Skip to content

[5.9]: globalSet cache invalidation #18479

@soerenmeier

Description

@soerenmeier

What happened?

Description

Since 5.9.0 the graphql cache is not invalidated if a globalSet is updated.

Steps to reproduce

1.Install 5.8.23
2. Create a new globalSet (myGlobals)
3. Add a field to it (text)
4. enable graphql and enable permission for site and myGlobals
5. set the content of the text
6. query the text:

curl -X POST http://mysite.site/actions/graphql/api   -H "Content-Type: application/json"   -d '{ "query": "query { globalSet(handle: \"myGlobals\") { ... on myGlobals_GlobalSet { text } } }" }'
  1. update the global field
  2. query the text again
  3. text response gets updated successfully
  4. update to 5.9.*
  5. update text field again
  6. run the query again

Expected behavior

The updated text should be returned.

Actual behavior

The same text gets returned.

The same occurs on 5.9.14, this does not occur in the graphiQL.

Craft CMS version

5.9.0

PHP version

8.2.20

Operating system and version

Ubuntu (Ddev)

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions