File size: 329 Bytes
1b5b024 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | from graphene import Schema,ObjectType,String
class Query(ObjectType):
say = String()
def resolve_say(self,info):
return 'Hello GraphQL!!'
if __name__ == '__main__':
schema = Schema(query= Query)
query_string='''
{
say
}
'''
rs = schema.execute(query_string)
print(rs.data) |