Handle GraphQL exposed fields and types behind feature flags
As we continue to develop our GraphQL API, we're going to have to deal with how feature flags integrate with GraphQL declarations.
We should be able to selectively hide fields and types behind a feature flag.
the graphql-ruby
gem has a method visible?
that we can use to selectively hide exposed fields and types behind feature flags.
@seanarnold has suggested this kind of declaration:
field :test_field, type: GraphQL::STRING_TYPE,
null: false,
description: 'Some test field',
feature_key: :some_feature_key
Ensure that docs are identical regardless of whether the FF is on or off.
Edited by charlie ablett