GraphQL query with variables cache issue


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