Download Code/GraphQL/01_hello_graphql.py from zxy0307/Python_05_Flask: direct link, hf CLI and curl.
- Browser
- Download file 329 Bytes
-
https://huggingface.co/zxy0307/Python_05_Flask/resolve/main/Code/GraphQL/01_hello_graphql.py
- Command line
-
hf download hf://zxy0307/Python_05_Flask/Code/GraphQL/01_hello_graphql.py
-
curl -L -o 01_hello_graphql.py https://huggingface.co/zxy0307/Python_05_Flask/resolve/main/Code/GraphQL/01_hello_graphql.py
329 Bytes
| 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) |