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 (syrusakbary/aiodataloader#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 #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 #1304
Thank you to everyone that contributed to this release!
Other Changes
- Fix typo in union comments by @ramonwenger in #1424
- Add Codecov to github actions by @erikwrede in #1431
- docs: Fix a few typos by @timgates42 in #1437
- Highlight .get in backticks by @RJ722 in #1402
- Add support for interfaces on interfaces by @AlecRosenbaum in #1304
- Update Dataloader docs [Waiting for Graphene v3 to be live] by @jkimbo in #1190
- Avoid ambiguity in graphene.Mutation docstring [documentation] by @belkka in #1381
- Issue #1413 fix invalid input type by @tcleonard in #1414
- Delete coveralls.yml by @erikwrede in #1442
- fix: use install instead of instal for consistency by @karmingc in #1444
- Update quickstart.rst by @alimcmaster1 in #1407
- Update pre-commit hooks by @ulgens in #1447
- fix: update ariadne url to the new docs by @DrewHoo in #1370
- Add Python 3.11 release candidate 1 to the testing by @cclauss in #1450
- Remove duplicate flake8 call in tox, it's covered by pre-commit by @ulgens in #1448
- Fix BigInt export by @erikwrede in #1456
- Upgrade base Python version to 3.10 by @ulgens in #1449
- Upgrade GitHub Actions by @cclauss in #1457
- Vendor
DataLoader
fromaiodataloader
and moveget_event_loop()
out of__init__
function. by @flipbit03 in #1459
New Contributors
- @ramonwenger made their first contribution in #1424
- @timgates42 made their first contribution in #1437
- @RJ722 made their first contribution in #1402
- @belkka made their first contribution in #1381
- @karmingc made their first contribution in #1444
- @alimcmaster1 made their first contribution in #1407
- @ulgens made their first contribution in #1447
- @DrewHoo made their first contribution in #1370
- @flipbit03 made their first contribution in #1459
Full Changelog: v3.1.0...v3.1.1