Skip to content

Commit

Permalink
Remove unnecessary GraphQL descriptions (#6105)
Browse files Browse the repository at this point in the history
* Remove unnecessary GraphQL descriptions

* Fixes
  • Loading branch information
emmatown authored Jul 16, 2021
1 parent dd7e811 commit e5f61ad
Show file tree
Hide file tree
Showing 29 changed files with 21 additions and 2,201 deletions.
6 changes: 6 additions & 0 deletions .changeset/odd-windows-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@keystone-next/fields': major
'@keystone-next/keystone': major
---

Removed unnecessary descriptions on GraphQL types.
25 changes: 0 additions & 25 deletions docs/pages/docs/apis/graphql.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,37 +24,20 @@ This system will generate the following GraphQL API.

```graphql
type Query {
""" Search for the User item with the matching ID. """
User(where: UserWhereUniqueInput!): User

""" Search for all User items which match the where clause. """
allUsers(where: UserWhereInput, search: String, orderBy: [UserOrderByInput!]! = [], first: Int, skip: Int! = 0): [User]

""" Perform a meta-query on all User items which match the where clause. """
_allUsersMeta(where: UserWhereInput, search: String, orderBy: [UserOrderByInput!]! = [], first: Int, skip: Int! = 0): _QueryMeta
}

type Mutation {
""" Create a single User item. """
createUser(data: UserCreateInput): User

""" Create multiple User items. """
createUsers(data: [UsersCreateInput]): [User]

""" Update a single User item by ID. """
updateUser(id: ID!, data: UserUpdateInput): User

""" Update multiple User items by ID. """
updateUsers(data: [UsersUpdateInput]): [User]

""" Delete a single User item by ID. """
deleteUser(id: ID!): User

""" Delete multiple User items by ID. """
deleteUsers(ids: [ID!]): [User]
}

""" A keystone list """
type User {
id: ID!
name: String
Expand Down Expand Up @@ -133,7 +116,6 @@ type _QueryMeta {

```graphql
type Query {
""" Search for the User item with the matching ID. """
User(where: UserWhereUniqueInput!): User
}

Expand All @@ -151,7 +133,6 @@ type User {

```graphql
type Query {
""" Search for all User items which match the where clause. """
allUsers(where: UserWhereInput, search: String, orderBy: [UserOrderByInput!]! = [], first: Int, skip: Int! = 0): [User]
}

Expand Down Expand Up @@ -261,7 +242,6 @@ type _QueryMeta {

```graphql
type Mutation {
""" Create a single User item. """
createUser(data: UserCreateInput): User
}

Expand All @@ -279,7 +259,6 @@ type User {

```graphql
type Mutation {
""" Create multiple User items. """
createUsers(data: [UsersCreateInput]): [User]
}

Expand All @@ -301,7 +280,6 @@ type User {

```graphql
type Mutation {
""" Update a single User item by ID. """
updateUser(id: ID!, data: UserUpdateInput): User
}

Expand All @@ -319,7 +297,6 @@ type User {

```graphql
type Mutation {
""" Update multiple User items by ID. """
updateUsers(data: [UsersUpdateInput]): [User]
}

Expand All @@ -342,7 +319,6 @@ type User {

```graphql
type Mutation {
""" Delete a single User item by ID. """
deleteUser(id: ID!): User
}

Expand All @@ -356,7 +332,6 @@ type User {

```graphql
type Mutation {
""" Delete multiple User items by ID. """
deleteUsers(ids: [ID!]): [User]
}

Expand Down
88 changes: 0 additions & 88 deletions examples-staging/assets-cloud/schema.graphql
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
"""
A keystone list
"""
type Post {
id: ID!
title: String
Expand Down Expand Up @@ -178,9 +175,6 @@ input PostsCreateInput {
data: PostCreateInput
}

"""
A keystone list
"""
type Author {
id: ID!
name: String
Expand Down Expand Up @@ -236,20 +230,8 @@ input AuthorWhereInput {
email_not_contains: String
email_in: [String]
email_not_in: [String]

"""
condition must be true for all nodes
"""
posts_every: PostWhereInput

"""
condition must be true for at least 1 node
"""
posts_some: PostWhereInput

"""
condition must be false for all nodes
"""
posts_none: PostWhereInput
}

Expand Down Expand Up @@ -310,71 +292,21 @@ scalar JSON
)

type Mutation {
"""
Create a single Post item.
"""
createPost(data: PostCreateInput): Post

"""
Create multiple Post items.
"""
createPosts(data: [PostsCreateInput]): [Post]

"""
Update a single Post item by ID.
"""
updatePost(id: ID!, data: PostUpdateInput): Post

"""
Update multiple Post items by ID.
"""
updatePosts(data: [PostsUpdateInput]): [Post]

"""
Delete a single Post item by ID.
"""
deletePost(id: ID!): Post

"""
Delete multiple Post items by ID.
"""
deletePosts(ids: [ID!]): [Post]

"""
Create a single Author item.
"""
createAuthor(data: AuthorCreateInput): Author

"""
Create multiple Author items.
"""
createAuthors(data: [AuthorsCreateInput]): [Author]

"""
Update a single Author item by ID.
"""
updateAuthor(id: ID!, data: AuthorUpdateInput): Author

"""
Update multiple Author items by ID.
"""
updateAuthors(data: [AuthorsUpdateInput]): [Author]

"""
Delete a single Author item by ID.
"""
deleteAuthor(id: ID!): Author

"""
Delete multiple Author items by ID.
"""
deleteAuthors(ids: [ID!]): [Author]
}

type Query {
"""
Search for all Post items which match the where clause.
"""
allPosts(
where: PostWhereInput! = {}
search: String
Expand All @@ -384,15 +316,7 @@ type Query {
first: Int
skip: Int! = 0
): [Post!]

"""
Search for the Post item with the matching ID.
"""
Post(where: PostWhereUniqueInput!): Post

"""
Perform a meta-query on all Post items which match the where clause.
"""
_allPostsMeta(
where: PostWhereInput! = {}
search: String
Expand All @@ -406,10 +330,6 @@ type Query {
reason: "This query will be removed in a future version. Please use postsCount instead."
)
postsCount(where: PostWhereInput! = {}): Int

"""
Search for all Author items which match the where clause.
"""
allAuthors(
where: AuthorWhereInput! = {}
search: String
Expand All @@ -419,15 +339,7 @@ type Query {
first: Int
skip: Int! = 0
): [Author!]

"""
Search for the Author item with the matching ID.
"""
Author(where: AuthorWhereUniqueInput!): Author

"""
Perform a meta-query on all Author items which match the where clause.
"""
_allAuthorsMeta(
where: AuthorWhereInput! = {}
search: String
Expand Down
Loading

1 comment on commit e5f61ad

@vercel
Copy link

@vercel vercel bot commented on e5f61ad Jul 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.