-
Notifications
You must be signed in to change notification settings - Fork 25
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
fix(nova-react-test-utils): bump relay, relax generate types in relay case, add example and docs for working with client extensions #127
Conversation
mockClientData: true, | ||
generateDeferredPayload: true, // this makes sure mock data is array of deferred payloads, not a single response |
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.
Wouldn't people want this for most use cases? I'm thinking it would be nice to make this the default behavior.
Could we expose a default generateFunction
from @nova/react-test-utils/relay
that does exactly this?
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.
Fair point but my take is that we shouldn't. I still want to solve it properly in scope of #125 which will require some changes in artefacts generated by the compile. Graphitation's payload generator is much better in terms generation when mock resolvers are not specified, relay's one is just buggy. Even if you check test cases in relay-test-utils
a lot of snapshots just don't make sense
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.
Even if you check test cases in relay-test-utils a lot of snapshots just don't make sense
Probably our brother GPT that made them 🙃
Yes, let's not do this yet.
In scope of this PR we:
generateFunction
so that one can use relay'sMockPayloadGenerator
without type issues (which was the case in 1JS)