-
1.2.0.0
All checks were successfultest Test.released this
2023-02-28 18:01:33 +01:00 | 41 commits to master since this releaseAdded
- Schema printing.
Semigroup
andMonoid
instances forAST.Document.Description
.- Support for vector 0.13.0.0 and transformers 0.6.1.0.
Fixed
- Fix resolvers returning a list in the reverse order.
Removed
- GHC 8 support.
- Cabal -json flag.
Test.Hspec.GraphQL
: moved tographql-spice
package.- CPP
ifdef WITH_JSON
blocks.
Downloads
-
1.1.0.0 Stable
released this
2022-12-24 19:58:54 +01:00 | 55 commits to master since this releaseChanged
- Removed deprecated
Language.GraphQL.Error
functions:addErr
,addErrMsg
,
singleError
. - Deprecate
Resolution
,CollectErrsT
andrunCollectErrs
in theError
module. It was already noted in the documentation that these symbols are
deprecated, now a pragma is added. Language.GraphQL
: Added information about the json flag and switching to
graphql-spice for JSON support.
Added
- Partial schema printing: operation type encoder.
Downloads
- Removed deprecated
-
1.0.3.0 Stable
released this
2022-03-27 13:52:50 +02:00 | 62 commits to master since this releaseFixed
- Index position in error path. (Index and Segment paths of a field have been
swapped). - Parsing empty list as an argument.
Added
- quickCheck Parser test for arguments. Arbitrary instances for Language.GraphQL.AST.Document.
- Enhanced query error messages. Add tests for these cases.
- Allow version 2.0 of the text package.
Downloads
- Index position in error path. (Index and Segment paths of a field have been
-
1.0.2.0 Stable
released this
2021-12-26 05:16:25 +01:00 | 69 commits to master since this releaseAdded
Serialize
instance forType.Definition.Value
.VariableValue
instance forType.Definition.Value
.Json
build flag, enabled by default. JSON and Aeson support can be disabled
by disabling this flag.
Downloads
-
1.0.1.0 Stable
released this
2021-09-27 07:31:01 +02:00 | 75 commits to master since this releaseAdded
- Custom
Show
instance forType.Definition.Value
(for error
messages). - Path information in errors (path to the field throwing the error).
- Deprecation notes in the
Error
module forResolution
,CollectErrsT
and
runCollectErrs
. These symbols are part of the old executor and aren't used
anymore, it will be deprecated in the future and removed. TH
module with thegql
quasi quoter.
Fixed
- Error messages are more concrete, they also contain type information and
wrong values, where appropriate and possible. - If the field with an error is Non-Nullable, the error is propagated to the
first nullable field, as required by the specification.
Downloads
- Custom
-
1.0.0.0 Stable
released this
2021-07-04 10:04:43 +02:00 | 103 commits to master since this releaseAdded
Language.GraphQL.Execute.OrderedMap
is a map data structure, that preserves
insertion order.Language.GraphQL.Schema.schemaWithTypes
constructs a complete schema,
including an optional schema description and user-defined types not referenced
in the schema directly (for example interface implementations).Language.GraphQL.Schema.description
returns the optional schema description.- All errors that can be associated with a location in the query contain
location information.
Fixed
- Parser now accepts empty lists and objects.
- Parser now accepts all directive locations.
valuesOfCorrectTypeRule
doesn't check lists recursively since the
validation traverser calls it on all list items.valuesOfCorrectTypeRule
doesn't check objects recursively since the
validation traverser calls it on all object properties.- Validation of non-nullable values inside lists.
executeField
shouldn't assume that a selection has only one field with a
given name, but it should take the first field. The underlying cause is a
wrong pattern, which (because of the laziness) is executed only if the field
has arguments.
Changed
AST.Document.Value.List
andAST.Document.ConstValue.ConstList
contain
location information for each list item.Error
:singleError
,addErr
andaddErrMsg
are deprecated. They are
internal functions used by the executor for error handling.
Downloads
-
0.11.1.0 Stable
released this
2021-02-07 08:10:46 +01:00 | 129 commits to master since this releaseAdded
Validate.Rules
:overlappingFieldsCanBeMergedRule
possibleFragmentSpreadsRule
variablesInAllowedPositionRule
valuesOfCorrectTypeRule
Type.Schema.implementations
contains a map from interfaces and objects to
interfaces they implement.- Show instances for GraphQL type definitions in the
Type
modules. - Custom Show instances for type and value representations in the AST.
AST.Document.escape
escapes a single character in aStringValue
.
Downloads
-
0.11.0.0 Stable
released this
2020-11-07 09:05:47 +01:00 | 144 commits to master since this releaseChanged
AST.Document.Selection
wraps additional new types:Field
,FragmentSpread
andInlineFragment
. Thus validation rules can be defined more concise.AST.Document
:Argument
andDirective
contain token location.AST.Document.Argument
contains theValue
wrapped in theNode
.AST.Lexer.colon
andAST.Lexer.at
ignore the result (it is always the- same).
Validate.Validation
:Validation.rules
was removed.Validation.rules
contained the list of rules, but the executed rules shouldn't know about other
rules.rules
was a part of theValidation
context to pass it easier
around, but since the rules are traversed once now and applied to all nodes in
the tree at the beginning, it isn't required anymore.Validate.Validation.Error
:path
is removed since it isn't possible to get
the path without executing the query.Error.Error
:path
added. It is currently always empty.Validate.Validation.Path
was moved toError
.Type.Schema.Schema
: data constructor is hidden, fields are accessible with
freestanding functions:query
,mutation
,subscription
,directives
and
types
.
Added
Validate.Validation.Rule
constructors:SelectionRule
FragmentRule
FragmentSpreadRule
ArgumentsRule
DirectivesRule
VariablesRule
FieldRule
Validate.Rules
:fragmentsOnCompositeTypesRule
fragmentSpreadTargetDefinedRule
fragmentSpreadTypeExistenceRule
noUnusedFragmentsRule
noFragmentCyclesRule
uniqueArgumentNamesRule
uniqueDirectiveNamesRule
uniqueVariableNamesRule
variablesAreInputTypesRule
noUndefinedVariablesRule
noUndefinedVariablesRule
noUnusedVariablesRule
uniqueInputFieldNamesRule
fieldsOnCorrectTypeRule
scalarLeafsRule
knownArgumentNamesRule
knownDirectiveNamesRule
directivesInValidLocationsRule
providedRequiredArgumentsRule
providedRequiredInputFieldsRule
AST.Document.Field
.AST.Document.FragmentSpread
.AST.Document.InlineFragment
.AST.Document.Node
.Type.In.Arguments
: Type alias for an argument map.Type.Schema.Directive
andType.Schema.Directives
are directive definition
representation.Type.Schema.schema
: Schema constructor.
Fixed
- Collecting existing types from the schema considers subscriptions.
Removed
AST.Document.Alias
. UseAST.Document.Name
instead.
Downloads
-
0.10.0.0 Stable
released this
2020-08-29 12:12:04 +02:00 | 173 commits to master since this releaseChanged
Test.Hspec.GraphQL.*
: replaceIO
in the resolver with anyMonadCatch
.- The
Location
argument ofAST.Document.Definition.ExecutableDefinition
was
moved toOperationDefinition
andFragmentDefinition
since these are the
actual elements that have a location in the document. Validate.Rules
get the whole validation context (AST and schema).
Added
Validate.Validation
contains data structures and functions used by the
validator and concretet rules.Validate.Rules
: operation validation rules.
Downloads
-
0.9.0.0 Stable
released this
2020-07-24 21:34:31 +02:00 | 180 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