-
Hello there, I am working with a federated GraphQL API and I need to add Apollo directives(using the apollo's federation ruby gem) to some specific connections and their fields(as they are auto-generated by graphql-ruby gem). As an example, I have the following implementation:
Just had that implementation, so we could call
The above connections have different behavior when I loop through schema's Currently using:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hey! I'm not sure what would explain the difference but my first guess is, do the Does the MySchema.get_type("Site").fields.keys
# Somehow reference your `Site` type class, however it's defined:
Types::Site.fields.keys
bundles_field = Types::Site.get_field("bundles")
bundles_field.type.to_type_signature
bundles_field.connection? |
Beta Was this translation helpful? Give feedback.
-
Hey @rmosolgo it happens that the Site type wasn't available in the custom logic to add tags to specific connection fields, because it was not in schema's Thanks for the help! Guess we figured this one out. |
Beta Was this translation helpful? Give feedback.
Hey @rmosolgo it happens that the Site type wasn't available in the custom logic to add tags to specific connection fields, because it was not in schema's
types
, but it is defined within QueryType as mentioned above, so it should be handled differently.From Schema, it can be accessed by
query.fields
instead.After implementing that, we were able to manipulate and add tags to the connections fields of that specific Site type.
Thanks for the help! Guess we figured this one out.