mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-02 12:44:15 +03:00
Updated docs reflecting latest resolver arguments
This commit is contained in:
parent
cc4031f866
commit
2ae6cc3b7c
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user