Gusto / apollo-federation-ruby

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

feat: Explore using GraphQL Ruby's client directives #152

Open daemonsy opened 2 years ago

daemonsy commented 2 years ago

GraphQL Ruby has support for client directives now. It could potentially reduce the surface area of this library by quite a bit.

We have quite a bit code that seems to be responsible for generating the SDL.

flvrone commented 2 years ago

Hey @daemonsy! :wave: How about just adding the support for directives, without thinning out the gem's codebase for now? :) I assume it should be simple. :thinking:

daemonsy commented 2 years ago

Yea that was what I was thinking in my spike. We could detect that native directives are supported and call a branch of code.

It wasn't hard, it just produced slightly different results (e.g. definitions of the directives itself) that caused the tests to fail.

I think the old code can be removed when GraphQL 1.13.x and 2.0.x are the dominant versions.