DEV Community

Dhruba Patra
Dhruba Patra

Posted on

Using GraphQL in Voiden

Voiden gives you two flexible ways to work with GraphQL so you can focus on writing and testing queries with confidence.
Both approaches let Voiden fully understand your types, queries, mutations, and subscriptions.

Importing a GraphQL Schema File

You can import a GraphQL schema file such as .graphql or .gql directly into Voiden.

When you do this:

  • Voiden reads all types, queries, mutations, and subscriptions from the schema
  • The schema becomes available locally and works well in offline scenarios
  • You get a stable, version-controlled setup that aligns nicely with Git workflows

This approach is ideal when you already have the schema file and want full control over it.

Using GraphQL Introspection

Alternatively, you can provide a GraphQL endpoint URL to Voiden.

In this case :

  • Voiden make an introspection query to the GraphQL server
  • The server returns all available types, queries, mutations, and subscriptions
  • Voiden automatically loads this information so you can start querying immediately

This option is perfect for quickly exploring a live GraphQL API or when the schema file is not available locally.

Use GraphQL in our beta version : https://voiden.md/beta

Top comments (0)