babyfish-ct / graphql-ts-client

Typescript DSL for GraphQL.
MIT License
147 stars 20 forks source link

Add error messages #10

Closed ghost closed 2 years ago

ghost commented 2 years ago

This will allow us to do checks like

await expect(
  createUser(undefined, true, company.id)
).rejects
  .toThrow("Uniqueness violation");

where we assert a certain "type" of error is thrown.