A NetworkLayer around mockServer to serve mock data locally
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)