library-graphql

Query.userProfile

GRAPHQLQuery.userProfile

Get a user's profile: the user plus their current and historical loans.

Parameters

NameInTypeRequiredDescription
idargumentID!yesThe user's unique identifier, e.g. "us_001".

Responses

result UserProfile!

FieldTypeRequiredDescription
currentLoans[Loan!]!yesThe user's currently open loans (not yet returned).
bookBook!yesThe borrowed book.
authorAuthor!yesThe author who wrote this book.
authorIdID!yesThe id of the Author who wrote this book.
createdAtTime!yesWhen the book record was created.
currentLoanLoanThe open loan currently holding this book, or null if it is available.
idID!yesUnique identifier assigned by the server, prefixed with bk_.
isbnString!yesThe book's ISBN. Must be unique across the catalog.
publishedYearInt!yesThe year the book was first published. Must be between 1450 and next year.
statusBookStatus!yesThe book's current availability.
titleString!yesThe book's display title, 1-200 characters.
updatedAtTime!yesWhen the book record was last modified.
bookIdID!yesThe id of the borrowed Book.
borrowedAtTime!yesWhen the loan started.
dueAtTime!yesWhen the book is expected back.
idID!yesUnique identifier assigned by the server, prefixed with ln_.
overdueBoolean!yesComputed at query time: true if the loan is still open and past its dueAt. Never stored, so it never goes stale.
returnedAtTimeWhen the book was actually returned, or null while the loan is still open.
userUser!yesThe user who borrowed the book.
emailString!yesThe user's contact email address.
idID!yesUnique identifier assigned by the server, prefixed with us_.
loans[Loan!]!yesEvery loan (open or closed) made by this user.
nameString!yesThe user's full name.
registeredAtTime!yesWhen the user joined the library.
userIdID!yesThe id of the User who borrowed the book.
loanHistory[Loan!]!yesThe user's closed (returned) loans.
bookBook!yesThe borrowed book.
authorAuthor!yesThe author who wrote this book.
authorIdID!yesThe id of the Author who wrote this book.
createdAtTime!yesWhen the book record was created.
currentLoanLoanThe open loan currently holding this book, or null if it is available.
idID!yesUnique identifier assigned by the server, prefixed with bk_.
isbnString!yesThe book's ISBN. Must be unique across the catalog.
publishedYearInt!yesThe year the book was first published. Must be between 1450 and next year.
statusBookStatus!yesThe book's current availability.
titleString!yesThe book's display title, 1-200 characters.
updatedAtTime!yesWhen the book record was last modified.
bookIdID!yesThe id of the borrowed Book.
borrowedAtTime!yesWhen the loan started.
dueAtTime!yesWhen the book is expected back.
idID!yesUnique identifier assigned by the server, prefixed with ln_.
overdueBoolean!yesComputed at query time: true if the loan is still open and past its dueAt. Never stored, so it never goes stale.
returnedAtTimeWhen the book was actually returned, or null while the loan is still open.
userUser!yesThe user who borrowed the book.
emailString!yesThe user's contact email address.
idID!yesUnique identifier assigned by the server, prefixed with us_.
loans[Loan!]!yesEvery loan (open or closed) made by this user.
nameString!yesThe user's full name.
registeredAtTime!yesWhen the user joined the library.
userIdID!yesThe id of the User who borrowed the book.
userUser!yesThe user this profile belongs to.
emailString!yesThe user's contact email address.
idID!yesUnique identifier assigned by the server, prefixed with us_.
loans[Loan!]!yesEvery loan (open or closed) made by this user.
bookBook!yesThe borrowed book.
bookIdID!yesThe id of the borrowed Book.
borrowedAtTime!yesWhen the loan started.
dueAtTime!yesWhen the book is expected back.
idID!yesUnique identifier assigned by the server, prefixed with ln_.
overdueBoolean!yesComputed at query time: true if the loan is still open and past its dueAt. Never stored, so it never goes stale.
returnedAtTimeWhen the book was actually returned, or null while the loan is still open.
userUser!yesThe user who borrowed the book.
userIdID!yesThe id of the User who borrowed the book.
nameString!yesThe user's full name.
registeredAtTime!yesWhen the user joined the library.