You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some reason, my wrapping (outer) data fetcher is just not getting invoked. I don't know if it's significant, but I've noticed that when calling GraphQLCodeRegistry.dataFetcher, it's unclear what to actually pass as the parent type vs. field. I.e. I'd have expected some internal representation of Query to be the parent type with bar as the field, but I can see in the debugger that environment.element and environment.fieldsContainer both point to the same exact object -- the GraphQLObjectType instance representing the Bar, with no obvious reference to the parent on any of the environment APIs.
The other thing that seems odd to me is the fact that the code sample from the test suite is wrapping the child fields of the object type, rather than that object type itself as a child of it's own parent. I'm hoping there's a straightforward answer to this!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm having trouble implementing a directive via
SchemaDirectiveWiringfor object types. E.g.:I've tried a number of implementations, including what's indicated over here: https://github.com/graphql-java/graphql-java/blob/master/src/test/groovy/graphql/schema/idl/SchemaGeneratorDirectiveHelperTest.groovy#L471
For some reason, my wrapping (outer) data fetcher is just not getting invoked. I don't know if it's significant, but I've noticed that when calling
GraphQLCodeRegistry.dataFetcher, it's unclear what to actually pass as the parent type vs. field. I.e. I'd have expected some internal representation ofQueryto be the parent type withbaras the field, but I can see in the debugger thatenvironment.elementandenvironment.fieldsContainerboth point to the same exact object -- theGraphQLObjectTypeinstance representing theBar, with no obvious reference to the parent on any of theenvironmentAPIs.The other thing that seems odd to me is the fact that the code sample from the test suite is wrapping the child fields of the object type, rather than that object type itself as a child of it's own parent. I'm hoping there's a straightforward answer to this!
Beta Was this translation helpful? Give feedback.
All reactions