@OlegIlyenko OlegIlyenko released this May 12, 2018 · 46 commits to master since this release

Assets 2
  • 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 the extensions field

    Before 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!"
        }
      }]
    }

    For backward-compatibility, HandledException now provides 2 additional fields: addFieldsInExtensions (by default true) and addFieldsInError (by default false). You can also set both flags to true 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 replaced TrieMap-based cache implementation with ConcurrentHashMap. This change introduces potential minor performance improvements and compatibility with GraalVM native-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 flexible TransformValueNames.

  • 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 ObjectTypes 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).