confuser / graphql-constraint-directive

Validate GraphQL fields
ISC License
568 stars 74 forks source link

Handle mutation failure #230

Closed paullebras closed 6 months ago

paullebras commented 6 months ago

Hello!

Following the implementation of graphql-constraint-directive, we encountered a failing test. This test aimed to ensure that mutations would fail under specific conditions.

Instead of correctly handling the mutation failure with this message : Schema is not configured to execute mutation operation. It would throw the following error :

{ "errors": [ { "message": "Cannot read properties of undefined (reading 'getFields')" } ] }

These changes address this issue, ensuring that mutations fail gracefully. We also added a test to validate this behavior.

coveralls commented 6 months ago

Pull Request Test Coverage Report for Build 8269752117

Details


Totals Coverage Status
Change from base Build 8119970561: 0.0%
Covered Lines: 358
Relevant Lines: 367

💛 - Coveralls