Skip to content
Snippets Groups Projects
Commit afc71f34 authored by Vincent Texier's avatar Vincent Texier
Browse files

issue #59 WIP: improve example

parent ee73475d
No related branches found
No related tags found
No related merge requests found
Pipeline #7225 failed
...@@ -12,8 +12,6 @@ SWAPI_ENDPOINT = "BMAS swapi.graph.cool 443" ...@@ -12,8 +12,6 @@ SWAPI_ENDPOINT = "BMAS swapi.graph.cool 443"
GRAPHQL_GET_SCHEMA_QUERY_FILEPATH = "../duniterpy/api/gva/get_schema_query.graphql" GRAPHQL_GET_SCHEMA_QUERY_FILEPATH = "../duniterpy/api/gva/get_schema_query.graphql"
GRAPHQL_SCHEMA_FILEPATH = "/tmp/duniterpy_example_swapi_schema.graphql"
################################################ ################################################
...@@ -25,9 +23,11 @@ async def main(): ...@@ -25,9 +23,11 @@ async def main():
with open(os.path.join(os.path.dirname(__file__), GRAPHQL_GET_SCHEMA_QUERY_FILEPATH), 'r') as fd: with open(os.path.join(os.path.dirname(__file__), GRAPHQL_GET_SCHEMA_QUERY_FILEPATH), 'r') as fd:
query = fd.read() query = fd.read()
print("\nGet swapi schema with introspection query:")
response = await client.query(query) response = await client.query(query)
print(response) print(response)
print("\nallFilms query:")
query = """query { query = """query {
allFilms { allFilms {
title, title,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment