mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-29 21:13:58 +03:00
14 lines
326 B
Python
14 lines
326 B
Python
import graphene
|
|
|
|
class Query(graphene.ObjectType):
|
|
hello = graphene.String()
|
|
ping = graphene.String(to=graphene.String())
|
|
|
|
def resolve_hello(self, args, info):
|
|
return 'World'
|
|
|
|
def resolve_ping(self, args, info):
|
|
return 'Pinging {}'.format(args.get('to'))
|
|
|
|
schema = graphene.Schema(query=Query)
|