Skip to content

Instantly share code, notes, and snippets.

@barsumek
Created November 22, 2018 12:03
Show Gist options
  • Save barsumek/3f67ea3dfad649cf3932ccef4685c7ec to your computer and use it in GitHub Desktop.
Save barsumek/3f67ea3dfad649cf3932ccef4685c7ec to your computer and use it in GitHub Desktop.
Detox your GraphQL: Combining mocks
const { startGraphQLServer } = require("./mockedGraphQLServer");
const { defaultPokemon } = require("./mocks/pokemon");
const { defaultTrainer } = require("./mocks/trainer");
const { date, defaultString } = require("./mocks/scalars");
const customMocks = {
...date,
...defaultString,
...defaultPokemon,
...defaultTrainer
};
async function start() {
await startGraphQLServer(customMocks);
}
start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment