init
This commit is contained in:
commit
867c5164d3
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
venv/
|
22
main.py
Normal file
22
main.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
from graphene import Schema, ObjectType, String
|
||||||
|
|
||||||
|
|
||||||
|
class Query(ObjectType):
|
||||||
|
hello = String(name=String(default_value="world"))
|
||||||
|
|
||||||
|
def resolve_hello(self, info, name):
|
||||||
|
return "Hello " + name
|
||||||
|
|
||||||
|
|
||||||
|
schema = Schema(query=Query)
|
||||||
|
|
||||||
|
gql = """
|
||||||
|
{
|
||||||
|
hello(name: "ghasdf")
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
res = schema.execute(gql)
|
||||||
|
print(res)
|
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
graphene==3.2.2
|
Loading…
Reference in New Issue
Block a user