Add Suave server integration package#567
Conversation
Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/1f4b9b83-930c-43b3-a8a5-8cf795269b9d Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/1f4b9b83-930c-43b3-a8a5-8cf795269b9d Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/1f4b9b83-930c-43b3-a8a5-8cf795269b9d Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
|
@copilot Does this support websocket aspects of GraphQL spec? |
Checked this in the current implementation at 46c8871: no, the Suave package does not support the WebSocket/GraphQL-over-WebSocket part right now. What exists today in The WebSocket implementation lives in So the short answer is: HTTP GraphQL is supported in Suave, WebSocket GraphQL is not. Reusing the ASP.NET Core implementation as-is would not work directly; it would need either a Suave-specific WebSocket adapter or a refactor that extracts the transport-agnostic parts into shared code. |
This adds an official Suave integration package for
FSharp.Data.GraphQL, following the existing Giraffe/Oxpecker shape. The new package exposes GraphQL as a SuaveWebPartso it can be embedded directly into larger Suave applications.New Suave integration package
FSharp.Data.GraphQL.Server.SuaveHttpHandlers.graphQLHttpHandlers.setRequestTypeGETintrospection requestsPOSTJSON GraphQL requestsRequest handling model
IInputExecutionContextimplementation for file uploadsRequest-Typeresponse header convention used by the current integrationsPackaging and build wiring
Focused coverage
Example usage: