Skip to content

Instantly share code, notes, and snippets.

@dittos
Last active August 29, 2015 14:27
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 dittos/961bab23463624366c5c to your computer and use it in GitHub Desktop.
Save dittos/961bab23463624366c5c to your computer and use it in GitHub Desktop.
Relay Internals

Relay.QL transformation

  • Relay.QL`... `
  • -> babel-relay-plugin GraphQLPrinter
  • -> A function that returns Relay GraphQL ('Query Builder')

Collecting queries

Subtracting queries

https://github.com/facebook/relay/blob/v0.1.1/src/traversal/subtractRelayQuery.js

If field is requisite, keep it (ex: id, ...)

Running queries

!forceFetch && no cache case

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