Hey thanks a lot for this article! Very instructive.
I have an issue when I try using the FieldExtension. The class of the object I'm getting is the GraphqlObject Type but I'm expecting my ActiveRecord type. I've tried in a regular resolver and it works correctly. Any idea why by any chance?
Hey thanks a lot for this article! Very instructive.
I have an issue when I try using the FieldExtension. The class of the object I'm getting is the GraphqlObject Type but I'm expecting my ActiveRecord type. I've tried in a regular resolver and it works correctly. Any idea why by any chance?
Apparently you need to use object.object to get the ActiveRecord object! (and object.object.class for its class).
Which version of graphql gem it is? Probably, that's the reason. The code I posted works fine for us in 1.9.4.
I tried with 1.9.3 and 1.9.6...