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.

Close

Get Started with GraphQL Now

Hasura Cloud gives you a fully managed, production ready GraphQL API as a service to help you build modern apps faster.
Ready to get started?
Start for free on Hasura Cloud or you could contact our sales team for a detailed walk-through on how Hasura may benefit your business.
Stay in the know
Sign up for full access to our community highlights, new features, and occasional baby animal gifs! Oh, and we have a strict no-spam rule. ✌️