Prisma 1.7.0 (2018-04-24)
You can read more about upgrading your server to this version in the upgrade guide.
Overview
- Terminology Changes
- Changes & simplifications to
prisma.yml
- Deprecation of
prisma local
andprisma cluster
commands - Explicit
docker-compose.yml
, changes toprisma init
- Alpha Release of Postgres Connector (feature complete to MySQL Connector)
- Improvements to MySQL Connector
Terminology Changes
- Prisma clusters are renamed to Prisma servers
- Development clusters are renamed to Prisma Sandbox
Changes to prisma.yml
Simplifications
-
The
service
,stage
andcluster
properties have been removed. A new property called endpoint has been added that encodes the information of the three removed properties. -
The
disableAuth
property has been removed. If you don't want your Prisma API to require authentication, simply omit thesecret
property. -
The
schema
property has been removed. If you want to get access to the GraphQL schema of your Prisma API, you need to configure a post deploment hook accordingly, using the new propertieshooks
andpost-deploy
(see below).
When deploying a Prisma service using the old prisma.yml structure, the CLI supports you with the migration to the new structure. You can read more about upgrading your prisma.yml in the documentation.
Hooks
Previously, the prisma
CLI would automatically run commands from the graphql
CLI after a deployment. With this release, this implicit behaviour is now broken down into explicit post deployment hooks.
Post deployment hooks are controlled with the hook and post-deploy properties in prisma.yml. A simple hook can look like this:
hooks:
post-deploy:
- echo "Deployment finished"
You can read how to download the Prisma API schema and generate Prisma bindings in the documentation.
Default Endpoint (single tenancy)
For a simpler single tenancy setup, the /
route of a Prisma server now exposes a default service. It can also be accessed via the default
service and stage names.
Simplified Server Authentication
Authenticating Prisma servers can now be done using symmetric JWT encryption (a single secret is used in the server, and in the CLI).
The server uses the secret set via the managementApiSecret
property in the docker-compose.yml
file, while the CLI needs uses the environment variable called PRISMA_MANAGEMENT_API_SECRET
. You can read more about this in the documentation.
The formerly used asymmetric encryption is still available, but it is recommended to use the symmetric approach instead.
Note: This section does not talk about Prisma service authentication. This release contains no changes for authenticating Prisma services.
Deprecated Commands
Starting with Prisma 1.7 we are deprecating the prisma local
and prisma cluster add
and prisma cluster list
commands. These commands will be removed in version 1.9.
prisma local
The idea of prisma local
was to hide the complexity of running docker on your local development machine. In practice this turned out to not work very well.
First, many developers want to be in full control of their Docker setup. Second, by hiding the complexity of running Prisma, many developers found it to be a daunting tasks to deploy Prisma to production.
prisma cluster
In a future release we will enable you to manage all your clusters within your Prisma Cloud account, giving you a visual overview of all your clusters whether they are deployed on Prisma Cloud or your own infrastructure.
For now, you will need to provide environment variables with endpoint and secret for Prisma servers that are not managed by Prisma Cloud.
New prisma seed
command
You can now run prisma seed
to seed your Prisma service according to the seed
property in prisma.yml
.
Changes to prisma init
and explicit docker-compose.yml
Going forward, the Prisma CLI will help you use docker
and docker-compose
to run Prisma locally. If you are unfamiliar with Docker, you will need to spend a little time to learn the basics, but running Prisma with Docker should be very simple.
prisma init
can now be used to connect to an existing Prisma server, or to interactively set up a new Prisma server locally. If choosing the local Prisma server, a docker-compose.yml
file is created according to the entered information.
Note: To set up boilerplate projects, you can now directly use
graphql create
after installing thegraphql
CLI:npm install graphql-cli
.
Connectors
Postgres Connector (Alpha)
This release comes with alpha support for the Postgres Connector. It is feature complete to the MySQL connector, and can be set up using prisma init
. You are invited to test this out and report back with your feedback!
MySQL Connector
Features
- Added NOT filter operator #2234. Thanks @PatrykRudnicki for providing this feature!
Bug Fixes
- GraphQL Variable usage for Server Side Subscriptions and Websocket Subscriptions is now fully supported #1734 #2244
CLI
Features
- Added proxy support. #618. Read more about using a proxy with the CLI in the documentation.