summaryrefslogtreecommitdiff
path: root/app/graphql/mutations/base_mutation.rb
blob: e40f854a019dc0013542c7f1a63825674a703318 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

module Mutations
  class BaseMutation < GraphQL::Schema::RelayClassicMutation
    field :errors, [GraphQL::STRING_TYPE],
          null: false,
          description: _("Reasons why the mutation failed.")

    def current_user
      context[:current_user]
    end
  end
end