GraphQL Connector
Introduction
Using the Hasura GraphQL Connector, you can instantly bring an existing GraphQL API into a Hasura DDN supergraph API.
The GraphQL Connector replaces the Remote Schemas functionality from Hasura v2 and can also be used to bring in an existing Hasura v2 GraphQL API into Hasura DDN.
The connector translates the root-fields of a GraphQL schema to NDC functions and procedures. This results in your GraphQL root fields being exposed as commands in the supergraph. This simplifies implementation and acts as a proxy more than a model.
The recent support for field arguments and header forwarding on Hasura v3 engine allow the connector to represent the majority of queries and mutations.
The connector is built using the Rust Native Data Connector SDK and implements the Native Data Connector Spec.
Features
Below, you'll find a matrix of all supported features for the GraphQL connector:
Feature | Supported | Notes |
---|---|---|
Queries | ✅ | All features that v3 engine currently supports |
Mutations | ✅ | |
Header Passthrough | ✅ | Entire headers can be forwarded |
Subscriptions | ❌ | |
Unions | ❌ | Can be brought in via scalar types |
Interfaces | ❌ | |
Relay API | ❌ | |
Directives | ❌ | @cached, Apollo directives |
Getting started
To get started with the GraphQL Data Connector, you can follow the guide here.
If you've never used Hasura DDN, we recommend that you first go through the getting started. 😊