diff --git a/examples/extend-graphql-schema-graphql-ts/schema.graphql b/examples/extend-graphql-schema-graphql-ts/schema.graphql index cc8104d9227..163c77c1f46 100644 --- a/examples/extend-graphql-schema-graphql-ts/schema.graphql +++ b/examples/extend-graphql-schema-graphql-ts/schema.graphql @@ -1,63 +1,6 @@ # This file is automatically generated by Keystone, do not modify it manually. # Modify your Keystone config when you want to change this. -type Mutation { - """ - Publish a post - """ - publishPost(id: ID!): Post - createPost(data: PostCreateInput!): Post - createPosts(data: [PostCreateInput!]!): [Post] - updatePost(where: PostWhereUniqueInput!, data: PostUpdateInput!): Post - updatePosts(data: [PostUpdateArgs!]!): [Post] - deletePost(where: PostWhereUniqueInput!): Post - deletePosts(where: [PostWhereUniqueInput!]!): [Post] - createAuthor(data: AuthorCreateInput!): Author - createAuthors(data: [AuthorCreateInput!]!): [Author] - updateAuthor(where: AuthorWhereUniqueInput!, data: AuthorUpdateInput!): Author - updateAuthors(data: [AuthorUpdateArgs!]!): [Author] - deleteAuthor(where: AuthorWhereUniqueInput!): Author - deleteAuthors(where: [AuthorWhereUniqueInput!]!): [Author] -} - -type Query { - """ - Return all posts for a user from the last days - """ - recentPosts(id: ID!, days: Int! = 7): [Post] - - """ - Compute statistics for a user - """ - stats(id: ID!): Statistics - posts( - where: PostWhereInput! = {} - orderBy: [PostOrderByInput!]! = [] - take: Int - skip: Int! = 0 - ): [Post!] - post(where: PostWhereUniqueInput!): Post - postsCount(where: PostWhereInput! = {}): Int - authors( - where: AuthorWhereInput! = {} - orderBy: [AuthorOrderByInput!]! = [] - take: Int - skip: Int! = 0 - ): [Author!] - author(where: AuthorWhereUniqueInput!): Author - authorsCount(where: AuthorWhereInput! = {}): Int - keystone: KeystoneMeta! -} - -""" - A custom type to represent statistics for a user -""" -type Statistics { - draft: Int - published: Int - latest: Post -} - type Post { id: ID! title: String @@ -270,6 +213,50 @@ scalar JSON url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf" ) +type Mutation { + createPost(data: PostCreateInput!): Post + createPosts(data: [PostCreateInput!]!): [Post] + updatePost(where: PostWhereUniqueInput!, data: PostUpdateInput!): Post + updatePosts(data: [PostUpdateArgs!]!): [Post] + deletePost(where: PostWhereUniqueInput!): Post + deletePosts(where: [PostWhereUniqueInput!]!): [Post] + createAuthor(data: AuthorCreateInput!): Author + createAuthors(data: [AuthorCreateInput!]!): [Author] + updateAuthor(where: AuthorWhereUniqueInput!, data: AuthorUpdateInput!): Author + updateAuthors(data: [AuthorUpdateArgs!]!): [Author] + deleteAuthor(where: AuthorWhereUniqueInput!): Author + deleteAuthors(where: [AuthorWhereUniqueInput!]!): [Author] + publishPost(id: ID!): Post +} + +type Query { + posts( + where: PostWhereInput! = {} + orderBy: [PostOrderByInput!]! = [] + take: Int + skip: Int! = 0 + ): [Post!] + post(where: PostWhereUniqueInput!): Post + postsCount(where: PostWhereInput! = {}): Int + authors( + where: AuthorWhereInput! = {} + orderBy: [AuthorOrderByInput!]! = [] + take: Int + skip: Int! = 0 + ): [Author!] + author(where: AuthorWhereUniqueInput!): Author + authorsCount(where: AuthorWhereInput! = {}): Int + keystone: KeystoneMeta! + recentPosts(id: ID!, days: Int! = 7): [Post!] + stats(id: ID!): Statistics +} + +type Statistics { + draft: Int + published: Int + latest: Post +} + type KeystoneMeta { adminMeta: KeystoneAdminMeta! }