relay-mock
v0.2.0
Published
A NetworkLayer for mocking
Downloads
4
Readme
relay-mock
A NetworkLayer
around mockServer to serve mock data locally.
import RelayMockNetworkLayer from 'relay-mock';
import mySchema from 'mySchema.graphql';
const environment = new Relay.Environment();
const networkLayer = new RelayMockNetworkLayer(mySchema);
environment.injectNetworkLayer(networkLayer)
The arguments to RelayMockNetworkLayer
are the same of mockServer
(documentation, example)