drupal-graphql / drupal-graphql/graphql
How to prevent GraphQL from clearing the schema cache automatically when ConfigEntityBundle changes?
- Dominant language
- PHP
- Stars
- 287
- Forks
- 198
- PR merge metrics
- No merged PRs in 30d
Description
Hi guys, we are facing an extremely slow query after I save a webform or a paragraph type, for example. Is there a way somehow to prevent GraphQL from clearing the schema cache automatically when a `ConfigEntityBundle` changes?
I know that the schema is automatically generated and that's why you need to clear things when a content type changes, for example.
However, it doesn't make sense to clear it all when editors add or update webforms in the CMS.
Just as a side note... a simple query like this:
```
{
route(path: "/node/36676") {
path
}
}
```
takes 130ms to run but after adding an element to a webform.. the same query takes 11s in our case.
@kyuubi figured out that if we override `getCacheTags` in `SchemaPluginManager` to return an empty list achieves the outcome desired (avoid clearing the schema when a `ConfigEntityBundle` is updated)
Our question is:
From your knowledge of 3.x do you see any drawbacks to this approach?
Important note: we use persisted queries.
Thanks.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.