Updated docs reflecting latest resolver arguments

This commit is contained in:
Syrus Akbary 2016-09-10 22:24:18 -07:00
parent cc4031f866
commit 2ae6cc3b7c
2 changed files with 4 additions and 4 deletions

View File

@ -45,10 +45,10 @@ class Query(graphene.ObjectType):
ping = graphene.String(description='Ping someone',
to=graphene.String())
def resolve_hello(self, args, info):
def resolve_hello(self, args, context, info):
return 'World'
def resolve_ping(self, args, info):
def resolve_ping(self, args, context, info):
return 'Pinging {}'.format(args.get('to'))
schema = graphene.Schema(query=Query)

View File

@ -58,10 +58,10 @@ Here is one example for get you started:
ping = graphene.String(description='Ping someone',
to=graphene.String())
def resolve_hello(self, args, info):
def resolve_hello(self, args, context, info):
return 'World'
def resolve_ping(self, args, info):
def resolve_ping(self, args, context, info):
return 'Pinging {}'.format(args.get('to'))
schema = graphene.Schema(query=Query)