graphql-php
graphql-php copied to clipboard
Error Reporting
Is there already or can you folks please add a way for the graphql method to return errors when a query does not match the schema?
Example
Schema: type Query { category(id: [Int]!): [Category] <- expects and array of ids }
Query: { category(id:2) { id title } }
Result: null
Wanted result: { "error": "Variable id is of type Int, expects array of Ints" }
Thanks
@truecastdesign Sorry for the delay, but the expected result should not be null. It should be a result containing a descriptive error. I'll have to look into this when I have time.
Thanks for the report, however we're going to archive this repo soon as we're no longer maintaining it: https://github.com/digiaonline/graphql-php/issues/359