library-graphql
Mutation.createAuthor
GRAPHQL
Mutation.createAuthorCreate a new author with no books linked yet.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| input | argument | CreateAuthorInput! | yes | The fields of the author to create. |
Responses
result Author!
| Field | Type | Required | Description |
|---|---|---|---|
| bio | String! | yes | A short biography of the author. |
| books | [Book!]! | yes | The books this author has written. |
| author | Author! | yes | The author who wrote this book. |
| 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. |
| 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. |
| id | ID! | yes | Unique identifier assigned by the server, prefixed with au_. |
| name | String! | yes | The author's full name. |