tartiflette v1.2.0 Release Notes

Release Date: 2020-05-02 // almost 4 years ago
  • [1.2.0] - 2020-04-30

    โž• Added

    • ISSUE-363 - Add an optional query_cache_decorator argument at engine initialisation allowing to forward a custom decorator to use to cache query parsing.
    • ISSUE-362 - Add an optional json_loader argument to engine creation APIs so json loader can be customized.
    • 0๏ธโƒฃ ISSUE-361 - Add an optional custom_default_arguments_coercer argument at engine initialisation to override the callable used to coerce arguments.
    • ISSUE-361 - Add an optional arguments_coercer to @Directive, @Subscription & @Resolver decorator to override the callable used to coerce arguments on the decorated directive/field.

    ๐Ÿ”„ Changed

    • ๐Ÿšš ISSUE-356 - Removed dependencies on flex and bison for installing Tartiflette. cmake is still necessary.
    • ๐Ÿ”€ ISSUE-361 - Coerce lists (input, literal, output) synchronously to avoid creation of too many asyncio tasks.
    • ISSUE-365 - Forward the InputValueDefinitionNode to the on_argument_execution hook.

    โฌ†๏ธ > Note: this brings a break changes from previous versions, to upgrade to

    this version you'll have to update your on_argument_execution methods:

    @Directive("MyDirective") class MyDirective: async def on\_argument\_execution( self, directive\_args: Dict[str, Any], next\_directive: Callable, parent\_node: Union["FieldNode", "DirectiveNode"],+ argument\_definition\_node: "InputValueDefinitionNode",- argument\_node: "ArgumentNode",+ argument\_node: Optional["ArgumentNode"], value: Any, ctx: Optional[Any], ) -\> Any: # Write your business logic here- return next\_directive(parent\_node, argument\_node, value, ctx)+ return next\_directive(parent\_node, argument\_definition\_node, argument\_node, value, ctx)
    

    ๐Ÿ›  Fixed

    ISSUE-370 - Fix EnumValue uniqueness in schema definition validation rule. It should now throw the correct error in the correct case.

    enum anEnum { A A B}
    

    ๐Ÿ— Will throw a GraphQLSchemaError exception at engine build time. You can't have duplicates values.

    But now:

    type X { afield:String}enum anEnum { Value1 X}
    

    Doesn't throw a GraphQLSchemaError for the use of X as an EnumValue. This was a buggy schema error detection

    ISSUE-372 - Fix SDL Validation, Now ObjectFollowInterface validator validate field arguments and allows for field type to be covariant of the interface defined type.

    Typing on the documentation related to the argument_node argument on the on_argument_execution directive hook.