v2.0.0 - Access providers, codegen, custom endpoints
Version 2.0.0 is out on npm and it brings a few new features and improvements. But before we get to those, I'll detail some of the breaking changes that were introduced.
Breaking changes
No more global installs
Fauna GQL Upload previously supported global installation to be used as a CLI. Support for global installations has been removed. If you have a previous global installation, I suggest removing that from your system. To continue using the package, you'll simply have to follow the installation and configuration sections below.
You need a local installation of faunadb
It was previously possible to use Fauna GQL Upload without a local faunadb installation. This is no longer possible, the package now relies solely on the faunadb version that you install.
You might need faunadb@>=4.0.0
It is still possible to upload resources with versions before 4.0.0, but if you are configuring access providers in your project, you will have to use faunadb@>=4.0.0 since that's when the AccessProvider and CreateAccessProvider functions were added.
The version of faunadb specified in peerDependencies is >=4.0.0, but if you won't be using access providers you should still be able to install older versions. You'll just have to ignore the "incorrect peer depencency" warnings.
Changing the secret environment variable
The default environment variable for your FaunaDB admin key used to be FAUNADB_SECRET. This has now changed to FGU_SECRET.
If you have previously used the default environment variable you now need to either:
- Rename
FAUNADB_SECRETtoFGU_SECRETin your environment file - Or set the
secretEnvproperty in.fauna.jsontoFAUNADB_SECRET
Changelog
Now, let's see what's changed!
Added
- Support for uploading access providers. See uploading access providers section in readme for more information.
- Ability to import interfaces to help with writing resources when using Typescript. See Typescript section in readme for an example of this.
- Low-config GraphQL code generation. See GraphQL code generation section in readme for more information.
- Support for custom GraphQL and API endpoints, enabling local development with Fauna Dev. See local development section in readme for more info.
Changed
- Converted project to Typescript
- Look of logging output
- The default environment variable for the secret key to
FGU_SECRET
Removed
- Support for global installations. You must now install the package locally and add an npm script.
Fixed
- A few bugs