juniper icon indicating copy to clipboard operation
juniper copied to clipboard

GraphQL over HTTP spec compliance (#1120)

Open tyranron opened this issue 2 years ago • 2 comments

Resolves #1120

Synopsis

Currently in draft but it is an official project:

https://graphql.github.io/graphql-over-http/draft/

Checklist

Integration

  • [ ] juniper_actix
  • [ ] juniper_axum
  • [ ] juniper_hyper
  • [ ] juniper_rocket
  • [ ] juniper_warp

tyranron avatar Nov 27 '23 15:11 tyranron

@LegNeato after investigating it closely, the rabbit hole seems to be way deeper that I thought it would be. There are quite a lot of nuisances and details to be handled properly regarding different media types (for example, response codes for application/json and application/graphql-response+json are treated very differently), and moreover, spec implies few points for extension by user-side, while the core should remain.

Implementing all this separately for each integration crate would be painful and fragile. Moreover, integration crates are not doing well with extensibility. That's why, to implement this properly, it seems right to introduce a new juniper_graphql_http crate, providing a core http-crate-based implementation and being framework-agnostic, just as we have the juniper_graphql_ws crate for GraphQL over WebSocket specs.

This, however, quite a huge and time-consuming task, so I decided to move it from 0.16 milestone to 0.17 one.

tyranron avatar Nov 27 '23 17:11 tyranron

Make sense to me! I've been thinking that we'd probably need something similar, mirroring the http / tower stack

LegNeato avatar Nov 29 '23 00:11 LegNeato