Ariadne 0.6.0
Ariadne 0.6 is now available, bringing bug fixes, extensions and support for application performance monitoring.
Extensions and middlewares
Extensions support is now available. Extensions can be used to add custom monitoring to the API, as well as inject custom logic into query execution process.
0.6 also formalizes our support for the GraphQL middlewares, which enable developers to wrap resolvers used by server with custom logic.
Extensions are only available in GraphQL servers running over the ASGI, but middlewares are supported by both ASGI and WSGI servers.
Apollo tracing and OpenTracing monitoring extensions.
ariadne.contrib.tracing package has been added to the library that provides extensions for easy enabling application performance metrics in GraphQL Server.
Apollo tracing extension adds query's trace data to the results JSON. This data can then be viewed using the TRACE option in GraphQL Playground.
OpenTracing extension can be used to monitor GraphQL API for performance and errors using popular APM tools like Jaeger or Datadog:

CHANGELOG
- Updated
graphql-core-nextto 1.1.1 which has feature parity with GraphQL.js 14.4.0. - Added basic extensions system to the
ariadne.graphql.graphql. Currently only available in theariadne.asgi.GraphQLapp. - Added
convert_kwargs_to_snake_caseutility decorator that recursively converts the case of arguments passed to resolver fromcamelCasetosnake_case. - Removed
default_resolverand replaced its uses in library withgraphql.default_field_resolver. - Resolver returned by
resolve_toutil followsgraphql.default_field_resolverbehaviour and supports resolving to callables. - Added
is_default_resolverutility for checking if resolver function isgraphql.default_field_resolver, resolver created withresolve_tooralias. - Added
ariadne.contrib.tracingpackage withApolloTracingExtensionandOpenTracingExtensionGraphQL extensions for adding Apollo tracing and OpenTracing monitoring to the API (ASGI only). - Updated ASGI app disconnection handler to also check client connection state.
- Fixed ASGI app
context_valueoption support for async callables. - Updated
middlewareoption implementation in ASGI and WSGI apps to accept list of middleware functions or callable returning those. - Moved error formatting utils (
get_formatted_error_context,get_formatted_error_traceback,unwrap_graphql_error) to public API.