Last active
July 19, 2020 16:07
-
-
Save mtvspec/e6b32ac7ce91bb3db887b94187840821 to your computer and use it in GitHub Desktop.
GraphQL Schema Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Query { | |
bookList: [BookList!] | |
book(id: ID!): Book | |
authorList: [AuthorList!] | |
author(id: ID!): Author | |
} | |
type Book { | |
id: ID! | |
title: String! | |
description: String | |
author: Author! | |
} | |
type BookList { | |
count: Int | |
nodes: [Book!] | |
} | |
type Author { | |
id: ID! | |
name: String! | |
bookList: AuthorBookList! | |
} | |
type AuthorList { | |
count: Int! | |
nodes: [Author!] | |
} | |
type AuthorBookList { | |
count: Int! | |
nodes: [Book!] | |
} | |
input BookInput { | |
title: String! | |
description: String | |
author: ID! | |
} | |
input AuthorInput { | |
name: String! | |
bookList: [BookInput!] | |
} | |
type Mutation { | |
createBook(data: BookInput!): Book | |
updateBook(id: ID! data: BookInput): Book | |
deleteBook(id: ID!): Book | |
createAuthor(data: AuthorInput!): Author | |
updateAuthor(id: ID! data: AuthorInput!): Author | |
deleteAuthor(id: ID!): Author | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment