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 base server constructor #1006

Closed
wants to merge 2 commits into from

Conversation

evans
Copy link
Contributor

@evans evans commented Apr 30, 2018

This PR adds mocking to the new apollo server 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 Apr 30, 2018
@evans evans changed the title Add mocking to base server construction Add mocking to base server constructor Apr 30, 2018
@ghost ghost added the ⛲️ feature New addition or enhancement to existing solutions label Apr 30, 2018
@evans
Copy link
Contributor Author

evans commented May 1, 2018

This PR is superseded by #1017

@evans evans closed this May 1, 2018
@evans evans deleted the evans/as-2-mocking branch May 1, 2018 20:28
@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