-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GraphQL support #11
Comments
Link to compare all changes in that branch: https://github.com/dwsutherland/cylc/compare/9ca798d815934966d28a65438d7fd7645ffc174f..34a87b1b8b73277ed810cc365db7bda9ad658054 |
@dwsutherland looks to me like there are small changes required for GraphQL + Flask. The majority of the changes are in Cylc to have the right objects required to populate the GraphQL response. Q: about the I believe this is where we have the complete API contract, available through our GraphQL endpoint for clients. Where should we put it? I think it will go to This current project, But if we have Another alternative would be to have WDYT? |
Work started here: https://github.com/kinow/cylc-jupyterhub/tree/add-graphql So far have only added |
This is a breaking change, and we will no longer be able to use the Flask branch, we will divorce from it here on out. Yeah, we need to setup the feed from cylc8.
The schema is no longer needed in the suite (we will transport the full field objects) and resolved them in the UI Server. So I'll make a pull request to Just use a hello world schema until then.. All good? |
Oh, much easier for now. Thanks @dwsutherland ! |
…per documentation of graphene-tornado
Tested WebSockets today. Used the simple example from the Tornado documentation, which just prints back whatever you say on the message. Not possible to use that endpoint in a browser, unless you write JS code. For now the WebSocket is insecure, but we should try to use a secure WebSocket in production. Then tested without a cookie/authentication. And that worked, as the endpoint was not extending JupyterHub's Extending the right class, we can't connect without logging in: And finally, once logged in, the WebSocket worked again! 🎉 So I believe we are all good with WebSockets support for Tornado, with integration with the Hub. @dwsutherland I think the only thing missing now is the graphql-python/graphql-ws#25 👍 |
@kinow - Yes, it can't use the same HTTP authentication.. but authentication is done at the hub right? else we may be able to use other types, or bespoke (as you mentioned) |
Authentication done in the hub. We can still change who is authorised to see what however. |
Merged. Remaining work in #14, and later more work on data model. |
As per discussion in Riot, we are now ready to start porting the work from @dwsutherland with GraphQL + Flask to here, with GraphQL + Tornado.
As both the Flask and the Tornado implementations are provided as extensions of the Python Graphene project, it should be fairly easy to port most of the code.
Flask has an approach of a slim core, with extensions installed via
pip
for things like CORS, HTTP Basic, etc. Whereas Tornado includes a slim core too, but without official modules for things like CORS or some authentication mechanisms.So this may be a bit of a challenge.
See:
The text was updated successfully, but these errors were encountered: