You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Framework adapters: request extraction and context construction beyond the axum example #32
The axum example is the only integration and hand-writes the whole handler (examples/axum/src/main.rs:342-383): deserializing greem::http::Request, constructing the application context, negotiating Accept, turning the payload stream into a response. #21 moves the response half into greem::http. The request half is still per application: how C is built per request, how connection state (headers, auth, peer address) reaches it, and GET requests, Content-Type dispatch and application/graphql-response+json are not handled at all.
Stay transport-agnostic: greem::http gains GET parsing and a plain RequestParts { method, content_type, accept, body } -> Request step; each integration writes the few lines around it.
Adapter crates per framework (axum, actix-web, hyper) on top of the plain helpers, each with an extractor that builds C through a user closure over the request parts.
Both: plain helpers in greem::http, one greem-axum crate as the reference adapter.
Open questions
Is C built per request or per connection, and does greem need to know?
Which GraphQL-over-HTTP rules does greem enforce (status codes for request errors, media types) versus the adapter?
Should stream_capacity be overridable per request?
#47 lands this issue's first option, in greem::http without an HTTP crate:
GET parsing, Content-Type dispatch (POST takes application/json only) and the well-formedness checks;
405 for a mutation over GET;
Accept negotiation with application/graphql-response+json.
handle takes a plain RequestParts { method, query_string, content_type, accept, body }, and an http feature adds RequestParts::from_http and Response → http::Response<Body> conversions. The status code rules follow the GraphQL-over-HTTP draft (ADR-0012), which answers the open question of which rules greem enforces: greem enforces them all.
Still open here:
how C is built per request (the context is still passed in, built by the integration);
Activity
XiNiHa commentedon Oct 15, 2026
#47 lands this issue's first option, in
greem::httpwithout an HTTP crate:Content-Typedispatch (POST takesapplication/jsononly) and the well-formedness checks;Acceptnegotiation withapplication/graphql-response+json.handletakes a plainRequestParts { method, query_string, content_type, accept, body }, and anhttpfeature addsRequestParts::from_httpandResponse → http::Response<Body>conversions. The status code rules follow the GraphQL-over-HTTP draft (ADR-0012), which answers the open question of which rules greem enforces: greem enforces them all.Still open here:
Cis built per request (the context is still passed in, built by the integration);greem-axum;stream_capacity.