1.0.0
[1.0.0] - 2019-09-20
Added
- ISSUE-122 - Implementation of a new
@TypeResolver
decorator to allow the resolution of the concrete type of a result linked to an abstract type (union or interface) in a generic way (more detail here) - ISSUE-122 - Implementation of a new
type_resolver
parameter on the@Resolver
decorator to allow the resolution of the concrete type of the field result linked to the resolved field abstract type (union or interface) (more detail here) - ISSUE-122 - Implementation of a new
custom_default_type_resolver
parameter on thecreate_engine
function and the__init__
andcook
method of theEngine
class. This parameter allow to override the default type resolver provided by Tartiflette to resolve the concrete type of abstract type fields (more detail here) - A new
GraphQLInputField
type has been implemented to more clearly distinguish the difference between an argument and an input field and be closer to the GraphQL specification - The parsing of the same query and its validation is now cached to improve performance when the same query is played regularly
- ISSUE-278 - Support for
extend
syntax in SDL
Changed
-
Bump the
libgraphqlparser
submodule to latest master commits so we can now support triple quoted strings as litteral values for parameters.
Note: It's important to have at leastbison
in version >= 3 on your system before installing tartiflette. -
Bump the
lark-parser
package to version0.7.3
-
ISSUE-121 - The grammar used by the lark parser used in the SDL parsing has been updated to conform to the June 2018 GraphQL specification
-
ISSUE-121 - Both SDL and query parsing does now focus only on the parsing part and returns an instance of
DocumentNode
that can be treated generically -
Built-in Tartiflette SDL parts (introspection types, directives, scalars...) have been modified to add descriptions on the various built-in types in order to make the introspection queries more complete
-
In order to solve the performance issues related to the execution of introspection requests, we proceeded to a big work of pre-compute of the various fields of introspection at the initialization of the Tartiflette engine in order to answer as quickly as possible to the introspection queries
-
In order to improve performance and thus reduce the execution time of queries, the majority of coercion algorithms are now pre-computed for each type, scalar, directive, etc. at engine initialization
-
The values of the variables are now computed before executing the requested operation (as specified in the GraphQL specification). This allows us to execute the requested operation only if variables coercion doesn't return any errors.
Note: it is important to note that the computing of values of the variables includes the entire coercion process as well as the execution of potential directives applied on the scalar or input fields of the variable type:
- directives will only be executed once when calculating the value of each variable and no longer at each occurrence of the variable in the query
- if a directive returns an error at coercion time of a variable, the whole operation will not be executed, when previously, only the field where the variable is used would have been in error
-
ISSUE-216 - An important work on error handling has been done. Error messages are now more explicit and relevant. In addition, the keys
path
andlocations
in error items should now also be more relevant and accurate than before -
The
error_coercer
parameter now expects an asynchronous function instead of a synchronous function (see the migration guide for more information) -
The shape of the
info
parameter accessible in particular in the resolvers and some hooks of directives has been completely changed (see the migration guide for more information) -
The
@Subscription
decorator no longer has its specific default resolver. This means that the messages returned by@Subscription
will no longer be wrapped with the field name as before (when the field doesn't have a dedicated@Resolver
) (see the migration guide for more information) -
We now make a strong distinction between non-supplied values and
null
values. This is to avoid passing thenull
value when a value has not been supplied (especially for arguments) (see the migration guide for more information) -
The signature of the following directives hook methods has been changed to
on_argument_execution
,on_post_input_coercion
andon_pre_output_coercion
(see the migration guide for more information) -
Scalar definition now requires the implementation of a third
parse_literal
method (see the migration guide for more information or documentation on scalar)
Fixed
- The type of the
__Type.kind
field has been fixed for__TypeKind!
instead of__TypeKind
in the built-in introspection SDL - The optional argument
includeDeprecated
defined on the__Type.enumValues
and__Type.fields
introspection fields is now functional and allows to filter the result respectively to the deprecations of enum values or fields - The directives applied to input fields are now calling the
on_post_input_coercion
directive hook instead ofon_argument_execution
- The coercion of the arguments is fully functional and the directives applied to the arguments of another directives are now well triggered and computed
- In some specific and complex cases, the
@if
and@skip
built-in directives could behave unexpectedly and undesirably, their behaviour has been fixed - ISSUE-277 - Abstract types are better handled especially the interfaces that are now executed and resolved correctly when using fragment and the
__typename
field - Bakes schema objects after extensions baking - ISSUE-292 thrown by @remorses
- Code Smells seen by sonarcloud.io