Skip to content
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

Hive Gateway reports only first of subgraph errors #7674

Open
4 tasks
klys-equinix opened this issue Sep 12, 2024 · 3 comments
Open
4 tasks

Hive Gateway reports only first of subgraph errors #7674

klys-equinix opened this issue Sep 12, 2024 · 3 comments

Comments

@klys-equinix
Copy link

Issue workflow progress

Progress of the issue based on the
Contributor Workflow

Make sure to fork this template and run yarn generate in the terminal.

Please make sure Mesh package versions under package.json matches yours.

  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

Describe the bug

Hive Gateway return just one of the errors that the subgraph it calls actually returns.
For example if i call a mutation using gateway, i will get just one error
Screenshot 2024-09-12 at 11 05 38

But if i call this operation directly on subgraph, i will get a list of errors
Screenshot 2024-09-12 at 11 06 18

To Reproduce Steps to reproduce the behavior:

As above, try calling a subgraph mutation that can respond with more than one error

Expected behavior
All errors should be returned

Environment:

  • OS:
  • Hive gateway docker 1.0.4
@ardatan
Copy link
Owner

ardatan commented Sep 12, 2024

The error you show in the second one looks a bit incorrect to me.
Your operation only has "id" field but you have two different errors on the right with different paths so this is actually unexpected behavior for the gateway.

@tgelo-equinix
Copy link

tgelo-equinix commented Sep 13, 2024

The error you show in the second one looks a bit incorrect to me. Your operation only has "id" field but you have two different errors on the right with different paths so this is actually unexpected behavior for the gateway.

What is incorrect? What is the expected behavior for the gateway?

Notice that the gateway returned one of the errors from the subgraph which doesn't relate to 'id' field that you mentioned. Why didn't it return all of them?
Regarding

Your operation only has "id" field

'id' is a requested field from the returned type, and it is normal behavior for the service to return not only errors related to the returned type, but also errors related to the request.

@ardatan
Copy link
Owner

ardatan commented Sep 13, 2024

The path in the errors you shared doesn't match the operation
In the operation, you have approveDesign and id while the error has "cage", "design" and "customer" which is unexpected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants