-
Notifications
You must be signed in to change notification settings - Fork 393
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
Multiple return types for a field #1633
Labels
Comments
Please provide a minimum reproduction repository. |
Thanks! |
bump |
Hi, did you ever find a solution to this? |
same here, can't use a union in inputType, does anyone know of an alternative? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm submitting a...
Current behavior
I've got a class with multiple fields, and the one which returns object of union type results in an error:
"Error: Cannot determine a GraphQL input type for the "users". Make sure your class is decorated with an appropriate decorator."
The issue is not about decorators from what I've researched, it is about the type I specify as a return type in @field decorator.
Expected behavior
I need for the "access" field to be able to return an object of one out of multiple types.
Minimal reproduction of the problem with instructions
Field "users" in WidgetAccess class is the questionable part
What is the motivation / use case for changing the behavior?
It would be nice to be able to split differently structured units by different types, to restrict client to enter logically disjoint sets of data.
Environment
The text was updated successfully, but these errors were encountered: