Created
July 2, 2018 12:47
-
-
Save didierfranc/efb25cdd14c0b010a5f2146eed0be46d to your computer and use it in GitHub Desktop.
Get data from Relay store
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// relay initialization | |
import { Environment, Network, RecordSource, Store } from 'relay-runtime' | |
const network = Network.create(...) | |
export const store = new Store(source) | |
export default new Environment({ network, store }) | |
// app | |
import { store as relayStore } from '../store' | |
const store = relayStore.getSource() | |
const data = store.get(uuid) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment