Skip to content
This repository was archived by the owner on Aug 24, 2023. It is now read-only.
This repository was archived by the owner on Aug 24, 2023. It is now read-only.

Make graphQlQueryName __or__ graphQlMutationName relationship clear using typing #22

@rickschubert

Description

@rickschubert

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions