summaryrefslogtreecommitdiff
path: root/app/graphql/mutations/concerns/mutations/resolves_namespace.rb
blob: 35009623c6973abb30e73c0941504899aa4e1550 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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