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

Modules: DefaultResolve 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:, parser: DefaultParser) ⇒ Object



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

def from_definition(definition_string, default_resolve:, parser: DefaultParser)
  document = parser.parse(definition_string)
  Builder.build(document, default_resolve: default_resolve)
end