Skip to content

Commit

Permalink
feat(mockServer): set preserveResolvers default to true
Browse files Browse the repository at this point in the history
  • Loading branch information
cchen9299 committed Sep 29, 2024
1 parent 8e7a354 commit a95d272
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/parrot-graphql/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@

const { mockServer } = require('@graphql-tools/mock');

module.exports = function graphql(path, schema, mocks) {
const server = mockServer(schema, mocks);
// eslint-disable-next-line max-params
module.exports = function graphql(path, schema, mocks, preserveResolvers = true) {
const server = mockServer(schema, mocks, preserveResolvers);
return {
request: ({ method }, match) => match({ path }) && (method === 'GET' || method === 'POST'),
response: {
Expand Down

0 comments on commit a95d272

Please sign in to comment.