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.