-
0.9.0.0 Stable
released this
2020-07-24 21:34:31 +02:00 | 184 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
ASTreexportsAST.Parser.AST.Document.Locationis a token location as a line and column pair.ExecutereexportsExecute.Coerce.Error.Erroris an error representation with a message and source location.Error.Responserepresents a result of running a GraphQL query.Type.SchemaexportsTypewhich lists all types possible in the schema.- Parsing subscriptions.
Error.ResponseEventStream,Type.Out.Resolve,Type.Out.Subscribeand
Type.Out.SourceEventStreamdefine subscription resolvers.Error.ResolverExceptionis an exception that can be thrown by (field value
and event stream) resolvers to signalize an error. Other exceptions will
escape.Test.Hspec.GraphQLcontains some test helpers.Validatecontains 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.Resolverrepresents these differences
now and pairs a field with the function(s). Resolvers don't haveExceptT,
errors are handled withMonadThrow/MonadCatch.- All code from
Transis moved toType.Outand exported byTypeand
Type.Out. AST.Corecontained onlyArgumentswhich was moved toType.Definition.
ASTprovides now only functionality related to parsing and encoding, as it
should be.Execute.executetakes an additional argument, a possible operation name
and returns either a stream or the response.Errormodule was changed to work with dedicated types for errors and the
response instead of JSON.graphqlSubstakes 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 theExecutemodule). The function returns either a
a stream or the resolved value.graphqlreturns either a stream or the resolved value.- The constraint of the base monad was changed to
MonadCatch(and it implies
MonadThrow).
Removed
Trans.ActionTis an unneeded layer of complexity.Type.Out.Resolver
represents possible resolver configurations.Execute.executeWithName.Execute.executetakes the operation name and
completely replacesexecuteWithName.
Downloads
- Location of a parse error is returned in a singleton array with key