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

Provide a clear and easy way to do an integration test #478

Open
2 tasks
maxime-rainville opened this issue Jun 22, 2022 · 2 comments
Open
2 tasks

Provide a clear and easy way to do an integration test #478

maxime-rainville opened this issue Jun 22, 2022 · 2 comments

Comments

@maxime-rainville
Copy link
Contributor

You can define a schema in YML right now, but you don't have a quick way to test the outcome and the results you'll get out of your schema.

The closest example we have right now is in IntegrationTest.php. Even then, there's a lot of boiler plate to get through to do simple queries.

In a perfect world, you would have a straight forward way of saying, "given I run this query, against this schema, I assert I will receive these results."

Acceptance criteria

  • There's clear guidance for developers who want to write integration test for their GraphQL schema.
  • There's a simple to use API that makes this process easy.
@GuySartorelli
Copy link
Member

@maxime-rainville
Copy link
Contributor Author

graphql-devtools doesn't let you run this as PHPUnit test.

I've got an example of what I'm talking about on my AnyField GraphQL test.

Basically, what I would like to have is an easy way to assert that when you run a specific GraphQL query you get a specific results.

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

No branches or pull requests

2 participants