""" Root Query type """ schema { query: Query } type Query { """ Get the identified instance of the Address """ addressById(id: ID): Address """ Get the set of Address """ addresses(street: String, town: String, country: String): [Address] """ Get the identified instance of the Librarian """ librarianById(id: ID): Librarian """ Get the set of Librarian """ librarians(surname:String): [Librarian] """ Get the identified instance of the MediaCopyOrder """ mediaCopyOrderById(id: ID): MediaCopyOrder """ Get the set of MediaCopyOrder """ mediaCopyOrders(copyCount: Int, dateOrdered: Date): [MediaCopyOrder] """ Get the identified instance of the MediaCopy """ mediaCopyById(id: ID): MediaCopy """ Get the set of MediaCopy """ mediaCopies(dateAcquired: Date): [MediaCopy] """ Get the identified instance of the MediaTitle """ mediaTitleById(id: ID): MediaTitle """ Get the set of MediaTitle """ mediaTitles(title: String, author: String): [MediaTitle] """ Get the identified instance of the Reservation """ reservationById(id: ID): Reservation """ Get the set of Reservation """ reservations(dateReserved: Date): [Reservation] """ Get the identified instance of the JuniorBorrower """ juniorBorrowerById(id: ID): JuniorBorrower """ Get the set of JuniorBorrower """ juniorBorrowers(surname: String): [JuniorBorrower] """ Get the identified instance of the AdultBorrower """ adultBorrowerById(id: ID): AdultBorrower """ Get the set of AdultBorrower """ adultBorrowers(surname: String): [AdultBorrower] """ Get the identified instance of the Loan """ loanById(id: ID): Loan """ Get the set of Loan """ loans(dateBorrowed: Date, dateReturned: Date): [Loan] } union BorrowerUnion = JuniorBorrower | AdultBorrower """ The abstract concept of a Borrower. Actual Borrowers must be either Adult or Junior. """ interface Borrower implements Person{ surname: String! givenName: String! """ currently lives at this Address. """ currentlyLivesAtAddress: Address! """ reserved this set of MediaTitles. """ reservedMediaTitles: [MediaTitle] """ The set of Reservations. """ reservations: [Reservation] """ borrowed this set of MediaCopies. """ borrowedMediaCopies: [MediaCopy] """ The set of Loans. """ loans: [Loan] """ previously lived at this set of Addresses. """ previouslyLivedAtAddresses: [Address] } """ Node Description """ interface Node { """ The identifier of this object """ id: ID! } """ Represents a Person object. """ interface Person { surname: String! givenName: String! """ currently lives at this Address. """ currentlyLivesAtAddress: Address! } """ An Address that Borrowers currently or previously have lived at. """ type Address implements Node { """ The identifier of this object """ id: ID! country: String! """ is currently lived at by this set of Persons. """ isCurrentlyLivedAtByPersons: [Person]! street: String! town: String! } """ A Borrower who can borrow any media and can vouch for Junior Borrowers. """ type AdultBorrower implements Borrower & Node & Person { """ The identifier of this object """ id: ID! """ borrowed this set of MediaCopies. """ borrowedMediaCopies: [MediaCopy] """ currently lives at this Address. """ currentlyLivesAtAddress: Address! givenName: String! """ The set of Loans. """ loans: [Loan] """ previously lived at this set of Addresses. """ previouslyLivedAtAddresses: [Address] """ The set of Reservations. """ reservations: [Reservation] """ reserved this set of MediaTitles. """ reservedMediaTitles: [MediaTitle] surname: String! """ vouched for this set of JuniorBorrowers. """ vouchedForJuniorBorrowers: [JuniorBorrower] } """ Represents a Borrower Profile object. """ type BorrowerProfile { givenName: String! surname: String! address: Address! loans: [LoanSummary] reservations: [ReservationSummary] } """ Represents a Borrower Stats By County object which implements the Node Interfaces. """ type BorrowerStatsByCounty { """ The identifier of this object """ id: ID! loanSummaryForCounty: [LoanSummaryForCounty] type: String! } """ Represents a Borrower Summary object which implements the Node Interfaces. """ type BorrowerSummary { """ The identifier of this object """ id: ID! givenName: String! surname: String! totalLoans: Int! type: BorrowerType! } """ Represents a Genre Stats By Town object. """ type GenreStatsByTown { historicalFiction: Int! youngAdult: Int! town: String! fantasy: Int! romance: Int! mystery: Int! scienceFiction: Int! } """ A Borrower who cannot borrow certain Media Titles and a limited number of Media Copies. """ type JuniorBorrower implements Borrower & Node & Person { """ The identifier of this object """ id: ID! """ borrowed this set of MediaCopies. """ borrowedMediaCopies: [MediaCopy] """ currently lives at this Address. """ currentlyLivesAtAddress: Address! """ The Date of Birth (DOB) of this Junior Borrower """ dob: Date! givenName: String! """ The set of Loans. """ loans: [Loan] """ previously lived at this set of Addresses. """ previouslyLivedAtAddresses: [Address] """ The set of Reservations. """ reservations: [Reservation] """ reserved this set of MediaTitles. """ reservedMediaTitles: [MediaTitle] surname: String! """ was vouched for by this AdultBorrower. """ wasVouchedForByAdultBorrower: AdultBorrower! } """ A Librarian who can order copies of MediaTitles and may act as a manager or mentor for other librarians. """ type Librarian implements Node & Person { """ The identifier of this object """ id: ID! """ currently lives at this Address. """ currentlyLivesAtAddress: Address! givenName: String! """ is managed by this Librarian. """ isManagedBy: Librarian """ is mentored by this Librarian. """ isMentoredBy: Librarian """ manages this set of Librarians. """ manages: [Librarian] """ mentors this set of Librarians. """ mentors: [Librarian] """ placed this set of MediaCopyOrders. """ placedMediaCopyOrders: [MediaCopyOrder] surname: String! } """ The Loan of a specific Media Copy """ type Loan implements Node { """ The identifier of this object """ id: ID! """ was borrowed by this Borrower. """ borrower: Borrower! dateBorrowed: Date! dateReturned: Date """ borrowed this MediaCopy. """ mediaCopy: MediaCopy! } """ Represents a Loan Summary object. """ type LoanSummary { dataBorrowed: Date! dateReturned: Date mediaCopyId: UUID! mediaTitle: TitleSummary! } """ Represents a Loan Summary For County objectwhich implements the Node Interfaces. """ type LoanSummaryForCounty { """ The identifier of this object """ id: ID! countyName: String! loanSummaryForTown: [LoanSummaryForTown] totalLoans: Int! } """ Represents a Loan Summary For Town objectwhich implements the Node Interfaces. """ type LoanSummaryForTown { """ The identifier of this object """ id: ID! borrowerSummary: [BorrowerSummary] totalLoans: Int! townName: String! } """ An actual copy of a MediaTitle that can be borrowed. """ type MediaCopy { dateAcquired: Date! """ The set of Loans. """ loans: [Loan] """ null this MediaTitle. """ mediaTitle: MediaTitle """ was borrowed by this set of Borrowers. """ wasBorrowedByBorrowers: [Borrower] } """ Represents a Media Copy Order objectwhich implements the Node Interfaces. """ type MediaCopyOrder implements Node { """ The identifier of this object """ id: ID! copyCount: Int! dateOrdered: Date! """ order by this Librarian. """ wasOrderedByLibrarian: Librarian """ was order for this set of MediaCopies. """ wasOrderForMediaTitle: MediaTitle! } """ Details of a Media Title, such as a Book or Movie. This is distinct from a Media Copy which is a particular """ type MediaTitle implements Node { """ The identifier of this object """ id: ID! author: String! description: String! """ is held as this set of MediaCopies. """ isHeldAsMediaCopies: [MediaCopy]! mediaType: MediaType! price: Float! rating: Float! """ The set of Reservations. """ reservations: [Reservation] title: String! """ was reserved by this set of Borrowers. """ wasReservedByBorrowers: [Borrower] } """ The Reservation of a Media Title, independent of which actual copy is subsequently loaned. """ type Reservation implements Node { """ The identifier of this object """ id: ID! """ was reserved by this Borrower. """ borrower: Borrower! dateReserved: Date! """ reserved this MediaTitle. """ mediaTitle: MediaTitle! } """ Represents a Reservation Summary object. """ type ReservationSummary { dateReserved: Date! mediaTitle: TitleSummary! } """ Represents a Title Summary object. """ type TitleSummary { title: String! mediaTitleId: UUID! genre: Genre! } """ Represents a Top Genre object. """ type TopGenre { type: String! id: UUID! genreStatsByTown: [GenreStatsByTown] } """ An Address that Borrowers currently or previously have lived at. """ input AddressInput { street: String! town: String! country: String! currentlyLivesAtCount: Int! } """ A Borrower who can borrow any media and can vouch for Junior Borrowers. """ input AdultBorrowerInput { surname: String! givenName: String! } """ A Borrower who cannot borrow certain Media Titles and a limited number of Media Copies. """ input JuniorBorrowerInput { surname: String! givenName: String! """ The Date of Birth (DOB) of this Junior Borrower """ dob: Date! } """ A Librarian who can order copies of MediaTitles and may act as a manager or mentor for other librarians. """ input LibrarianInput { surname: String! givenName: String! } """ The Loan of a specific Media Copy """ input LoanInput { dateBorrowed: Date! dateReturned: Date } """ An actual copy of a MediaTitle that can be borrowed. """ input MediaCopyInput { dateAcquired: Date! } """ Represents a Media Copy Order object. """ input MediaCopyOrderInput { copyCount: Int! dateOrdered: Date! } """ Details of a Media Title, such as a Book or Movie. This is distinct from a Media Copy which is a particular """ input MediaTitleInput { title: String! isbn: String! author: String! mediaType: MediaType! rating: Float! price: Float! description: String! } """ The Reservation of a Media Title, independent of which actual copy is subsequently loaned. """ input ReservationInput { dateReserved: Date! } """ Represents a Borrower Type object. """ enum BorrowerType { ADULT_BORROWER JUNIOR_BORROWER } """ Represents a Genre object. """ enum Genre { FANTASY HISTORICAL_FICTION ROMANCE YOUNG_ADULT MYSTERY SCIENCE_FICTION UNKNOWN_GENRE } """ The types of MediaTitle that the library holds. """ enum MediaType { BOOK VIDEO AUDIO } """ An ISO 8601 standard representation of a date. """ scalar Date """ A 32-bit floating point number that adheres to the IEEE 754 single-precision standard . """ scalar Float """ A signed 32-bit integer, ranges from --2,147,483,648 to 2,147,483,647 """ scalar Int """ A sequence of characters. """ scalar String """ A Universally Unique Identifier. """ scalar UUID