-
0.8.0.0 Stable
released this
2020-06-20 05:48:25 +02:00 | 202 commits to master since this releaseFixed
- The parser rejects variables when parsing defaultValue (DefaultValue). The
specification defines default values asValuewithconstparameter and
constants cannot be variables.AST.Document.ConstValuewas added,
AST.Document.ObjectFieldwas modified. - AST transformation should never fail.
- Arguments and fields with a missing variable as value should be left out.
- Invalid (recusrive or non-existing) fragments should be skipped.
- Argument value coercion.
- Variable value coercion.
- Result coercion.
- The executor should skip the fields missing in the object type and not fail.
- Merging subselections.
Changed
Schema.Resolverwas moved toType.Out, it is a field and resolver function
pair.AST.Core.Valuewas moved intoType.Definition. These values are used only
in the execution and type system, it is not a part of the parsing tree.Typemodule is superseded byType.Out. This module contains now only
exports from other module that completeType.InandType.Outexports.Error.CollectErrsTcontains the newResolutiondata structure.
Resolutionrepresents the state used by the executor. It contains all types
defined in the schema and collects the thrown errors.
Added
Type.Definitioncontains base type system definition, e.g. Enums and
Scalars.Type.Schemadescribes a schema. Both public functions that execute queries
accept aSchemanow instead of aHashMap. The execution fails if the root
operation doesn't match the root Query type in the schema.Type.InandType.Outcontain definitions for input and output types.Execute.Coercedefines a typeclass responsible for input, variable value
coercion. It decouples us a bit from JSON since any format can be used to pass
query variables. Execution functions accept (HashMap Name a) instead of
Subs, where a is an instance ofVariableValue.
Removed
Schema.scalar,Schema.wrappedScalar. They accepted everything can be
converted to JSON and JSON is not suitable as an internal representation for
GraphQL. E.g. GraphQL distinguishes between Floats and Integers.Schema.wrappedObject,Schema.object,Schema.resolversToMap. There is no
need in special functions to construct field resolvers anymore, resolvers are
normal functions attached to the fields in the schema representation.Schema.resolveis superseded byExecute.Execution.Error.runAppendErrsisn't used anywhere.AST.Core:Document,Directive,Field,Fragment,Selection,Alias
TypeConditionwere modified, moved intoExecute.Transform.Documentand
made private. These types describe intermediate representation used by the
executor internally. Moving was required to avoid cyclic dependencies between
the executor and type system.AST.Coredoesn't reexports anything.
Downloads
- The parser rejects variables when parsing defaultValue (DefaultValue). The