Skip to content

Commit

Permalink
[Blog] Add note on ES2023
Browse files Browse the repository at this point in the history
  • Loading branch information
LoicPoullain committed Aug 22, 2024
1 parent 3cb8f2c commit 79e40c0
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/blog/version-5.0-release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,20 @@ Version 5.0 of [Foal](https://foalts.org/) is out!

## Supported versions of Node and TypeScript

- Support for Node 18 has been dropped and support for Node 22 has been added.
- Support for Node 18 has been dropped and support for Node 22 has been added. Foal code is now compiled to ES2023.
- The supported version of TypeScript is version 5. Update your `package.json` file accordingly.

> If you're using the `GraphQLController` with the `resolvers` property, you need to add the `declare` keyword before the property name:
> ```typescript
>
> export class ApiController extends GraphQLController {
> schema = // ...
>
> @dependency
> declare resolvers: RootResolverService;
> }
> ```
## Better typing
- The default type of `Context.state` is now `{}`. This way, you'll get a compilation error if you forget to specify a type for the state.
Expand Down

0 comments on commit 79e40c0

Please sign in to comment.