Fix: queryDeduplication from context#6526
Merged
benjamn merged 5 commits intoapollographql:version-2.6from Jul 20, 2020
Kujawadl:version-2.6
Merged
Fix: queryDeduplication from context#6526benjamn merged 5 commits intoapollographql:version-2.6from Kujawadl:version-2.6
benjamn merged 5 commits intoapollographql:version-2.6from
Kujawadl:version-2.6
Conversation
|
Thanks for this @Kujawadl. We need this fix as well. |
Contributor
Author
|
@benjamn sorry to bug you, just wanted to make sure this didn't fall off your radar over the holiday weekend. There's a lot of new and updated tests here, but the fix itself is really small, so I was hoping this could get released as a 2.6 fix at some point. I've got a meeting tomorrow to discuss workarounds with our team in the meanwhile, but let me know if there's anything I can do to get this released. |
benjamn
approved these changes
Jul 20, 2020
benjamn
added a commit
that referenced
this pull request
Jul 20, 2020
Use context.queryDeduplication if provided. Similar to #6526, but for AC3 instead of AC2.
benjamn
added a commit
that referenced
this pull request
Jul 20, 2020
spong
added a commit
to elastic/kibana
that referenced
this pull request
Jul 22, 2020
## Summary When using the `useFetchIndexPatterns` hook multiple times within a component (e.g. add_exception_modal & edit_exception_modal), the `apolloClient` will perform `queryDeduplication` and prevent the first query from executing. A deep compare is not performed on `indices`, so another field must be passed to circumvent this. For all the lovely details, see apollographql/react-apollo#2202 Note: As of yesterday, [support has been added](apollographql/apollo-client#6526) for configuring `queryDeduplicating` via `context`. This is available in `apollo-client` `2.6`, so when upgrading (currently on `2.3.8`) we can swap out this workaround to leverage this functionality. Note II: This [link](https://www.apollographql.com/docs/link/links/dedup/#context) may also be an option after upgrading to a supported version.
spong
added a commit
to spong/kibana
that referenced
this pull request
Jul 22, 2020
…c#72770) ## Summary When using the `useFetchIndexPatterns` hook multiple times within a component (e.g. add_exception_modal & edit_exception_modal), the `apolloClient` will perform `queryDeduplication` and prevent the first query from executing. A deep compare is not performed on `indices`, so another field must be passed to circumvent this. For all the lovely details, see apollographql/react-apollo#2202 Note: As of yesterday, [support has been added](apollographql/apollo-client#6526) for configuring `queryDeduplicating` via `context`. This is available in `apollo-client` `2.6`, so when upgrading (currently on `2.3.8`) we can swap out this workaround to leverage this functionality. Note II: This [link](https://www.apollographql.com/docs/link/links/dedup/#context) may also be an option after upgrading to a supported version.
spong
added a commit
to spong/kibana
that referenced
this pull request
Jul 22, 2020
…c#72770) ## Summary When using the `useFetchIndexPatterns` hook multiple times within a component (e.g. add_exception_modal & edit_exception_modal), the `apolloClient` will perform `queryDeduplication` and prevent the first query from executing. A deep compare is not performed on `indices`, so another field must be passed to circumvent this. For all the lovely details, see apollographql/react-apollo#2202 Note: As of yesterday, [support has been added](apollographql/apollo-client#6526) for configuring `queryDeduplicating` via `context`. This is available in `apollo-client` `2.6`, so when upgrading (currently on `2.3.8`) we can swap out this workaround to leverage this functionality. Note II: This [link](https://www.apollographql.com/docs/link/links/dedup/#context) may also be an option after upgrading to a supported version.
spong
added a commit
to elastic/kibana
that referenced
this pull request
Jul 22, 2020
#72785) ## Summary When using the `useFetchIndexPatterns` hook multiple times within a component (e.g. add_exception_modal & edit_exception_modal), the `apolloClient` will perform `queryDeduplication` and prevent the first query from executing. A deep compare is not performed on `indices`, so another field must be passed to circumvent this. For all the lovely details, see apollographql/react-apollo#2202 Note: As of yesterday, [support has been added](apollographql/apollo-client#6526) for configuring `queryDeduplicating` via `context`. This is available in `apollo-client` `2.6`, so when upgrading (currently on `2.3.8`) we can swap out this workaround to leverage this functionality. Note II: This [link](https://www.apollographql.com/docs/link/links/dedup/#context) may also be an option after upgrading to a supported version.
spong
added a commit
to elastic/kibana
that referenced
this pull request
Jul 22, 2020
#72784) ## Summary When using the `useFetchIndexPatterns` hook multiple times within a component (e.g. add_exception_modal & edit_exception_modal), the `apolloClient` will perform `queryDeduplication` and prevent the first query from executing. A deep compare is not performed on `indices`, so another field must be passed to circumvent this. For all the lovely details, see apollographql/react-apollo#2202 Note: As of yesterday, [support has been added](apollographql/apollo-client#6526) for configuring `queryDeduplicating` via `context`. This is available in `apollo-client` `2.6`, so when upgrading (currently on `2.3.8`) we can swap out this workaround to leverage this functionality. Note II: This [link](https://www.apollographql.com/docs/link/links/dedup/#context) may also be an option after upgrading to a supported version.
Contributor
Author
|
I saw that this got released to @apollo/client@3.1.0-pre.0, is there any chance we could get a 2.6.11 release as well? Thanks so much for all your help :) |
Contributor
Author
|
@benjamn Any word on a 2.6.11 release? Sorry to be a bother 😅 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the same as #6261, except with the target branch set to version-2.6 in the hopes that we can get a 2.6 release with this included. Our team is not ready to transition to v3, but we still need this bug fixed.
Please let me know if this isn't typically how things are done here.