Skip to content

Releases: graphql-nexus/nexus-plugin-prisma

0.18.2

08 Sep 14:39
9da6103
Compare
Choose a tag to compare

Fixes

0.18.1

03 Sep 13:25
Compare
Choose a tag to compare

Fixes

0.18.0

02 Sep 16:02
4beea3b
Compare
Choose a tag to compare

BREAKING CHANGES

  • UUID scalar has been removed. Thus so has its filter types e.g. UUIDFilter. Prisma models like this now result in GraphQL String types. This behaviour of uuid now aligns with cuid. Note that in the future we would like both of these cases to map to ID GraphQL types (issue).

    model User {
      id String @id @default(uuid()) # now maps to String type in GraphQL schema (used to be UUID)
    }
  • There are new nested scalar filter types. Scalar filter types have a not field. Its type has changed from the type of respective Scalar to the type of the respective nested filter. Below you can see an example, how the string filter type has changed. The pattern here is the same for all filter types. This change prepares for eventually supporting the new Prisma Client mode option on string filters to control case sensitivity. The top level filter types will eventually have the mode option. The NestedStringFilter type however will not. Achieving that separation is why two types are necessary. All scalar filters have this type separation pattern now. But only String filters are currently planned to make use of it. That is, for example, Int filters will not have a mode. We have decided however not to collapse the types where possible. Instead we have opted for consistentcy. In the future we may make an option to generate a GraphQL schema where scalar filters are collapsed where possible. In sum here are the affected scalar types:

    StringFilter
    StringNullableFilter
    IntFilter
    IntNullableFilter
    FloatFilter
    FloatNullableFilter
    DateTimeFilter
    DateTimeNullableFilter
    BooleanFilter
    BooleanNullableFilter
    
      input StringFilter {
        contains: String
        endsWith: String
        equals: String
        gt: String
        gte: String
        in: [String!]
        lt: String
        lte: String
    -   not: String
    +   not: NestedStringFilter
        notIn: [String!]
        startsWith: String
      }
    
    +  input NestedStringFilter {
    +    contains: String
    +    endsWith: String
    +    equals: String
    +    gt: String
    +    gte: String
    +    in: [String!]
    +    lt: String
    +    lte: String
    +    not: NestedStringFilter
    +    notIn: [String!]
    +    startsWith: String
    +  }
  • The relation filter type naming pattern has changed from RM_Filter to RM_ListRelationFilter. As a reminder relation filter types show up in the following places (below, the RM_Filter type is what we're interested in):

    query {
      # When filtering option is enabled
      Ms(where: M_WhereInput, ...): [M!]!
    }
    mutation {
      updateMany_M(where: M_WhereInput, ...) BatchPayload!
      deleteMany_M(where: M_WhereInput): BatchPayload!
    }
    
    input RM_Filter { # the name pattern of this type changes to RM_ListRelationFilter
      every: RM_WhereInput
      none: RM_WhereInput
      some: RM_WhereInput
    }
  • The ordering input fields have changed to be a list of order by types rather than just one. This ensures stable ordering where there sometimes can not be for object keys (details). As a reminder ordering input fields show up in t.crud.<BatchRead> and t.model.<ListRelation> locations. For details see https://nexusjs.org/pluginss/prisma/runtime#ordering. Here is how the schema contribution changes:

    # t.crud.<BatchRead>
    - M(orderBy: M_OrderByInput)
    + M(orderBy: [M_OrderByInput!])
    # t.model.<ListRelation>
    type M {
    -  MF(orderBy: M_OrderByInput)
    +  MF(orderBy: [M_OrderByInput!])
    }
  • The schema contribution for update of fields of type Float and Int has changed. This reflects the new atomicNumberOperations preview feature of Prisma 2.6. Note that only one operation can be given at a time.

      FooUpdateManyMutationInput {
    -   bar: Float
    +   bar: FloatFieldUpdateOperationsInput
      }
    
    + input FloatFieldUpdateOperationsInput {
    +   set: Float
    +   increment: Float
    +   decrement: Float
    +   multiply: Float
    +   divide: Float
    + }
    

Features

  • 4beea3b (breaking change) upgrade prisma to 2.6 (#815)

Chores

  • 6fe27fd update example to use apollo server

0.17.0

04 Aug 20:37
b1a7bdb
Compare
Choose a tag to compare

Features

Fixes

  • 64169ac different crud warning if FW or schema plugin (#743)
  • 71b80ca do not walk into arrays when removing nulls (#739)

Improvements

  • 1a6db99 refactor: remove photon terminology (#778)
  • c9998a3 improve: instructions on how to remove prisma deps (#766)
  • d2d1a56 refactor: fix typo prismaStraegy => prismaStrategy (#770)
  • 7edca9c improve: pretty stack-trace + add one missing hook (#742)

Chores

0.16.1

30 Jun 18:58
d93491f
Compare
Choose a tag to compare

Fixes

0.16.0

30 Jun 15:46
70e7be7
Compare
Choose a tag to compare

Features

  • 2e325dd upgrade to prisma 2.1 (#733)
  • a442ccd fw-level pagination strategy setting
  • e15a3ac postinstall warning when user has prisma deps (#731)
  • fda506a expose schema plugin at /schema entrypoint (#721)

Improvements

  • 70e7be7 improve: remove @nexus/schema & graphql from peer deps (#735)

nexus-prisma has migrated!

If you were nexus-prisma user, please do the following to remain so
Your Dependencies
npm remove nexus-prisma @prisma/client @prisma/cli
npm add nexus-plugin-prisma
Your Imports
- import { nexusPrismaPlugin } from 'nexus-prisma'
+ import { nexusSchemaPrisma } from 'nexus-plugin-prisma/schema'
Learn More

0.15.0

17 Jun 03:44
fe9611e
Compare
Choose a tag to compare

BREAKING CHANGES

Features

Fixes

Improvements

Chores

0.14.0

03 Jun 20:26
b324d38
Compare
Choose a tag to compare

Features

Fixes

Chores

0.13.0

11 May 09:51
Compare
Choose a tag to compare

BREAKING CHANGES

Features

Improvements

  • 35fe35f deps: update dependency camelcase to v6 (#646)
  • 411e096 deps: update dependency fs-extra to v9 (#641)

Chores

0.12.0

01 Apr 12:09
Compare
Choose a tag to compare

Features

  • Add support for Prisma2 Beta 1.

Breaking changes

  • @prisma/client@2.0.0-beta.1 and @prisma/cli@2.0.0-beta.1 are required for nexus-prisma to work safely