[Error handling] Category missing in error response
cvergne opened this issue · comments
Hi,
Since the update to webonyx/graphql-php v15, the category
property is missing from extensions
node in response.
The lib has removed the category
node ( see upgrade guide v14 -> v15), which means documentation shows wrong examples and Exceptions in Graphqlite library still have the category getter/setter.
What should be done about that ?
Manually adding back the category in WebonyxErrorHandler
or totally removing it everywhere ?
These categories never made much sense to me. I don't understand how GraphQLite could, or why it should, attempt to categorize errors on behalf of an application/API. The organization of that API is going to have it's own, unique, requirements. We've never used this value in the error output. I see no reason to maintain it and don't see why, if it's needed, it cannot be re-implemented.
My vote is for removal and cleanup. I'm open to hear other opinions on it.
I've noticed it because, on a project I'm working on, we are using it, but I can confirm it's pretty easy to handle it again outside of the library.
So from the point of view of the graphqlite library, I agree with you, we should remove any occurrence of "category".
I could do the PR ;)
Being that there hasn't been any pushback on this, let's go forward with removing in a PR. Please include details in the PR description on the BC breaks and suggested fixes. Thanks!