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
Class Method Summary collapse
- .from_definition(definition_string, parser: GraphQL.default_parser, **kwargs) ⇒ Object
- .from_definition_path(definition_path, parser: GraphQL.default_parser, **kwargs) ⇒ Object
- .from_document(document, default_resolve:, using: {}, relay: false) ⇒ Object
Class Method Details
.from_definition(definition_string, parser: GraphQL.default_parser, **kwargs) ⇒ Object
9 10 11 |
# File 'lib/graphql/schema/build_from_definition.rb', line 9 def from_definition(definition_string, parser: GraphQL.default_parser, **kwargs) from_document(parser.parse(definition_string), **kwargs) end |
.from_definition_path(definition_path, parser: GraphQL.default_parser, **kwargs) ⇒ Object
13 14 15 |
# File 'lib/graphql/schema/build_from_definition.rb', line 13 def from_definition_path(definition_path, parser: GraphQL.default_parser, **kwargs) from_document(parser.parse_file(definition_path), **kwargs) end |
.from_document(document, default_resolve:, using: {}, relay: false) ⇒ Object
17 18 19 |
# File 'lib/graphql/schema/build_from_definition.rb', line 17 def from_document(document, default_resolve:, using: {}, relay: false) Builder.build(document, default_resolve: default_resolve || {}, relay: relay, using: using) end |