Skip to content

graphql-epoxy v0.3 release

Latest
Compare
Choose a tag to compare
@jhgg jhgg released this 17 Nov 21:02
· 4 commits to master since this release

Add support for subscriptions and bump graphql-core to v0.4.9

You can now define a subscription just like you would a Query:

R = TypeRegistry()

class Query(R.ObjectType):
    a = R.Int

class Subscription(R.ObjectType):
    subscribe_to_foo = R.Boolean(args={'id': R.Int})

    def resolve_subscribe_to_foo(self, obj, args, info):
        return args.get('id') == 1

Schema = R.Schema(R.Query, subscription=R.Subscription)

graphql-epoxy remains un-opinionated as to how you actually want to implement your subscription logic.