-
1.2.0.0
StableAll checks were successfultest Test.released this
2023-02-28 18:01:33 +01:00 | 45 commits to master since this releaseAdded
- Schema printing.
SemigroupandMonoidinstances 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-spicepackage.- CPP
ifdef WITH_JSONblocks.
Downloads
-
1.1.0.0 Stable
released this
2022-12-24 19:58:54 +01:00 | 59 commits to master since this releaseChanged
- Removed deprecated
Language.GraphQL.Errorfunctions:addErr,addErrMsg,
singleError. - Deprecate
Resolution,CollectErrsTandrunCollectErrsin 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 | 66 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 | 73 commits to master since this releaseAdded
Serializeinstance forType.Definition.Value.VariableValueinstance forType.Definition.Value.Jsonbuild 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 | 79 commits to master since this releaseAdded
- Custom
Showinstance forType.Definition.Value(for error
messages). - Path information in errors (path to the field throwing the error).
- Deprecation notes in the
Errormodule forResolution,CollectErrsTand
runCollectErrs. These symbols are part of the old executor and aren't used
anymore, it will be deprecated in the future and removed. THmodule with thegqlquasi 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 | 107 commits to master since this releaseAdded
Language.GraphQL.Execute.OrderedMapis a map data structure, that preserves
insertion order.Language.GraphQL.Schema.schemaWithTypesconstructs 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.descriptionreturns 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.
valuesOfCorrectTypeRuledoesn't check lists recursively since the
validation traverser calls it on all list items.valuesOfCorrectTypeRuledoesn't check objects recursively since the
validation traverser calls it on all object properties.- Validation of non-nullable values inside lists.
executeFieldshouldn'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.ListandAST.Document.ConstValue.ConstListcontain
location information for each list item.Error:singleError,addErrandaddErrMsgare 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 | 133 commits to master since this releaseAdded
Validate.Rules:overlappingFieldsCanBeMergedRulepossibleFragmentSpreadsRulevariablesInAllowedPositionRulevaluesOfCorrectTypeRule
Type.Schema.implementationscontains a map from interfaces and objects to
interfaces they implement.- Show instances for GraphQL type definitions in the
Typemodules. - Custom Show instances for type and value representations in the AST.
AST.Document.escapeescapes a single character in aStringValue.
Downloads
-
0.11.0.0 Stable
released this
2020-11-07 09:05:47 +01:00 | 148 commits to master since this releaseChanged
AST.Document.Selectionwraps additional new types:Field,FragmentSpread
andInlineFragment. Thus validation rules can be defined more concise.AST.Document:ArgumentandDirectivecontain token location.AST.Document.Argumentcontains theValuewrapped in theNode.AST.Lexer.colonandAST.Lexer.atignore the result (it is always the- same).
Validate.Validation:Validation.ruleswas removed.Validation.rules
contained the list of rules, but the executed rules shouldn't know about other
rules.ruleswas a part of theValidationcontext 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:pathis removed since it isn't possible to get
the path without executing the query.Error.Error:pathadded. It is currently always empty.Validate.Validation.Pathwas moved toError.Type.Schema.Schema: data constructor is hidden, fields are accessible with
freestanding functions:query,mutation,subscription,directivesand
types.
Added
Validate.Validation.Ruleconstructors:SelectionRuleFragmentRuleFragmentSpreadRuleArgumentsRuleDirectivesRuleVariablesRuleFieldRule
Validate.Rules:fragmentsOnCompositeTypesRulefragmentSpreadTargetDefinedRulefragmentSpreadTypeExistenceRulenoUnusedFragmentsRulenoFragmentCyclesRuleuniqueArgumentNamesRuleuniqueDirectiveNamesRuleuniqueVariableNamesRulevariablesAreInputTypesRulenoUndefinedVariablesRulenoUndefinedVariablesRulenoUnusedVariablesRuleuniqueInputFieldNamesRulefieldsOnCorrectTypeRulescalarLeafsRuleknownArgumentNamesRuleknownDirectiveNamesRuledirectivesInValidLocationsRuleprovidedRequiredArgumentsRuleprovidedRequiredInputFieldsRule
AST.Document.Field.AST.Document.FragmentSpread.AST.Document.InlineFragment.AST.Document.Node.Type.In.Arguments: Type alias for an argument map.Type.Schema.DirectiveandType.Schema.Directivesare directive definition
representation.Type.Schema.schema: Schema constructor.
Fixed
- Collecting existing types from the schema considers subscriptions.
Removed
AST.Document.Alias. UseAST.Document.Nameinstead.
Downloads
-
0.10.0.0 Stable
released this
2020-08-29 12:12:04 +02:00 | 177 commits to master since this releaseChanged
Test.Hspec.GraphQL.*: replaceIOin the resolver with anyMonadCatch.- The
Locationargument ofAST.Document.Definition.ExecutableDefinitionwas
moved toOperationDefinitionandFragmentDefinitionsince these are the
actual elements that have a location in the document. Validate.Rulesget the whole validation context (AST and schema).
Added
Validate.Validationcontains 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 | 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