v3.1.1
版本发布时间: 2022-09-08 17:26:24
graphql-python/graphene最新发布版本:v3.3.0(2023-07-26 14:47:55)
What's changed
Dataloader
Graphene now includes an updated version of aiodataloader
by Syrus Akbary under graphene.utils.dataloader
due to inactivity of the old repository. The update fixes an issue some users experienced when trying to use dataloader
in conjunction with pytest (https://github.com/syrusakbary/aiodataloader/issues/13). Further contributions and updates to dataloader in this repo are welcome!
Enums
A custom typename can now be added when using from_enum
:
from enum import Enum as PyEnum
class Color(PyEnum):
RED = 1
YELLOW = 2
BLUE = 3
GColor = Enum.from_enum(Color, description="original colors")
UniqueGColor = Enum.from_enum(
Color, name="UniqueColor", description="unique colors"
)
type Query {
color: Color!
uniqueColor: UniqueColor!
}
"""original colors"""
enum Color {
RED
YELLOW
BLUE
}
"""unique colors"""
enum UniqueColor {
RED
YELLOW
BLUE
}
- feat: add ability to provide a type name to enum when using from_enum by @tcleonard in https://github.com/graphql-python/graphene/pull/1430
Interfaces
Interfaces extending interfaces is now supported!
class FooInterface(Interface):
foo = String()
class BarInterface(Interface):
class Meta:
interfaces = [FooInterface]
foo = String()
bar = String()
interface FooInterface {
foo: String
}
interface BarInterface implements FooInterface {
foo: String
bar: String
}
- Add support for interfaces on interfaces by @AlecRosenbaum in https://github.com/graphql-python/graphene/pull/1304
Thank you to everyone that contributed to this release!
Other Changes
- Fix typo in union comments by @ramonwenger in https://github.com/graphql-python/graphene/pull/1424
- Add Codecov to github actions by @erikwrede in https://github.com/graphql-python/graphene/pull/1431
- docs: Fix a few typos by @timgates42 in https://github.com/graphql-python/graphene/pull/1437
- Highlight .get in backticks by @RJ722 in https://github.com/graphql-python/graphene/pull/1402
- Add support for interfaces on interfaces by @AlecRosenbaum in https://github.com/graphql-python/graphene/pull/1304
- Update Dataloader docs [Waiting for Graphene v3 to be live] by @jkimbo in https://github.com/graphql-python/graphene/pull/1190
- Avoid ambiguity in graphene.Mutation docstring [documentation] by @belkka in https://github.com/graphql-python/graphene/pull/1381
- Issue #1413 fix invalid input type by @tcleonard in https://github.com/graphql-python/graphene/pull/1414
- Delete coveralls.yml by @erikwrede in https://github.com/graphql-python/graphene/pull/1442
- fix: use install instead of instal for consistency by @karmingc in https://github.com/graphql-python/graphene/pull/1444
- Update quickstart.rst by @alimcmaster1 in https://github.com/graphql-python/graphene/pull/1407
- Update pre-commit hooks by @ulgens in https://github.com/graphql-python/graphene/pull/1447
- fix: update ariadne url to the new docs by @DrewHoo in https://github.com/graphql-python/graphene/pull/1370
- Add Python 3.11 release candidate 1 to the testing by @cclauss in https://github.com/graphql-python/graphene/pull/1450
- Remove duplicate flake8 call in tox, it's covered by pre-commit by @ulgens in https://github.com/graphql-python/graphene/pull/1448
- Fix BigInt export by @erikwrede in https://github.com/graphql-python/graphene/pull/1456
- Upgrade base Python version to 3.10 by @ulgens in https://github.com/graphql-python/graphene/pull/1449
- Upgrade GitHub Actions by @cclauss in https://github.com/graphql-python/graphene/pull/1457
- Vendor
DataLoader
fromaiodataloader
and moveget_event_loop()
out of__init__
function. by @flipbit03 in https://github.com/graphql-python/graphene/pull/1459
New Contributors
- @ramonwenger made their first contribution in https://github.com/graphql-python/graphene/pull/1424
- @timgates42 made their first contribution in https://github.com/graphql-python/graphene/pull/1437
- @RJ722 made their first contribution in https://github.com/graphql-python/graphene/pull/1402
- @belkka made their first contribution in https://github.com/graphql-python/graphene/pull/1381
- @karmingc made their first contribution in https://github.com/graphql-python/graphene/pull/1444
- @alimcmaster1 made their first contribution in https://github.com/graphql-python/graphene/pull/1407
- @ulgens made their first contribution in https://github.com/graphql-python/graphene/pull/1447
- @DrewHoo made their first contribution in https://github.com/graphql-python/graphene/pull/1370
- @flipbit03 made their first contribution in https://github.com/graphql-python/graphene/pull/1459
Full Changelog: https://github.com/graphql-python/graphene/compare/v3.1.0...v3.1.1