juniper icon indicating copy to clipboard operation
juniper copied to clipboard

Axum integration

Open btielen opened this issue 2 years ago • 3 comments

This PR provides an integration for Axum including subscriptions (fixes #986)

  • including http tests run by juniper::http::tests::run_http_test_suite
  • including websocket tests run by juniper::http::tests::run_ws_test_suite

Get started

Run cargo run -p juniper_axum --example simple from the root directory, and navigate to 127.0.0.1:3000 in your browser.

Other changes

Minor changes were made in other libraries

  • Added an Error for the implementation of Sink for juniper_graphql_ws::Connection, so the code doesn't panic.
  • Added an extra test in juniper::http::tests::run_ws_test_suite to test POST requests with variables

Discussion

  • Documentation probably needs some polishing
  • juniper::http::GraphQLRequest now has a property variables with type Option<InputValue<S>>, I think (but not sure) things would be easier if this has the type Variables<S>
  • I didn't test requests with an operation_name defined

Any help polishing this PR is appreciated :)

btielen avatar Jul 24 '22 16:07 btielen

In case this PR will get merged, it would be nice to update the projects documentation and book to point out an integration for Axum exists.

btielen avatar Jul 24 '22 17:07 btielen

Thanks for the feedback, I will take a look at it tomorrow.

btielen avatar Aug 04 '22 07:08 btielen

:wave: Incredible work :star_struck: , Is there any plan to merge & release it ?

harksin avatar Oct 16 '22 14:10 harksin