1.2.0
[1.2.0] - 2020-04-30
Added
- ISSUE-363 - Add an optional
query_cache_decoratorargument at engine initialisation allowing to forward a custom decorator to use to cache query parsing. - ISSUE-362 - Add an optional
json_loaderargument to engine creation APIs so json loader can be customized. - ISSUE-361 - Add an optional
custom_default_arguments_coercerargument at engine initialisation to override the callable used to coerce arguments. - ISSUE-361 - Add an optional
arguments_coercerto@Directive,@Subscription&@Resolverdecorator to override the callable used to coerce arguments on the decorated directive/field.
Changed
- ISSUE-356 - Removed dependencies on
flexandbisonfor installing Tartiflette.cmakeis still necessary. - ISSUE-361 - Coerce lists (input, literal, output) synchronously to avoid creation of too many
asynciotasks. - ISSUE-365 - Forward the
InputValueDefinitionNodeto theon_argument_executionhook.Note: this brings a break changes from previous versions, to upgrade to
this version you'll have to update youron_argument_executionmethods:@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
GraphQLSchemaErrorexception atenginebuild time. You can't have duplicates values.But now:
type X { afield:String } enum anEnum { Value1 X }
Doesn't throw a
GraphQLSchemaErrorfor the use ofXas anEnumValue. This was a buggy schema error detection -
ISSUE-372 - Fix SDL Validation, Now
ObjectFollowInterfacevalidator validate field arguments and allows for field type to becovariantof the interface defined type. -
Typing on the documentation related to the
argument_nodeargument on theon_argument_executiondirective hook.