Replies: 1 comment
-
Adding issue pertaining to current Nexus testing challenges: https://github.com/graphql-nexus/nexus/issues/1326 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have created a PR in the "examples" repo that contains a new
plugins-prisma-and-jwt-auth-and-shield-piecemeal
folder. The project in this folder is a one-off ofplugins-prisma-and-jwt-auth-and-shield
and illustrates how to put Nexus under test, while also avoiding a monolithicQuery
orMutation
file. Each query and mutation is broken out into an individual file and has a unique "spec".Unfortunately, one major testing challenge is that with so many test files, you can NOT run the tests successfully unless using
jest --runInBand
. Even with this setting, tests CAN fail from time to time if the DB gets bogged down or responds too slowly.Additionally, there are some challenges accessing
ctx
properties added by runtime plug-ins. Possibly, plugins should have a more symmetrical setup and have a destroy options to teardown any objects created in a plugins create step?If anyone has any feedback, I'd be greatly interested!
prisma-labs/graphql-framework-experiment-examples#89
Beta Was this translation helpful? Give feedback.
All reactions