Created
August 22, 2019 20:00
-
-
Save rxgx/0e8c5fe012d56b30865944c2c49e7283 to your computer and use it in GitHub Desktop.
GraphQL request client
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { GraphQLClient } from 'graphql-request'; | |
import authn from 'clients/authn'; | |
import config from 'config'; | |
const accessToken = authn.getToken('access_token'); | |
const idToken = authn.getToken('id_token'); | |
const graphQLClient = new GraphQLClient(config.apiGatewayUrl, { | |
headers: { | |
Authorization: accessToken, | |
id: idToken, | |
}, | |
}); | |
export default graphQLClient; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment