Sha256: 36421588f52f7b9bbc6a7b3e0ab10e1d1cda878b568ec076052ff552c4926f1f

Contents?: true

Size: 454 Bytes

Versions: 25

Compression:

Stored size: 454 Bytes

Contents

# frozen_string_literal: true

module GraphqlDevise
  module MountMethod
    module OperationPreparers
      class GqlNameSetter
        def initialize(mapping_name)
          @mapping_name = mapping_name
        end

        def call(operation, **)
          operation.graphql_name(graphql_name)

          operation
        end

        private

        def graphql_name
          @mapping_name.camelize(:upper)
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

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