Redwood Graphql Authorization with supabase

hey, i am using supabase auth, aslo have generated gql apis, now i want to use the graphql playground, and test out some queries and mutations, how i can be authenticated, like i know i have to add Authorization header, but which token to pass in that, while using supabase for auth?

Hi @MeetChaudhari we have a PR to help to do exactly this and that is soon to be merged:

Have a look at the docs and code to see how it adds the headers, but in until this util is available you need to pass headers for:

  • auth-provider: supabase
  • Authorization: Bearer

For now, use your app and inspect the Network tab of the graphql request in your browser and copy those headers into the header section of GraphiQL.

1 Like