Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mocking to apollo server core 2 refactor #1017

Merged
merged 2 commits into from
May 1, 2018

Conversation

evans
Copy link
Contributor

@evans evans commented May 1, 2018

This PR adds mocking to the apollo server core by adding a parameter to the constructor. The parameter, mock allows a user to specify a boolean or an object containing mocks for types/objects. The default is to preserve the resolvers. If a user would like to remove the resolvers, then they must comment out the resolvers passed to the constructor, which I believe to be a better alternative to the preserveResolvers parameter currently found in addMockFunctionToSchema.

The changes apply directly to the Base server implementation, so all variants receive the changes.

Documentation to come in #1007.

@ghost ghost added the ⛲️ feature New addition or enhancement to existing solutions label May 1, 2018
@evans
Copy link
Contributor Author

evans commented May 1, 2018

Not sure why prettier modified the result so much. Are the settings different from the rest of the projects?

@evans evans merged commit 0ea77e1 into refactor-2.0 May 1, 2018
@evans evans deleted the evans/refactor-2-mocking branch May 1, 2018 22:22
@evans evans mentioned this pull request Jun 1, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
⛲️ feature New addition or enhancement to existing solutions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant