Type binding mismatch: javax.security.Subject instead of my x.y.z.Subject #490
-
I have a schema which declare a type:
and a class
At startup, instead of picking up my Subject class, I get the following error:
I'm struggling, trying to find a way to indicate my class instead of that coming from javax.security. Apart asking where I can set that mapping, I think it would be better to have a configuration or something like that, which would allow me to indicate a package where the bindings can be found. I mean, it's absolutely great to rely on this automatic binding, but in these cases there should be an easy way to solve the ambiguity. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The binding is handled by graphql-java-tools by starting the scan of the root Query and Mutation types and following all defined queries and mutations to bind all types and inputs to the corresponding classes. The above snippet above doesn't show that crucial part. This |
Beta Was this translation helpful? Give feedback.
-
Thanks for your hints, @oliemansm. As expected, it was a fault of mine: I had one of my classes with a wrong import (javax.auth.Subject instead of my Subject). I think I've checked that class more or less 200 times but nothing, when you don't want to see a thing there's nothing to do. Thanks again |
Beta Was this translation helpful? Give feedback.
The binding is handled by graphql-java-tools by starting the scan of the root Query and Mutation types and following all defined queries and mutations to bind all types and inputs to the corresponding classes. The above snippet above doesn't show that crucial part.
This
Subject
type is used in one of your queries or mutations? And in the Java class implementing that query or mutation you are using your own Subject class? Because in that case it should map it correctly.