Releases: graphql-nexus/nexus-plugin-prisma
0.18.2
0.18.1
0.18.0
BREAKING CHANGES
-
UUID
scalar has been removed. Thus so has its filter types e.g.UUIDFilter
. Prisma models like this now result in GraphQLString
types. This behaviour ofuuid
now aligns withcuid
. Note that in the future we would like both of these cases to map toID
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 Clientmode
option on string filters to control case sensitivity. The top level filter types will eventually have themode
option. TheNestedStringFilter
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 amode
. 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
toRM_ListRelationFilter
. As a reminder relation filter types show up in the following places (below, theRM_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>
andt.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
andInt
has changed. This reflects the newatomicNumberOperations
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
Chores
- 6fe27fd update example to use apollo server
0.17.0
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
0.16.0
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
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
BREAKING CHANGES
- 34a2bdf support prisma 2 (#692)
- cdfcda2 revert to old pagination model (#699)
- 541996b put
t.crud
behind an experimental flag (#682)
Features
- fe9611e enable configuring scalars (#712)
- 18e017d configurable pagination, prisma option (#709)
- cd3b5c9 relative @prisma/client import when path given (#704)
- 34a2bdf (breaking) support prisma 2 (#692)
- cdfcda2 (breaking) revert to old pagination model (#699)
- a08b741 warn if t.crud is used but not enabled (#691)
- 0703fb7 partially support Json type (#690)
- 0c03826 (breaking) support Prisma Beta 8 (#688)
- 9569bd6 support custom resolvers (#674)
- 7c5f4b8 forward nexus plugins into t.model and t.crud (#687)
- 6d44cdd support model without ids, compound ids and uniques (#686)
- 541996b (breaking) put
t.crud
behind an experimental flag (#682)
Fixes
- b089997 automated releases
- 2cabc65 convert nulls to undefined for non-nullable Prisma fields (#695)
- 061df60 do not require react types (#700)
- c63b8ae support model with a single id field (#696)