Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
timleslie committed Aug 9, 2021
1 parent 7dd7773 commit a8d0650
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
1 change: 0 additions & 1 deletion docs/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @ts-ignore
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />
15 changes: 14 additions & 1 deletion docs/pages/updates/new-graphql-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ type Mutation {

- Inputs are non-nullable
- We use `where: ItemWhereUniqueInput!` and `where: [ItemWhereUniqueInput!]!` rather than `id: ID!` and `ids: [ID!].
- Create/update many no longer take a nested `{ data: ... }` input.
- 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`.

## Query

Expand Down Expand Up @@ -134,6 +135,11 @@ FIXME
```graphql
// Before

input TasksUpdateInput {
id: ID!
data: TaskUpdateInput
}

input TaskUpdateInput {
label: String
priority: TaskPriorityType
Expand Down Expand Up @@ -168,6 +174,11 @@ input TagRelateToManyInput {

// After

input TaskUpdateArgs {
where: TaskWhereUniqueInput!
data: TaskUpdateInput!
}

input TaskUpdateInput {
label: String
priority: TaskPriorityType
Expand Down Expand Up @@ -217,5 +228,7 @@ input TagRelateToManyForCreateInput {
- To-many relationship inputs for `create` no longer `disconnect` or `disconnectAll`.
- Everything is non-nullable



export default ({ children, ...props }) => <Markdown description="A Fresh New GraphQL API" {...props}>{children}</Markdown>;
export { getServerSideProps }
6 changes: 0 additions & 6 deletions examples/task-manager/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ enum TaskPriorityType {
high
}


type _QueryMeta {
count: Int
}


input TaskWhereInput {
AND: [TaskWhereInput!]
OR: [TaskWhereInput!]
Expand Down

0 comments on commit a8d0650

Please sign in to comment.