• v1.2.0.0 3b69dac371

    1.2.0.0 Stable

    belka released this 2023-02-28 18:01:33 +01:00 | 17 commits to master since this release

    Added

    • Schema printing.
    • Semigroup and Monoid instances for AST.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 to graphql-spice package.
    • CPP ifdef WITH_JSON blocks.
    Downloads
  • v1.1.0.0 a5cf0a32e8

    1.1.0.0 Stable

    belka released this 2022-12-24 19:58:54 +01:00 | 31 commits to master since this release

    Changed

    • Removed deprecated Language.GraphQL.Error functions: addErr, addErrMsg,
      singleError.
    • 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.

    Added

    • Partial schema printing: operation type encoder.
    Downloads
  • v1.0.3.0 a2401d563b

    1.0.3.0 Stable

    belka released this 2022-03-27 13:52:50 +02:00 | 38 commits to master since this release

    Fixed

    • 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
  • v1.0.2.0 16cbe3fc28

    1.0.2.0 Stable

    belka released this 2021-12-26 05:16:25 +01:00 | 45 commits to master since this release

    Added

    • Serialize instance for Type.Definition.Value.
    • VariableValue instance for Type.Definition.Value.
    • Json build flag, enabled by default. JSON and Aeson support can be disabled
      by disabling this flag.
    Downloads
  • v1.0.1.0 a044fc40d3

    1.0.1.0 Stable

    belka released this 2021-09-27 07:31:01 +02:00 | 51 commits to master since this release

    Added

    • Custom Show instance for Type.Definition.Value (for error
      messages).
    • Path information in errors (path to the field throwing the error).
    • 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.
    • TH module with the gql 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
  • v1.0.0.0 dd6fdf69f6

    1.0.0.0 Stable

    belka released this 2021-07-04 10:04:43 +02:00 | 79 commits to master since this release

    Added

    • 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 and AST.Document.ConstValue.ConstList contain
      location information for each list item.
    • Error: singleError, addErr and addErrMsg are deprecated. They are
      internal functions used by the executor for error handling.
    Downloads
  • v0.11.1.0 2839b28590

    0.11.1.0 Stable

    belka released this 2021-02-07 08:10:46 +01:00 | 105 commits to master since this release

    Added

    • 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 a StringValue.
    Downloads
  • v0.11.0.0 445f33dcf3

    0.11.0.0 Stable

    belka released this 2020-11-07 09:05:47 +01:00 | 120 commits to master since this release

    Changed

    • AST.Document.Selection wraps additional new types: Field, FragmentSpread
      and InlineFragment. Thus validation rules can be defined more concise.
    • AST.Document: Argument and Directive contain token location.
    • AST.Document.Argument contains the Value wrapped in the Node.
    • AST.Lexer.colon and AST.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 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.
    • 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.
    • 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 and Type.Schema.Directives are directive definition
      representation.
    • Type.Schema.schema: Schema constructor.

    Fixed

    • Collecting existing types from the schema considers subscriptions.

    Removed

    • AST.Document.Alias. Use AST.Document.Name instead.
    Downloads
  • v0.10.0.0 4b59da2fcb

    0.10.0.0 Stable

    belka released this 2020-08-29 12:12:04 +02:00 | 149 commits to master since this release

    Changed

    • Test.Hspec.GraphQL.*: replace IO in the resolver with any MonadCatch.
    • 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).

    Added

    • Validate.Validation contains data structures and functions used by the
      validator and concretet rules.
    • Validate.Rules: operation validation rules.
    Downloads
  • v0.9.0.0 adeba459a2

    0.9.0.0 Stable

    belka released this 2020-07-24 21:34:31 +02:00 | 156 commits to master since this release

    Fixed

    • 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 reexports AST.Parser.
    • AST.Document.Location is a token location as a line and column pair.
    • 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.
    • Type.Schema exports Type 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 have ExceptT,
      errors are handled with MonadThrow/MonadCatch.
    • All code from Trans is moved to Type.Out and exported by Type and
      Type.Out.
    • 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.
    • 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 the Execute 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 replaces executeWithName.
    Downloads