I'm curious as to how people handle writing tests for GraphQL, at least with GraphQL Go. Spin up mock server, post query, validate response?
-
Show this thread
-
I guess it's more the depth of testing. You can call the Resolver functions directly for testing purposes but that feels half-assed.
2 replies 0 retweets 1 likeShow this thread -
Replying to @kwuchu
This is JS so take with a grain of salt, but we don't mock anything. DB running in background then just call graphql(query), match result. Done.
3 replies 0 retweets 2 likes -
We like to have at least one integration test that calls graphql(query). Then many tests that hit resolver function directly
2 replies 0 retweets 2 likes
as with all things: balance. Our context setup for graphql is non-trivial so nice to not always have that overhead.
8:55 AM - 1 Nov 2017
0 replies
0 retweets
2 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.