directive @isAdmin on FIELD_DEFINITION scalar Time enum OrderDirection { ASC DESC } input Filter { order_by: String order_direction: OrderDirection limit: Int offset: Int } type Query { siteInfo: SiteInfo! "List of registered users, must be admin to call" users(filter: Filter): [User!]! @isAdmin "Information about the currently logged in user" myUser: User! "List of albums owned by the logged in user" myAlbums(filter: Filter): [Album!]! "Get album by id, user must own the album or be admin" album(id: ID): Album! "List of photos owned by the logged in user" myPhotos(filter: Filter): [Photo!]! "Get photo by id, user must own the photo or be admin" photo(id: ID!): Photo! } type Mutation { authorizeUser(username: String!, password: String!): AuthorizeResult! "Registers a new user, must be admin to call" registerUser( username: String! password: String! rootPath: String! ): AuthorizeResult! "Registers the initial user, can only be called if initialSetup from SiteInfo is true" initialSetupWizard( username: String! password: String! rootPath: String! ): AuthorizeResult "Scan all users for new photos" scanAll: ScannerResult! "Scan a single user for new photos" scanUser(userId: ID!): ScannerResult! } type AuthorizeResult { success: Boolean! status: String! token: String } type ScannerResult { finished: Boolean! success: Boolean! progress: Float message: String } "General public information about the site" type SiteInfo { initialSetup: Boolean! } type User { id: ID! username: String! #albums: [Album] "Local filepath for the user's photos" rootPath: String! @isAdmin admin: Boolean! #shareTokens: [ShareToken] } type Album { id: ID! title: String! photos(filter: Filter): [Photo!]! subAlbums(filter: Filter): [Album!]! parentAlbum: Album owner: User! path: String! thumbnail: Photo # shares: [ShareToken] } type PhotoURL { "URL for previewing the image" url: String! "Width of the image in pixels" width: Int! "Height of the image in pixels" height: Int! } type Photo { id: ID! title: String! "Local filepath for the photo" path: String! "URL to display the photo in full resolution" original: PhotoURL! "URL to display the photo in a smaller resolution" thumbnail: PhotoURL! highRes: PhotoURL! "The album that holds the photo" album: Album! exif: PhotoEXIF # shares: [ShareToken] # downloads: [PhotoDownload] } "EXIF metadata from the camera" type PhotoEXIF { photo: Photo "The model name of the camera" camera: String "The maker of the camera" maker: String "The name of the lens" lens: String dateShot: Time "The formatted filesize of the image" fileSize: String "The exposure time of the image" exposure: String "The aperature stops of the image" aperture: Float "The ISO setting of the image" iso: Int "The focal length of the lens, when the image was taken" focalLength: String "A formatted description of the flash settings, when the image was taken" flash: String }