Queries and Mutations
Learn how to create queries and mutations using Deno.
Overview
Now that we have defined the schema, types, queries, and mutations, let’s dive deeper into these concepts. To keep everything simple, we’ll define the following queries:
getAllBooks()
getAllAuthors()
getBook(id: String)
getAuthor(id: String)
We’ll also define the following mutations:
addBook(input: BookInput!)
addAuthor(input: AuthorInput!)
addReview(input: ReviewInput!)
Note: We’ll only add the entities for now and we won’t link them (that is, we won’t add an author and reviews to a book).
Get hands-on with 1400+ tech skills courses.