Skip to Content

GraphQL DataSource

Published: 2022-05-24

The GraphQL DataSource allows you to connect any compatible GraphQL Server. WunderGraph supports Queries, Mutations as well as Subscriptions.

Linking Fields#

Besides simply supporting GraphQL as a DataSource, you can combine and stitch multiple GraphQL schemas. You can nest different GraphQL schemas within eachother and add Links between fields of different schemas, allowing you to join different DataSources.

Upstream Security#

To be able to protect your origins, it's possible to inject Headers into upstream requests. This way, you can add static API keys to upstream requests to prevent bypassing the API exposed by WunderGraph.


For authenticated users, WunderGraph might be making requests on behalf of a user. To be able to process user-based requests, WunderGraph can inject a JWT with information like username and email into the upstream request. By sharing a secret between WunderGraph and your upstream, you can always validate in the origin that a request is coming from an API proxied by WunderGraph. Using JWT in this scenario allows you to implement stateless backends, e.g. using Serverless technologies, while WunderGraph manages authentication and login states.

All this allows you to get maximum flexibility without a complex implementation. Add a JWT middleware, share the secret with the WunderGraph API, done.



Subscribe to our newsletter!

Stay informed when great things happen! Get the latest news about APIs, GraphQL and more straight into your mailbox.

© 2022 WunderGraph