Skip to content

Conversation

@NataliaTepluhina
Copy link
Contributor

Fix for #69
With current implementation, if mocks are enabled, any existing resolvers will be overwritten. Adding a mockEntireSchema property to Apollo Server options allows to mock only missing resolvers.

Also fixed a name for plugin options: graphqlMock => enableMocks

@alphacentauri82
Copy link

Thank you, this was definitely a huge bug!

@Akryum Akryum merged commit cc220a6 into Akryum:master Oct 24, 2018
@yarnball
Copy link

yarnball commented Jul 8, 2019

Is this still an issue?

It keeps returning no values (or whatever is in db.json).

I have enabled mocking ("vue.config.js" has enableMocks: true), and ran the server with vue-cli-service apollo:start --mock

Please check below, have I setup my mocks wrong? I did read the docs

// mocks.js from the example project setup
export default {
  // Mock resolvers here
  Query: () => ({
	  Message: () => ({
	    text: 'Mocked Value',
	    id:123,
	  }),
  })
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants