Headers Authorization token parameter to create connector GraphqlClient
charlitoro opened this issue · 2 comments
charlitoro commented
In my project use AWS Cognito form my users, I have a graphql api with GQLify in AWS Lambda. I get the idToken to authentication but I don't know how send this token in the parameters when y create de connector GraphqlClient.
This is my configuration:
import {GraphqlClient} from 'canner-graphql-interface';
export const configGraphqlClient = (uri: any, idToken: any) => {
return new GraphqlClient({
uri,
credentials: 'same-origin',
headers: {
Authorization: idToken,
}
})
}
But this configuration don't work.
charlitoro commented
this configuration it work, i had a problem with the incorrect api, sorry
abz53378 commented
Thanks for your report! It's resolved, so I close it.