2019-12-26 13:05:17 +01:00
|
|
|
# Changelog
|
2015-09-12 12:54:05 +02:00
|
|
|
All notable changes to this project will be documented in this file.
|
|
|
|
|
2019-12-26 13:05:17 +01:00
|
|
|
The format is based on
|
|
|
|
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
|
and this project adheres to
|
|
|
|
[Haskell Package Versioning Policy](https://pvp.haskell.org/).
|
|
|
|
|
2022-12-25 16:38:00 +01:00
|
|
|
## [Unreleased]
|
|
|
|
### Added
|
|
|
|
- Partial schema printing: schema definition encoder.
|
2022-12-27 10:37:34 +01:00
|
|
|
- `Semigroup` and `Monoid` instances for `AST.Document.Description`.
|
2022-12-25 16:38:00 +01:00
|
|
|
|
2022-12-24 18:09:52 +01:00
|
|
|
## [1.1.0.0] - 2022-12-24
|
2022-03-31 21:49:44 +02:00
|
|
|
### Changed
|
|
|
|
- Removed deprecated `Language.GraphQL.Error` functions: `addErr`, `addErrMsg`,
|
|
|
|
`singleError`.
|
2022-06-30 11:10:46 +02:00
|
|
|
- Deprecate `Resolution`, `CollectErrsT` and `runCollectErrs` in the `Error`
|
|
|
|
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.
|
2022-03-31 21:49:44 +02:00
|
|
|
|
2022-10-02 11:38:53 +02:00
|
|
|
### Added
|
|
|
|
- Partial schema printing: operation type encoder.
|
|
|
|
|
2022-03-27 13:41:16 +02:00
|
|
|
## [1.0.3.0] - 2022-03-27
|
2022-01-04 12:40:41 +01:00
|
|
|
### Fixed
|
2022-01-06 14:49:54 +01:00
|
|
|
- Index position in error path. (Index and Segment paths of a field have been
|
|
|
|
swapped).
|
|
|
|
- Parsing empty list as an argument.
|
2022-01-04 12:40:41 +01:00
|
|
|
|
2022-02-02 18:52:46 +01:00
|
|
|
### Added
|
|
|
|
- quickCheck Parser test for arguments. Arbitrary instances for Language.GraphQL.AST.Document.
|
2022-02-11 20:50:53 +01:00
|
|
|
- Enhanced query error messages. Add tests for these cases.
|
2022-03-27 13:41:16 +02:00
|
|
|
- Allow version 2.0 of the text package.
|
2022-02-02 18:52:46 +01:00
|
|
|
|
2021-12-26 05:14:36 +01:00
|
|
|
## [1.0.2.0] - 2021-12-26
|
2021-12-22 08:56:01 +01:00
|
|
|
### Added
|
|
|
|
- `Serialize` instance for `Type.Definition.Value`.
|
|
|
|
- `VariableValue` instance for `Type.Definition.Value`.
|
2021-12-24 13:35:18 +01:00
|
|
|
- `Json` build flag, enabled by default. JSON and Aeson support can be disabled
|
|
|
|
by disabling this flag.
|
2021-12-22 08:56:01 +01:00
|
|
|
|
2021-09-27 07:24:02 +02:00
|
|
|
## [1.0.1.0] - 2021-09-27
|
2021-09-04 07:12:34 +02:00
|
|
|
### Added
|
|
|
|
- Custom `Show` instance for `Type.Definition.Value` (for error
|
2021-08-31 17:29:20 +02:00
|
|
|
messages).
|
2021-09-04 07:12:34 +02:00
|
|
|
- Path information in errors (path to the field throwing the error).
|
2021-09-05 09:14:57 +02:00
|
|
|
- Deprecation notes in the `Error` module for `Resolution`, `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.
|
2021-09-21 09:37:57 +02:00
|
|
|
- `TH` module with the `gql` quasi quoter.
|
2021-09-04 07:12:34 +02:00
|
|
|
|
|
|
|
### 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.
|
2021-08-31 17:29:20 +02:00
|
|
|
|
2021-09-27 07:24:02 +02:00
|
|
|
## [1.0.0.0] - 2021-07-04
|
2021-02-19 08:09:04 +01:00
|
|
|
### Added
|
|
|
|
- `Language.GraphQL.Execute.OrderedMap` is a map data structure, that preserves
|
|
|
|
insertion order.
|
2021-05-13 17:40:38 +02:00
|
|
|
- `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.
|
2021-07-02 09:28:03 +02:00
|
|
|
- All errors that can be associated with a location in the query contain
|
|
|
|
location information.
|
2021-02-11 12:02:08 +01:00
|
|
|
|
2021-02-20 16:06:27 +01:00
|
|
|
### Fixed
|
|
|
|
- Parser now accepts empty lists and objects.
|
|
|
|
- Parser now accepts all directive locations.
|
2021-04-12 07:09:39 +02:00
|
|
|
- `valuesOfCorrectTypeRule` doesn't check lists recursively since the
|
2021-03-16 10:08:13 +01:00
|
|
|
validation traverser calls it on all list items.
|
2021-04-12 07:09:39 +02:00
|
|
|
- `valuesOfCorrectTypeRule` doesn't check objects recursively since the
|
|
|
|
validation traverser calls it on all object properties.
|
2021-05-06 22:23:16 +02:00
|
|
|
- Validation of non-nullable values inside lists.
|
2021-06-18 06:51:14 +02:00
|
|
|
- `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.
|
2021-03-16 10:08:13 +01:00
|
|
|
|
|
|
|
### Changed
|
|
|
|
- `AST.Document.Value.List` and `AST.Document.ConstValue.ConstList` contain
|
|
|
|
location information for each list item.
|
2021-05-10 09:43:39 +02:00
|
|
|
- `Error`: `singleError`, `addErr` and `addErrMsg` are deprecated. They are
|
|
|
|
internal functions used by the executor for error handling.
|
2021-02-20 16:06:27 +01:00
|
|
|
|
2021-02-07 08:10:46 +01:00
|
|
|
## [0.11.1.0] - 2021-02-07
|
2020-11-15 10:11:09 +01:00
|
|
|
### Added
|
|
|
|
- `Validate.Rules`:
|
|
|
|
- `overlappingFieldsCanBeMergedRule`
|
2020-11-19 08:48:37 +01:00
|
|
|
- `possibleFragmentSpreadsRule`
|
2020-12-26 06:31:56 +01:00
|
|
|
- `variablesInAllowedPositionRule`
|
2021-02-03 05:42:10 +01:00
|
|
|
- `valuesOfCorrectTypeRule`
|
2020-11-17 08:10:32 +01:00
|
|
|
- `Type.Schema.implementations` contains a map from interfaces and objects to
|
|
|
|
interfaces they implement.
|
2020-12-14 22:36:27 +01:00
|
|
|
- Show instances for GraphQL type definitions in the `Type` modules.
|
2021-02-04 08:12:12 +01:00
|
|
|
- Custom Show instances for type and value representations in the AST.
|
2021-02-06 12:54:27 +01:00
|
|
|
- `AST.Document.escape` escapes a single character in a `StringValue`.
|
2020-11-11 08:49:45 +01:00
|
|
|
|
2020-11-07 08:06:15 +01:00
|
|
|
## [0.11.0.0] - 2020-11-07
|
2020-08-31 11:06:27 +02:00
|
|
|
### Changed
|
2020-09-09 17:04:31 +02:00
|
|
|
- `AST.Document.Selection` wraps additional new types: `Field`, `FragmentSpread`
|
|
|
|
and `InlineFragment`. Thus validation rules can be defined more concise.
|
2020-09-18 07:32:58 +02:00
|
|
|
- `AST.Document`: `Argument` and `Directive` contain token location.
|
2020-09-21 07:28:40 +02:00
|
|
|
- `AST.Document.Argument` contains the `Value` wrapped in the `Node`.
|
2020-09-18 07:32:58 +02:00
|
|
|
- `AST.Lexer.colon` and `AST.Lexer.at` ignore the result (it is always the
|
|
|
|
- same).
|
2020-09-14 07:49:33 +02:00
|
|
|
- `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 the `Validation` 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.
|
2020-09-16 09:12:49 +02:00
|
|
|
- `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 to `Error`.
|
2020-10-07 05:24:51 +02:00
|
|
|
- `Type.Schema.Schema`: data constructor is hidden, fields are accessible with
|
|
|
|
freestanding functions: `query`, `mutation`, `subscription`, `directives` and
|
|
|
|
`types`.
|
2020-08-31 11:06:27 +02:00
|
|
|
|
|
|
|
### Added
|
2020-09-19 18:18:26 +02:00
|
|
|
- `Validate.Validation.Rule` constructors:
|
|
|
|
- `SelectionRule`
|
|
|
|
- `FragmentRule`
|
|
|
|
- `FragmentSpreadRule`
|
|
|
|
- `ArgumentsRule`
|
|
|
|
- `DirectivesRule`
|
|
|
|
- `VariablesRule`
|
2020-09-28 07:06:15 +02:00
|
|
|
- `FieldRule`
|
2020-09-04 19:12:19 +02:00
|
|
|
- `Validate.Rules`:
|
2020-09-07 22:01:49 +02:00
|
|
|
- `fragmentsOnCompositeTypesRule`
|
2020-09-04 19:12:19 +02:00
|
|
|
- `fragmentSpreadTargetDefinedRule`
|
|
|
|
- `fragmentSpreadTypeExistenceRule`
|
2020-09-09 17:04:31 +02:00
|
|
|
- `noUnusedFragmentsRule`
|
2020-09-11 08:03:49 +02:00
|
|
|
- `noFragmentCyclesRule`
|
2020-09-17 10:33:37 +02:00
|
|
|
- `uniqueArgumentNamesRule`
|
2020-09-18 07:32:58 +02:00
|
|
|
- `uniqueDirectiveNamesRule`
|
2020-09-19 18:18:26 +02:00
|
|
|
- `uniqueVariableNamesRule`
|
2020-09-20 06:59:27 +02:00
|
|
|
- `variablesAreInputTypesRule`
|
2020-09-21 07:28:40 +02:00
|
|
|
- `noUndefinedVariablesRule`
|
|
|
|
- `noUndefinedVariablesRule`
|
2020-09-22 04:42:25 +02:00
|
|
|
- `noUnusedVariablesRule`
|
2020-09-24 05:47:31 +02:00
|
|
|
- `uniqueInputFieldNamesRule`
|
2020-09-25 21:57:25 +02:00
|
|
|
- `fieldsOnCorrectTypeRule`
|
2020-09-26 09:06:30 +02:00
|
|
|
- `scalarLeafsRule`
|
2020-09-28 07:06:15 +02:00
|
|
|
- `knownArgumentNamesRule`
|
2020-09-29 06:21:32 +02:00
|
|
|
- `knownDirectiveNamesRule`
|
2020-10-03 07:34:34 +02:00
|
|
|
- `directivesInValidLocationsRule`
|
|
|
|
- `providedRequiredArgumentsRule`
|
2020-10-04 18:51:21 +02:00
|
|
|
- `providedRequiredInputFieldsRule`
|
2020-09-09 17:04:31 +02:00
|
|
|
- `AST.Document.Field`.
|
2020-09-07 22:01:49 +02:00
|
|
|
- `AST.Document.FragmentSpread`.
|
|
|
|
- `AST.Document.InlineFragment`.
|
2020-09-21 07:28:40 +02:00
|
|
|
- `AST.Document.Node`.
|
2020-09-28 07:06:15 +02:00
|
|
|
- `Type.In.Arguments`: Type alias for an argument map.
|
|
|
|
- `Type.Schema.Directive` and `Type.Schema.Directives` are directive definition
|
|
|
|
representation.
|
2020-10-07 05:24:51 +02:00
|
|
|
- `Type.Schema.schema`: Schema constructor.
|
2020-09-04 19:12:19 +02:00
|
|
|
|
|
|
|
### Fixed
|
|
|
|
- Collecting existing types from the schema considers subscriptions.
|
2020-08-31 11:06:27 +02:00
|
|
|
|
2020-09-09 17:04:31 +02:00
|
|
|
### Removed
|
|
|
|
- `AST.Document.Alias`. Use `AST.Document.Name` instead.
|
|
|
|
|
2020-08-29 12:12:04 +02:00
|
|
|
## [0.10.0.0] - 2020-08-29
|
2020-08-31 11:06:27 +02:00
|
|
|
### Changed
|
2020-08-22 06:39:52 +02:00
|
|
|
- `Test.Hspec.GraphQL.*`: replace `IO` in the resolver with any `MonadCatch`.
|
2020-08-25 21:03:42 +02:00
|
|
|
- The `Location` argument of `AST.Document.Definition.ExecutableDefinition` was
|
|
|
|
moved to `OperationDefinition` and `FragmentDefinition` since these are the
|
|
|
|
actual elements that have a location in the document.
|
|
|
|
- `Validate.Rules` get the whole validation context (AST and schema).
|
|
|
|
|
2020-08-31 11:06:27 +02:00
|
|
|
### Added
|
2020-08-25 21:03:42 +02:00
|
|
|
- `Validate.Validation` contains data structures and functions used by the
|
|
|
|
validator and concretet rules.
|
2020-08-28 08:32:21 +02:00
|
|
|
- `Validate.Rules`: operation validation rules.
|
2020-08-18 20:53:47 +02:00
|
|
|
|
|
|
|
## [0.9.0.0] - 2020-07-24
|
2020-08-31 11:06:27 +02:00
|
|
|
### Fixed
|
2020-07-08 08:16:14 +02:00
|
|
|
- Location of a parse error is returned in a singleton array with key
|
|
|
|
`locations`.
|
2020-07-09 08:11:12 +02:00
|
|
|
- Parsing comments in the front of definitions.
|
2020-07-10 08:43:47 +02:00
|
|
|
- Some missing labels were added to the parsers, some labels were fixed to
|
2021-02-20 16:06:27 +01:00
|
|
|
refer to the AST nodes being parsed.
|
2020-07-08 08:16:14 +02:00
|
|
|
|
2020-08-31 11:06:27 +02:00
|
|
|
### Added
|
2020-06-30 10:28:10 +02:00
|
|
|
- `AST` reexports `AST.Parser`.
|
2020-07-08 08:16:14 +02:00
|
|
|
- `AST.Document.Location` is a token location as a line and column pair.
|
2020-07-05 14:36:00 +02:00
|
|
|
- `Execute` reexports `Execute.Coerce`.
|
|
|
|
- `Error.Error` is an error representation with a message and source location.
|
|
|
|
- `Error.Response` represents a result of running a GraphQL query.
|
2020-07-06 19:10:34 +02:00
|
|
|
- `Type.Schema` exports `Type` which lists all types possible in the schema.
|
2020-08-18 20:53:47 +02:00
|
|
|
- Parsing subscriptions.
|
2020-07-14 19:37:56 +02:00
|
|
|
- `Error.ResponseEventStream`, `Type.Out.Resolve`, `Type.Out.Subscribe` and
|
|
|
|
`Type.Out.SourceEventStream` define subscription resolvers.
|
2020-07-17 07:05:03 +02:00
|
|
|
- `Error.ResolverException` is an exception that can be thrown by (field value
|
|
|
|
and event stream) resolvers to signalize an error. Other exceptions will
|
|
|
|
escape.
|
2020-07-19 07:36:06 +02:00
|
|
|
- `Test.Hspec.GraphQL` contains some test helpers.
|
2020-07-24 21:34:31 +02:00
|
|
|
- `Validate` contains the validator and standard rules.
|
2020-06-30 10:28:10 +02:00
|
|
|
|
2020-08-31 11:06:27 +02:00
|
|
|
### Changed
|
2020-07-14 19:37:56 +02:00
|
|
|
- `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
|
2020-07-17 07:05:03 +02:00
|
|
|
now and pairs a field with the function(s). Resolvers don't have `ExceptT`,
|
|
|
|
errors are handled with `MonadThrow`/`MonadCatch`.
|
2020-07-02 07:33:03 +02:00
|
|
|
- All code from `Trans` is moved to `Type.Out` and exported by `Type` and
|
|
|
|
`Type.Out`.
|
2020-06-30 10:28:10 +02:00
|
|
|
- `AST.Core` contained only `Arguments` which was moved to `Type.Definition`.
|
|
|
|
`AST` provides now only functionality related to parsing and encoding, as it
|
|
|
|
should be.
|
2020-07-14 19:37:56 +02:00
|
|
|
- `Execute.execute` takes an additional argument, a possible operation name
|
|
|
|
and returns either a stream or the response.
|
2020-07-05 14:36:00 +02:00
|
|
|
- `Error` module was changed to work with dedicated types for errors and the
|
|
|
|
response instead of JSON.
|
2020-07-08 08:16:14 +02:00
|
|
|
- `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
|
2020-07-19 07:36:06 +02:00
|
|
|
underlying functions (in the `Execute` module). The function returns either a
|
|
|
|
a stream or the resolved value.
|
|
|
|
- `graphql` returns either a stream or the resolved value.
|
2020-07-17 07:05:03 +02:00
|
|
|
- The constraint of the base monad was changed to `MonadCatch` (and it implies
|
|
|
|
`MonadThrow`).
|
2020-06-29 13:14:23 +02:00
|
|
|
|
2020-08-31 11:06:27 +02:00
|
|
|
### Removed
|
2020-07-14 19:37:56 +02:00
|
|
|
- `Trans.ActionT` is an unneeded layer of complexity. `Type.Out.Resolver`
|
|
|
|
represents possible resolver configurations.
|
2020-07-05 14:36:00 +02:00
|
|
|
- `Execute.executeWithName`. `Execute.execute` takes the operation name and
|
|
|
|
completely replaces `executeWithName`.
|
2020-06-29 13:14:23 +02:00
|
|
|
|
2020-06-20 05:48:25 +02:00
|
|
|
## [0.8.0.0] - 2020-06-20
|
2020-05-22 10:11:48 +02:00
|
|
|
### Fixed
|
|
|
|
- The parser rejects variables when parsing defaultValue (DefaultValue). The
|
|
|
|
specification defines default values as `Value` with `const` parameter and
|
2020-05-24 13:51:00 +02:00
|
|
|
constants cannot be variables. `AST.Document.ConstValue` was added,
|
2020-05-22 10:11:48 +02:00
|
|
|
`AST.Document.ObjectField` was modified.
|
2020-05-23 06:46:21 +02:00
|
|
|
- AST transformation should never fail.
|
2020-06-10 11:42:00 +02:00
|
|
|
* Arguments and fields with a missing variable as value should be left out.
|
2020-05-23 06:46:21 +02:00
|
|
|
* Invalid (recusrive or non-existing) fragments should be skipped.
|
2020-06-06 21:22:11 +02:00
|
|
|
- Argument value coercion.
|
|
|
|
- Variable value coercion.
|
2020-06-19 10:53:41 +02:00
|
|
|
- Result coercion.
|
2020-06-10 11:42:00 +02:00
|
|
|
- The executor should skip the fields missing in the object type and not fail.
|
2020-06-12 07:58:08 +02:00
|
|
|
- Merging subselections.
|
2020-05-22 10:11:48 +02:00
|
|
|
|
2020-05-13 16:21:48 +02:00
|
|
|
### Changed
|
2020-06-03 07:20:38 +02:00
|
|
|
- `Schema.Resolver` was moved to `Type.Out`, it is a field and resolver function
|
|
|
|
pair.
|
2020-05-27 23:18:35 +02:00
|
|
|
- `AST.Core.Value` was moved into `Type.Definition`. These values are used only
|
|
|
|
in the execution and type system, it is not a part of the parsing tree.
|
2020-05-25 07:41:21 +02:00
|
|
|
- `Type` module is superseded by `Type.Out`. This module contains now only
|
|
|
|
exports from other module that complete `Type.In` and `Type.Out` exports.
|
2020-05-27 23:18:35 +02:00
|
|
|
- `Error.CollectErrsT` contains the new `Resolution` data structure.
|
|
|
|
`Resolution` represents the state used by the executor. It contains all types
|
|
|
|
defined in the schema and collects the thrown errors.
|
2020-05-11 12:30:41 +02:00
|
|
|
|
2020-05-14 09:17:14 +02:00
|
|
|
### Added
|
2020-05-25 07:41:21 +02:00
|
|
|
- `Type.Definition` contains base type system definition, e.g. Enums and
|
|
|
|
Scalars.
|
2020-05-21 10:20:59 +02:00
|
|
|
- `Type.Schema` describes a schema. Both public functions that execute queries
|
2020-05-14 09:17:14 +02:00
|
|
|
accept a `Schema` now instead of a `HashMap`. The execution fails if the root
|
|
|
|
operation doesn't match the root Query type in the schema.
|
2020-05-26 11:13:55 +02:00
|
|
|
- `Type.In` and `Type.Out` contain definitions for input and output types.
|
2020-05-21 10:20:59 +02:00
|
|
|
- `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 of `VariableValue`.
|
|
|
|
|
|
|
|
### Removed
|
2020-05-23 06:46:21 +02:00
|
|
|
- `Schema.scalar`, `Schema.wrappedScalar`. They accepted everything can be
|
|
|
|
converted to JSON and JSON is not suitable as an internal representation for
|
2020-05-27 23:18:35 +02:00
|
|
|
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.
|
2020-06-03 07:20:38 +02:00
|
|
|
- `Schema.resolve` is superseded by `Execute.Execution`.
|
2020-05-27 23:18:35 +02:00
|
|
|
- `Error.runAppendErrs` isn't used anywhere.
|
|
|
|
- `AST.Core`: `Document`, `Directive`, `Field`, `Fragment`, `Selection`, `Alias`
|
|
|
|
`TypeCondition` were modified, moved into `Execute.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.
|
2020-06-07 06:16:45 +02:00
|
|
|
- `AST.Core` doesn't reexports anything.
|
2020-05-14 09:17:14 +02:00
|
|
|
|
2020-05-11 12:30:41 +02:00
|
|
|
## [0.7.0.0] - 2020-05-11
|
2020-03-31 09:04:34 +02:00
|
|
|
### Fixed
|
|
|
|
- Result of null encoding
|
2020-03-29 15:56:07 +02:00
|
|
|
- Block strings encoding
|
|
|
|
- Result of tab and newline encoding
|
2020-03-31 09:04:34 +02:00
|
|
|
|
2019-12-26 13:00:47 +01:00
|
|
|
### Added
|
|
|
|
- AST for the GraphQL schema.
|
2020-01-26 11:55:15 +01:00
|
|
|
- Type system definition parser.
|
2019-12-31 08:29:03 +01:00
|
|
|
- `Trans.argument`.
|
2020-01-25 16:37:17 +01:00
|
|
|
- Schema extension parser.
|
2020-05-10 18:32:58 +02:00
|
|
|
- Contributing guidelines.
|
2020-05-13 16:21:48 +02:00
|
|
|
- `Schema.resolversToMap` (intended to be used internally).
|
2019-12-26 13:00:47 +01:00
|
|
|
|
2019-12-25 06:45:29 +01:00
|
|
|
### Changed
|
2019-12-28 07:07:58 +01:00
|
|
|
- Rename `AST.Definition` into `AST.Document.ExecutableDefinition`.
|
|
|
|
`AST.Document.TypeSystemDefinition` and `AST.Document.TypeSystemExtension`
|
|
|
|
can also be definitions.
|
|
|
|
- Move all AST data to `AST.Document` and reexport them.
|
|
|
|
- Rename `AST.OperationSelectionSet` to `AST.Document.SelectionSet`.
|
2019-12-30 18:26:24 +01:00
|
|
|
- Make `Schema.Subs` a `Data.HashMap.Strict` (was a function
|
|
|
|
`key -> Maybe value` before).
|
2020-01-17 12:22:29 +01:00
|
|
|
- Make `AST.Lexer.at` a text (symbol) parser. It was a char before and is
|
|
|
|
`symbol "@"` now.
|
2020-02-01 20:46:35 +01:00
|
|
|
- Replace `MonadIO` with a plain `Monad`. Since the tests don't use IO,
|
|
|
|
set the inner monad to `Identity`.
|
2020-05-10 18:32:58 +02:00
|
|
|
- `NonEmpty (Resolver m)` is now `HashMap Text (NonEmpty (Resolver m))`. Root
|
|
|
|
operation type can be any type, therefore a hashmap is needed. Since types
|
|
|
|
cannot be empty, we save the list of resolvers in the type as a non-empty
|
|
|
|
list. Currently only "Query" and "Mutation" are supported as types. For more
|
|
|
|
schema support is required. The executor checks now if the type in the query
|
|
|
|
matches the type of the provided root resolvers.
|
2019-12-26 13:05:17 +01:00
|
|
|
|
|
|
|
### Removed
|
|
|
|
- `AST.Field`, `AST.InlineFragment` and `AST.FragmentSpread`.
|
2019-12-25 06:45:29 +01:00
|
|
|
These types are only used in `AST.Selection` and `AST.Selection` contains now
|
|
|
|
3 corresponding data constructors, `Field`, `InlineFragment` and
|
|
|
|
`FragmentSpread`, instead of separate types. It simplifies pattern matching
|
|
|
|
and doesn't make the code less typesafe.
|
2019-12-31 08:29:03 +01:00
|
|
|
- `Schema.scalarA`.
|
|
|
|
- `Schema.wrappedScalarA`.
|
|
|
|
- `Schema.wrappedObjectA`.
|
|
|
|
- `Schema.objectA`.
|
2020-01-01 10:58:11 +01:00
|
|
|
- `AST.Argument`. Replaced with `AST.Arguments` which holds all arguments as a
|
|
|
|
key/value map.
|
2019-12-25 06:45:29 +01:00
|
|
|
|
2019-12-23 06:35:32 +01:00
|
|
|
## [0.6.1.0] - 2019-12-23
|
2019-11-27 09:18:20 +01:00
|
|
|
### Fixed
|
2019-12-25 06:45:29 +01:00
|
|
|
- Parsing multiple string arguments, such as
|
2019-11-27 09:18:20 +01:00
|
|
|
`login(username: "username", password: "password")` would fail on the comma
|
|
|
|
due to strings not having a space consumer.
|
2019-12-01 20:43:19 +01:00
|
|
|
- Fragment spread is evaluated based on the `__typename` resolver. If the
|
|
|
|
resolver is missing, it is assumed that the type condition is satisfied (all
|
|
|
|
fragments are included).
|
2019-12-19 06:59:27 +01:00
|
|
|
- Escaping characters during encoding.
|
2019-11-27 09:18:20 +01:00
|
|
|
|
2019-12-06 22:52:24 +01:00
|
|
|
### Added
|
|
|
|
- Directive support (@skip and @include).
|
2019-12-21 09:16:41 +01:00
|
|
|
- Pretifying multi-line string arguments as block strings.
|
2019-12-06 22:52:24 +01:00
|
|
|
|
2019-11-27 08:26:51 +01:00
|
|
|
## [0.6.0.0] - 2019-11-27
|
2019-11-03 10:42:10 +01:00
|
|
|
### Changed
|
|
|
|
- `Language.GraphQL.Encoder` moved to `Language.GraphQL.AST.Encoder`.
|
|
|
|
- `Language.GraphQL.Parser` moved to `Language.GraphQL.AST.Parser`.
|
|
|
|
- `Language.GraphQL.Lexer` moved to `Language.GraphQL.AST.Lexer`.
|
|
|
|
- All `Language.GraphQL.AST.Value` data constructor prefixes were removed. The
|
|
|
|
module should be imported qualified.
|
|
|
|
- All `Language.GraphQL.AST.Core.Value` data constructor prefixes were removed.
|
|
|
|
The module should be imported qualified.
|
2019-11-22 08:00:50 +01:00
|
|
|
- `Language.GraphQL.AST.Core.Object` is now just a HashMap.
|
|
|
|
- `Language.GraphQL.AST.Transform` is isn't exposed publically anymore.
|
|
|
|
- `Language.GraphQL.Schema.resolve` accepts a selection `Seq` (`Data.Sequence`)
|
|
|
|
instead of a list. Selections are stored as sequences internally as well.
|
2019-11-23 09:49:12 +01:00
|
|
|
- Add a reader instance to the resolver's monad stack. The Reader contains
|
|
|
|
a Name/Value hashmap, which will contain resolver arguments.
|
2019-11-03 10:42:10 +01:00
|
|
|
|
2019-11-09 23:24:31 +01:00
|
|
|
### Added
|
2019-11-22 08:00:50 +01:00
|
|
|
- Nested fragment support.
|
|
|
|
|
|
|
|
### Fixed
|
|
|
|
- Consume ignored tokens after `$` and `!`. I mistakenly assumed that
|
|
|
|
`$variable` is a single token, same as `Type!` is a single token. This is not
|
|
|
|
the case, for example `Variable` is defined as `$ Name`, so these are two
|
|
|
|
tokens, therefore whitespaces and commas after `$` and `!` should be
|
|
|
|
consumed.
|
|
|
|
|
|
|
|
### Improved
|
|
|
|
- `Language.GraphQL.AST.Parser.type_`: Try type parsers in a variable
|
|
|
|
definition in a different order to avoid using `but`.
|
2019-11-09 23:24:31 +01:00
|
|
|
|
2019-11-23 09:49:12 +01:00
|
|
|
### Removed
|
|
|
|
- `Language.GraphQL.AST.Arguments`. Use `[Language.GraphQL.AST.Argument]`
|
|
|
|
instead.
|
|
|
|
- `Language.GraphQL.AST.Directives`. Use `[Language.GraphQL.AST.Directives]`
|
|
|
|
instead.
|
|
|
|
- `Language.GraphQL.AST.VariableDefinitions`. Use
|
|
|
|
`[Language.GraphQL.AST.VariableDefinition]` instead.
|
|
|
|
- `Language.GraphQL.AST.FragmentName`. Use `Language.GraphQL.AST.Name` instead.
|
|
|
|
- `Language.GraphQL.Execute.Schema` - It was a resolver list, not a schema.
|
|
|
|
- `Language.GraphQL.Schema`: `enum`, `enumA`, `wrappedEnum` and `wrappedEnumA`.
|
|
|
|
Use `scalar`, `scalarA`, `wrappedScalar` and `wrappedScalarA` instead.
|
|
|
|
|
|
|
|
|
2019-10-22 07:07:54 +02:00
|
|
|
## [0.5.1.0] - 2019-10-22
|
2019-10-01 06:59:30 +02:00
|
|
|
### Deprecated
|
|
|
|
- `Language.GraphQL.AST.Arguments`. Use `[Language.GraphQL.AST.Argument]`
|
|
|
|
instead.
|
|
|
|
- `Language.GraphQL.AST.Directives`. Use `[Language.GraphQL.AST.Directives]`
|
|
|
|
instead.
|
|
|
|
- `Language.GraphQL.AST.VariableDefinitions`. Use
|
|
|
|
`[Language.GraphQL.AST.VariableDefinition]` instead.
|
|
|
|
|
|
|
|
### Added
|
|
|
|
- Module documentation.
|
2019-10-11 23:28:55 +02:00
|
|
|
- Inline fragment support.
|
2019-09-13 20:33:39 +02:00
|
|
|
|
2019-10-22 07:07:54 +02:00
|
|
|
### Fixed
|
|
|
|
- Top-level fragments.
|
|
|
|
- Fragment for execution is chosen based on the type.
|
|
|
|
|
2019-09-10 10:06:48 +02:00
|
|
|
## [0.5.0.1] - 2019-09-10
|
2019-08-26 10:14:46 +02:00
|
|
|
### Added
|
|
|
|
- Minimal documentation for all public symbols.
|
|
|
|
|
2019-08-29 07:40:50 +02:00
|
|
|
### Deprecated
|
2019-08-30 07:26:04 +02:00
|
|
|
- `Language.GraphQL.AST.FragmentName`. Replaced with Language.GraphQL.AST.Name.
|
|
|
|
- `Language.GraphQL.Execute.Schema` - It is not a schema (at least not a
|
|
|
|
complete one), but a resolver list, and the resolvers should be provided by
|
|
|
|
the user separately, because the schema can originate from a GraphQL
|
|
|
|
document. `Schema` name should be free to provide a data type for the real
|
|
|
|
schema later.
|
2019-09-01 02:53:15 +02:00
|
|
|
- `Language.GraphQL.Schema`: `enum`, `enumA`, `wrappedEnum` and `wrappedEnumA`.
|
|
|
|
There are actually only two generic types in GraphQL: Scalars and objects.
|
|
|
|
Enum is a scalar value.
|
2019-08-29 07:40:50 +02:00
|
|
|
|
2019-09-06 07:48:01 +02:00
|
|
|
### Fixed
|
|
|
|
- Parsing block string values.
|
|
|
|
|
2019-08-14 08:49:07 +02:00
|
|
|
## [0.5.0.0] - 2019-08-14
|
2019-07-25 07:37:36 +02:00
|
|
|
### Added
|
|
|
|
- `executeWithName` executes an operation with the given name.
|
2019-08-14 08:49:07 +02:00
|
|
|
- Export `Language.GraphQL.Encoder.definition`,
|
|
|
|
`Language.GraphQL.Encoder.type'` and `Language.GraphQL.Encoder.directive`.
|
2019-08-13 07:24:05 +02:00
|
|
|
- Export `Language.GraphQL.Encoder.value`. Escapes \ and " in strings now.
|
2019-07-25 07:37:36 +02:00
|
|
|
|
|
|
|
### Changed
|
|
|
|
- `Operation` includes now possible operation name which allows to support
|
|
|
|
documents with multiple operations.
|
2019-08-02 13:52:51 +02:00
|
|
|
- `Language.GraphQL.Encoder.document` and other encoding functions take a
|
|
|
|
`Formatter` as argument to distinguish between minified and pretty printing.
|
2019-08-05 09:00:11 +02:00
|
|
|
- All encoder functions return `Data.Text.Lazy`.
|
2019-07-25 07:37:36 +02:00
|
|
|
|
2019-07-27 07:19:21 +02:00
|
|
|
### Removed
|
|
|
|
- Unused `Language.GraphQL.Encoder.spaced`.
|
|
|
|
|
2019-07-23 06:04:33 +02:00
|
|
|
## [0.4.0.0] - 2019-07-23
|
|
|
|
### Added
|
|
|
|
- Support for mutations.
|
|
|
|
- Error handling (with monad transformers).
|
|
|
|
- Nullable types.
|
|
|
|
- Arbitrary nested lists support.
|
|
|
|
- Potential BOM header parsing.
|
|
|
|
|
|
|
|
### Changed
|
|
|
|
- attoparsec is replaced with megaparsec.
|
|
|
|
- The library is now under `Language.GraphQL` (instead of `Data.GraphQL`).
|
|
|
|
- HUnit and tasty are replaced with Hspec.
|
|
|
|
- `Alternative`/`MonadPlus` resolver constraints are replaced with `MonadIO`.
|
|
|
|
|
|
|
|
### Removed
|
|
|
|
- Duplicates from `Language.GraphQL.AST` already available in
|
|
|
|
`Language.GraphQL.AST.Core`.
|
|
|
|
- All module exports are now explicit, so private and help functions aren't
|
|
|
|
exported anymore.
|
|
|
|
|
2015-09-22 14:27:10 +02:00
|
|
|
## [0.3] - 2015-09-22
|
|
|
|
### Changed
|
|
|
|
- Exact match numeric types to spec.
|
|
|
|
- Names follow now the spec.
|
|
|
|
- AST slightly different for better readability or easier parsing.
|
|
|
|
- Replace golden test for test to validate parsing/encoding.
|
|
|
|
|
|
|
|
### Added
|
|
|
|
- Parsing errors in all cases where `Alternative` is used.
|
|
|
|
- GraphQL encoder.
|
|
|
|
|
|
|
|
### Fixed
|
|
|
|
- Expect braces `inputValueDefinitions` instead of parens when parsing.
|
|
|
|
|
2015-09-16 11:16:16 +02:00
|
|
|
## [0.2.1] - 2015-09-16
|
|
|
|
### Fixed
|
|
|
|
- Include data files for golden tests in Cabal package.
|
|
|
|
- Support for ghc-7.8.
|
|
|
|
|
2015-09-14 17:25:18 +02:00
|
|
|
## [0.2] - 2015-09-14
|
|
|
|
### Added
|
|
|
|
- Rudimentary parser for `GraphQL` which successfully parses the sample file
|
|
|
|
`kitchen-sink.graphql` from `graphql-js` tests.
|
|
|
|
- Golden test for `kitchen-sink.grahql` parsing.
|
|
|
|
### Changed
|
|
|
|
- Many optional data types in `GraphQl` didn't need to be wrapped in a `Maybe`.
|
|
|
|
- Some `newtype`s became type synonyms for easier parsing.
|
|
|
|
|
2015-09-16 11:16:16 +02:00
|
|
|
## 0.1 - 2015-09-12
|
2015-09-12 12:54:05 +02:00
|
|
|
### Added
|
|
|
|
- Data types for the GraphQL language.
|
2015-09-16 11:16:16 +02:00
|
|
|
|
2022-12-25 16:38:00 +01:00
|
|
|
[Unreleased]: https://www.caraus.tech/projects/pub-graphql/repository/23/diff?rev=master&rev_to=v1.1.0.0
|
2022-12-24 18:09:52 +01:00
|
|
|
[1.1.0.0]: https://www.caraus.tech/projects/pub-graphql/repository/23/diff?rev=v1.1.0.0&rev_to=v1.0.3.0
|
|
|
|
[1.0.3.0]: https://www.caraus.tech/projects/pub-graphql/repository/23/diff?rev=v1.0.3.0&rev_to=v1.0.2.0
|
|
|
|
[1.0.2.0]: https://www.caraus.tech/projects/pub-graphql/repository/23/diff?rev=v1.0.2.0&rev_to=v1.0.1.0
|
2021-09-27 07:24:02 +02:00
|
|
|
[1.0.1.0]: https://www.caraus.tech/projects/pub-graphql/repository/23/diff?rev=v1.0.1.0&rev_to=v1.0.0.0
|
2021-07-04 09:57:17 +02:00
|
|
|
[1.0.0.0]: https://www.caraus.tech/projects/pub-graphql/repository/23/diff?rev=v1.0.0.0&rev_to=v0.11.1.0
|
2021-02-07 08:10:46 +01:00
|
|
|
[0.11.1.0]: https://www.caraus.tech/projects/pub-graphql/repository/23/diff?rev=v0.11.1.0&rev_to=v0.11.0.0
|
2020-11-07 08:06:15 +01:00
|
|
|
[0.11.0.0]: https://www.caraus.tech/projects/pub-graphql/repository/23/diff?rev=v0.11.0.0&rev_to=v0.10.0.0
|
|
|
|
[0.10.0.0]: https://www.caraus.tech/projects/pub-graphql/repository/23/diff?rev=v0.10.0.0&rev_to=v0.9.0.0
|
|
|
|
[0.9.0.0]: https://www.caraus.tech/projects/pub-graphql/repository/23/diff?rev=v0.9.0.0&rev_to=v0.8.0.0
|
|
|
|
[0.8.0.0]: https://www.caraus.tech/projects/pub-graphql/repository/23/diff?rev=v0.8.0.0&rev_to=v0.7.0.0
|
|
|
|
[0.7.0.0]: https://www.caraus.tech/projects/pub-graphql/repository/23/diff?rev=v0.7.0.0&rev_to=v0.6.1.0
|
|
|
|
[0.6.1.0]: https://www.caraus.tech/projects/pub-graphql/repository/23/diff?rev=v0.6.1.0&rev_to=v0.6.0.0
|
|
|
|
[0.6.0.0]: https://www.caraus.tech/projects/pub-graphql/repository/23/diff?rev=v0.6.0.0&rev_to=v0.5.1.0
|
|
|
|
[0.5.1.0]: https://www.caraus.tech/projects/pub-graphql/repository/23/diff?rev=v0.5.1.0&rev_to=v0.5.0.1
|
|
|
|
[0.5.0.1]: https://www.caraus.tech/projects/pub-graphql/repository/23/diff?rev=v0.5.0.1&rev_to=v0.5.0.0
|
|
|
|
[0.5.0.0]: https://www.caraus.tech/projects/pub-graphql/repository/23/diff?rev=v0.5.0.0&rev_to=v0.4.0.0
|
|
|
|
[0.4.0.0]: https://www.caraus.tech/projects/pub-graphql/repository/23/diff?rev=v0.4.0.0&rev_to=v0.3
|
|
|
|
[0.3]: https://www.caraus.tech/projects/pub-graphql/repository/23/diff?rev=v0.3&rev_to=v0.2.1
|
|
|
|
[0.2.1]: https://www.caraus.tech/projects/pub-graphql/repository/23/diff?rev=v0.2.1&rev_to=v0.2
|
|
|
|
[0.2]: https://www.caraus.tech/projects/pub-graphql/repository/23/diff?rev=v0.2&rev_to=v0.1
|