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

Pass mutation options to handlers #10052

Conversation

MrDoomBringer
Copy link
Contributor

Implementation of the changes originally proposed in #6238, but fit for our current codebase. This PR passes mutation options into the onError and onCompleted hooks. See the previous PR for some discussion on the topic.

Tests have been updated to reflect this feature

Checklist:

  • If this PR is a new feature, please reference an issue where a consensus about the design was reached (not necessary for small changes)
  • Make sure all of the significant new logic is covered by tests

Copy link
Member

@hwillson hwillson left a comment

Choose a reason for hiding this comment

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

This is awesome @MrDoomBringer - would you mind adding a CHANGELOG entry about this (in this PR) as well?

@MrDoomBringer
Copy link
Contributor Author

Done!

@MrDoomBringer MrDoomBringer merged commit 66b951f into apollographql:main Sep 2, 2022
@sjwilczynski
Copy link

@hwillson, @MrDoomBringer do you think it would be possible to add context to onCompleted and onError callbacks in useQuery options? As we are logging some information in these callbacks, we would love to have access to context in them to add the properties from context to our logs

@jpvajda jpvajda added this to the v3.x.x patch releases milestone Sep 29, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 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.

None yet

4 participants