diff options
Diffstat (limited to 'app/graphql/mutations/base_mutation.rb')
-rw-r--r-- | app/graphql/mutations/base_mutation.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/graphql/mutations/base_mutation.rb b/app/graphql/mutations/base_mutation.rb index 5f98b222099..994668b5f8f 100644 --- a/app/graphql/mutations/base_mutation.rb +++ b/app/graphql/mutations/base_mutation.rb @@ -28,7 +28,7 @@ module Mutations end def ready?(**args) - raise_resource_not_available_error! ERROR_MESSAGE if Gitlab::Database.read_only? + raise_resource_not_available_error!(ERROR_MESSAGE) if read_only? missing_args = self.class.arguments.values .reject { |arg| arg.accepts?(args.fetch(arg.keyword, :not_given)) } @@ -39,6 +39,10 @@ module Mutations true end + def read_only? + Gitlab::Database.read_only? + end + def load_application_object(argument, id, context) ::Gitlab::Graphql::Lazy.new { super } end |