Closed miador closed 4 years ago
/cc @phillip-kruger, @jmartisk /cc @kenfinnigan, @phillip-kruger, @jmartisk, @radcortez, @Ladicek
Please create a small Maven reproducer, it's really far easier for us to reproduce issues that way.
Thanks!
@miador - yes a reproducer will help. As a workaround you can try and give the types unique names using the Enum annotation: Something like:
@Enum("AccountType")
and @Enum("BalanceType")
(as a class level annotation on the enum)
see https://download.eclipse.org/microprofile/microprofile-graphql-1.0.2/microprofile-graphql.html#enums
SmallRye GraphQL cannot differentiate same enum names in different models from version 1.6.0 to 1.8.1. We have GraphQL API for banking. We have separate models i.e
Accounts
andBalances
. InAccounts
we have an enum calledType
and we have enum with same nameType
inBalances
.The expected behavior is to see they're working fine as in previous versions. The quarkus version was 1.5.2 for this apps and we decide to update the quarkus and plug-in versions. In the all versions after 1.5.2, the problem is same. In 1.5.2, it perfectly works without having conflict even if we have same enum name in different models.
Actual behavior The data is stored in Neo4j and when we run the application, it works fine with accounts. But when running the
Balances
, it gives the following stacktrace:To Reproduce Steps to reproduce the behavior:
Type
inAccounts
andBalances
)GraphQLFieldDefinition.java
and see the hittingtype can't be null
on same enum name.Environment (please complete the following information):
java -version
: openjdk version "11.0.7" 2020-04-14Additional context If you really want to see that's the reason, you can simply create other models as well and have same enum name. It will hit on that and will say
type can't be null
Regards! Yusuf