Skip to content
Snippets Groups Projects
Forked from project / graphql_export
7 commits behind, 1 commit ahead of the upstream repository.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.

GraphQL Export

GraphQL Export enables exporting your GraphQL 4.x schemas to a file.

This module enables:

  • Admin Web UI for exporting.
  • Drush config:export hook for exporting GraphQL 4.x schemas on config export.

Web UI

This module will also expose a simple interface at /admin/config/graphql/servers/manage/SERVER_MACHINE_ID_HERE/export where you can see and manually export the schema.

Exporting with Drush

Add the following to your settings.php:

$settings['graphql_export'] = [
  'SERVER_MACHINE_ID_HERE' => [
    'graphqls' => '../schema.graphqls',
    'json' => '../schema.json',
  ],
];

You can change the file path to whatever you like, as long as the path is writable by Drupal when exporting your config.

When you're ready, just run drush config:export (or drush cex if you hate typing) and the full introspection result will be put into the specified file(s).