From c6877839af260463b45390fee51b8dc412e8639b Mon Sep 17 00:00:00 2001 From: Tim Leslie Date: Wed, 11 Aug 2021 08:25:24 +1000 Subject: [PATCH] WIP --- docs/pages/updates/new-graphql-api.mdx | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/docs/pages/updates/new-graphql-api.mdx b/docs/pages/updates/new-graphql-api.mdx index 761aec7cb3b..d2563745d56 100644 --- a/docs/pages/updates/new-graphql-api.mdx +++ b/docs/pages/updates/new-graphql-api.mdx @@ -50,8 +50,8 @@ export const lists = createSchema({ - 🚨 We have renamed the queries generated for lists. The query for a singular `Task` has been renamed from `Task()` to `task()`, and the query for multiple `Tasks` has been renamed from `allTasks` to `tasks`. -- 🚨 We have renamed the argument `first` to `take`, to be more consistent with the arguments used by Prisma. -- We have removed the `search` argument to `allTasks`. +- 🚨 We have renamed the pagination argument `first` to `take`, to be more consistent with the arguments used by Prisma. +- ⚠️ We have removed the `search` argument to `allTasks`. - ✅ We have removed the deprecated `sortBy` argument to `allTasks`. - ✅ We have removed the deprecated `_allTasksMeta` query. @@ -99,11 +99,6 @@ type Query { } ``` -- The deprecated `_allItemsMeta` has been removed. Use `itemsCount`. -- The filter arguments `sortBy`, `search` and search have been removed. -- The filter argument `first` has been renamed to `take. -- The queries `allItems` and `Item` have been renamed to `items` and `item`. - ## Filters FIXME @@ -112,6 +107,11 @@ FIXME The generated CRUD mutations all have the same names and return types, only their inputs have changed. +- ✅ Inputs are non-nullable +- ⚠️ We use `where: ItemWhereUniqueInput!` and `where: [ItemWhereUniqueInput!]!` rather than `id: ID!` and `ids: [ID!]`. +- Create many no longer take a nested `{ data: ... }` input. +- Update many now accepts an array of `TaskUpdateArgs` rather than `TasksUpdateInput`. This type has a `where` argument rather than `id`. + ```graphql // Before type Mutation { @@ -139,11 +139,6 @@ type Mutation { ... } ``` - -- ✅ Inputs are non-nullable -- ⚠️ We use `where: ItemWhereUniqueInput!` and `where: [ItemWhereUniqueInput!]!` rather than `id: ID!` and `ids: [ID!]. -- Create many no longer take a nested `{ data: ... }` input. -- Update many now accepts an array of `TaskUpdateArgs` rather than `TasksUpdateInput`. This type has a `where` argument rather than `id`. ## Types