Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/mutations/timelogs/base.rb')
-rw-r--r--app/graphql/mutations/timelogs/base.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/graphql/mutations/timelogs/base.rb b/app/graphql/mutations/timelogs/base.rb
new file mode 100644
index 00000000000..9859f0e7d79
--- /dev/null
+++ b/app/graphql/mutations/timelogs/base.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+module Mutations
+ module Timelogs
+ class Base < Mutations::BaseMutation
+ field :timelog,
+ Types::TimelogType,
+ null: true,
+ description: 'Timelog.'
+
+ private
+
+ def response(result)
+ { timelog: result.payload[:timelog], errors: result.errors }
+ end
+ end
+ end
+end