Comment

Comment by phamilton

I guess in theory we could take a gql query like:

  query {
    user {
      first_name
      last_name
    }
    settings {
      debug
      paid
    }
  }
could be translated into:

GET /user/first_name GET /user/last_name GET /settings/debug GET /settings/paid

And you could represent any gql query as a multiplexed http2 call. And you could then have the server use a persistent user scoped dataloader (or some other shared cache) to resolve all that data and respond to each of those queries.

That's roughly an isomorphism between graphql and http2.

parent phamilton 7 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton