Skip to content
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

"Spec" compliance #341

Open
armanbilge opened this issue Mar 15, 2022 · 0 comments
Open

"Spec" compliance #341

armanbilge opened this issue Mar 15, 2022 · 0 comments

Comments

@armanbilge
Copy link
Contributor

I'm using "spec" here very loosely 😅 in order of specy-ness:

  1. https://spec.graphql.org/June2018/
  2. https://github.com/graphql/graphql-over-http/blob/main/spec/GraphQLOverHTTP.md
  3. https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md
    Note that apollographql/subscriptions-transport-ws is archived and points to there instead.
  4. https://github.com/enisdenjo/graphql-sse/blob/master/PROTOCOL.md

I still have a lot of reading to do since I'm new to GraphQL. Some of my notes so far:

  • the client interfaces for query/mutation/subscription should use only concepts from (1); e.g. the core model should not be tied to the http spec or notions of persistent connections. It seems ok to use circe.Json as an intermediary format since that's pretty close to what the spec describes
    // Request format from Spec: https://github.com/APIs-guru/graphql-over-http
  • backends for these clients should probably be implemented directly in terms of http4s (ws-)clients according to (2), (3), (4); this does not rule out common abstractions for sharing of code, but it seems like that should remain an internal implementation detail since these specs may evolve independently
  • special functionality to reconnect/recreate subscriptions sounds like middleware territory to me
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant