Skip to content

Instantly share code, notes, and snippets.

@donabrams
Created September 1, 2016 14:08
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 donabrams/f5e25a69bd16e86825f84ed169d4cdac to your computer and use it in GitHub Desktop.
Save donabrams/f5e25a69bd16e86825f84ed169d4cdac to your computer and use it in GitHub Desktop.
Example Relay Request with Heavy fragment user
query Index {
viewer {
id
...FX
}
}
fragment F0 on User {
name
email
avatarFileName
id
}
fragment F1 on User {
entityId
name
id
...F0
}
fragment F2 on Goal {
_owners39bmdv: owners(first: 10) {
edges {
node {
entityId
id
...F1
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
id
}
fragment F3 on Goal {
id
entityId
_ownersNl6Bi: owners(first: 100) {
edges {
node {
id
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
team {
id
}
parent {
id
}
}
fragment F4 on Goal {
id
_ownersNl6Bi: owners(first: 100) {
edges {
node {
id
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
company {
id
}
}
fragment F5 on Goal {
entityId
state
creator {
entityId
id
}
_ownersNl6Bi: owners(first: 100) {
edges {
node {
entityId
id
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
id
...F3
...F4
}
fragment F6 on Goal {
name
status
state
description
_owners39bmdv: owners(first: 10) {
edges {
node {
id
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
companyGoal
private
team {
entityId
name
id
}
amountType
type
startingAmount
goalAmount
progressAmount
endDate
lastUpdated
id
...F2
...F5
}
fragment F7 on Metric {
startingAmount
goalAmount
progressAmount
id
}
fragment F8 on Goal {
_metrics1l1LnK: metrics(first: 20) {
edges {
node {
entityId
complete
type
title
id
...F7
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
id
}
fragment F9 on Goal {
id
...F6
...F8
}
fragment Fa on GoalUpdate {
updateStatus
increase
comment
goal {
amountType
goalAmount
id
}
id
}
fragment Fb on GoalUpdate {
entityId
createdAt
creator {
name
id
...F0
}
id
...Fa
}
fragment Fc on GoalUpdate {
id
goal {
id
}
}
fragment Fd on GoalUpdate {
entityId
creator {
entityId
id
}
id
...Fb
...Fc
}
fragment Fe on Node {
id
__typename
}
fragment Ff on ActivitySource {
__typename
...Fd
...Fe
}
fragment Fg on Goal {
entityId
name
id
}
fragment Fh on Activity {
_comments312TyF: comments(first: 99) {
edges {
cursor
node {
id
__typename
}
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
id
}
fragment Fi on Commentable {
id
body
createdAt
user {
name
entityId
id
...F0
}
__typename
}
fragment Fj on CommentableSource {
_commentspwYjO: comments(first: 100) {
edges {
node {
id
createdAt
__typename
...Fi
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
__typename
...Fe
}
fragment Fk on Activity {
id
}
fragment Fl on Activity {
id
entityId
...Fj
...Fk
}
fragment Fm on Activity {
_likes47hyZ0: likes(last: 9) {
edges {
node {
id
user {
name
id
}
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
viewerHasLiked
id
}
fragment Fn on Activity {
entityId
id
...Fm
...Fk
}
fragment Fo on Activity {
entityId
id
...Fh
...Fl
...Fn
}
fragment Fp on Activity {
entityId
source {
__typename
...Ff
...Fe
}
goal {
id
...Fg
}
id
...Fo
...Fk
}
fragment Fq on GoalComment {
entityId
body
createdAt
creator {
name
id
...F0
}
id
}
fragment Fr on GoalComment {
id
goal {
id
}
}
fragment Fs on GoalComment {
entityId
creator {
entityId
id
}
id
...Fq
...Fr
}
fragment Ft on ActivitySource {
__typename
...Fs
...Fe
}
fragment Fu on Activity {
entityId
source {
__typename
...Ft
...Fe
}
id
...Fo
...Fk
}
fragment Fv on MetricUpdate {
entityId
increase
createdAt
creator {
name
id
...F0
}
metric {
title
type
id
}
id
}
fragment Fw on MetricUpdate {
id
metric {
id
}
}
fragment Fx on MetricUpdate {
entityId
creator {
entityId
id
}
id
...Fv
...Fw
}
fragment Fy on ActivitySource {
__typename
...Fx
...Fe
}
fragment Fz on Activity {
id
goal {
id
}
}
fragment FA on Activity {
entityId
source {
__typename
...Fy
...Fe
}
id
...Fz
}
fragment FB on Goal {
endedAt
id
}
fragment FC on Goal {
id
...FB
}
fragment FD on ActivitySource {
__typename
...FC
...Fe
}
fragment FE on Activity {
source {
__typename
...FD
...Fe
}
id
}
fragment FF on Goal {
entityId
createdAt
creator {
name
id
...F0
}
id
}
fragment FG on Goal {
id
...FF
}
fragment FH on ActivitySource {
__typename
...FG
...Fe
}
fragment FI on Activity {
entityId
source {
__typename
...FH
...Fe
}
id
...Fo
}
fragment FJ on Activity {
sourceableType
id
...Fp
...Fu
...FA
...FE
...FI
}
fragment FK on Goal {
progressAmount
startingAmount
goalAmount
createdAt
endedAt
amountType
type
name
id
}
fragment FL on Goal {
id
status
progressAmount
_ancestors1dSZXF: ancestors(first: 100) {
edges {
node {
id
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
_metrics3Gb4Mp: metrics(first: 100) {
edges {
node {
entityId
id
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
company {
id
}
}
fragment FM on Goal {
entityId
_metrics3Gb4Mp: metrics(first: 100) {
edges {
node {
complete
entityId
progressAmount
startingAmount
title
type
id
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
id
...FK
...FL
...F4
}
fragment FN on Goal {
entityId
_activities2Lg7FS: activities(last: 50, recusive: false) {
edges {
node {
entityId
createdAt
sourceableType
goal {
entityId
id
}
id
...FJ
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
_childrenZ9R1Q: children(first: 1) {
edges {
node {
entityId
id
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
id
...FM
}
fragment FO on Goal {
amountType
endedAt
goalAmount
progressAmount
startingAmount
state
status
type
id
}
fragment FP on Goal {
entityId
name
status
lastUpdated
companyGoal
private
_owners39bmdv: owners(first: 10) {
edges {
cursor
node {
id
}
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
id
...FO
...F2
}
fragment FQ on Goal {
entityId
name
status
companyGoal
_owners39bmdv: owners(first: 10) {
edges {
cursor
node {
id
}
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
id
...FO
...F2
}
fragment FR on Goal {
entityId
name
status
state
type
amountType
progressAmount
startingAmount
goalAmount
endedAt
_owners39bmdv: owners(first: 10) {
edges {
node {
name
id
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
id
}
fragment FS on Goal {
id
...FP
...FQ
...FR
}
fragment FT on Goal {
entityId
state
_children23wmLS: children(first: 50) {
edges {
node {
entityId
id
...FS
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
id
}
fragment FU on Goal {
id
companyGoal
_ownersNl6Bi: owners(first: 100) {
edges {
node {
id
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
company {
id
}
team {
id
}
parent {
id
}
}
fragment FV on Goal {
amountType
companyGoal
description
endedAt
entityId
goalAmount
id
name
private
type
startingAmount
_metrics3Gb4Mp: metrics(first: 100) {
edges {
node {
id
title
type
startingAmount
goalAmount
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
_ownersNl6Bi: owners(first: 100) {
edges {
node {
entityId
id
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
team {
entityId
id
}
parent {
entityId
id
}
...FU
}
fragment FW on Goal {
name
id
...F9
...FN
...FT
...FV
}
fragment FX on Viewer {
_findGoalsyTHL: findGoal(goalId: "e4db9220-2c05-11e6-a88a-3b863afb3f48") {
creator {
entityId
id
}
_owners36Bf4w: owners(first: 20) {
edges {
node {
entityId
id
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
id
...FW
}
id
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment