All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- ISSUE-160: All schema definitions errors are returned all at once.
- ISSUE-139: Handle multiple exceptions on argument coercing.
- ISSUE-158: Add Support for @skip, @include directive.
- ISSUE-163: Fix crash with non-typed inline fragment.
- PR-155: Add support for
extensions
field in GraphQLError exceptions and allow importing exceptions more easily. (Thanks @ultrabug) - ISSUE-154: Validate that an argument of a field and directive is an InputType. Also validate that all inputType are composed of inputType.
- It is no more possible to pass an instance of GraphQLSchema to the Engine Constructor.
- Introspection code moved into the schema submodule.
- Introspection no longer return __ starting fields data
- Apply directives on sub-levels arguments.
- ISSUE-143: Fix regression in on_introspection directive method call
-
ISSUE-140: A new parameter in Engine() constructor, you can now specify a list of modules containing your decorated code such as:
- Resolver
- Subscription
- Mutation
- Scalar
- Directive
IE:
Engine = Engine(a_sdl, modules=["some.module", "another.module", "oh.another.module"])
- Add docstring and remove
_
prefix on unused parameter on public API. - Clean some unused stuff.
- ISSUE-133: Add an
on_argument_execution
directive method to handle argument directive hook.
- Rename
on_execution
directive method name toon_execution_field
.
- Properly set
directives
toGraphQLArgument
at bake time.
- ISSUE-127: Now Object and List are supported as input values for arguments
Note: This patch doesn't include validation of theses Values (yet), this will be done in a more global PR about Document Validation that is coming soon ISSUE-121
- Pass
ctx
&info
as argument toon_introspection
directive's method.
- ISSUE-126: Now, child of a None result are no more executed
- ISSUE-128: Use a specific default resolver for subscription which doesn't implement a dedicated resolver.
- ISSUE-113 Handle subscriptions as async generator.
- ISSUE-119: Add an
initial_value
parameter on theexecute
's engine method.
- ISSUE-99: Raise errors on non unique arguments on fields or directives.
- ISSUE-114: Execute only the specified operation or throw on error if not exists.
- ISSUE-117: Execute top-level mutation selection set serially.
- ISSUE-109: Manage SelectionSet errors on leaf/non-leaf field.
- Add type hints & some refactoring / code cleaning.
- ISSUE-108: Understand .graphql files as SDL ones
- ISSUE-97: Raise errors on undefined arguments on nodes or directives.
- ISSUE-103: Process enum values.
- ISSUE-105: Process fragment spreading properly.
- ISSUE-101: Raise errors on missing required argument on field / directive.
- Add import sorting on style rule.
- Add formating on tests.
- Add link to tartiflette-aiohttp in readme.
- Add a
ttftt_engine
pytest marker to improve the way we handle functional tests.
- ISSUE-85: Raise errors on non-unique named operation definition.
- ISSUE-86: Raise errors on not alone anonymous operation.
- ISSUE-87: Raise errors on subscription operations with multiple root field.
- ISSUE-94: Raise errors when redefining directives, scalars or resolvers multiple times.
- ISSUE-92: Official Introspection Query support.
- Unordered Fragments support
- Don't fail on type that doesn't have fields
- Support
possibleTypes
on Union - Support
interfaces
on Object - Support
inputFields
on InputValue
- Remove aiohttp example files
- ISSUE-79: Raise errors when fragment target unknown type.
- ISSUE-80: Raise errors when defined fragment isn't used.
- ISSUE-82: Raise errors when undefined fragment is used.
- ISSUE-76: Path is correctly set on "Unknow field" errors.
- Really fixes Issue-70, previous 0.3.0 was 'too permissive' in fragment execution code.
- Allows to handle custom exception errors.
- Coerce exception raised during query parsing instead of throwing them:
class BadRequestError(Exception):
def coerce_value(self, *_args, path=None, locations=None, **_kwargs):
return your_coerced_error
@Resolver("Query.hello")
async def resolver_hello(parent, args, ctx, info):
if args["name"] == "":
raise BadRequestError("`name` argument shouldn't by empty.")
return "hello " + args["name"]
- Enable you to override the
default_error_coercer
at Engine initialization time:
def my_error_coercer(exception) -> dict:
do_ing_some_thin_gs = 42
return a_value
e = Engine("my_sdl.sdl", error_coercer=my_error_coercer)
- Adds manually path & locations attributes to the
UnknownSchemaFieldResolver
raised exception. - Returns all encountered errors during query parsing instead of only the last one.
- _typename tartiflette attribute is now automatically set by coercion except inside union type where it is deduce at execution time.
- Makes raised exceptions inherits from
GraphQLError
.
- Parse raw GraphQL query in order to have the correct locations on raised errors.
- Avoid
TypeError
by re-raisingUnknownSchemaFieldResolver
or casting_inline_fragment_type
to string. - Raise
GraphQLError
instead of builtin exceptions. - ISSUE-70: Now Typecondition is correctly unset for nested fields inside a fragment.
- ISSUE-71: Now libgraphqlparser parsing errors only lives for the duration of the request.
- Enable you to exclude builtins scalars at Engine initialization time with
exclude_builtins_scalars
parameter. - Publish package to Test PyPi on each working branch.
e = Engine("my_sdl.sdl", exclude_builtins_scalars=["Date", "DateTime"])
- Enable you to override the
default_resolver
at Engine initialization time.
async def my_default_resolver(parent_result, arguments, context, info):
do_ing_some_thin_gs = 42
return a_value
e = Engine("my_sdl.sdl", custom_default_resolver=my_default_resolver)
- Dependancy to
python-rapidjson
,uvloop
,cython
.
- Default values for arguments setted in SDL where ignored, now they aren't anymore.
-
Drop plural of
Engine
sdls
constructor parameter. Went from :class Engine(): def __init__(sdls, ....):
to
class Engine(): def __init__(sdl, ...):
- Support for
__typename
meta field
- Support for Union and TypeCondition filtering
Now a resolver of a union type should explicitly define the value of _typename
on it's return value.
- If the resolver wants to return a
dict
a_typename
key must be present. - If the resolver wants to return an
object
(a class instance), a_typename
attribute should be present. - If none of the above are present the execution engine infer
_typename
from the class name of the object returned by the resolver.
I.E.
def get_typename(resolver_result):
try:
return resolver_result["_typename"]
except (KeyError, TypeError):
pass
try:
return resolver_result._typename
except AttributeError:
pass
return resolver_result.__class__.__name__
- Change the way README.md is read in setup.py for long_description, now file is closed after reading.
- (Query) Support Alias in Query and Mutation
- (CI) Integrate missing Grammar
- Retrieve the appropriate operation type with operation definition.
- (SDL) Remove useless type and add Line/Col info propagation
- Add missing "UnknownDirectiveDefinition" imports
- (CI) Integrate missing Grammar
- (SDL / Executor) Implement declaration and execution of custom directives
- (SDL) Implement Interfaces
- (SDL) Implement Scalar Types
- (SDL) Implement directive
@Deprecated
- (Executor) Implement Introspection and Dynamic intropection (Documentation needed)
- Executor engine
- README.md & LICENSE