Sha256: e8edede1bb417974be953de45e89a74d8d67d1fc4ef34ae1f0a37213aa5a4327

Contents?: true

Size: 766 Bytes

Versions: 17

Compression:

Stored size: 766 Bytes

Contents

# A collection of types which implement the same fields
#
# @example An interface with three required fields
#   DeviceInterface = GraphQL::InterfaceType.define do
#     name("Device")
#     description("Hardware devices for computing")
#
#     field :ram, types.String
#     field :processor, ProcessorType
#     field :release_year, types.Int
#   end
#
class GraphQL::InterfaceType < GraphQL::BaseType
  include GraphQL::BaseType::HasPossibleTypes
  defined_by_config :name, :description, :fields, :resolve_type
  attr_accessor :name, :description, :fields

  def kind
    GraphQL::TypeKinds::INTERFACE
  end

  # @return [Array<GraphQL::ObjectType>] Types which declare that they implement this interface
  def possible_types
    @possible_types ||= []
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
graphql-0.11.0 lib/graphql/interface_type.rb
graphql-0.10.9 lib/graphql/interface_type.rb
graphql-0.10.8 lib/graphql/interface_type.rb
graphql-0.10.7 lib/graphql/interface_type.rb
graphql-0.10.6 lib/graphql/interface_type.rb
graphql-0.10.5 lib/graphql/interface_type.rb
graphql-0.10.4 lib/graphql/interface_type.rb
graphql-0.10.3 lib/graphql/interface_type.rb
graphql-0.10.2 lib/graphql/interface_type.rb
graphql-0.10.1 lib/graphql/interface_type.rb
graphql-0.10.0 lib/graphql/interface_type.rb
graphql-0.9.5 lib/graphql/interface_type.rb
graphql-0.9.4 lib/graphql/interface_type.rb
graphql-0.9.3 lib/graphql/interface_type.rb
graphql-0.9.2 lib/graphql/interface_type.rb
graphql-0.8.1 lib/graphql/interface_type.rb
graphql-0.8.0 lib/graphql/interface_type.rb