-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Only dedupe pagination queries if the variables match #1378
Conversation
🦋 Changeset detectedLatest commit: d401396 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for houdini-docs-next ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for houdinigraphql ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm this doesn't seem to be doing any deduping at all, regardless of what params I give it...
I'll try to add a small repro in the e2e over the weekend
Can we also either have the option to opt in/out of dedupe behaviour? Or at least disable it for SSR? |
@half2me it should only be automatically deduping pagination queries. are you seeing something different? |
Yes I am. Since I upgraded to this, a lot of tests started failing with the server returning status This definitely has something to do with multiple requests hitting the same page, since if I disable parallel workers for my tests, and run them just one at a time, they all work fine. Its only when simultaneous requests hit the same page that they break., |
@SeppahBaws i think i fixed what was wrong @half2me i added a new config value |
Amazing, I will rerun the tests and let you know. @AlecAivazis is there an easy way I can pin the |
Ah awesome, I'll give this a shot once it's calmed down a bit more at work... @half2me you can clone and build the repo locally, and then link it locally to your repo with (on npm you can also specify the package version as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
This PR adds a new argument to the
@dedupe
directive:match
which takes 3 values:Variables
,Operation
, andNone
. This gives the user more fine-grained control over how the deduping happens. Most importantly, for paginated queries,@dedupe
comes withmatch
set toVariables
.To help everyone out, please make sure your PR does the following:
pnpm run tests
andcd integration && pnpm run tests
pnpm changeset