The "default:default" plugin does not exist.

Created on 24 September 2020, over 4 years ago
Updated 26 August 2023, over 1 year ago

Problem/Motivation

Exporting the GraphQL schema with `drush cex`
I have enabled the module and added a location for the GraphQL schema to be exported.
I am getting this error:
Error: The "default:default" plugin does not exist. Valid plugin IDs for Drupal\graphql\Plugin\SchemaPluginManager are:.

Steps to reproduce

- Set the filepath on settings.php to a location, i.e:
$settings['graphql_export'] = [
'file' => 'sites/default/files/_drupal_schema.json'
];
- Drun `drush cex`
- Error: The "default:default" plugin does not exist. Valid plugin IDs for Drupal\graphql\Plugin\SchemaPluginManager are:.

Is there any further step I may be missing?
I have tried to set the location to the one exposed on the module page, this is:
'file' => __DIR__ . '/../../../../react/src/graphql/_drupal_schema.json'

But I am getting another error, even if I create the actual file:
The graphql_export is configured to write to /app/web/sites/default/../../../../react/src/graphql/_drupal_schema.json, but /app/web/sites/default/../../../../react/src/graphql doesn't exist or is not a folder.

Any idea what I might be missing?
Thanks,
Juan

🐛 Bug report
Status

Closed: outdated

Component

Code

Created by

🇬🇧United Kingdom jfcolomer

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇦🇺Australia almunnings Melbourne, 🇦🇺

    Hi,
    New maintainer here.
    I'm not actively going to develop on the 8.x branch - But looking at the code, I can offer some... 3 year late advice!

    default:default is the name of the schema it is trying to load. The README wasnt very explicit here.

    You can change the schema name using

    $settings['graphql_export'] = [
      'file' => '../whatever',
      'schema' => 'YOUR_SCHEMA_ID',
    ];
    

    The error you have looks like your graphql schema doesnt exist, or you could have a weird caching issue.

    Either way, I hope this support finds you well.
    I'm closing the ticket as outdated.

Production build 0.71.5 2024