2

Version 2.3 release notes

 3 years ago
source link: https://foalts.org/blog/2021/04/22/version-2.3-release-notes/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Version 2.3 release notes

April 22, 2021 · 3 min read

Loïc Poullain

Fullstack developper and creator of FoalTS

Banner

Version 2.3 of Foal has been released! Here are the improvements that it brings.

GraphiQL#

From version 2.3, it is possible to generate a GraphiQL page in one line of code. This can be useful if you quickly need to test your API.

GraphiQL

app.controller.ts

The page is also customizable and you can provide additional options to change the UI or the API endpoint.

Support for .env.local files#

Foal's configuration system already supported .env files in previous versions. As of version 2.3, the framework also supports .env.local files.

This can be useful in case you want to have two .env files, one to define the default env vars needed by the application and another to override these values on your local machine.

If a variable is defined in both files, the value in the .env.local file will take precedence.

Similarly, you can also define environment-specific local files (.env.development.local, .env.production.local, etc).

Prisma documentation#

The documentation has been expanded to include examples of how to use Prisma with Foal.

Base 64 and base 64 URL utilities#

Two functions are provided to convert base64 encoded strings to base64url encoded strings and vice versa.

Converting Streams to Buffers#

In case you need to convert a readable stream to a concatenated buffer during testing, you can now use the streamToBuffer function for this.

Accessing services during authentication#

The user option of @JWTRequired and @UseSessions now gives you the possibility to access services.

Bug Fixes#

Social authentication#

Social authentication controllers could sometimes return 500 errors, depending on the social provider you were using. This was due to a problem of string encoding in the callback URL. This bug has been fixed in this version.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK