Skip to content
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

Closed
tobias-tengler opened this issue Sep 12, 2022 · 3 comments
Closed

Kitchen sink HTTP requests #228

tobias-tengler opened this issue Sep 12, 2022 · 3 comments

Comments

@tobias-tengler
Copy link

tobias-tengler commented Sep 12, 2022

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.

@spawnia
Copy link
Member

spawnia commented Nov 1, 2022

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).

@enisdenjo
Copy link
Member

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.

@spawnia
Copy link
Member

spawnia commented Mar 21, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants