Releases: mirumee/ariadne
Ariadne 0.4.0
0.4.0 (2019-05-23)
- Updated
graphql-core-next
to 1.0.4 which has feature parity with GraphQL.js 14.3.1 and better type annotations. ariadne.asgi.GraphQL
is now an ASGI3 application. ASGI3 is now handled by all ASGI servers.ObjectType.field
andSubscriptionType.source
decorators now raise ValueError when used without name argument (eg.@foo.field
).ScalarType
will now use default literal parser that unpacksast.value
and calls value parser if scalar has value parser set.- Updated
ariadne.asgi.GraphQL
andariadne.wsgi.GraphQL
to support callables forcontext_value
androot_value
options. - Added
logger
option toariadne.asgi.GraphQL
,ariadne.wsgi.GraphQL
andariadne.graphql.*
utils. - Added default logger that logs to
ariadne
. - Added support for
extend type
in schema definitions. - Removed unused
format_errors
utility function and renamedariadne.format_errors
module toariadne.format_error
. - Removed explicit
typing
dependency. - Added
ariadne.contrib.django
package that provides Django class-based view together withDate
andDatetime
scalars. - Fixed default ENUM values not being set.
- Updated project setup so mypy ran in projects with Ariadne dependency run type checks against it's annotations.
- Updated Starlette to 0.12.0.
Ariadne 0.3.0
Ariadne 0.3.0 release is focused on further improving the support for GraphQL specification and developer experience. It adds support for subscriptions, enums, interfaces and union GraphQL types, and unifies the API across those types. It also greatly improves developer experience by the inclusion of debug mode, error reporting, and includes graphql
, graphql_sync
and subscribe
wrappers that ease integrations with existing sites greatly. Lastly, it also provides ASGI
application that works with asynchronous servers and frameworks like Uvicorn and Starlette
CHANGELOG
- Added
EnumType
type for mapping enum variables to internal representation used in application. - Added support for subscriptions.
- Updated Playground to 1.8.7.
- Split
GraphQLMiddleware
into two classes and moved it toariadne.wsgi
. - Added an ASGI interface based on Starlette under
ariadne.asgi
. - Replaced the simple server utility with Uvicorn.
- Made users responsible for calling
make_executable_schema
. - Added
UnionType
andInterfaceType
types. - Updated library API to be more consistent between types, and work better with code analysis tools like PyLint. Added
QueryType
andMutationType
convenience utils. Suffixed all types names withType
so they are less likely to clash with other libraries built-ins. - Improved error reporting to also include Python exception type, traceback and context in the error JSON. Added
debug
anderror_formatter
options to enable developer customization. - Introduced Ariadne wrappers for
graphql
,graphql_sync
, andsubscribe
to ease integration into custom servers.
Ariadne 0.2.0
Ariadne 0.2.0 replaces GraphQL-Core with GraphQL-core-next that offers much better compliance with GraphQL specification, supports async query execution and resolvers, and improves library's API and developer experience.
Changelog
- Removed support for Python 3.5 and added support for 3.7.
- Moved to
GraphQL-core-next
that supportsasync
resolvers, query execution and implements a more recent version of GraphQL spec. If you are updating an existing project, you will need to uninstallgraphql-core
before installinggraphql-core-next
, as both libraries usegraphql
namespace. - Added
gql()
utility that provides GraphQL string validation on declaration time, and enables use of Apollo-GraphQL plugin in Python code. - Added
load_schema_from_path()
utility function that loads GraphQL types from a file or directory containing.graphql
files, also performing syntax validation. - Added
start_simple_server()
shortcut function for quick dev server creation, abstracting away theGraphQLMiddleware.make_server()
from first time users. Boolean
built-in scalar now checks the type of each serialized value. Returning values of type other thanbool
,int
orfloat
from a field resolver will result in aBoolean cannot represent a non boolean value
error.- Redefining type in
type_defs
will now result inTypeError
being raised. This is a breaking change from previous behavior where the old type was simply replaced with a new one. - Returning
None
from scalarparse_literal
andparse_value
function no longer results in GraphQL API producing default error message. Instead,None
will be passed further down to resolver or produce a "value is required" error if its marked as such with!
For old behavior raise eitherValueError
orTypeError
. See documentation for more details. resolvers
argument defined byGraphQLMiddleware.__init__()
,GraphQLMiddleware.make_server()
andstart_simple_server()
is now optional, allowing for quick experiments with schema definitions.dict
has been removed as primitive for mapping python function to fields. Instead,make_executable_schema()
expects object or list of objects with abind_to_schema
method, that is called with aGraphQLSchema
instance and are expected to add resolvers to schema.- Default resolvers are no longer set implicitly by
make_executable_schema()
. Instead you are expected to include eitherariadne.fallback_resolvers
orariadne.snake_case_fallback_resolvers
in the list ofresolvers
for your schema. - Added
snake_case_fallback_resolvers
that populates schema with default resolvers that mapCamelCase
andPascalCase
field names from schema tosnake_case
names in Python. - Added
ResolverMap
object that enables assignment of resolver functions to schema types. - Added
Scalar
object that enables assignment ofserialize
,parse_value
andparse_literal
functions to custom scalars. - Both
ResolverMap
andScalar
are validating if schema defines specified types and/or fields at the moment of creation of executable schema, providing better feedback to the developer.
Ariadne 0.1.0
Ariadne 0.1.0 is first release of Ariadne that out of the box implements following features:
- WSGI Middleware for adding GraphQL API to existing sites
- Built-in dev server that enables developers to start experimenting quickly
- GraphQL Playground as API explorer
- Resolvers, mutations, custom scalars, inputs and enums
- Modularization support
- Documentation