-
0.9.0.0 Stable
released this
2020-07-24 21:34:31 +02:00 | 158 commits to master since this releaseFixed
- Location of a parse error is returned in a singleton array with key
locations
. - Parsing comments in the front of definitions.
- Some missing labels were added to the parsers, some labels were fixed to
refer to the AST nodes being parsed.
Added
AST
reexportsAST.Parser
.AST.Document.Location
is a token location as a line and column pair.Execute
reexportsExecute.Coerce
.Error.Error
is an error representation with a message and source location.Error.Response
represents a result of running a GraphQL query.Type.Schema
exportsType
which lists all types possible in the schema.- Parsing subscriptions.
Error.ResponseEventStream
,Type.Out.Resolve
,Type.Out.Subscribe
and
Type.Out.SourceEventStream
define subscription resolvers.Error.ResolverException
is an exception that can be thrown by (field value
and event stream) resolvers to signalize an error. Other exceptions will
escape.Test.Hspec.GraphQL
contains some test helpers.Validate
contains the validator and standard rules.
Changed
Type.Out.Resolver
: Interface fields don't have resolvers, object fields
have value resolvers, root subscription type resolvers need an additional
resolver that creates an event stream.Resolver
represents these differences
now and pairs a field with the function(s). Resolvers don't haveExceptT
,
errors are handled withMonadThrow
/MonadCatch
.- All code from
Trans
is moved toType.Out
and exported byType
and
Type.Out
. AST.Core
contained onlyArguments
which was moved toType.Definition
.
AST
provides now only functionality related to parsing and encoding, as it
should be.Execute.execute
takes an additional argument, a possible operation name
and returns either a stream or the response.Error
module was changed to work with dedicated types for errors and the
response instead of JSON.graphqlSubs
takes an additional argument, the operation name. The type of
variable names is changed back to JSON since it is a common format and it
saves additional conversions. Custom format still can be used with the
underlying functions (in theExecute
module). The function returns either a
a stream or the resolved value.graphql
returns either a stream or the resolved value.- The constraint of the base monad was changed to
MonadCatch
(and it implies
MonadThrow
).
Removed
Trans.ActionT
is an unneeded layer of complexity.Type.Out.Resolver
represents possible resolver configurations.Execute.executeWithName
.Execute.execute
takes the operation name and
completely replacesexecuteWithName
.
Downloads
- Location of a parse error is returned in a singleton array with key