MyGit

v3.1.1

graphql-python/graphene

版本发布时间: 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
}

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
}

Thank you to everyone that contributed to this release!

Other Changes

New Contributors

Full Changelog: https://github.com/graphql-python/graphene/compare/v3.1.0...v3.1.1

相关地址:原始地址 下载(tar) 下载(zip)

查看:2022-09-08发行的版本