CannerCMS/cannercms

Headers Authorization token parameter to create connector GraphqlClient

charlitoro opened this issue · 2 comments

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.

this configuration it work, i had a problem with the incorrect api, sorry

Thanks for your report! It's resolved, so I close it.