Duplicate input types for GraphQL
Given a resource like this
I get multiple errors about duplicate related to Option (UnionType) and its children (OptionString, OptionBoolean).
If I comment out the update mutation, it generates all the types as expected for the create. The update mutation should not require any additional type or input types.
4 Replies
🤔 this looks like a bug pretty cut and dry
Strange that its duplicating them somehow...ah, I think I might see?
nope, still don't
Could you open an issue on
ash_graphql
? A reproduction in the tests would be awesome If you have time also ❤️will do.
Spent some time unsuccessfully trying to write a test for ash_graphql, and while doing so figured out a work around.
I did not define a graphql_type and so it was assuming one for me. Setting my own graphql_type fixes it.
So to recap: when I use a nested union as a singular argument and array attribute in two mutations while not defining a graphql_type, absinthe throws an after compile error:
In my repo, I can replicate it reliably. And I'm unable to replicate it in the ash_graphql test suite.
🤔 interesting. And you were working against ash_graphql main?
Thanks for the extra details!
I am working on ash_graphql main. I can not figure out how to reproduce this in the test lib, but I have it working in app now using
graphql_type()
🤷♂️