-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(package/gqty): Use GraphQLError over plain objects in defaultResponseHandler #2058
base: main
Are you sure you want to change the base?
Conversation
d2c86c6
to
97371e8
Compare
🚀 Snapshot Release (
|
Package | Version | Info |
---|---|---|
@gqty/cli |
4.2.2-canary-20250131112755.43462e94e3bde969ca87ef505b89c46a22cec873 |
npm ↗︎ unpkg ↗︎ |
gqty |
3.3.0-canary-20250131112755.43462e94e3bde969ca87ef505b89c46a22cec873 |
npm ↗︎ unpkg ↗︎ |
@gqty/logger |
4.0.0-canary-20250131112755.43462e94e3bde969ca87ef505b89c46a22cec873 |
npm ↗︎ unpkg ↗︎ |
@gqty/react |
4.0.0-canary-20250131112755.43462e94e3bde969ca87ef505b89c46a22cec873 |
npm ↗︎ unpkg ↗︎ |
@gqty/solid |
1.0.0-canary-20250131112755.43462e94e3bde969ca87ef505b89c46a22cec873 |
npm ↗︎ unpkg ↗︎ |
97371e8
to
c5d0c33
Compare
c5d0c33
to
b2c95fd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kleberbaum Is it possible that Pylon is using the error trace for location/path look up? In that case a new Error must be created at the callsite of a resolver, if that works it also begs the question of why new Error at query fetcher also works with Pylon. |
Good question tbh idk. Lets ask @schettn. |
It's simply because the design choice of a generated client, where network errors are throwing at fetch() before response handler have a chance to process it. We want the query fetcher to stay highly customizable rather than a blackbox client. You may have to catch network errors at fetch() for the moment. Your idea definitely helps with the design of the upcoming modular/plugin system though. |
@vicary @kleberbaum What is the instance of the So are |
@kleberbaum You may check it with |
|
||
if (Array.isArray(result?.errors)) { | ||
result.errors = result.errors.map( | ||
(error: any) => new GraphQLError(error.message, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GraphQLError Array
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment I am only on the phone but I already have a test environment. Will push it on getcronit fork.
@kleberbaum Double check it with the console log. If it's true and still not working there could be a version mismatch. (Maybe a different graphql version is installed for gqty and pylon.) |
True. The issue was that there was a mismatch between GraphQL versions. Therefore, an instance of It was solved by forcing
|
|
@kleberbaum Could resolve the version conflict without using explicit overrides? We can merge this one so I can move on to the pylon schema. |
Wasn't able to verify yet if it works in another environment. I was only able to confirm that In the gqty repo pnpm workspace it is not working without the override if the project using GQty is adding a different graphql version in package json. |
4e590e6
to
8afcf2c
Compare
8afcf2c
to
43462e9
Compare
No description provided.