Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip using the GraphQL cache if a token is passed #5673

Closed
wants to merge 1 commit into from

Conversation

DanielDarrenJones
Copy link
Contributor

@DanielDarrenJones DanielDarrenJones commented Mar 28, 2022

If a token is passed in the request we want to avoid using the cache so that our live preview can display the changed results, we need to perform this logic both in the get method to actually ensure we skip the cache when getting the value, but also in the put so that we don't override the standard cache with our temporary values.

Fixes #5389

If a token is passed in the request we want to avoid using the cache so that our live preview can display the changed results, we need to perform this logic both in the get method to actually ensure we skip the cache when getting the value, but also in the put so that we don't override the standard cache with our temporary values.
@DanielDarrenJones DanielDarrenJones marked this pull request as ready for review March 28, 2022 17:09
@jasonvarga
Copy link
Member

Thanks but this isn't quite enough. It needs to be a valid token, otherwise anyone could slap ?token=whatever onto the graphql route and bypass the cache. It also needs to support being able to pass the token through a header.

I'll address it in a separate PR. Thanks!

@jasonvarga jasonvarga closed this Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GraphQL queries with token shouldn't be cached
2 participants