-
0.8.0.0 Stable
released this
2020-06-20 05:48:25 +02:00 | 196 commits to master since this releaseFixed
- The parser rejects variables when parsing defaultValue (DefaultValue). The
specification defines default values asValue
withconst
parameter and
constants cannot be variables.AST.Document.ConstValue
was added,
AST.Document.ObjectField
was 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.Resolver
was moved toType.Out
, it is a field and resolver function
pair.AST.Core.Value
was moved intoType.Definition
. These values are used only
in the execution and type system, it is not a part of the parsing tree.Type
module is superseded byType.Out
. This module contains now only
exports from other module that completeType.In
andType.Out
exports.Error.CollectErrsT
contains the newResolution
data structure.
Resolution
represents the state used by the executor. It contains all types
defined in the schema and collects the thrown errors.
Added
Type.Definition
contains base type system definition, e.g. Enums and
Scalars.Type.Schema
describes a schema. Both public functions that execute queries
accept aSchema
now instead of aHashMap
. The execution fails if the root
operation doesn't match the root Query type in the schema.Type.In
andType.Out
contain definitions for input and output types.Execute.Coerce
defines 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.resolve
is superseded byExecute.Execution
.Error.runAppendErrs
isn't used anywhere.AST.Core
:Document
,Directive
,Field
,Fragment
,Selection
,Alias
TypeCondition
were modified, moved intoExecute.Transform.Document
and
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.Core
doesn't reexports anything.
Downloads
- The parser rejects variables when parsing defaultValue (DefaultValue). The