summaryrefslogtreecommitdiff
path: root/app/graphql/mutations/concerns
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-07-10 16:19:45 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2018-07-25 18:37:12 +0200
commit3bcb04f100f5e982379fbeae37a30a191581d1ef (patch)
treee01065b8a6728bcc75af16166baafcbddd1a6cf5 /app/graphql/mutations/concerns
parent9fe58f5a23f2960f666c4d641b463c744138d29c (diff)
downloadgitlab-ce-3bcb04f100f5e982379fbeae37a30a191581d1ef.tar.gz
Add mutation toggling WIP state of merge requests
This is mainly the setup of mutations for GraphQL. Including authorization and basic return type-structure.
Diffstat (limited to 'app/graphql/mutations/concerns')
-rw-r--r--app/graphql/mutations/concerns/mutations/resolves_project.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/graphql/mutations/concerns/mutations/resolves_project.rb b/app/graphql/mutations/concerns/mutations/resolves_project.rb
new file mode 100644
index 00000000000..0dd1f264a52
--- /dev/null
+++ b/app/graphql/mutations/concerns/mutations/resolves_project.rb
@@ -0,0 +1,13 @@
+module Mutations
+ module ResolvesProject
+ extend ActiveSupport::Concern
+
+ def resolve_project(full_path:)
+ resolver.resolve(full_path: full_path)
+ end
+
+ def resolver
+ Resolvers::ProjectResolver.new(object: nil, context: context)
+ end
+ end
+end