Changelogs » Graphql-core

Graphql-core

3.0.1

Patch release of GraphQL-core 3, based on GraphQL.js v14.5.8.

This is essentially the same as version 3.0.0 except for one minor change:

* The `utilities.get_introspection_query` module has been renamed back to `utilities.introspection_query`, since that was the name used in GraphQL.js v14.5.8 - renaming the module will be postponed to a version that replicates GraphQL.js v15.0.0.

Note that the `introspection_query` *constant* was already deprecated in v14 and had not been ported to graphql-core, like some other deprecated features.

3.0.0

Final release of GraphQL-core 3, based on GraphQL.js v14.5.8.

GraphQL-core 3 is the successor to both GraphQL-core 2 and GraphQL-core-next.

In addition to porting the minor changes in GraphQL.js since v14.5.6, this release also contains the following improvements:

* GraphQL-core 3 now officially supports Python 3.8
* Use mypy 0.750 and the new semantic analyzer (67)
* Fix for possible sort errors in `build_response()` (68)
* Document the differences between GraphQL-core 3 and GraphQL.js (24)

See also the changes in [v3.0.0b0](https://github.com/graphql-python/graphql-core-next/releases/tag/v3.0.0b0) and [v3.0.0b1](https://github.com/graphql-python/graphql-core-next/releases/tag/v3.0.0b1).

Contributors to this release were:

cito, tebanep

Thanks to everyone who sent bug reports or pull requests.

3.0.0b1

Second beta release of GraphQL-core 3, based on GraphQL.js v14.5.6.

GraphQL-core 3 is the successor to both GraphQL-core 2 and GraphQL-core-next.

In addition to incorporating the latest changes from GraphQL.js (see particularly the list of changes in GraphQL.js [v14.5.5](https://github.com/graphql/graphql-js/releases/tag/v14.5.5)), this release also contains the following improvements and changes:

* Changes: `format_error` now returns locations as a list of dicts (62)
* Bugs: Detect args passed to directive without args (63)

Contributors to this release were:

cito, Dodobibi, ktosiek

Thanks to everybody who contributed by sending bug reports or pull requests. Please continue to report any problems you find in this beta release, so that these can be fixed in the final v3 release.

3.0.0b0

First beta release of GraphQL-core 3, based on GraphQL.js v14.5.0.

GraphQL-core 3 is the successor to both GraphQL-core 2 and GraphQL-core-next.

In addition to incorporating the latest changes from GraphQL.js (see particularly the list of changes in GraphQL.js [v14.5.0](https://github.com/graphql/graphql-js/releases/tag/v14.5.0)), this release also contains the following improvements and changes:

* Features: Support using lazy descriptions for GraphQL types (58)
* Performance: Add pytest-benchmark and port the benchmarks from GraphQL.js (55)
* Performance: Use identity instead of hash for caching subfields in collect_subfields (56)
* Changes: Use FrozenLists in AST nodes (45)
* Changes: Changed `is_nullish()` to make it play nice with numpy arrays (60)
* Bugs: Fixed issue 43 with getting `parse_literal` via `to_kwargs()`
* Bugs: Fix hash method for AST nodes (45)
* Docs: Fix typo in docs for using SDL (48)
* Docs: Update installation instructions (50)
* Docs: Run all code snippets as part of the test suite
* Polish: Run type check also for functions without type annotations

Contributors to this release were:

cito, CorrosiveKid, delyanr, ktosiek, mvanlonden, qqi0O0, thomascobb

Thanks to everybody who contributed by sending bug reports or pull requests. Please continue to report any problems you find in this beta release, so that these can be fixed in the final v3 release.

2.2.1

Hotfix release with one fix:

* Require rx<3 since new version is not compatible (235)

2.2.0

Changelog

* Fix a typo in a deprecation warning 9202021fc87db9c175e115016cd53e5d9d085ac6
* Fix collections import for Python >3.3 cdb299df3efda82a09cbb282e561c6c8aaa2efdf
* Add dict support for the default resolver 1760eaf995e2623aee4afca48ad5be0cd9098fbe
* Fix UnicodeDecodeError in format_error 87b615605ac9724c4f945e220e67b5b2d0461424
* Add extensions support to GraphQLError 3ba7f9218bca7a039b109b103cf57b1511d970c7
* Add traceback to errors from failed promises 8f736b7a6b052c07347dbd57e00bc8221af71faa
* Lots of internal clean up

Full changelog: https://github.com/graphql-python/graphql-core/compare/v2.1.0...v2.2.0

2.1.0

Changelog
* Improved pre-commit integration (added `black` formatter) https://github.com/graphql-python/graphql-core/commit/04560ea333ab408502d3f89574cebb0c2add1ac8
* Added `flags` config to help know when certain features are available 9059ecd0a87e0bfaf4eff53217217879672adff3
* Added official support to Python 3.7 a7ce75e339a6aaf3a0bb52175c41776edd549bdc
* Improved `GraphQLEnumType` serialization allowing python `Enum` values https://github.com/graphql-python/graphql-core/commit/0cef6fb10c41d36d9042dae968d6a1c7f2b96b51 https://github.com/graphql-python/graphql-core/commit/24687b659e3dd2713e6cd397d2179b8b4ed51163
* Improved `ExecutionResult` typing https://github.com/graphql-python/graphql-core/commit/934deca6734b40519cff13b02054848cd808601e
* Set explicit order for middleware resolvers https://github.com/graphql-python/graphql-core/commit/c27daa5d69ab54d07ac629313a1a5ef7a5d0d7b1

Release's candidates Changelog
The following list includes the changes listed in each of the release candidates for `2.1`.

2.1rc3

Changelog
* Improved async generators 4d2f7e72bbb1f842fee4fd3178a4c1ed4e23eac6 (thanks ciscorn!)
* Added static typing with mypy fa4eeda36029680205e20059379e89189b946032 🎉
* Fixed errors in middleware when resolvers were not returning promises but Exceptions 6a3f9004362b51336e082e08b3b4a180c6a325c2

2.1rc2

Changelog
* Fixed `quiver_cloud` backend imports 79811e108da626bff749b27dae4a35ffd1f4b2a0
* Added `to_dict` method to `ExecutionResult` ff6b490d565124f08d7b7b8d42a421ad0c185b96
* Improved middleware init speed 24be647e0cf12b0a12d858c4791f34a9bd210be3

2.1rc1

Changelog
* Improved backend tests 37bcf6a1016f54f2662e839a49130e570c6ab47f
* Improved `format_error` function using six compatibility library 52de303855de695099362ff013f26ff2ce9045d0
* Added `get_operation_type` to GraphQLDocument 27e21e4d5023e0bfd1619537564cceed37dd8964

2.1rc0

Changelog
* Add path tracking in `ResolveInfo` 148
* Add path to GraphQL raised errors 186
* Fixed `GraphQLInt` description ea0dd0c2c653000761966faeb7c1c0a156e269d1
* Improved Enum support 163
* Make `GraphQLEnumValue` importable from main module 9ec3d7cce6b41228699f6f58b9f014b9dc0d589d
* Fixed memory leak in executors f2c4f6d2103e7e929c9d9d0fc08e423f3d75fe7f
* Added official support to Python 3.6
* Added pre-commit 178
* Added `is_deprecated` property to `GraphQLField` 175
* Added support for pluggable backends 185

Docs
* Improved contributing docs 173

2.0.0

Changelog

* Moving context from the resolver arguments to `info.context` 133
* New resolvers API. Moving from `resolver(root, args, context, info)` to `resolver(root, info, **args)` 133
* Is Type of new syntax from `is_type_of(result, context, info)` to `is_type_of(result, info)` 133
* Resolve type new syntax `resolve_type(result, context, info)` to `resolve_type(result, info)` 133
* Subscriptions support 143
* Improved exceptions on promises

1.1.1

Bugfix release of GraphQL-core-next, based on GraphQL.js v14.4.0.

This release fixes a problem with getting `parse_literal` via `to_kwargs()` (43).

Future versions of GraphQL-core-next will be released as GraphQL-core version 3 and up.

GraphQL-core-next has been discontinued as separate distribution.

1.1.0

Public release of GraphQL-core-next, based on GraphQL.js v14.4.0.

In addition to incorporating the latest changes from GraphQL.js
(see particularly the list of changes in GraphQL.js [v14.4.0](https://github.com/graphql/graphql-js/releases/tag/v14.4.0)),
this release also contains the following improvements and changes:

* Made GraphQLError hashable (35)
* Fixed online documentation for GraphQLError
* Support transformation of argument names (41)
* Support value transformation of input object types (42)
* Support custom type map reducers in GraphQLSchema
* Allow comments on the last line of the query (39)

Future versions of GraphQL-core-next will be released as GraphQL-core version 3 and up.

GraphQL-core-next has been discontinued as separate distribution.

1.0.5

Public release of GraphQL-core-next, based on GraphQL.js v14.3.1.

This patch release contains the bug fix made in GraphQL.js [v14.3.1](https://github.com/graphql/graphql-js/releases/tag/v14.3.1) and some internal polishing.

1.0.4

Public release of GraphQL-core-next, based on GraphQL.js v14.3.0.

In addition to incorporating the latest changes from GraphQL.js
(see the list of changes in GraphQL.js [v14.3.0](https://github.com/graphql/graphql-js/releases/tag/v14.3.0)),
which include the addition of a new utility function `strip_ignored_characters`,
this release also contains the following improvements and changes:

* `specified_directives` and similar lists are now read only lists (31)
* `introspection_types` is now a read only dict
* Minor fixes in the Sphinx docs and some docstrings

1.0.3

Public release of GraphQL-core-next, based on GraphQL.js v14.2.1.

In addition to incorporating the latest changes from GraphQL.js
(see particularly the list of changes in GraphQL.js [v14.2.0](https://github.com/graphql/graphql-js/releases/tag/v14.2.0)),
this release also contains the following improvements and changes:

* Check `__typename` not only as dict key, but also as object attribute (25)
* Made package PEP 561 compatible by adding `py.typed` file (26)
* Use poetry instead of pipenv for packaging (22)

1.0.2

Public release of GraphQL-core-next, based on [GraphQL.js v14.1.1](https://github.com/graphql/graphql-js/releases/tag/v14.1.1).

In addition to incorporating the latest changes from GraphQL.js,
this release also contains the following improvements and changes:

* Add traceback to GraphQLErrors (23)
* Fix lexer issue with empty string (18)
* Keep a list of middleware resolvers (16)
* Support `__typename` attribute on data objects
* Restrict output via inspect() in error messages
* Remove `contain_subset` helper since it is not used any more

1.0.1

Public release of GraphQL-core-next, based on [GraphQL.js v14.0.2](https://github.com/graphql/graphql-js/releases/tag/v14.0.2).

Besides incorporating the latest changes from GraphQL.js,
this release also contains the following improvements and changes:

* Support GraphQL middleware (7)
* Support custom ExecutionContext (6)
* Await resolvers in parallel (11)
* Await subscribed execution results (10)
* Use inspect() instead of repr() in error messages (12)
* Code formatting with "black" (8)

1.0.0

Final version of the first public release of GraphQL-core-next, based on [GraphQL.js v14.0.0](https://github.com/graphql/graphql-js/releases/tag/v14.0.0).

1.0.0rc2

Second release candidate for GraphQL-core-next, based on [GraphQL.js v14.0.0-rc.2](https://github.com/graphql/graphql-js/releases/tag/v14.0.0-rc.2).

0.5.2

Changelog
- Add right stacktrace to `Exception` https://github.com/graphql-python/graphql-core/commit/1de69e5d2b95f17487b839bb97cac5d3e5465c06
- Use `promise.get()` instead of `promise.value` https://github.com/graphql-python/graphql-core/commit/11f0513d8f68f3889bd37268efb2e4927028bb61
- Added `loop` option in `AsyncioExecutor` https://github.com/graphql-python/graphql-core/commit/3258d297a877d0215764a28f281698b8bdd6b6b2

0.5.1

Changelog
- Improve validation error message when field names conflict https://github.com/graphql-python/graphql-core/commit/3caa3e0efffcf99b4f8f8f58a82a4b62ea918e71

0.5.0

Changelog

Features
- Improve error handling 41
- Add ability to add custom errors (inheriting from `GraphQLError`)
- Expose all the function and classes
- Move modules from `graphql.core.*` to `graphql.*`
- Make tests relative to the directories

Breaking changes

Improve the executor to be closer to the reference implementation:
- Uses `Promise` instead of `Deferred` as it simplifies the implementation. Use parallel resolvers automatically as default behavior when available. Use `pypromise` package. Related PR: 59

GraphQL-js Commit Checklist
- Allow edit nodes on enter and on leave: https://github.com/graphql/graphql-js/commit/ecfdb3bb3e90755a7bff6155af50591d52e75625 + https://github.com/graphql/graphql-js/commit/d2c005afc87353eceadc03592e74bd6e44063e8e
- Nit: fix missing quote in error message: https://github.com/graphql/graphql-js/commit/db0924a91f0a6c4cea8ff9a93713cbfe69c5ae8f
- Add test for parseLiteral on ComplexScalar: https://github.com/graphql/graphql-js/commit/b3a512787618cfbed20c9717daf2d69444bf7f33
- Extract completeListValue function from CompleteValue: https://github.com/graphql/graphql-js/compare/57d71e108afc0bdd205f5019fb8d0143b24b55b6...7a15a3f17452fadf2cc7d4f43fd41a7c24b38c8a + https://github.com/graphql/graphql-js/commit/533fc43f7d5836fc9b6a3eafde9801db9a3ee011
- [RFC] Proposed change to directive location introspection: https://github.com/graphql/graphql-js/commit/e89c19d2ce584f924c2e0e472a61bb805ce260d4
- Fix error message for missing operation + tests: https://github.com/graphql/graphql-js/commit/debf3d1fbffc6b31e3b8425a28d3478d8cc0be78 https://github.com/graphql/graphql-js/commit/3278e861837cd3f7d17eaec54f3f04b175300826
- [RFC] Directives in schema language: https://github.com/graphql/graphql-js/commit/fdafe32724f2d6dac1ba360f1a440c0e633e75d9
- Updating schema parser to more closely match current state of RFC: https://github.com/graphql/graphql-js/pull/323/commits/b0885a038ec0e654962d69fb910ac86659279579
- [RFC] Add Schema Definition to IDL https://github.com/graphql/graphql-js/commit/8379e71f7011fe044574f4bdef2a761d18d6cf2c
- Remove unused function parameters https://github.com/graphql/graphql-js/commit/43992e3a60d7bf8f5e7d2f29dfae302b5ba72eec
- Include test for extending a schema that uses Enums https://github.com/graphql/graphql-js/commit/37924d240d7e094382927e4f612d61ff7dda3cb3
- Cache client schema exe function, and include test for unreferenced interface https://github.com/graphql/graphql-js/commit/1083c7e0f3dbd6be801a12f688fe0959716c54ac
- Naming similarity https://github.com/graphql/graphql-js/commit/3f6a7f4ca9cd9242819e0e14fc7916635fbeeced
- Move getTypeOf to execute.js and rename to defaultResolveTypeFn to mirror defaultResolveFn https://github.com/graphql/graphql-js/commit/edc405a11508a110759ce53c9efb2eb6dd2d181c + https://github.com/graphql/graphql-js/commit/a781b556eea66bbf3cd82e438f560be9d9bec22c
- Add tests and refine default resolve function. https://github.com/graphql/graphql-js/commit/d506c23e413a0b2d5b6b169caca4af928996d1d9
- Add GraphQLSchema types field https://github.com/graphql/graphql-js/commit/6a1f23e1f9c1e6bf4cea837bc9bb6eae0fb5c382 + Fix test https://github.com/graphql/graphql-js/commit/09be751e995dd641f138f67ff9f420525950fad1
- [RFC] Add explicit context arg to graphql execution https://github.com/graphql/graphql-js/commit/d7cc6f9aed462588291bc821238650c98ad53580
- Improve coercion error messages https://github.com/graphql/graphql-js/commit/dea5aacca01f4429026bea3d97ea7cbc88b33bcf + Minor touch ups: https://github.com/graphql/graphql-js/commit/136630f8fd8778c4d2e61d07c0b1ec47f99c9bf6
- Clean up tests https://github.com/graphql/graphql-js/commit/8514211b674d1f282fdff73e412c289435ab6920
- Fix bug where include directive is ignored if skip is present. https://github.com/graphql/graphql-js/commit/d6da0bff7f877e6a4fb66119796809f9c207f841 + Spec compliant skip/include https://github.com/graphql/graphql-js/commit/47f87fa701cb33fc1fb0ca65b4668c7a14a5ad11
- Fix tests on abstract type invariant https://github.com/graphql/graphql-js/commit/cf5b2340f934c94b6c960d765d9fc26a02fb6250
- Remove non spec compliant test https://github.com/graphql/graphql-js/commit/07e627adda2b236e720ec352b21eb3043170c60f
- Add tests for type comparators https://github.com/graphql/graphql-js/commit/3201ebb825f7bab4ca4856238ade4603e15a5abc
- Add sanity checks for schema to allow only a single query, mutation, subscription in schema https://github.com/graphql/graphql-js/commit/ffe76c51c44922e2a24494ef0def9e3b999caacb
- RFC: Return type overlap validation https://github.com/graphql/graphql-js/commit/c034de91acce10d5c06d03bd332c6ebd45e2213c

0.4.18


      

0.4.17


      

0.4.16


      

0.4.15


      

0.4.14


      

0.4.13


      

0.4.12.1

This release is a halfway-point between 0.4.12 and 0.4.13, containing the validation stuff that's been implemented so far.

0.4.12

- Added support for experimental schema validation 37.

0.4.11

This release updates feature parity to `graphql-js` v0.4.11.

Changelog
- Fix typo in directive schema introspection description.
- 32 Implement `concat_ast` utility
- 33 Allow providing directives to `GraphQLSchema`
- 34 Allow nested objects with similar keys.
- 35 Support deprecation via introspection
- 36 Fix false positive validation error from fragment cycle when unknown fragment is used.

0.4.9

We're happy to announce `graphql-core` v0.4.9 is a stable release and is ready for use in Production.

Changelog
- Implement `subscription` type execition in the schema. 27
- Clearer lex errors for unprintable unicode.
- Introspection descriptions for scalar and introspection query types.
- Add missing tests. 23
- Implement [RFC] Additional optional arguments. 26
- Bump required gevent to `1.1rc1`.

0.4.7b1

Getting ready for stable release.

Changelog:
- [Executor] Implement memoization on `get_argument_values`.
- [Type Definition] Implement `__hash__` methods on `GraphQLField` and `GraphQLArgument`.
- [AST Visitor] Check if edit in visitor is a valid node.
- GraphQLUnion shall now accept a callable for types. This will make functionality equivalent to all the other types. i.e. GraphQLInterfaceType and GraphQLObjectType when it comes to defining fields/interfaces/types.

0.4.7b0

This is the first beta release of `graphql-core` and represents feature parity with [`graphql-js`](https://github.com/graphql/graphql-js/) `v0.4.7`, hence the matching version number. All `graphql-core` releases will follow `graphql-js` in terms of version numbers. This means for a given version of graphql-js, you can expect feature parity on the same version of `graphql-core`.

We will follow GraphQL's semantic versioning and releases except for one key difference, we will be introducing a BUGFIX version number as well, in the form of `MAJOR.MINOR.PATCH.BUGFIX`. This will allow us to match the PATCHes in graphql-js, while maintaining our own bugfix version numbers. That means that `v0.4.7.0`, `v0.4.7.1` will all match `v0.4.7` in feature parity, but with bugfixes to the Python codebase.

0.1a4

This release implements the Type Validation System (8)
- Implement type validation and unit tests 8
- Implement `assert_object_implements_interface` 8
- Implement missing enum_type tests.
- Removed submodule `libgraphqlparser`, move everything we need into `scripts`.
- Make `generate_ast` work on py3x
- Use **slots** in classes that seem to be instantiated a lot (to save some memory)

0.1a3

Yet again more potentially breaking fixes if you are using the Executor directly.
- Implement the `get_operation_ast` utility.
- Implement a way to get/set the default executor that is used when you call `graphql.core.graphql()` or `graphql.core.execute()`. You can do this by calling `graphql.core.executor.{get,set}_default_executor()`
- Add the option to specify `map_type` in the Executor. This change allows for you to specify what kind of Map you want to store your result data in. The two recommended options are:
- `dict` (the default). Use this when you don't care about result ordering. For example, you don't care that the order in the fields of your response match the order of the fields in your query. For most cases, this is correct and is the fastest option.
- [`collections.OrderedDict`](https://docs.python.org/2/library/collections.htmlordereddict-objects), when you pass something that is an OrderedDict, or a subclass of it, the executor will switch into "strict ordering" mode, which will make it so that the order of the results, match the order they were defined in the query. Concurrent execution will still execute out of order however if you are running a `Query` (but the results will still return in the correct order), you can override this by passing `execute_serially=True` to the executor (which is generally not needed. But exists incase you want to execute serially for whatever reason). Also, mutations will always execute serially.

You can use any other user implemented mapping type as long as it implements the [`MutableMapping`](https://docs.python.org/2/library/collections.htmlcollections.MutableMapping) abstract base type.
- The executor no longer takes `schema` in it's constructor. Instead pass this as the first argument to `Executor.execute()`.

0.1a2

More fixes and potentially breaking changes as we gradually implement schema type checking.
- The proper version of `gevent` can now be installed by using `pip install graphql-core[gevent]`.
- Require `six` as a dependency, and use it to handle py2/3 compat instead of `graphql.core.compat`.
- Ensure that values for `args` passed to `GraphQLField` are of type `GraphQLArgument`.
- Implement the `schema_printer` utility.
- Ensure that values for `fields` passed to `GraphQLInputType` are `GraphQLInputObjectFields`.
- For `GraphQLEnumType` use an `OrderedDict` to store values so that we can preserve the order of enums passed in. Additionally, when constructing an `GraphQLEnumType` you should use an OrderedDict to pass in your values as well. But this isn't enforced anywhere, but may raise a warning soon.
- Introspection's object types/enums should be using OrderedDicts for their fields/values, that way the order in the schema printer is going to be consistent.
- Switch argument ordering for `core.utils.value_from_ast` to match reference implementation.
- Allow `GraphQLInputObjectType` to take a callable as a `field` argument.
- Schema types should be built immediately instead of lazily when `get_type_map()` is called. This should allow us to raise exceptions upon construction of the schema, instead of later, upon first execution.
- Implement `build_ast_schema` utility.
- Split validation rules into individual files.
- The executor will now choose to use an ordered dict implementation when collecting the root fields of query/mutation, rather than an unordered-dict implementation to guarantee the order of execution when being executed serially is the same as it is defined in the query. No order guarantees are given for non-serial execution, as per the spec.
- Instead of using `is_nullish`, use a more Pythonic `is None` check. (thank you faassen)
- Remove `setup.py test` instead, use `tox` for testing.

0.1a1

`graphql-core` v0.1-alpha-1 release.
- Performance and memory optimizations to the visitor, parser, lexer and tokenizer.
- Implement latest upstream RFCs (operation name optional, type condition optional).
- Implement schema parser and schema AST printer.
- Add more tests.

0.1a0

Alpha package release: https://pypi.python.org/pypi/graphql-core/0.1a0