Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Remove typenames from MockedProvider #1001
This PR allows to pass a removeTypenames prop to the MockedProvider, this way there's no need to add the __typename field to the mocked data.
Right now, to add mocked data in tests, it's required to use
Together with this, the mocked data needs to include the __typename field in all of the models:
I find this a bit of a pain, and I would prefer not having to do this. As the apollo-client accepts an
This can be used this like this:
I didn't find any tests for test-utils, so I only added an example test within the base example.