gql-next icon indicating copy to clipboard operation
gql-next copied to clipboard

Good support for mocking responses, tests

Open avivey opened this issue 5 years ago • 0 comments

I think this should be high in the roadmap: Make it easy/fun for application writers to write mock gql responses, to support their tests.

This includes:

  • Check the mock used in the test matches the query & schema used.
  • Allow a mocked response to contain "don't-care" values (which the test writer knows aren't important for the specific test) and sentinel values (which the author will want to check for identity).
  • Allow a basic mocked response to be written for a test class, and then 'patched" in place for each test with specific changes.
  • Maybe automagically generate a mocked response, à la https://github.com/marak/Faker.js/ ?

avivey avatar Jan 09 '19 13:01 avivey