This repository has been archived by the owner on Aug 24, 2023. It is now read-only.
Make graphQlQueryName __or__ graphQlMutationName relationship clear using typing #22
Labels
enhancement
New feature or request
When calling
mockRequest
, users are not allowed to add graphQlQueryName AND graphQlMutationName at the same time. If the user does so, we will throw an error at runtime telling the user that the creation of this mock is incorrect.The above behaviour is useful and I would leave it in. It makes a lot of sense for when developers create code without IDE hints. But I propose to add an additional way of warning the user: We could type the MockResponseOptions interface so that it will tell the user already at compile time/at time of writing code in their IDE (i.e. VSCode) that one can't define the two properties at the same time.
The text was updated successfully, but these errors were encountered: