Gusto / apollo-federation-ruby

A Ruby implementation of Apollo Federation
MIT License
216 stars 72 forks source link

feat: add support for @composeDirective #253

Open utay opened 1 year ago

utay commented 1 year ago

Fixes https://github.com/Gusto/apollo-federation-ruby/issues/228

This PR adds support for @composeDirective as well as having multiple @link on the schema which is a prerequisite of the former. There's a breaking change link -> default_link_namespace in the federation function because I felt like it makes more sense like this. Happy to hear your thoughts!

utay commented 1 year ago

CI fails on graphql-ruby <= 1.11, it looks like schema directives support was added in 1.12:

  1) ApolloFederation::ServiceField with older versions of GraphQL and the interpreter runtime behaves like service field returns the federation SDL with compose directives for the schema
     Failure/Error: super(*args, **kwargs, &block)

     ArgumentError:
       unknown keyword: :directives
grxy commented 1 year ago

@utay Thanks for putting this together! I will try to take a look this week, but will be OOO for a couple weeks after in the case I'm not able to get to it this week.