graphqlite icon indicating copy to clipboard operation
graphqlite copied to clipboard

[Error handling] Category missing in error response

Open cvergne opened this issue 1 year ago • 2 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 ?

cvergne avatar Apr 24 '24 14:04 cvergne

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.

oojacoboo avatar Apr 25 '24 01:04 oojacoboo

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 ;)

cvergne avatar Apr 25 '24 16:04 cvergne

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!

oojacoboo avatar May 03 '24 14:05 oojacoboo