
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
graphql-request-appsync-iam
Advanced tools
Extension of graphql-request that can be used to make calls to an AppSync API using IAM authorization.
Extension of graphql-request that can be used to make calls to an AppSync API using IAM authorization.
AWS AppSync provides the ability to authenticate GraphQl requests using IAM credentials. However, to do so you need to calculate a special signature and include it in the request headers. This library provides a function to give you a graphql-request client that will calculate and include the proper signature at request time.
npm install graphql-request-appsync-iam
import { getGraphQLClient } from 'graphql-request-appsync-iam';
const url =
'https://wvMQY3gdydNyvEJaJisxLymPbb.appsync-api.us-east-1.amazonaws.com/graphql';
// client is an instance of graphql-request's GraphQLClient
const client = getGraphQLClient(url);
const query = `
query getMovie {
Movie(title: "Inception") {
releaseDate
actors {
name
}
}
}
`;
const data = await graphQLClient.request(query);
By default, the library uses the credentials and region specified in the global
AWS.config
object. You can override these settings via the awsCredentials
and awsRegion
options. You can also pass in any other options to
GraphQLClient
's constructor, except for fetch
. Putting that all together:
import { getGraphQLClient } from 'graphql-request-appsync-iam';
const url =
'https://wvMQY3gdydNyvEJaJisxLymPbb.appsync-api.us-east-1.amazonaws.com/graphql';
const client = getGraphQLClient(url, {
awsCredentials: {
accessKeyId: 'asdfasdfd',
secretAccessKey: 'asdfasdfd',
sessionToken: 'asdfasdf',
},
awsRegion: 'us-east-1',
timeout: 60,
});
4.0.0 (2025-04-28)
FAQs
Extension of graphql-request that can be used to make calls to an AppSync API using IAM authorization.
We found that graphql-request-appsync-iam demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.