Skip to content
Snippets Groups Projects
Select Git revision
  • 3443411-add-.graphql-file
  • 2.0.x default
  • 8.x-1.x
  • 8.x-1.0-alpha4
  • 2.0.3
  • 2.0.2
  • 2.0.1
  • 2.0.0
  • 8.x-1.0-alpha3
  • 8.x-1.0-alpha2
  • 8.x-1.0-alpha1
11 results

README.md

Blame
  • 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).