-
Notifications
You must be signed in to change notification settings - Fork 21
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
complex object types which are both output and input #33
Comments
I was really willing to implement it from start of this project, but spec of graphql says: http://facebook.github.io/graphql/October2016/#sec-Input-Objects
That was ther reason they're separated. You can try tools like import { TypeComposer } from 'graphql-compose';
const yourConvertedInputType = TypeComposer.create(YourOutputType).getInputType(); |
@pie6k that's doable, but I'd have to compile my class into a GQL schema. Which is another extra line 😕 |
Thanks for your PR. I think that maybe another type may not be even needed. What about auto-converting it when So we could do
and ten simply use it as argument type
That would feel more intuitive than having another type. It would be good to check if given I'll think about it as I don't want to make If that could be accomplished with reasonable api, then actually I stop seeing point of even having |
@pie6k thanks! Your solution sounds much better than having an extra type. By recursive fields you mean what exactly? Even if |
Recursive field = User has Dog > Dog has owner User > owner User has Dog > Dog has owner user etc... Recursive = Circular and it's not possible to reflect it in input field. |
currently I have this in my app:
I'd love to be able to define both at once doing:
The text was updated successfully, but these errors were encountered: