Skip to content

Instantly share code, notes, and snippets.

@isocroft
Created December 7, 2021 16:09
Show Gist options
  • Save isocroft/9f84de0d80a41d44dbafd9f9cbe18e2e to your computer and use it in GitHub Desktop.
Save isocroft/9f84de0d80a41d44dbafd9f9cbe18e2e to your computer and use it in GitHub Desktop.
HTTP caching directive
type User {
name: String!
age: Int!
salary: Float!
}
type Query {
getAllUsers (id: ID!, page: Int!, pageSize: Int!): [User!] @httpCached(action: "check", freshness: 1, validation: 0)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment