library-graphql
Mutation.updateBook
GRAPHQL
Mutation.updateBookApply the non-null fields of input to the book with the given id.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | argument | ID! | yes | The id of the book to update. |
| input | argument | UpdateBookInput! | yes | The fields to change; null or omitted fields are left unchanged. |
Responses
result Book!
| Field | Type | Required | Description |
|---|---|---|---|
| author | Author! | yes | The author who wrote this book. |
| bio | String! | yes | A short biography of the author. |
| books | [Book!]! | yes | The books this author has written. |
| id | ID! | yes | Unique identifier assigned by the server, prefixed with au_. |
| name | String! | yes | The author's full name. |
| authorId | ID! | yes | The id of the Author who wrote this book. |
| createdAt | Time! | yes | When the book record was created. |
| currentLoan | Loan | The open loan currently holding this book, or null if it is available. | |
| book | Book! | yes | The borrowed book. |
| bookId | ID! | yes | The id of the borrowed Book. |
| borrowedAt | Time! | yes | When the loan started. |
| dueAt | Time! | yes | When the book is expected back. |
| id | ID! | yes | Unique identifier assigned by the server, prefixed with ln_. |
| overdue | Boolean! | yes | Computed at query time: true if the loan is still open and past its dueAt. Never stored, so it never goes stale. |
| returnedAt | Time | When the book was actually returned, or null while the loan is still open. | |
| user | User! | yes | The user who borrowed the book. |
| String! | yes | The user's contact email address. | |
| id | ID! | yes | Unique identifier assigned by the server, prefixed with us_. |
| loans | [Loan!]! | yes | Every loan (open or closed) made by this user. |
| name | String! | yes | The user's full name. |
| registeredAt | Time! | yes | When the user joined the library. |
| userId | ID! | yes | The id of the User who borrowed the book. |
| id | ID! | yes | Unique identifier assigned by the server, prefixed with bk_. |
| isbn | String! | yes | The book's ISBN. Must be unique across the catalog. |
| publishedYear | Int! | yes | The year the book was first published. Must be between 1450 and next year. |
| status | BookStatus! | yes | The book's current availability. |
| title | String! | yes | The book's display title, 1-200 characters. |
| updatedAt | Time! | yes | When the book record was last modified. |