Better error handling for invalid schemas
See original GitHub issueNot sure if this is an issue with graphql-let or @graphql-codegen, but if you have an error with your schema, the only error message is [ graphql-let ] Failed to load schema
. Is there a way a more detailed error that could be exposed? (eg line number of the error)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Handling Validation Errors - python-jsonschema
When an invalid instance is encountered, a ValidationError will be raised or returned, depending on which method or function is used. In case...
Read more >Schema Validation and Error Handling - Sample Use Cases
This sample demonstrates the schema validation and error handling capabilities ... The configuration specifies a service level error handler and the invalid ......
Read more >Error handling - Apollo GraphQL Docs
The GraphQL operation is not valid against the server's schema. BAD_USER_INPUT. The GraphQL operation includes an invalid value for a field argument.
Read more >Understanding schema errors | HESA
1) Invalid values. In these examples the error message states that the value returned is invalid. · 2) Invalid child elements · 3)...
Read more >8.7.2 Validating (Compiling) Invalid Schema Objects
Schema objects (such as triggers, procedures, or views) might be invalidated when changes are made to objects on which they depend. For example,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Running v0.10.0
My invalid schema.d.ts
graphql-let gives me the error:
[ graphql-let ] Failed to load schemaError: Failed to load schema
Testing with other GraphQL tools (ApolloServer and graphql-tag) both give the error
Error: Unknown type "string". Did you mean "String"?
While developing with
graphql-let
I’m finding myself constantly copying my schema into other tools just to get a more meaningful error message. It would be extremely useful ifgraphql-let
had similar error messages.@piglovesyou The use case I specified above is not solved with version v0.11.1, I still receive the exact same output when graphql-let is loading my schema. I believe @salzhrani PR only handles GraphQL errors during the .d.ts generation, but the error I’m getting is in the initial schema load.
But I am getting much better error messages for my documents 🥳