diff options
Diffstat (limited to 'app/graphql/mutations/concerns/mutations/resolves_namespace.rb')
-rw-r--r-- | app/graphql/mutations/concerns/mutations/resolves_namespace.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/graphql/mutations/concerns/mutations/resolves_namespace.rb b/app/graphql/mutations/concerns/mutations/resolves_namespace.rb new file mode 100644 index 00000000000..35009623c69 --- /dev/null +++ b/app/graphql/mutations/concerns/mutations/resolves_namespace.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Mutations + module ResolvesNamespace + extend ActiveSupport::Concern + + def resolve_namespace(full_path:) + namespace_resolver.resolve(full_path: full_path) + end + + def namespace_resolver + Resolvers::NamespaceResolver.new(object: nil, context: context, field: nil) + end + end +end |