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
Overview
TODO Populate .directive(...)
from here
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
14 15 16 |
# File 'lib/graphql/schema/build_from_definition.rb', line 14 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
18 19 20 |
# File 'lib/graphql/schema/build_from_definition.rb', line 18 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
22 23 24 |
# File 'lib/graphql/schema/build_from_definition.rb', line 22 def from_document(document, default_resolve:, using: {}, relay: false) Builder.build(document, default_resolve: default_resolve || {}, relay: relay, using: using) end |