Last active
November 26, 2018 17:27
-
-
Save stubailo/0554b00cdbc84abe10211506c1a2419a to your computer and use it in GitHub Desktop.
How to use the ApolloMockingProvider in a storybook example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
storiesOf('TodoList', module) | |
.add('renders a list', () => { | |
const customResolvers = { | |
Todo: () => ({ | |
text: 'My todo item text', | |
}), | |
}; | |
return ( | |
<ApolloMockingProvider customResolvers={customResolvers}> | |
<TodoList /> | |
</ApolloMockingProvider>, | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment