hasura / learn-graphql

Real world GraphQL tutorials for frontend developers with deadlines!
https://hasura.io/learn/
MIT License
1.19k stars 648 forks source link

learn: Hasura backend tutorial [remote-schemas] #5

Closed waptik closed 4 years ago

waptik commented 4 years ago

In remote-schemas, the demo app is not working as it should. On glitch, this query

# Write your query or mutation here
query {
  auth0 {
    email,
    picture
  }
}

displays some errors.

praveenweb commented 4 years ago

@waptik - The query is supposed to be made from a client with the right Authorization headers set. In case you want to try it out in GraphQL Playground, do send in the header with Auth0 idToken and you should be able to get a response.

waptik commented 4 years ago

@waptik - The query is supposed to be made from a client with the right Authorization headers set. In case you want to try it out in GraphQL Playground, do send in the header with Auth0 idToken and you should be able to get a response.

Ok. Also in the example, the video displayed how to access the query from hashura's GraphiQl UI. I also set the Authorization header but i get the following error:

{
  "errors": [
    {
      "extensions": {
        "path": "$",
        "code": "jwt-invalid-claims"
      },
      "message": "claims key: 'https://hasura.io/jwt/claims' not found"
    }
  ]
}
praveenweb commented 4 years ago

@waptik - Have you configured the jwt claims in Auth0? This is the relevant step - https://learn.hasura.io/graphql/hasura/authentication/2-custom-jwt-claims-rule

waptik commented 4 years ago

Yes, I did. IMG_20190914_101146

alizhdanov commented 4 years ago

Hey @praveenweb, I see hacktoberfest tag. But what exactly should be done? Just add more human-readable error, that Authorization token is missing? It should be helpful for beginners.

nik72619c commented 4 years ago

Yes, I'd love to take this one up. Kindly guide me with this if this is still open to take it !

praveenweb commented 4 years ago

Unable to reproduce this. Closing this now.