-
Notifications
You must be signed in to change notification settings - Fork 96
Description
I have an issue with changes in #175 - all my fields defined by static method ( which I use on root query fields ) are now broken. The behaviour of MethodDataFetcher is changed and I don't understand the new logic.
First the test on isStatic has been removed, so code is now going into the second case, trying to instantiate an instance of my class. This returns null as it's not intended to be built.
Next, obj==null, environment.getSource() is the root context, so getGraphQLFieldValue() is called and it throws an exception "No GraphQL field found".
I would expect it to simply call method.invoke(null, invocationArgs(environment, container))
I could fix this by rewriting all code - removing static and adding a constructor with a root context to all classes where it's needed, but it would be good to keep compatibility here ?