Skip to content

Validate Operations against GraphQL schema #1741

@mbroecheler

Description

@mbroecheler

Currently, any graphql files provided as operations are not validated against the GraphQL schema but converted to operations for the server as they are defined. This can cause runtime errors in the server when it tries to execute an invalid query.

We want to validate the queries at compile time:

  • create a non-executable schema from the inferred or provided graphql schema
  • ParseAndValidate: output any validation errors and fail the compilation

Here is ChatGPT sketch of the necessary code.
Note, that we need to do this for each schema version (if there are multiple).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions