Changelog for graphql-0.7.0.0
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Haskell Package Versioning Policy.
Unreleased
0.7.0.0 - 2020-05-11
Fixed
- Result of null encoding
- Block strings encoding
- Result of tab and newline encoding
Added
- AST for the GraphQL schema.
- Type system definition parser.
Trans.argument.- Schema extension parser.
- Contributing guidelines.
Schema.resolversToMap(intended for to be used internally).
Changed
- Rename
AST.DefinitionintoAST.Document.ExecutableDefinition.AST.Document.TypeSystemDefinitionandAST.Document.TypeSystemExtensioncan also be definitions. - Move all AST data to
AST.Documentand reexport them. - Rename
AST.OperationSelectionSettoAST.Document.SelectionSet. - Make
Schema.SubsaData.HashMap.Strict(was a functionkey -> Maybe valuebefore). - Make
AST.Lexer.ata text (symbol) parser. It was a char before and issymbol "@"now. - Replace
MonadIOwith a plainMonad. Since the tests don't use IO, set the inner monad toIdentity. NonEmpty (Resolver m)is nowHashMap 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.
Removed
AST.Field,AST.InlineFragmentandAST.FragmentSpread. These types are only used inAST.SelectionandAST.Selectioncontains now 3 corresponding data constructors,Field,InlineFragmentandFragmentSpread, instead of separate types. It simplifies pattern matching and doesn't make the code less typesafe.Schema.scalarA.Schema.wrappedScalarA.Schema.wrappedObjectA.Schema.objectA.AST.Argument. Replaced withAST.Argumentswhich holds all arguments as a key/value map.
0.6.1.0 - 2019-12-23
Fixed
- Parsing multiple string arguments, such as
login(username: "username", password: "password")would fail on the comma due to strings not having a space consumer. - Fragment spread is evaluated based on the
__typenameresolver. If the resolver is missing, it is assumed that the type condition is satisfied (all fragments are included). - Escaping characters during encoding.
Added
- Directive support (@skip and @include).
- Pretifying multi-line string arguments as block strings.
0.6.0.0 - 2019-11-27
Changed
Language.GraphQL.Encodermoved toLanguage.GraphQL.AST.Encoder.Language.GraphQL.Parsermoved toLanguage.GraphQL.AST.Parser.Language.GraphQL.Lexermoved toLanguage.GraphQL.AST.Lexer.- All
Language.GraphQL.AST.Valuedata constructor prefixes were removed. The module should be imported qualified. - All
Language.GraphQL.AST.Core.Valuedata constructor prefixes were removed. The module should be imported qualified. Language.GraphQL.AST.Core.Objectis now just a HashMap.Language.GraphQL.AST.Transformis isn't exposed publically anymore.Language.GraphQL.Schema.resolveaccepts a selectionSeq(Data.Sequence) instead of a list. Selections are stored as sequences internally as well.- Add a reader instance to the resolver's monad stack. The Reader contains a Name/Value hashmap, which will contain resolver arguments.
Added
- Nested fragment support.
Fixed
- Consume ignored tokens after
$and!. I mistakenly assumed that$variableis a single token, same asType!is a single token. This is not the case, for exampleVariableis 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 usingbut.
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. UseLanguage.GraphQL.AST.Nameinstead.Language.GraphQL.Execute.Schema- It was a resolver list, not a schema.Language.GraphQL.Schema:enum,enumA,wrappedEnumandwrappedEnumA. Usescalar,scalarA,wrappedScalarandwrappedScalarAinstead.
0.5.1.0 - 2019-10-22
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.
- Inline fragment support.
Fixed
- Top-level fragments.
- Fragment for execution is chosen based on the type.
0.5.0.1 - 2019-09-10
Added
- Minimal documentation for all public symbols.
Deprecated
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.Schemaname should be free to provide a data type for the real schema later.Language.GraphQL.Schema:enum,enumA,wrappedEnumandwrappedEnumA. There are actually only two generic types in GraphQL: Scalars and objects. Enum is a scalar value.
Fixed
- Parsing block string values.
0.5.0.0 - 2019-08-14
Added
executeWithNameexecutes an operation with the given name.- Export
Language.GraphQL.Encoder.definition,Language.GraphQL.Encoder.type'andLanguage.GraphQL.Encoder.directive. - Export
Language.GraphQL.Encoder.value. Escapes \ and " in strings now.
Changed
Operationincludes now possible operation name which allows to support documents with multiple operations.Language.GraphQL.Encoder.documentand other encoding functions take aFormatteras argument to distinguish between minified and pretty printing.- All encoder functions return
Data.Text.Lazy.
Removed
- Unused
Language.GraphQL.Encoder.spaced.
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 ofData.GraphQL). - HUnit and tasty are replaced with Hspec.
Alternative/MonadPlusresolver constraints are replaced withMonadIO.
Removed
- Duplicates from
Language.GraphQL.ASTalready available inLanguage.GraphQL.AST.Core. - All module exports are now explicit, so private and help functions aren't exported anymore.
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
Alternativeis used. - GraphQL encoder.
Fixed
- Expect braces
inputValueDefinitionsinstead of parens when parsing.
0.2.1 - 2015-09-16
Fixed
- Include data files for golden tests in Cabal package.
- Support for ghc-7.8.
0.2 - 2015-09-14
Added
- Rudimentary parser for
GraphQLwhich successfully parses the sample filekitchen-sink.graphqlfromgraphql-jstests. - Golden test for
kitchen-sink.grahqlparsing.
Changed
- Many optional data types in
GraphQldidn't need to be wrapped in aMaybe. - Some
newtypes became type synonyms for easier parsing.
0.1 - 2015-09-12
Added
- Data types for the GraphQL language.