Skip to content

Commit

Permalink
Update changelog to add breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
captbaritone committed Aug 11, 2024
1 parent dcfad60 commit b6ffc36
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

Changes in this section are not yet released. If you need access to these changes before we cut a release, check out our `@main` NPM releases. Each commit on the main branch is [published to NPM](https://www.npmjs.com/package/grats?activeTab=versions) under the `main` tag.

- **Breaking**
- Resolver parameters `args`, `context`, and `info` may now be used in any order, and are all optional. To enable this flexibility there are three small breaking changes, all of which will be reported with helpful errors when you run `grats`:
- The declaration of the type/class you use as your GraphQL context must now be annotated with `@gqlContext` to be recognized by Grats.
- If you access the `info` object in a resolver, you must type it using `GqlInfo` exported from `grats`.
- Unused `args` and `context` resolver parameters must now be omitted instead of being typed as `unknown`.
- **Features**
- If a `@gqlType` which is used in an abstract type is defined using an exported `class`, an explicit `__typename` property is no-longer required. Grats can now generate code to infer the `__typename` based on the class definition. (#144)
- Support for `@oneOf` on input types. This allows you to define a discriminated union of input types. (#146)
Expand Down

0 comments on commit b6ffc36

Please sign in to comment.