-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Allow useLazyQuery
trigger fn to change query
#10499
Conversation
🦋 Changeset detectedLatest commit: ac72e11 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
@@ -13,7 +13,7 @@ type OptionsUnion<TData, TVariables extends OperationVariables, TContext> = | |||
| MutationOptions<TData, TVariables, TContext>; | |||
|
|||
export function mergeOptions< | |||
TOptions extends OptionsUnion<any, any, any> | |||
TOptions extends Partial<OptionsUnion<any, any, any>> |
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.
This was necessary since LazyQueryHookOptions
does not 100% match any member of OptionsUnion
and this way it felt cleaner than adding LazyQueryHookOptions
to the union (which is in the shared utilities
folder and has no direct relation to the React hooks). This actually fixes a few things where before, mergeOptions
would return a OptionsUnion
instead of the correct type.
ded9019
to
bca49b9
Compare
We've pushed a few things to improve the reliability of our test suite recently that have helped, but unfortunately a flaky test still failed here, along with the bundlesize check which seems to be narrowly above the limit (feel free to increase it in I suspect that on the next CI run this will be 🍏 |
Yup, now it's green 🎉 |
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.
🚀
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.
Nice! I had one minor nit for the changelog verbage, but otherwise this looks great. Welcome to the team 🎉 🎉 🎉
Co-authored-by: Jerel Miller <[email protected]>
fixes #10496
Locally, many of the tests were erroring out for me - but independently of the
useLazyQuery
tests and even without my changes. So let's see what CI has to say about this.Checklist: