Sha256: b9c10bab40e0f784ccb4873ccec82e2c93778ddc7ee152a9e9e6007b66c753d4

Contents?: true

Size: 544 Bytes

Versions: 71

Compression:

Stored size: 544 Bytes

Contents

# frozen_string_literal: true

module GraphQL
  module Types
    module Relay
      class BaseObject < GraphQL::Schema::Object
        field_class(Types::Relay::BaseField)
        class << self
          def default_relay(new_value)
            @default_relay = new_value
          end

          def default_relay?
            !!@default_relay
          end

          def to_graphql
            type_defn = super
            type_defn.default_relay = default_relay?
            type_defn
          end
        end
      end
    end
  end
end

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
graphql-1.10.8 lib/graphql/types/relay/base_object.rb
graphql-1.10.7 lib/graphql/types/relay/base_object.rb
graphql-1.10.6 lib/graphql/types/relay/base_object.rb
graphql-1.10.5 lib/graphql/types/relay/base_object.rb
graphql-1.10.4 lib/graphql/types/relay/base_object.rb
graphql-1.10.3 lib/graphql/types/relay/base_object.rb
graphql-1.10.2 lib/graphql/types/relay/base_object.rb
graphql-1.9.19 lib/graphql/types/relay/base_object.rb
graphql-1.10.1 lib/graphql/types/relay/base_object.rb
graphql-1.10.0 lib/graphql/types/relay/base_object.rb
graphql-1.10.0.pre4 lib/graphql/types/relay/base_object.rb
graphql-1.9.18 lib/graphql/types/relay/base_object.rb
graphql-1.10.0.pre3 lib/graphql/types/relay/base_object.rb
graphql-1.9.17 lib/graphql/types/relay/base_object.rb
graphql-1.10.0.pre2 lib/graphql/types/relay/base_object.rb
graphql-1.9.16 lib/graphql/types/relay/base_object.rb
graphql-1.9.15 lib/graphql/types/relay/base_object.rb
graphql-1.9.14 lib/graphql/types/relay/base_object.rb
graphql-1.10.0.pre1 lib/graphql/types/relay/base_object.rb
graphql-1.9.13 lib/graphql/types/relay/base_object.rb