Download tutorial as e-book ⚡️
Loading...
Hasura Con
Workshop | June 30, 2022 | 08:00 AM PST
Learn how to use Hasura from the engineers who built it! Join our live workshop
Register Now
Hasura Con

Add Remote Schema

We have written the custom resolver and deployed it to Glitch. We have the GraphQL endpoint ready. Let's add it to Hasura as a remote schema.

Add

Head to the Remote Schemas tab of the console and click on the Add button.

Add remote schema

Give a name for the remote schema (let's say auth0). Under GraphQL Server URL, enter the glitch app url that you just deployed in the previous step.

Select Forward all headers from the client and click on Add Remote Schema.

Try it out

Head to the Console GraphiQL tab and explore the following GraphQL query.

query {
auth0 {
email
picture
}
}

Remember the JWT token that we got after configuring Auth0 and testing it out? Here you also need to pass in the Authorization header with the same JWT token to get the right data.

remote schema query

As you can see, Hasura has merged the custom GraphQL schema with the already existing auto-generated APIs over Postgres.

Did you find this page helpful?
Start with GraphQL on Hasura for Free
  • ArrowBuild apps and APIs 10x faster
  • ArrowBuilt-in authorization and caching
  • Arrow8x more performant than hand-rolled APIs
Promo
footer illustration
Brand logo
© 2022 Hasura Inc. All rights reserved
Github
Titter
Discord
Facebook
Instagram
Youtube
Linkedin