-
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
breaking(nova-react-test-utils): add support for Relay #103
breaking(nova-react-test-utils): add support for Relay #103
Conversation
…to feature/improvedDecorator
…yloadGenerator for relay
…to feature/improvedDecorator
I like having I wouldn't mind having the |
This is how it works right now actually. Because we set the main field as |
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.
Forgot to complete this yesterday :)
Joint work with @jakobkhansen
In scope of this PR we add support for using Relay client with the Nova decorator and add a feature of specifying
query
needed to be run and way to pass result of that query to the component rendered in Story. Check the documentation that we added in README for more details about the features.Additionally we changed the structure of the package so that now users have access to same functions for both client but need to import from different paths. For example:
import { getNovaDecorator } from "@nova/react-test-utils"
orimport { getNovaDecorator } from "@nova/react-test-utils/relay"
import { getNovaDecorator } from "@nova/react-test-utils/apollo"
Same patterns applies for utilities for unit tests
To verify our work, we added more stories and tests in
packages/examples
now showcasing both GraphQL client variants