Skip to content

Dummy data on third party graphql query? #27614

Answered by herecydev
Blakeinstein asked this question in Help
Discussion options

You must be logged in to vote

I've had great success with mocking the useStaticQuery to return dummy data. If you use page Queries you can pass in a data prop with the dummy data as well. This works well for a simple schema, if you have a lot of custom resolvers the complexity can become somewhat problematic but none-the-less usable.

There's some great info on this page: https://www.gatsbyjs.com/docs/unit-testing/#mocking-gatsby

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by LekoArts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants