mirror of
https://github.com/kennethreitz/responder.git
synced 2026-06-05 23:00:17 +00:00
14 lines
306 B
Python
14 lines
306 B
Python
import graphene
|
|
|
|
|
|
class Query(graphene.ObjectType):
|
|
hello = graphene.String(name=graphene.String(default_value="stranger"))
|
|
|
|
def resolve_hello(self, info, name):
|
|
return "Hello " + name
|
|
|
|
|
|
schema = graphene.Schema(query=Query)
|
|
result = schema.execute("{ hello }")
|
|
print(result.data["hello"])
|