Skip to content

How to prevent GraphQL from clearing the schema cache automatically when ConfigEntityBundle changes?  #994

Open
@carolpettirossi

Description

@carolpettirossi

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions