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

More concise error message when stitching errors occur #5345

Closed
vmary2014 opened this issue Aug 26, 2022 · 0 comments · Fixed by #5346
Closed

More concise error message when stitching errors occur #5345

vmary2014 opened this issue Aug 26, 2022 · 0 comments · Fixed by #5346
Labels
🎉 enhancement New feature or request

Comments

@vmary2014
Copy link
Contributor

vmary2014 commented Aug 26, 2022

Is your feature request related to a problem?

Hi.
We use the stitching functionality of the HotChocolate gateway and one issue that can occur during development and release is that when the gateway starts, if a type has been mis-typed in the stitching files, the error message sent by the Gateway is very long and lists all dependencies and types together in one long error message.
As an example - from a live project - but cut as it is so long:

  1. Unable to resolve dependencies None: authorize, None: TypeQuotesInput!, None: delegate, None: Int, None: String, None: Int, None: String, None: [TypeManufacturerFilterInput!], None: TypeManufacturerFilterInput, None: delegate, None: BoilerInput!, None: delegate, None: Uuid!, None: delegate, None: CommunicationsInput!, None: delegate, None: Uuid!, None: delegate, None: String, None: delegate, None: delegate, None: Uuid!, None: delegate, None: Int!, None: delegate, None: Uuid!, None: delegate, None: delegate, None: BankInput, None: delegate, [...], None: FilterInput, None: [AuditLogEntitySortInput123!], None: delegate, None: Int, None: String, None: Int, None: String, None: delegate, None: WorkingDaysQueryInput!, None: delegate, None: Int, None: delegate for type Query. (HotChocolate.Types.ObjectType)

It is obvious in this example that the culprit is AuditLogEntitySortInput123 as this is just an example of me breaking it, however in case of type renaming, issues can occur and in our micro services architecture can be a bit of a pain to fix.
Also there is no specific order - it would be better if the missing type appeared first or last, so that it can be easily pointed at.

The solution you'd like

Show the missing types as an added error:
Missing types first
Full message (the original) set in this example

So essentially 2 errors, the first one only on the missing type(s).

I have tested a code change to solve this issue that I am happy to submit as part of this request.

Product

Hot Chocolate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎉 enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant