-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kitchen sink HTTP requests #228
Comments
There have been multiple discussions and proposals of how a test suite for spec complicance could look like. For instance, there is this issue which proposes extending express-graphql: #114. I also gathered feedback from the working group on how a test suite could look like in #57 (comment). |
graphql-http contains a suite of tests to audit a server and check the compliance. You can integrate it into your test runner as simple as this. Also worth mentioning, a few implementations are already tested in the repo and you can see their reports here. |
https://github.com/enisdenjo/graphql-http looks awesome, thanks @enisdenjo. I found the repository to be well-structured and the test suite to be quite comprehensive. |
Would it make sense to create a collection of HTTP requests that represent common combinations of header values, validation failures, etc. and their expected status code / response headers according to this specification?
I'm thinking of either a collection of cURL scripts or an executable that you could point towards a GraphQL HTTP endpoint and assert that it is handling the cases described by the spec correctly.
Server maintainers could transfer these cases to their integration test sweet and other folk could use it to test an existing server for compliance.
I don't think it makes sense for every server maintainer to come up with all of the possible cases to test (especially with backwards compatibility), when there could be a programming language agnostic test suite as reference.
The text was updated successfully, but these errors were encountered: