Skip to content

Instantly share code, notes, and snippets.

@isocroft
Created December 7, 2021 16:06
Show Gist options
  • Save isocroft/432b6be864b5e6909f29ccbc4e5bd882 to your computer and use it in GitHub Desktop.
Save isocroft/432b6be864b5e6909f29ccbc4e5bd882 to your computer and use it in GitHub Desktop.
A sample of a potential GraphQL directive on the client-side for HTTP compression
query GetUserFriendsAndLikes ($id: Int!) {
getUserFriendsAndLikes (id: $id) @httpCompressed(mode: "incremental") {
first_name
last_name
age
gender
friends @defer {
first_name
last_name
age
gender
}
likes @live
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment