Skip to content

Releases: sangria-graphql/sangria

v1.2.0

29 Apr 22:12
Compare
Choose a tag to compare
  • Provide convenient functions for IDL-based schema materialization and validation (#240). . For more info see the "Query Validation" section of documentation. Improvements include:
    • Introduced Schema.buildStubFromAst that builds a schema with a stub Query type
    • Introduced Schema.buildDefinitions that builds a list of definitions based on IDL AST (without a schema)
    • Introduced Document.emptyStub as a most basic, but valid document stub
    • Introduced alias query1 + query2 for document merge
  • Add Fetcher.deferSeqOptExplicit or similar to explicitly get Seq[Option[T]] in the result (#230)
  • Fixed scalar aliases when they are used with variables or schema is extended (#237)
  • Preserve IDL directives at schema materialization time and use them in schema comparator (#236). This also adds Vector[ast.Directive] to all relevant schema definitions which may be extremely useful for future features and schema analysis
  • Improve syntax error reporting for graphql macro (#235)
  • Improve Int, BigInt and Long scalar value handling (#234)
  • Propagate updated value through middleware's afterField (#233). For more info see the "Middleware" section of documentation.
  • Forbid 'true', 'false' and 'null' as names for Enum value (#239)

v1.1.0

11 Mar 19:17
Compare
Choose a tag to compare
  • Added scalar type alias support (#225, #210). For more info see the "Scalar Type Alias" section of documentation.
  • Greatly improved AstVisitor (#214). It now includes helper methods to traverse and transform an AST with type info and state. Sangria now integrates with macro-visit which was specifically written to traverse and transform ASTs which are similar to sangria's. For more info see the "AstVisitor" section of documentation.
  • Added DocumentAnalyzer and SchemaBasedDocumentAnalyzer that contain a lot of helper methods to analyze query. This includes newly introduced deprecatedUsages and introspectionUsages (#211, #207, #212). For more info see brand new "Query And Schema Analysis" section of documentation.
  • Added QueryReducer.hasIntrospection and QueryReducer.rejectIntrospection that rejects queries which contain introspection fields (#211). This may be useful for production environments where introspection can potentially be abused.
  • Added Context.isIntrospection and sangria.introspection.isIntrospection helper methods to easily distinguish between introspection types and fields in middleware and query reducers.
  • Added QueryReducer.measureDepth and QueryReducer.rejectMaxDepth rejects queries that are deeper than provided threshold (In contrast to Executor.execute(maxQueryDepth = ...), query reducer does it at query analysis time before actual execution).
  • Added derive* macro settings (TransformFieldNames and TransformInputFieldNames) to transform field names. (#215) Big thanks to @ostronom for this contribution.
  • Added ability to represent complex relations in Fetch API (#220).
  • ExecutionScheme.Extended now returns updated user context for mutations (#209).
  • Improved handling of tailing comments when rendering query AST (#219).
  • Added aliases for graphql/graphqlInput macros: gql/gqlInp
  • Using Vector instead of List for all AST nodes now. This is a minor breaking change.

v1.0.0

17 Jan 02:06
Compare
Choose a tag to compare
  • Added Action.sequence combinator to compose a list of LeafActions in a single LeadAction that can be returned from a resolve function (#206)
  • Support of Option[Id] in Fetcher.deferOpt (#205)
  • Implicit conversion from Future[Deferred[A]] to Action does not work (#201)
  • Disallow creation of object types with empty list of fields (#200)
  • SimpleFetcherCache does not cache Relation (#194)
  • Fetching Relation Typing (#193)
  • Helper method sangroia.schema.action is replaced with Action.apply and LeafAction.apply

v1.0.0-RC5

28 Nov 22:25
Compare
Choose a tag to compare
  • Uphold spec for non-validation names not beginning with __ (spec-change) (#189)
  • Field cache does not consider output object polymorphism (#190)
  • Added QueryReducer.measureDepth and QueryReducer.rejectMaxDepth query reducers (#191). maxQueryDepth argument was available for a long time on Executor, but in contrast to new query reducers, it measures depth along side of the execution. With query reducers it happens before query execution, thus allow to reject the query execution entirely.
  • FetcherDeferredOpt does not extends DeferredOpt (#188)
  • Invalid operation name now be considered a client-side error and now implements QueryAnalysisError (#186, #187). Big thanks to @mattfenwick for working on this one!

v1.0.0-RC4

20 Nov 19:00
Compare
Choose a tag to compare

Sangria v1.0.0-RC4 is fully compliant with "October 2016" version of the GraphQL specification.

  • In presence of explicit null value, the default will not be used (#185) (spec change). Breaking change! Arguments with default values are no longer treated as non-optional arguments. Though Args still preserves existing semantics (default is still applied, even in presence of explicit null). The same is true for input objects and optional input object fields with default values.
  • Added Args.withArgs and Args.argDefinedInQuery convenience methods.
  • Validation rule for unique directives per location (#179).
  • Enforces input coercion rules (#177).
  • MiddlewareQueryContext and ExecutionResult now contain information about validation and query reducers' execution time (validationTiming, queryReducerTiming)
  • Middleware.fieldError was not called in all possible exceptional situations (#184).
  • New QueryParser.parseInputWithVariables provides a way to parse input values with variables.
  • Various bugfixes in error handing of deferred values and null/undefined value handling.

v1.0.0-RC3

05 Nov 17:28
Compare
Choose a tag to compare
  • Cross compile to scala 2.12 and scala 2.11 (#182, #183)
  • Schema comparator (#169, #165). It helps to compare different schemas or different versions of the same schema. It also provides an information whether particular change is a breaking change. This is a great example of GraphQL type system potential. For more info see the "Schema Comparator" section of documentation.
  • Improved handling of NaN and infinity values (#167, #168)

v1.0.0-RC2

10 Oct 18:15
Compare
Choose a tag to compare
  • Capture original exceptions only if necessary (based on the ExecutionScheme)
  • Fixed issue with duplicate errors appearing during sequential query execution (mutations)

v1.0.0-RC1

08 Oct 20:40
Compare
Choose a tag to compare

Towards 1.0!

v0.7.3

26 Aug 00:18
Compare
Choose a tag to compare
  • Description formatting/parsing is updated based in the changes in the reference implementation (#155). More places of the query now preserve the comments. For instance all trailing comments within a section set and at the end of the document are preserved and rendered.
  • Ensure that the result of deferred value resolution has the same size as the deferred list (#154).
  • During macro-based derivation, default value should never be a null for an optional arguments (#153).
  • Executor now properly handles undefined values (like null and None) even if GraphQL type is not null (#152)

v0.7.2

01 Aug 21:21
Compare
Choose a tag to compare
  • Transitive types are now collected for all types provided via additionalTypes to a schema definition (#149).
  • ObjectType.withInstanceCheck provides an easier way to customize an instance check on ObjectType (#148).
  • Enumeration derivation macro should now only collects instances of Enumeration#Value (#151).
  • Ensure that all unreferenced types are collected during the schema extension.
  • sangria.ast.Type.namedType helper method.