hypothesis-graphql icon indicating copy to clipboard operation
hypothesis-graphql copied to clipboard

Add a test server

Open Stranger6667 opened this issue 5 years ago • 2 comments

It will be really helpful to verify generated queries against a real GraphQL server

Stranger6667 avatar Apr 10 '20 16:04 Stranger6667

How does the requirements for this look?

One option is to build something using graphene which can for instance easily be used in FastAPI (via Starlette) but also used in other contexts such as for Django and flask through extensions.

Another one is if we exit the python ecosystem to use something like hasura or graphile, however it might not be worth the extra hassle with a larger toolchain required if we depend on these.

Hultner avatar Apr 14 '20 13:04 Hultner

I was thinking to have something similar to the Schemathesis's internal test server, so it can be used as a pytest fixture with some configuration (e.g. different schemas for different tests)

I think that the easiest way will be to use graphene with Fast API, I am really keen to try it out :)

Stranger6667 avatar Apr 14 '20 18:04 Stranger6667