Sha256: d5dd7221d7530a85a35a6803bb9bb05270eae7475b65e0b9f9d1299197c3d67f

Contents?: true

Size: 486 Bytes

Versions: 26

Compression:

Stored size: 486 Bytes

Contents

# frozen_string_literal: true

module GraphqlDevise
  module MountMethod
    module OperationPreparers
      class MutationFieldSetter
        def initialize(authenticatable_type)
          @authenticatable_type = authenticatable_type
        end

        def call(mutation, authenticatable: true)
          return mutation unless authenticatable

          mutation.field(:authenticatable, @authenticatable_type, null: false)
          mutation
        end
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
graphql_devise-2.0.0 lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb
graphql_devise-1.4.0 lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb
graphql_devise-1.3.0 lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb
graphql_devise-1.2.0 lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb
graphql_devise-1.1.1 lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb
graphql_devise-1.1.0 lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb
graphql_devise-1.0.1 lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb
graphql_devise-1.0.0 lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb
graphql_devise-0.18.2 lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb
graphql_devise-0.18.1 lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb
graphql_devise-0.18.0 lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb
graphql_devise-0.17.1 lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb
graphql_devise-0.17.0 lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb
graphql_devise-0.16.0 lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb
graphql_devise-0.15.0 lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb
graphql_devise-0.14.3 lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb
graphql_devise-0.14.2 lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb
graphql_devise-0.14.1 lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb
graphql_devise-0.14.0 lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb
graphql_devise-0.13.6 lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb