qlient-org / python-qlient-core Goto Github PK
View Code? Open in Web Editor NEWThe core module for the python qlient
License: MIT License
The core module for the python qlient
License: MIT License
Looking over the code I see there is a way to load schema from a file. Would it make sense to have a cache mechanism? When using the qlient with smaller schema, the delay isn't noticeable but using it with api.github.com/graphql it adds ~5 seconds to each request.
For example:
2022-10-11 16:31:19,800 DEBUG:Loading remote schema using `<qlient.http.backends.HTTPBackend object at 0x7facd59b2ca0>`
2022-10-11 16:31:19,800 DEBUG:Sending request: ...snipped_introspection_for_brevity...
2022-10-11 16:31:19,802 DEBUG:Starting new HTTPS connection (1): api.github.com:443
2022-10-11 16:31:25,098 DEBUG:https://api.github.com:443 "POST /graphql HTTP/1.1" 200 None
2022-10-11 16:31:25,304 DEBUG:Schema successfully introspected
2022-10-11 16:31:25,304 DEBUG:Sending request: {"query": "query viewer { viewer { login } }", "operationName": "viewer", "variables": {}}
2022-10-11 16:31:25,398 DEBUG:https://api.github.com:443 "POST /graphql HTTP/1.1" 200 None
2022-10-11 16:31:25,399 INFO: Query: query viewer { viewer { login } }
2022-10-11 16:31:25,399 INFO: Data: {'viewer': {'login': 'eisenhowerj'}}
2022-10-11 16:31:25,399 DEBUG:done
versus:
2022-10-11 16:35:51,867 DEBUG:Loading remote schema using `<qlient.http.backends.HTTPBackend object at 0x7f6b51b6ebb0>`
2022-10-11 16:35:51,867 DEBUG:Sending request: ...snipped_introspection_for_brevity...
2022-10-11 16:35:51,869 DEBUG:Starting new HTTPS connection (1): swapi-graphql.netlify.app:443
2022-10-11 16:35:52,046 DEBUG:https://swapi-graphql.netlify.app:443 "POST /.netlify/functions/index HTTP/1.1" 200 None
2022-10-11 16:35:52,057 DEBUG:Schema successfully introspected
2022-10-11 16:35:52,058 DEBUG:Sending request: {"query": "query film($id: ID) { film(id: $id) { id title episodeID } }", "operationName": "film", "variables": {"id": "ZmlsbXM6MQ=="}}
2022-10-11 16:35:52,121 DEBUG:https://swapi-graphql.netlify.app:443 "POST /.netlify/functions/index HTTP/1.1" 200 74
2022-10-11 16:35:52,123 INFO: Query: query film($id: ID) { film(id: $id) { id title episodeID } }
2022-10-11 16:35:52,123 INFO:{'id': 'ZmlsbXM6MQ=='}
2022-10-11 16:35:52,123 INFO: Data: {'film': {'id': 'ZmlsbXM6MQ==', 'title': 'A New Hope', 'episodeID': 4}}
2022-10-11 16:35:52,123 DEBUG:done
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.