Skip to content

Fix: queryDeduplication from context#6526

Merged
benjamn merged 5 commits intoapollographql:version-2.6from
Kujawadl:version-2.6
Jul 20, 2020
Merged

Fix: queryDeduplication from context#6526
benjamn merged 5 commits intoapollographql:version-2.6from
Kujawadl:version-2.6

Conversation

@Kujawadl
Copy link
Copy Markdown
Contributor

@Kujawadl Kujawadl commented Jul 1, 2020

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.

@thomasobrienglobality
Copy link
Copy Markdown

Thanks for this @Kujawadl. We need this fix as well.

@Kujawadl
Copy link
Copy Markdown
Contributor Author

Kujawadl commented Jul 6, 2020

@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 benjamn added this to the Release 2.x milestone Jul 20, 2020
Copy link
Copy Markdown
Member

@benjamn benjamn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for picking this up and back-porting it to AC2 @Kujawadl! Sorry for the wait.

By the way, your commit fixing the tests was also useful over in #6261. I'm amazed that Git let me cherry-pick that commit across so many changes in repository structure.

@benjamn benjamn merged commit 173f4ce into apollographql:version-2.6 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.
@Kujawadl
Copy link
Copy Markdown
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 :)

@Kujawadl
Copy link
Copy Markdown
Contributor Author

Kujawadl commented Jul 29, 2020

@benjamn Any word on a 2.6.11 release? Sorry to be a bother 😅

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants