pypi graphene 3.1.1
v3.1.1

latest releases: 3.3, 3.2.2, 3.2.1...
22 months ago

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
}

Thank you to everyone that contributed to this release!

Other Changes

New Contributors

Full Changelog: v3.1.0...v3.1.1

Don't miss a new graphene release

NewReleases is sending notifications on new releases.