new ash_graphql version generates duplicate enums

I tried upgrading today from ash_graphql fbebb21d1867acf9d43ad09c56374ad98ea8594f to fbebb21d1867acf9d43ad09c56374ad98ea8594f (also latest commits on other ash libraries) and I was unable to compile. I debugged a bit and was able to locate the problem here https://github.com/ash-project/ash_graphql/blob/0ecf70b54b78c6caa75d706ab4deacb214a3ee51/lib/resource/resource.ex#L2341 AshGraphql.all_attributes_and_arguments() returns all fields including the fields of embedded types. I have two fields descriptione_en and description_de both use the same embedded Type, the embedded type has a :boolean attribute with a one_of constraint. AshGraphql now tries to define the type twice for each boolean field. This results in a compile Error inside of absinthe. I was unsure on how to handle the embeded resources in that part of the code. The graphql enum should be defined for the embedded type I guess and not the one where it is embedded.
GitHub
ash_graphql/resource.ex at 0ecf70b54b78c6caa75d706ab4deacb214a3ee51...
An absinthe backed graphql API extension for the Ash Framework - ash_graphql/resource.ex at 0ecf70b54b78c6caa75d706ab4deacb214a3ee51 · ash-project/ash_graphql
5 Replies
ZachDaniel
ZachDaniel•3y ago
Ah, okay interesting. Should be an easy fix, lemme take a look in a bit.
barnabasj
barnabasjOP•3y ago
Great, thank you
ZachDaniel
ZachDaniel•3y ago
can you try main?
barnabasj
barnabasjOP•3y ago
Looks good, thank you
ZachDaniel
ZachDaniel•3y ago
🥳

Did you find this page helpful?