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

Validate the operation documents against the schema #4126

Closed
ardatan opened this issue Jul 5, 2022 · 0 comments
Closed

Validate the operation documents against the schema #4126

ardatan opened this issue Jul 5, 2022 · 0 comments

Comments

@ardatan
Copy link
Owner

ardatan commented Jul 5, 2022

We can use validate as it is but we need to consider the custom validation rules etc that user might be using.

Right now if the document has a field that is not available in the schema. They get the following error;

💥 🕸️  Mesh TypeError: Cannot read properties of undefined (reading 'name')
    at /home/ardat_000/Guild/graphql-mesh/node_modules/graphql/type/introspection.js:616:53
    at Array.some (<anonymous>)
    at Object.isIntrospectionType (/home/ardat_000/Guild/graphql-mesh/node_modules/graphql/type/introspection.js:616:29)
    at Object.Field (/home/ardat_000/Guild/graphql-mesh/node_modules/@graphql-codegen/typescript/index.js:425:25)
    at Object.enter (/home/ardat_000/Guild/graphql-mesh/node_modules/graphql/utilities/TypeInfo.js:391:27)
    at Object.visit (/home/ardat_000/Guild/graphql-mesh/node_modules/graphql/language/visitor.js:197:21)
    at /home/ardat_000/Guild/graphql-mesh/node_modules/@graphql-codegen/typescript/index.js:430:38
    at Array.forEach (<anonymous>)
    at includeIntrospectionTypesDefinitions (/home/ardat_000/Guild/graphql-mesh/node_modules/@graphql-codegen/typescript/index.js:430:15)
    at Object.plugin (/home/ardat_000/Guild/graphql-mesh/node_modules/@graphql-codegen/typescript/index.js:399:38)
@Urigo Urigo mentioned this issue Aug 11, 2022
22 tasks
@ardatan ardatan closed this as completed Mar 31, 2023
This was referenced Apr 30, 2024
This was referenced May 7, 2024
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

1 participant