Appsync Client
A lightweight Appsync client that signs requests for you (using IAM permissions) - perfect for running on Lambdas or servers.
Queries are made using
TypedDocumentNode
which means that the variables and results will be automatically typed for you
if using Typescript.
Use
import AppsyncClient from "appsync-client";
async function getTodo() {
const client = new AppsyncClient({
apiUrl: "https://xxx.appsync-api.xx-xxxx-x.amazonaws.com/graphql",
accessKeyId: "",
secretAccessKey: "",
sessionToken: ""
});
const res = await client.request({
query: TypedDocumentNodeQuery,
variables: {
id: "todoId"
}
);
}
Checklist
CD Feature | Provided |
---|
✅ | Typescript |
✅ | Linting (AirBnB + Prettier) |
✅ | Unit tests (Jest) |
✅ | 100% test coverage |
✅ | Github Continuous Deployment |