Skip to content

Instantly share code, notes, and snippets.

@mxstbr
Last active February 23, 2018 09:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mxstbr/451f833962c9db8fd0de78f9d5ef8e3a to your computer and use it in GitHub Desktop.
Save mxstbr/451f833962c9db8fd0de78f9d5ef8e3a to your computer and use it in GitHub Desktop.
type Participant {
# The complexity of getting one thread in a thread connection is 3, and multiply that by the amount of threads fetched
threadConnection(first: PaginationAmount, after: String): ThreadConnection @cost(complexity: 3, multipliers: ["first"])
}
type Thread {
author: Author @cost(complexity: 1)
participants(first: PaginationAmount,...): [Participant] @cost(complexity: 2, multipliers: ["first"])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment