GraphQL query with variables cache issue

Greetings,

Iā€™m experiencing some strange behaviors when using the Content Delivery API.

I have 4 entities with basic fields (ā€œTitleā€, ā€œFieldā€, ā€œMakerā€ and ā€œCreation dateā€ which are all strings except the creation date):

And I query the third latest ones based on my custom creation date. So far, that works well:

But here is the problem: if I update my custom creation date on the entity 1 to make it later than the entity 4 (which was the latest) like this:

It just doesnā€™t show up on the query:

I suspect a cache issue as if Iā€™m changing the body query (like removing a field), I get the correct result:

I noticed that the problem seems to occur only when using GraphQL variables. So a workaround is to avoid them, I guess.

Thank you for telling me if itā€™s a real issue or if Iā€™m just doing something wrong :pray:

Weā€™re seeing stale responses as well. Publishing doesnā€™t help, nor does updating. We can ā€œseeā€ updated values if we delete the fork and re-create it, but thatā€™s the only way.

Thank you for your comment! You made me realize that the problem is not related to GraphQL variables as it can occur without using them.
And youā€™re right: creating a new entity does seem to refresh the cache.

hello @developpement and @chad

looks like a bug on our end, weā€™ll have a look and get back to you as soon as possible.

@developpement can you leave the records in the broken state and send over a link to the project so that we can have a look at the bug directly?

Or @chad if you have an example as well itā€™s very appreciated!

Sorry for this.

This issue is fixed! :confetti_ball: (But I cannot manage to edit my post to mark it as solvedā€¦)

1 Like