Class: ElasticGraph::SchemaDefinition::SchemaElements::InterfaceType

Inherits:
TypeWithSubfields
  • Object
show all
Includes:
Mixins::HasIndices, Mixins::ImplementsInterfaces
Defined in:
elasticgraph-schema_definition/lib/elastic_graph/schema_definition/schema_elements/interface_type.rb

Overview

Defines a GraphQL interface. Use it to define an abstract supertype with one or more fields that concrete implementations of the interface must also define. Each implementation can be an ObjectType or InterfaceType.

Examples:

Define an interface

ElasticGraph.define_schema do |schema|
  schema.interface_type "Athlete" do |t|
    # in the block, `t` is an InterfaceType
  end
end

Constant Summary

Constants included from Mixins::HasTypeInfo

Mixins::HasTypeInfo::CUSTOMIZABLE_DATASTORE_PARAMS

Instance Attribute Summary

Attributes included from Mixins::HasDocumentation

#doc_comment

Method Summary

Methods included from Mixins::HasIndices

#derive_indexed_type_fields, #derived_indexed_types, #index, #indexed?, #plural_root_query_field_name, #root_query_fields, #singular_root_query_field_name

Methods included from Mixins::ImplementsInterfaces

#implemented_interfaces, #implements, #to_sdl

Methods inherited from TypeWithSubfields

#deleted_field, #field, #name, #paginated_collection_field, #relates_to_many, #relates_to_one, #renamed_from

Methods included from Mixins::HasTypeInfo

#json_schema, #json_schema_options, #mapping, #mapping_options

Methods included from Mixins::HasDerivedGraphQLTypeCustomizations

#customize_derived_type_fields, #customize_derived_types

Methods included from Mixins::HasDirectives

#directive, #directives, #directives_sdl

Methods included from Mixins::HasDocumentation

#append_to_documentation, #derived_documentation, #documentation, #formatted_documentation

Methods included from Mixins::CanBeGraphQLOnly

#graphql_only, #graphql_only?

Methods included from Mixins::VerifiesGraphQLName

verify_name!