Skip to content

Books

Last Updated   March 7, 2025

Reference

Fields

FieldTypeDescription
compilationbool
release_yearauto
ratingfloat
pagesauto
users_countint32
lists_countint32
ratings_countint32
reviews_countint32
author_namesstring[]
cover_colorauto
genresstring[]
moodsstring[]
content_warningsstring[]
tagsstring[]
series_namesstring[]
has_audiobookbool
has_ebookbool
contribution_typesstring[]
slugstring
titlestring
descriptionauto
subtitleauto
release_dateauto
audio_secondsauto
users_read_countint32
prompts_countint32
activities_countint32
release_date_iauto
featured_seriesauto
featured_series_positionauto
alternative_titlesstring[]
isbnsstring[]
contributionsauto
imageauto

Get a list of books belonging to the current user

Example Query
{
list_books(
where: {
user_books: {
user_id: {_eq: ##USER_ID##}
}
},
distinct_on: book_id
limit: 5
offset: 0
) {
book {
title
pages
release_date
}
}
}

Get a list of books by a specific author

Example Query
query BooksByUserCount {
books(
where: {
contributions: {
author: {
name: {_eq: "Brandon Sanderson"}
}
}
}
limit: 10
order_by: {users_count: desc}
) {
pages
title
id
}
}

Getting All Editions of a Book

Example Query
query GetEditionsFromTitle {
editions(where: {title: {_eq: "Oathbringer"}}) {
id
title
edition_format
pages
release_date
isbn_10
isbn_13
publisher {
name
}
}
}

Create a new book

Example Query
mutation {
createBook(input: {
title: "My First Book",
pages: 300,
release_date: "2024-09-07"
description: "This is my first book."
}) {
book {
title
pages
release_date
description
}
}
}