Skip to Content

Configure GraphQL DataSource

Published: September 09, 2021

One of the core competencies of WunderGraph is GraphQL. You can introspect any GraphQL API and use it in your WunderGraph Application.

Once you have it introspected, pass it to the Application and you're good to go.

const countries = introspect.graphql({
url: "https://countries.trevorblades.com/",
source: IntrospectionPolicy.Network,
// You can add custom headers for APIs that require Authentication.
headers: {
Authorization: "Bearer token",
"CustomHeader": "value"
}
})

Product

Subscribe to our newsletter!

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

© 2021 WunderGraph