Skip to content

Contributions

Last Updated   July 25, 2025

Reference

What is a Contribution?

A Contribution in Hardcover represents the relationship between an author and a book or edition, along with the specific role the author played. This flexible system allows for various types of contributions including writing, illustration, translation, editing, and more, providing detailed credit information for all contributors to a work.

Fields

FieldTypeDescription
idbigintUnique identifier for the contribution
author_idintID of the contributing author
contributable_idintID of the item being contributed to (book or edition)
contributable_typestringType of item: “Book” or “Edition”
contributionstringRole or type of contribution (Author, Illustrator, Translator, etc.)
created_attimestampWhen the contribution was recorded
updated_attimestampWhen the contribution was last updated
authorAuthorAuthor object with complete information
bookBookBook object (when contributable_type is “Book”)

Common Contribution Types

Contribution TypeDescription
AuthorPrimary writer of the book
IllustratorCreated illustrations or artwork
TranslatorTranslated the work to another language
EditorEdited or compiled the work
NarratorNarrated the audiobook version
ForewordWrote the foreword or introduction
AfterwordWrote the afterword or conclusion
Cover ArtistCreated the cover art or design

Related Schemas

  • Authors - The contributors to books
  • Books - Works that receive contributions
  • Editions - Specific editions with unique contributions

Example Queries

Get Book Contributors

Retrieve all contributors for a specific book with their roles:

Book Contributors Query
query GetBookContributors {
books(where: {id: {_eq: 328491}}) {
id
title
contributions {
id
contribution
author {
id
name
bio
}
}
}
}

Get Author’s Contributions

Find all works an author has contributed to with their roles:

Author Contributions Query
query GetAuthorContributions {
contributions(
where: {author_id: {_eq: 80626}}
order_by: {created_at: desc}
) {
id
contribution
contributable_type
book {
id
title
release_year
rating
}
created_at
}
}

Find Books by Illustrator

Search for books that have illustrators and display their names:

Books by Contributor Type
query FindBooksByContributor {
contributions(
where: {
contribution: {_eq: "Illustrator"}
book: {id: {_is_null: false}}
}
order_by: {created_at: desc}
limit: 10
) {
id
contribution
author {
name
}
book {
id
title
rating
release_year
}
}
}

Find Authors with Multiple Roles

Discover authors who have contributed to books in different roles (e.g., as both author and illustrator):

Authors with Multiple Roles
query AuthorMultipleRoles {
authors(
where: {
contributions_aggregate: {
count: {
predicate: {_gt: 0},
filter: {contribution: {_neq: "Author"}}
}
}
}
) {
id
name
contributions_aggregate(
distinct_on: contribution
) {
nodes {
contribution
}
}
contributions(
distinct_on: contribution
limit: 5
) {
contribution
}
}
}

Edition-Specific Contributors

Find contributors specific to particular editions:

Edition-Specific Contributors
query EditionContributors {
contributions(
where: {contributable_type: {_eq: "Edition"}}
order_by: {created_at: desc}
limit: 20
) {
id
contribution
author {
name
}
# The contributable_id field references the edition ID
# You can join this with editions table to get edition details
contributable_id
created_at
}
}