-
Notifications
You must be signed in to change notification settings - Fork 425
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
GraphQLInputObject macro fails if crate has a local type alias named "Result" #1194
Comments
tpoliaw
added a commit
to tpoliaw/juniper
that referenced
this issue
Oct 2, 2023
If user code has a type alias (or custom type) called `Result`, this would be used instead of the intended standard library result, causing surprising compile errors from generated code. Using the fully qualified path allows the generated code to be isolated from user types. Fixes graphql-rust#1194
tpoliaw
added a commit
to tpoliaw/juniper
that referenced
this issue
Oct 4, 2023
If user code has a type alias (or custom type) called `Result` or `Option` etc, this would be used instead of the intended standard library types causing surprising compile errors from generated code. Using the fully qualified path allows the generated code to be isolated from user types. Includes two basic regression tests covering `Result` and `Send`. Fixes graphql-rust#1194
LegNeato
pushed a commit
that referenced
this issue
Oct 6, 2023
If user code has a type alias (or custom type) called `Result` or `Option` etc, this would be used instead of the intended standard library types causing surprising compile errors from generated code. Using the fully qualified path allows the generated code to be isolated from user types. Includes two basic regression tests covering `Result` and `Send`. Fixes #1194
tyranron
added a commit
that referenced
this issue
Oct 13, 2023
tyranron
added a commit
that referenced
this issue
Oct 13, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
In a crate with this type alias:
Deriving
GraphQLInputObject
for structs that include optional values will fail.To Reproduce
Given the above type alias, and the following struct
The following error is returned:
Expected behavior
Successful compilation, as happens when the type alias is renamed to anything else, for example, there are no issues with the following:
Additional context
The text was updated successfully, but these errors were encountered: