Problem
As a user I wish to validate the generated graphql schema with a set of graphQL queries.
Solution 1
Since #438 we now support loading multiple graphQL files. Which means that we can pass the queries as a part of the configurations more easily. We should just validate the queries that are in the graphQL files without and special check parameter.
The command would look a lot simpler now:
tc check ./jsonplaceholder.graphql query1.graphql query2.graphql
All the above options should be allowed to test the graphQL schema against the provided queries and mutations.
Solution 2
We will extend the check command on the CLI to support checking of the schema against provided queries and mutations:
# using operation parameter
tc check ./jsonplaceholder.graphql --operation query1.graphql --operation mutation1.graphql
# using comma as a delimiter
tc check ./jsonplaceholder.graphql --operation file1.graphql,file2.graphql
# using space as a delimeter
tc check ./jsonplaceholder.graphql --operation file1.graphql file2.graphql
All the above options should be allowed to test the graphQL schema against the provided queries and mutations.
Technical Requirements
- Use
ValidationError to capture and display all the errors.
- Errors should be composed with errors
from_config.
Problem
As a user I wish to validate the generated graphql schema with a set of graphQL queries.
Solution 1
Since #438 we now support loading multiple graphQL files. Which means that we can pass the queries as a part of the configurations more easily. We should just validate the queries that are in the graphQL files without and special check parameter.
The command would look a lot simpler now:
All the above options should be allowed to test the graphQL schema against the provided queries and mutations.
Solution 2
We will extend the check command on the CLI to support checking of the schema against provided queries and mutations:
All the above options should be allowed to test the graphQL schema against the provided queries and mutations.
Technical Requirements
ValidationErrorto capture and display all the errors.from_config.