graphql-java-kickstart / graphql-java-tools

A schema-first tool for graphql-java inspired by graphql-tools for JS
https://www.graphql-java-kickstart.com/tools/
MIT License
810 stars 174 forks source link

java.lang.IllegalArgumentException: value already present - when trying to use the same class for input and output #440

Closed VsevolodGolovanov closed 4 years ago

VsevolodGolovanov commented 4 years ago

I'm trying to use the same class for input and output, but getting a problem with BiMap in SchemaClassScanner.

Here's the reproducer: https://github.com/VsevolodGolovanov/graphql-java-tools/commit/0526559dc4b3a8093ba29a8ddbd9d02189207019

(Why use the same class? Because it's just CRUD. Would be weird if it weren't the same class.)

VsevolodGolovanov commented 4 years ago

I actually was trying to make a reproducer for #216 which is the issue I'm currently getting in my real code ("Expected type 'XXX' to be a GraphQLInputType, but it wasn't!..."), but instead got this.

vojtapol commented 4 years ago

I use similar structure in my projects and it works. I wonder what's different here 🤔.

VsevolodGolovanov commented 4 years ago

image Nevermind. Passes fine after fixing this.