Skip to content

Conversation

akhomy
Copy link
Contributor

@akhomy akhomy commented Aug 31, 2022

Issues:

  • When I tried to disable introspection locally I faced an issue that it is working for the GraphQL Explorer, this is an inconsistency. Because, it isn't working when you call it outside Drupal, but is working inside Drupal. Whenever the introspection is disabled either in the UI or using config overrides it should not work in the GraphQL Explorer.
    After closer debugging, I found out that routing provides Server entity without overrides of configs. A similar issue in the search _api - https://www.drupal.org/project/search_api/issues/2690373.
  • After checking graphql.routing.yml I found out that we're using route param conversion, which isn't necessary if the param and entity machine name is identical and handled by the internal Drupal logic. See https://www.drupal.org/docs/8/api/routing-system/parameters-in-routes/how-upcasting-parameters-works

Settings example

// Disable introspection.
$config['graphql.graphql_servers.example_schema']['disable_introspection'] = TRUE;

Proposal

  • Clean up graphql.routing.yml and remove unnecessary routing param conversion.
  • Add with_config_overrides: TRUE to every route using the needed parameters.

Scope:

  • Removes unnecessary params conversion as entity name used and is working due to the internal upcasting logic.
  • Provides for the explorer, voyager, validate routes config overrides entities in order to have consistency.

…ed and is working due to the internal upcasting logic. Provides for explorer, voyager, validate routes config overrides entities in order to have consistency.
Copy link
Contributor

@klausi klausi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks!

@klausi klausi merged commit dedd45c into drupal-graphql:8.x-4.x Sep 12, 2022
klausi pushed a commit to klausi/graphql that referenced this pull request Sep 21, 2023
…se route config overrides entities in order to have consistency. (drupal-graphql#1304)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants