Module: GraphQL::Schema::BuildFromDefinition

Defined in:
lib/graphql/schema/build_from_definition.rb,
lib/graphql/schema/build_from_definition/resolve_map.rb,
lib/graphql/schema/build_from_definition/resolve_map/default_resolve.rb

Defined Under Namespace

Classes: ResolveMap

Constant Summary collapse

DefaultParser =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

GraphQL::Language::Parser

Class Method Summary collapse

Class Method Details

.from_definition(definition_string, default_resolve:, using: {}, relay: false, interpreter: true, parser: DefaultParser) ⇒ Object

See Also:

  • {Schema{Schema.from_definition}


9
10
11
12
13
# File 'lib/graphql/schema/build_from_definition.rb', line 9

def from_definition(definition_string, default_resolve:, using: {}, relay: false, interpreter: true, parser: DefaultParser)
  document = parser.parse(definition_string)
  default_resolve ||= {}
  Builder.build(document, default_resolve: default_resolve, relay: relay, using: using, interpreter: interpreter)
end