Releases: prisma/prisma1
1.8.0 (2018-05-08)
Prisma 1.8.0 (2018-05-08)
You can read more about upgrading your server to this version in the upgrade guide.
Overview
- Improved Performance
- Changes to the Management API
- Management Schema was renamed
- Stable Release of Postgres Connector
- Experimental support for Postgres Connector introspection
- Better deployment validation
Improved Performance
Performance has been improved. The biggest factor here is less aggressive logging which should speed up simple queries in particular. https://github.com/graphcool/prisma/pull/2321
Changes to the Management API
The Management API of a Prisma Server is responsible for service deployment and also provides information about the Prisma Server.
Breaking Change https://github.com/graphcool/prisma/pull/2251
Previously, the Management API was available at /cluster
, for example localhost:4466/cluster
. With 1.8, /cluster
is not available anymore. The endpoint has been updated to /managenent
, for example localhost:4466/management
.
The Management API exposes a GraphQL API, that previously contained a top-level field clusterInfo
. It has been renamed to serverInfo
in 1.8. clusterInfo
is deprecated and will be removed in version 1.10.
Management Schema was renamed
A Prisma Server stores information about services and service migrations in a dedicated management schema in the connected database.
Breaking Change https://github.com/graphcool/prisma/pull/2254
Previously, this schema was called graphcool
. In 1.8, management
is used by default instead. Using the managementSchema
setting in the Prisma Server configuration allows you to use a different database. For the Postgres connector, both the database
and the managementSchema
setting can be adjusted.
Read the upgrade guide for detailed information on how to do this.
Connectors
Postgres Connector
We release the Postgres Connector after improvements and bug fixes since the alpha release:
updatedAt
is now correctly updated https://github.com/graphcool/prisma/pull/2359- a problem with a Postgres function was resolved https://github.com/graphcool/prisma/pull/2368
Postgres Connector Introspection
This release comes with alpha support for the introspection feature of the Postgres Connector. Using introspection, you can connect to an existing Postgres database with data and automatically generate the SDL datamodel. Additionally, you can disable migrations for the Postgres Connector from now on.
You can follow along our progress with the introspection feature here: https://github.com/graphcool/prisma/issues/2377.
Better deployment validation
- Several issues with deploying relations have been fixed https://github.com/graphcool/prisma/pull/2359
- relation directives do not need to appear twice anymore in all cases
- when later adding the missing side of an optional back relation we check for potential problems
- validate relation changes for ambiguity and ask for clarification
- Check that enums have unique names https://github.com/graphcool/prisma/pull/2329
- Add validation checks for
@unique
directive https://github.com/graphcool/prisma/pull/2371
1.7.4 (2018-04-30)
1.7.3 (2018-04-27)
1.7.2 (2018-04-27)
1.7.2 (2018-04-27)
Fixes
Server
- Fixed Postgres connector issues with non-default user: https://github.com/graphcool/prisma/pull/2272
- Fixed security issue with cluster public keys not loading correctly, causing the server to be unsecured (9551070)
CLI
- e079b4e fix endpoint parsing
- b91d9f6 fix dialog options (show custom option when starting the first time)
- 090687c fix private cluster workspace handling
Backend
1.7.1 (2018-04-24)
1.7.0 (2018-04-24)
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.
Prisma 1.6.3 (2018-04-18)
Fix
CLI
- fix(cli): info command stage property
This command is being used under the hood in all boilerplates, which automatically install the latest Prisma version. Without the fix, the boilerplates are not working.
https://github.com/graphql-boilerplates/node-graphql-server/blob/master/advanced/package.json#L20
Prisma 1.6.1 (2018-04-17)
Fixes
Subscription fixes
We fixed an issue that caused most subscriptions to not fire at all. #1734
Breaking Change
Warnings & --force
flag
Prisma now protects you from changes that may cause data loss or that may let your project end up in an inconsistent state.
In order to do this Prisma will validate changes made to your project structure during a deploy against the current structure and data of your project.
It will then generate warnings in cases where you might lose data. In cases where you would end up in an inconsistent state afterwards it will generate errors and refuse to deploy. In these cases you usually need to advance in steps towards your desired state. We'll explain the different warnings and errors in more detail further down below.
Warnings signal potential data loss. For performance reasons we do not check whether fields actually contain data before generating warnings but check only if there are nodes for their models. So if you are sure that fields do not contain data or you do not mind losing their content, you can overwrite using the force flag in the CLI. Prisma will then go ahead and deploy the changes and the data will be lost.
Warnings
- Deleting a model when there are already nodes for it.
- Deleting a field when there are already nodes for it's model.
- Updating a field and changing it's cardinality / type / going from or to being a relation field when there are already nodes for its model.
Errors
- Creating a required field when there are existing nodes
- You need to first create it as optional and then set a value for the field for all nodes before updating to required
- Updating a field to required when there are existing nodes without a value for that field
- You need to set a value for the field for all nodes
- Updating an enum to remove cases which are already in use on existing nodes
- You need to remove all usages of the removed values before updating the enum
These cases apply to scalar fields and relation fields alike.
1.6.0 (2018-04-10)
Prisma 1.6.0 (2018-04-10)
Backend
Features
- Changed isolation level to Read Committed. Fixes https://github.com/graphcool/prisma/issues/2060. Read more about this in https://github.com/graphcool/prisma/pull/2177.
Bug Fixes
-
Fixed a bug that would sometimes lead to failures when deploying more than two relations between models. https://github.com/graphcool/prisma/pull/2203
-
Deeply nested SelfRelations were not being executed. https://github.com/graphcool/prisma/pull/2202
-
Same model same field relations were not resolved correctly. https://github.com/graphcool/prisma/pull/2201
-
Fixed a bug with where filters on deleteMany and updateMany. https://github.com/graphcool/prisma/pull/2191
-
Fixed a bug where only ServerSideSubscriptions for DELETE were being run. https://github.com/graphcool/prisma/pull/2171
1.5.3 (2018-04-03)
- Improved import validation for enums 8d2557d