From ca8be128e22c5214dee1f081b835261b5c069319 Mon Sep 17 00:00:00 2001 From: Bruce Bolt Date: Mon, 2 Dec 2024 16:04:09 +0000 Subject: [PATCH] Add feature flag for GraphQL rendering This allows us to toggle the use of GraphQL by environment, in the same way as Collections: https://github.com/alphagov/collections/commit/bc1fedfdab3a40266eb3ff5aef9361d58809bd3f. --- app/lib/features.rb | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 app/lib/features.rb diff --git a/app/lib/features.rb b/app/lib/features.rb new file mode 100644 index 000000000..adda507a5 --- /dev/null +++ b/app/lib/features.rb @@ -0,0 +1,5 @@ +class Features + def self.graphql_feature_enabled? + ENV["GRAPHQL_FEATURE_FLAG"] + end +end