sangria v1.4.1 Release Notes
Release Date: 2018-05-12 // almost 6 years ago-
Added support for
extend schema
in SDL (spec change) (#362). It adds following syntax in the SDL:extend schema @extraDirective { mutation: MutationType}
Ambiguity with null variable values and default values (spec change) (#359).
Add optional 'extensions' entry to errors (spec change) (#358).
CAUTION: breaking change. All additional error object fields that were provided via
HandledException
are now added to theextensions
fieldBefore v1.4.1:
{ "data": { "books": null }, "errors": [{ "message": "Can't access the database :'(", "path": ["books"], "locations": [{"line": 3, "column": 11}], "errorCode": "DATABASE\_DOWN", "mitigationStrategy": "Panic!" }] }
After v1.4.1:
{ "data": { "books": null }, "errors": [{ "message": "Can't access the database :'(", "path": ["books"], "locations": [{"line": 3, "column": 11}], "extensions": { "errorCode": "DATABASE\_DOWN", "mitigationStrategy": "Panic!" } }] }
0️⃣ For backward-compatibility,
HandledException
now provides 2 additional fields:addFieldsInExtensions
(by defaulttrue
) andaddFieldsInError
(by defaultfalse
). You can also set both flags totrue
in order to provide a migration path for the client applications.Ensure interface has at least 1 concrete type (spec change) (#360). It is potentially a minor breaking change. If you have non-implemented interfaces in your schema, you can temporary remove
InterfaceMustHaveImplementationValidationRule
schema validation rule.➕ Added a small
Cache
abstraction and replacedTrieMap
-based cache implementation withConcurrentHashMap
. This change introduces potential minor performance improvements and compatibility with GraalVMnative-image
.➕ Added
toAst
helper for different schema elements, like fields, enum values and types (#367)➕ Added macro setting to transform enum values' names with a macro setting (#350). Big thanks to @fehu for this contribution! The
UppercaseValues
macro setting is now deprecated in favour of more flexibleTransformValueNames
.🛠 Fixed typo in
BeforeFieldResult
field name (#363). Big thanks to @Codier for this contribution!Adjusted
KnownTypeNames
validation to not validate SDL definitions because they are validated in the schema materializer (#354).➕ Added option to disable parsing of AST locations and comments (#357)
Don't allow
ObjectType
s derived from case classes to overwrite each other (#345) Big thanks to @simonsaffer for this contribution!👌 Improved query parsing performance by optimizing the AST location tracking (#351). Big thanks to @guymers for this contribution!
🛠 Fixed new line tracking when parsing block-strings
🏗 Ast schema builder now considers
additionalTypes
when it validates the type extensions⚡️ Updated
sangria-marshalling-api
to version 1.0.3 (should be backwards compatible with v1.0.0).