Skip to content

Instantly share code, notes, and snippets.

@BjRo
Last active February 22, 2017 18:22
Show Gist options
  • Save BjRo/8a018f4b89574e4cbb29c645c23cffeb to your computer and use it in GitHub Desktop.
Save BjRo/8a018f4b89574e4cbb29c645c23cffeb to your computer and use it in GitHub Desktop.
Batching experiments with different server-side GraphQL implementations
fragment profileFragment on ProfileRef {
__typename
... on ActiveProfileRef {
id
firstName
lastName
}
... on InactiveProfileRef {
id
}
}
query profileRefQuery {
me {
profileRef {
... profileFragment
}
profileVisits {
collection {
visitorConnection {
... profileFragment
}
}
total
}
}
profileRefs(ids: [2,4,5]) {
... profileFragment
}
}
@AndrewIngram
Copy link

The main reason that dataloader and absinthe differ here is presumably because me is synchronous, so profileRef and profileRefs get resolved within the same tick. Can you clarify the details of which fields are actually making data requests vs resolving instantly? It's hard to conclude anything based on these numbers alone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment