Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
timleslie committed Aug 10, 2021
1 parent 580c3c9 commit c687783
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions docs/pages/updates/new-graphql-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand All @@ -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 {
Expand Down Expand Up @@ -139,11 +139,6 @@ type Mutation {
...
}
```
<Emoji symbol="⚠️" alt="Tag" /> <Emoji symbol="⚠️" alt="Warning" />
- ✅ 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

Expand Down

0 comments on commit c687783

Please sign in to comment.