From 3c834d705f8a1031b0dfbde18a5e155c2c831286 Mon Sep 17 00:00:00 2001
From: viktorstrate <viktorstrate@gmail.com>
Date: Mon, 7 Feb 2022 17:08:51 +0100
Subject: [PATCH] Make albums sort by direction as well as media does

---
 ui/src/Pages/AlbumPage/AlbumPage.test.tsx     | 24 +++++++
 ui/src/Pages/AlbumPage/AlbumPage.tsx          | 13 ++--
 .../AlbumPage/__generated__/albumQuery.ts     |  2 +-
 .../LoginPage/__generated__/Authorize.ts      | 23 +++++--
 .../LoginPage/__generated__/InitialSetup.ts   | 22 ++++---
 .../__generated__/detachImageFaces.ts         | 13 ++--
 .../__generated__/singleFaceGroup.ts          | 12 ++++
 .../Pages/PeoplePage/__generated__/myFaces.ts | 65 ++++++++++++-------
 .../PeoplePage/__generated__/setGroupLabel.ts | 15 +++--
 .../Users/__generated__/changeUserPassword.ts | 13 ++--
 .../Users/__generated__/createUser.ts         | 20 ++++--
 .../Users/__generated__/deleteUser.ts         | 13 ++--
 .../Users/__generated__/settingsUsersQuery.ts | 21 +++---
 .../Users/__generated__/updateUser.ts         | 22 ++++---
 .../Users/__generated__/userAddRootPath.ts    | 12 ++--
 .../userRemoveAlbumPathMutation.ts            | 15 +++--
 .../__generated__/changeUserPreferences.ts    | 15 +++--
 .../__generated__/myUserPreferences.ts        | 13 ++--
 .../SharePage/__generated__/SharePageToken.ts |  9 +++
 .../ShareTokenValidatePassword.ts             |  9 ++-
 .../__generated__/shareAlbumQuery.ts          |  6 ++
 ui/src/__generated__/globalTypes.ts           | 47 ++++++++------
 ui/src/__generated__/siteTranslation.ts       | 13 ++--
 .../album/__generated__/albumPathQuery.ts     | 19 +++---
 .../header/__generated__/searchQuery.ts       | 58 ++++++++++-------
 .../layout/__generated__/adminQuery.ts        |  9 ++-
 .../__generated__/notificationSubscription.ts | 42 ++++++++----
 .../__generated__/sidebarMediaQuery.ts        | 21 ++++++
 .../__generated__/sidebarDownloadQuery.ts     | 32 +++++----
 .../__generated__/sidebarGetAlbumShares.ts    | 21 +++---
 .../__generated__/sidebarGetPhotoShares.ts    | 21 +++---
 31 files changed, 421 insertions(+), 219 deletions(-)
 create mode 100644 ui/src/Pages/AlbumPage/AlbumPage.test.tsx

diff --git a/ui/src/Pages/AlbumPage/AlbumPage.test.tsx b/ui/src/Pages/AlbumPage/AlbumPage.test.tsx
new file mode 100644
index 0000000..3ed1786
--- /dev/null
+++ b/ui/src/Pages/AlbumPage/AlbumPage.test.tsx
@@ -0,0 +1,24 @@
+import { MockedProvider } from '@apollo/client/testing'
+import { render, screen } from '@testing-library/react'
+import React from 'react'
+import { MemoryRouter, Route, Routes } from 'react-router-dom'
+import AlbumPage from './AlbumPage'
+
+jest.mock('../../hooks/useScrollPagination')
+
+test('AlbumPage renders', () => {
+  render(
+    <MockedProvider mocks={[]}>
+      <MemoryRouter initialEntries={['/album/1']}>
+        <Routes>
+          <Route path="/album/:id" element={<AlbumPage />} />
+        </Routes>
+      </MemoryRouter>
+    </MockedProvider>
+  )
+
+  expect(screen.getByText('Sort')).toBeInTheDocument()
+  expect(screen.getByLabelText('Sort direction')).toBeInTheDocument()
+
+  screen.debug()
+})
diff --git a/ui/src/Pages/AlbumPage/AlbumPage.tsx b/ui/src/Pages/AlbumPage/AlbumPage.tsx
index 4b85936..95dbb35 100644
--- a/ui/src/Pages/AlbumPage/AlbumPage.tsx
+++ b/ui/src/Pages/AlbumPage/AlbumPage.tsx
@@ -16,14 +16,16 @@ const ALBUM_QUERY = gql`
     $id: ID!
     $onlyFavorites: Boolean
     $mediaOrderBy: String
-    $mediaOrderDirection: OrderDirection
+    $orderDirection: OrderDirection
     $limit: Int
     $offset: Int
   ) {
     album(id: $id) {
       id
       title
-      subAlbums(order: { order_by: "title" }) {
+      subAlbums(
+        order: { order_by: "title", order_direction: $orderDirection }
+      ) {
         id
         title
         thumbnail {
@@ -35,10 +37,7 @@ const ALBUM_QUERY = gql`
       }
       media(
         paginate: { limit: $limit, offset: $offset }
-        order: {
-          order_by: $mediaOrderBy
-          order_direction: $mediaOrderDirection
-        }
+        order: { order_by: $mediaOrderBy, order_direction: $orderDirection }
         onlyFavorites: $onlyFavorites
       ) {
         id
@@ -86,7 +85,7 @@ function AlbumPage() {
       id: albumId,
       onlyFavorites,
       mediaOrderBy: orderParams.orderBy,
-      mediaOrderDirection: orderParams.orderDirection,
+      orderDirection: orderParams.orderDirection,
       offset: 0,
       limit: 200,
     },
diff --git a/ui/src/Pages/AlbumPage/__generated__/albumQuery.ts b/ui/src/Pages/AlbumPage/__generated__/albumQuery.ts
index f81f35a..3a1a33d 100644
--- a/ui/src/Pages/AlbumPage/__generated__/albumQuery.ts
+++ b/ui/src/Pages/AlbumPage/__generated__/albumQuery.ts
@@ -117,7 +117,7 @@ export interface albumQueryVariables {
   id: string
   onlyFavorites?: boolean | null
   mediaOrderBy?: string | null
-  mediaOrderDirection?: OrderDirection | null
+  orderDirection?: OrderDirection | null
   limit?: number | null
   offset?: number | null
 }
diff --git a/ui/src/Pages/LoginPage/__generated__/Authorize.ts b/ui/src/Pages/LoginPage/__generated__/Authorize.ts
index 2e59f1e..e2618c9 100644
--- a/ui/src/Pages/LoginPage/__generated__/Authorize.ts
+++ b/ui/src/Pages/LoginPage/__generated__/Authorize.ts
@@ -8,17 +8,26 @@
 // ====================================================
 
 export interface Authorize_authorizeUser {
-  __typename: "AuthorizeResult";
-  success: boolean;
-  status: string;
-  token: string | null;
+  __typename: 'AuthorizeResult'
+  success: boolean
+  /**
+   * A textual status message describing the result, can be used to show an error message when `success` is false
+   */
+  status: string
+  /**
+   * An access token used to authenticate new API requests as the newly authorized user. Is present when success is true
+   */
+  token: string | null
 }
 
 export interface Authorize {
-  authorizeUser: Authorize_authorizeUser;
+  /**
+   * Authorizes a user and returns a token used to identify the new session
+   */
+  authorizeUser: Authorize_authorizeUser
 }
 
 export interface AuthorizeVariables {
-  username: string;
-  password: string;
+  username: string
+  password: string
 }
diff --git a/ui/src/Pages/LoginPage/__generated__/InitialSetup.ts b/ui/src/Pages/LoginPage/__generated__/InitialSetup.ts
index ba42b9e..9d99966 100644
--- a/ui/src/Pages/LoginPage/__generated__/InitialSetup.ts
+++ b/ui/src/Pages/LoginPage/__generated__/InitialSetup.ts
@@ -8,21 +8,27 @@
 // ====================================================
 
 export interface InitialSetup_initialSetupWizard {
-  __typename: "AuthorizeResult";
-  success: boolean;
-  status: string;
-  token: string | null;
+  __typename: 'AuthorizeResult'
+  success: boolean
+  /**
+   * A textual status message describing the result, can be used to show an error message when `success` is false
+   */
+  status: string
+  /**
+   * An access token used to authenticate new API requests as the newly authorized user. Is present when success is true
+   */
+  token: string | null
 }
 
 export interface InitialSetup {
   /**
    * Registers the initial user, can only be called if initialSetup from SiteInfo is true
    */
-  initialSetupWizard: InitialSetup_initialSetupWizard | null;
+  initialSetupWizard: InitialSetup_initialSetupWizard | null
 }
 
 export interface InitialSetupVariables {
-  username: string;
-  password: string;
-  rootPath: string;
+  username: string
+  password: string
+  rootPath: string
 }
diff --git a/ui/src/Pages/PeoplePage/SingleFaceGroup/__generated__/detachImageFaces.ts b/ui/src/Pages/PeoplePage/SingleFaceGroup/__generated__/detachImageFaces.ts
index ad423de..88c04d4 100644
--- a/ui/src/Pages/PeoplePage/SingleFaceGroup/__generated__/detachImageFaces.ts
+++ b/ui/src/Pages/PeoplePage/SingleFaceGroup/__generated__/detachImageFaces.ts
@@ -8,18 +8,21 @@
 // ====================================================
 
 export interface detachImageFaces_detachImageFaces {
-  __typename: "FaceGroup";
-  id: string;
-  label: string | null;
+  __typename: 'FaceGroup'
+  id: string
+  /**
+   * The name of the person
+   */
+  label: string | null
 }
 
 export interface detachImageFaces {
   /**
    * Move a list of ImageFaces to a new face group
    */
-  detachImageFaces: detachImageFaces_detachImageFaces;
+  detachImageFaces: detachImageFaces_detachImageFaces
 }
 
 export interface detachImageFacesVariables {
-  faceIDs: string[];
+  faceIDs: string[]
 }
diff --git a/ui/src/Pages/PeoplePage/SingleFaceGroup/__generated__/singleFaceGroup.ts b/ui/src/Pages/PeoplePage/SingleFaceGroup/__generated__/singleFaceGroup.ts
index 788e7a2..00b3a05 100644
--- a/ui/src/Pages/PeoplePage/SingleFaceGroup/__generated__/singleFaceGroup.ts
+++ b/ui/src/Pages/PeoplePage/SingleFaceGroup/__generated__/singleFaceGroup.ts
@@ -64,18 +64,30 @@ export interface singleFaceGroup_faceGroup_imageFaces_media {
 export interface singleFaceGroup_faceGroup_imageFaces {
   __typename: 'ImageFace'
   id: string
+  /**
+   * A bounding box of where on the image the face is present
+   */
   rectangle: singleFaceGroup_faceGroup_imageFaces_rectangle
+  /**
+   * A reference to the image the face appears on
+   */
   media: singleFaceGroup_faceGroup_imageFaces_media
 }
 
 export interface singleFaceGroup_faceGroup {
   __typename: 'FaceGroup'
   id: string
+  /**
+   * The name of the person
+   */
   label: string | null
   imageFaces: singleFaceGroup_faceGroup_imageFaces[]
 }
 
 export interface singleFaceGroup {
+  /**
+   * Get a particular `FaceGroup` specified by its ID
+   */
   faceGroup: singleFaceGroup_faceGroup
 }
 
diff --git a/ui/src/Pages/PeoplePage/__generated__/myFaces.ts b/ui/src/Pages/PeoplePage/__generated__/myFaces.ts
index 53db027..e05bfaa 100644
--- a/ui/src/Pages/PeoplePage/__generated__/myFaces.ts
+++ b/ui/src/Pages/PeoplePage/__generated__/myFaces.ts
@@ -8,59 +8,74 @@
 // ====================================================
 
 export interface myFaces_myFaceGroups_imageFaces_rectangle {
-  __typename: "FaceRectangle";
-  minX: number;
-  maxX: number;
-  minY: number;
-  maxY: number;
+  __typename: 'FaceRectangle'
+  minX: number
+  maxX: number
+  minY: number
+  maxY: number
 }
 
 export interface myFaces_myFaceGroups_imageFaces_media_thumbnail {
-  __typename: "MediaURL";
+  __typename: 'MediaURL'
   /**
    * URL for previewing the image
    */
-  url: string;
+  url: string
   /**
    * Width of the image in pixels
    */
-  width: number;
+  width: number
   /**
    * Height of the image in pixels
    */
-  height: number;
+  height: number
 }
 
 export interface myFaces_myFaceGroups_imageFaces_media {
-  __typename: "Media";
-  id: string;
-  title: string;
+  __typename: 'Media'
+  id: string
+  title: string
   /**
    * URL to display the media in a smaller resolution
    */
-  thumbnail: myFaces_myFaceGroups_imageFaces_media_thumbnail | null;
+  thumbnail: myFaces_myFaceGroups_imageFaces_media_thumbnail | null
 }
 
 export interface myFaces_myFaceGroups_imageFaces {
-  __typename: "ImageFace";
-  id: string;
-  rectangle: myFaces_myFaceGroups_imageFaces_rectangle;
-  media: myFaces_myFaceGroups_imageFaces_media;
+  __typename: 'ImageFace'
+  id: string
+  /**
+   * A bounding box of where on the image the face is present
+   */
+  rectangle: myFaces_myFaceGroups_imageFaces_rectangle
+  /**
+   * A reference to the image the face appears on
+   */
+  media: myFaces_myFaceGroups_imageFaces_media
 }
 
 export interface myFaces_myFaceGroups {
-  __typename: "FaceGroup";
-  id: string;
-  label: string | null;
-  imageFaceCount: number;
-  imageFaces: myFaces_myFaceGroups_imageFaces[];
+  __typename: 'FaceGroup'
+  id: string
+  /**
+   * The name of the person
+   */
+  label: string | null
+  /**
+   * The total number of images in this collection
+   */
+  imageFaceCount: number
+  imageFaces: myFaces_myFaceGroups_imageFaces[]
 }
 
 export interface myFaces {
-  myFaceGroups: myFaces_myFaceGroups[];
+  /**
+   * Get a list of `FaceGroup`s for the logged in user
+   */
+  myFaceGroups: myFaces_myFaceGroups[]
 }
 
 export interface myFacesVariables {
-  limit?: number | null;
-  offset?: number | null;
+  limit?: number | null
+  offset?: number | null
 }
diff --git a/ui/src/Pages/PeoplePage/__generated__/setGroupLabel.ts b/ui/src/Pages/PeoplePage/__generated__/setGroupLabel.ts
index 4ca3620..31b0475 100644
--- a/ui/src/Pages/PeoplePage/__generated__/setGroupLabel.ts
+++ b/ui/src/Pages/PeoplePage/__generated__/setGroupLabel.ts
@@ -8,19 +8,22 @@
 // ====================================================
 
 export interface setGroupLabel_setFaceGroupLabel {
-  __typename: "FaceGroup";
-  id: string;
-  label: string | null;
+  __typename: 'FaceGroup'
+  id: string
+  /**
+   * The name of the person
+   */
+  label: string | null
 }
 
 export interface setGroupLabel {
   /**
    * Assign a label to a face group, set label to null to remove the current one
    */
-  setFaceGroupLabel: setGroupLabel_setFaceGroupLabel;
+  setFaceGroupLabel: setGroupLabel_setFaceGroupLabel
 }
 
 export interface setGroupLabelVariables {
-  groupID: string;
-  label?: string | null;
+  groupID: string
+  label?: string | null
 }
diff --git a/ui/src/Pages/SettingsPage/Users/__generated__/changeUserPassword.ts b/ui/src/Pages/SettingsPage/Users/__generated__/changeUserPassword.ts
index 0435e49..371b057 100644
--- a/ui/src/Pages/SettingsPage/Users/__generated__/changeUserPassword.ts
+++ b/ui/src/Pages/SettingsPage/Users/__generated__/changeUserPassword.ts
@@ -8,15 +8,18 @@
 // ====================================================
 
 export interface changeUserPassword_updateUser {
-  __typename: "User";
-  id: string;
+  __typename: 'User'
+  id: string
 }
 
 export interface changeUserPassword {
-  updateUser: changeUserPassword_updateUser;
+  /**
+   * Update a user, fields left as `null` will not be changed
+   */
+  updateUser: changeUserPassword_updateUser
 }
 
 export interface changeUserPasswordVariables {
-  userId: string;
-  password: string;
+  userId: string
+  password: string
 }
diff --git a/ui/src/Pages/SettingsPage/Users/__generated__/createUser.ts b/ui/src/Pages/SettingsPage/Users/__generated__/createUser.ts
index 16111f8..5da494d 100644
--- a/ui/src/Pages/SettingsPage/Users/__generated__/createUser.ts
+++ b/ui/src/Pages/SettingsPage/Users/__generated__/createUser.ts
@@ -8,17 +8,23 @@
 // ====================================================
 
 export interface createUser_createUser {
-  __typename: "User";
-  id: string;
-  username: string;
-  admin: boolean;
+  __typename: 'User'
+  id: string
+  username: string
+  /**
+   * Whether or not the user has admin privileges
+   */
+  admin: boolean
 }
 
 export interface createUser {
-  createUser: createUser_createUser;
+  /**
+   * Create a new user
+   */
+  createUser: createUser_createUser
 }
 
 export interface createUserVariables {
-  username: string;
-  admin: boolean;
+  username: string
+  admin: boolean
 }
diff --git a/ui/src/Pages/SettingsPage/Users/__generated__/deleteUser.ts b/ui/src/Pages/SettingsPage/Users/__generated__/deleteUser.ts
index 7a42e6a..e3775ab 100644
--- a/ui/src/Pages/SettingsPage/Users/__generated__/deleteUser.ts
+++ b/ui/src/Pages/SettingsPage/Users/__generated__/deleteUser.ts
@@ -8,15 +8,18 @@
 // ====================================================
 
 export interface deleteUser_deleteUser {
-  __typename: "User";
-  id: string;
-  username: string;
+  __typename: 'User'
+  id: string
+  username: string
 }
 
 export interface deleteUser {
-  deleteUser: deleteUser_deleteUser;
+  /**
+   * Delete an existing user
+   */
+  deleteUser: deleteUser_deleteUser
 }
 
 export interface deleteUserVariables {
-  id: string;
+  id: string
 }
diff --git a/ui/src/Pages/SettingsPage/Users/__generated__/settingsUsersQuery.ts b/ui/src/Pages/SettingsPage/Users/__generated__/settingsUsersQuery.ts
index 9de9605..56bb5c1 100644
--- a/ui/src/Pages/SettingsPage/Users/__generated__/settingsUsersQuery.ts
+++ b/ui/src/Pages/SettingsPage/Users/__generated__/settingsUsersQuery.ts
@@ -8,28 +8,31 @@
 // ====================================================
 
 export interface settingsUsersQuery_user_rootAlbums {
-  __typename: "Album";
-  id: string;
+  __typename: 'Album'
+  id: string
   /**
    * The path on the filesystem of the server, where this album is located
    */
-  filePath: string;
+  filePath: string
 }
 
 export interface settingsUsersQuery_user {
-  __typename: "User";
-  id: string;
-  username: string;
-  admin: boolean;
+  __typename: 'User'
+  id: string
+  username: string
+  /**
+   * Whether or not the user has admin privileges
+   */
+  admin: boolean
   /**
    * Top level albums owned by this user
    */
-  rootAlbums: settingsUsersQuery_user_rootAlbums[];
+  rootAlbums: settingsUsersQuery_user_rootAlbums[]
 }
 
 export interface settingsUsersQuery {
   /**
    * List of registered users, must be admin to call
    */
-  user: settingsUsersQuery_user[];
+  user: settingsUsersQuery_user[]
 }
diff --git a/ui/src/Pages/SettingsPage/Users/__generated__/updateUser.ts b/ui/src/Pages/SettingsPage/Users/__generated__/updateUser.ts
index 28752c4..97e900b 100644
--- a/ui/src/Pages/SettingsPage/Users/__generated__/updateUser.ts
+++ b/ui/src/Pages/SettingsPage/Users/__generated__/updateUser.ts
@@ -8,18 +8,24 @@
 // ====================================================
 
 export interface updateUser_updateUser {
-  __typename: "User";
-  id: string;
-  username: string;
-  admin: boolean;
+  __typename: 'User'
+  id: string
+  username: string
+  /**
+   * Whether or not the user has admin privileges
+   */
+  admin: boolean
 }
 
 export interface updateUser {
-  updateUser: updateUser_updateUser;
+  /**
+   * Update a user, fields left as `null` will not be changed
+   */
+  updateUser: updateUser_updateUser
 }
 
 export interface updateUserVariables {
-  id: string;
-  username?: string | null;
-  admin?: boolean | null;
+  id: string
+  username?: string | null
+  admin?: boolean | null
 }
diff --git a/ui/src/Pages/SettingsPage/Users/__generated__/userAddRootPath.ts b/ui/src/Pages/SettingsPage/Users/__generated__/userAddRootPath.ts
index 666df55..02c2fa5 100644
--- a/ui/src/Pages/SettingsPage/Users/__generated__/userAddRootPath.ts
+++ b/ui/src/Pages/SettingsPage/Users/__generated__/userAddRootPath.ts
@@ -8,18 +8,18 @@
 // ====================================================
 
 export interface userAddRootPath_userAddRootPath {
-  __typename: "Album";
-  id: string;
+  __typename: 'Album'
+  id: string
 }
 
 export interface userAddRootPath {
   /**
-   * Add a root path from where to look for media for the given user
+   * Add a root path from where to look for media for the given user, specified by their user id.
    */
-  userAddRootPath: userAddRootPath_userAddRootPath | null;
+  userAddRootPath: userAddRootPath_userAddRootPath | null
 }
 
 export interface userAddRootPathVariables {
-  id: string;
-  rootPath: string;
+  id: string
+  rootPath: string
 }
diff --git a/ui/src/Pages/SettingsPage/Users/__generated__/userRemoveAlbumPathMutation.ts b/ui/src/Pages/SettingsPage/Users/__generated__/userRemoveAlbumPathMutation.ts
index 9d16cb2..9b0e410 100644
--- a/ui/src/Pages/SettingsPage/Users/__generated__/userRemoveAlbumPathMutation.ts
+++ b/ui/src/Pages/SettingsPage/Users/__generated__/userRemoveAlbumPathMutation.ts
@@ -8,15 +8,20 @@
 // ====================================================
 
 export interface userRemoveAlbumPathMutation_userRemoveRootAlbum {
-  __typename: "Album";
-  id: string;
+  __typename: 'Album'
+  id: string
 }
 
 export interface userRemoveAlbumPathMutation {
-  userRemoveRootAlbum: userRemoveAlbumPathMutation_userRemoveRootAlbum | null;
+  /**
+   * Remove a root path from a user, specified by the id of the user and the top album representing the root path.
+   * This album was returned when creating the path using `userAddRootPath`.
+   * A list of root paths for a particular user can be retrived from the `User.rootAlbums` path.
+   */
+  userRemoveRootAlbum: userRemoveAlbumPathMutation_userRemoveRootAlbum | null
 }
 
 export interface userRemoveAlbumPathMutationVariables {
-  userId: string;
-  albumId: string;
+  userId: string
+  albumId: string
 }
diff --git a/ui/src/Pages/SettingsPage/__generated__/changeUserPreferences.ts b/ui/src/Pages/SettingsPage/__generated__/changeUserPreferences.ts
index ef23398..cf4e89d 100644
--- a/ui/src/Pages/SettingsPage/__generated__/changeUserPreferences.ts
+++ b/ui/src/Pages/SettingsPage/__generated__/changeUserPreferences.ts
@@ -3,22 +3,25 @@
 // @generated
 // This file was automatically generated and should not be edited.
 
-import { LanguageTranslation } from "./../../../__generated__/globalTypes";
+import { LanguageTranslation } from './../../../__generated__/globalTypes'
 
 // ====================================================
 // GraphQL mutation operation: changeUserPreferences
 // ====================================================
 
 export interface changeUserPreferences_changeUserPreferences {
-  __typename: "UserPreferences";
-  id: string;
-  language: LanguageTranslation | null;
+  __typename: 'UserPreferences'
+  id: string
+  language: LanguageTranslation | null
 }
 
 export interface changeUserPreferences {
-  changeUserPreferences: changeUserPreferences_changeUserPreferences;
+  /**
+   * Change user preferences for the logged in user
+   */
+  changeUserPreferences: changeUserPreferences_changeUserPreferences
 }
 
 export interface changeUserPreferencesVariables {
-  language?: string | null;
+  language?: string | null
 }
diff --git a/ui/src/Pages/SettingsPage/__generated__/myUserPreferences.ts b/ui/src/Pages/SettingsPage/__generated__/myUserPreferences.ts
index 861e000..8793314 100644
--- a/ui/src/Pages/SettingsPage/__generated__/myUserPreferences.ts
+++ b/ui/src/Pages/SettingsPage/__generated__/myUserPreferences.ts
@@ -3,18 +3,21 @@
 // @generated
 // This file was automatically generated and should not be edited.
 
-import { LanguageTranslation } from "./../../../__generated__/globalTypes";
+import { LanguageTranslation } from './../../../__generated__/globalTypes'
 
 // ====================================================
 // GraphQL query operation: myUserPreferences
 // ====================================================
 
 export interface myUserPreferences_myUserPreferences {
-  __typename: "UserPreferences";
-  id: string;
-  language: LanguageTranslation | null;
+  __typename: 'UserPreferences'
+  id: string
+  language: LanguageTranslation | null
 }
 
 export interface myUserPreferences {
-  myUserPreferences: myUserPreferences_myUserPreferences;
+  /**
+   * User preferences for the logged in user
+   */
+  myUserPreferences: myUserPreferences_myUserPreferences
 }
diff --git a/ui/src/Pages/SharePage/__generated__/SharePageToken.ts b/ui/src/Pages/SharePage/__generated__/SharePageToken.ts
index e454c8b..dd4f871 100644
--- a/ui/src/Pages/SharePage/__generated__/SharePageToken.ts
+++ b/ui/src/Pages/SharePage/__generated__/SharePageToken.ts
@@ -52,6 +52,9 @@ export interface SharePageToken_shareToken_media_downloads_mediaUrl {
 
 export interface SharePageToken_shareToken_media_downloads {
   __typename: 'MediaDownload'
+  /**
+   * A description of the role of the media file
+   */
   title: string
   mediaUrl: SharePageToken_shareToken_media_downloads_mediaUrl
 }
@@ -155,6 +158,9 @@ export interface SharePageToken_shareToken_media {
    * URL to display the media in a smaller resolution
    */
   thumbnail: SharePageToken_shareToken_media_thumbnail | null
+  /**
+   * A list of different versions of files for this media that can be downloaded by the user
+   */
   downloads: SharePageToken_shareToken_media_downloads[]
   /**
    * URL to display the photo in full resolution, will be null for videos
@@ -181,6 +187,9 @@ export interface SharePageToken_shareToken {
 }
 
 export interface SharePageToken {
+  /**
+   * Fetch a share token containing an `Album` or `Media`
+   */
   shareToken: SharePageToken_shareToken
 }
 
diff --git a/ui/src/Pages/SharePage/__generated__/ShareTokenValidatePassword.ts b/ui/src/Pages/SharePage/__generated__/ShareTokenValidatePassword.ts
index 5f59ec2..5e03e89 100644
--- a/ui/src/Pages/SharePage/__generated__/ShareTokenValidatePassword.ts
+++ b/ui/src/Pages/SharePage/__generated__/ShareTokenValidatePassword.ts
@@ -8,10 +8,13 @@
 // ====================================================
 
 export interface ShareTokenValidatePassword {
-  shareTokenValidatePassword: boolean;
+  /**
+   * Check if the `ShareToken` credentials are valid
+   */
+  shareTokenValidatePassword: boolean
 }
 
 export interface ShareTokenValidatePasswordVariables {
-  token: string;
-  password?: string | null;
+  token: string
+  password?: string | null
 }
diff --git a/ui/src/Pages/SharePage/__generated__/shareAlbumQuery.ts b/ui/src/Pages/SharePage/__generated__/shareAlbumQuery.ts
index 21487e3..26b476e 100644
--- a/ui/src/Pages/SharePage/__generated__/shareAlbumQuery.ts
+++ b/ui/src/Pages/SharePage/__generated__/shareAlbumQuery.ts
@@ -74,6 +74,9 @@ export interface shareAlbumQuery_album_media_downloads_mediaUrl {
 
 export interface shareAlbumQuery_album_media_downloads {
   __typename: 'MediaDownload'
+  /**
+   * A description of the role of the media file
+   */
   title: string
   mediaUrl: shareAlbumQuery_album_media_downloads_mediaUrl
 }
@@ -173,6 +176,9 @@ export interface shareAlbumQuery_album_media {
    * URL to display the media in a smaller resolution
    */
   thumbnail: shareAlbumQuery_album_media_thumbnail | null
+  /**
+   * A list of different versions of files for this media that can be downloaded by the user
+   */
   downloads: shareAlbumQuery_album_media_downloads[]
   /**
    * URL to display the photo in full resolution, will be null for videos
diff --git a/ui/src/__generated__/globalTypes.ts b/ui/src/__generated__/globalTypes.ts
index ddf40c3..7771fbb 100644
--- a/ui/src/__generated__/globalTypes.ts
+++ b/ui/src/__generated__/globalTypes.ts
@@ -7,35 +7,44 @@
 // START Enums and Input Objects
 //==============================================================
 
+/**
+ * Supported language translations of the user interface
+ */
 export enum LanguageTranslation {
-  Danish = "Danish",
-  English = "English",
-  French = "French",
-  German = "German",
-  Italian = "Italian",
-  Polish = "Polish",
-  Portuguese = "Portuguese",
-  Russian = "Russian",
-  SimplifiedChinese = "SimplifiedChinese",
-  Spanish = "Spanish",
-  Swedish = "Swedish",
-  TraditionalChinese = "TraditionalChinese",
+  Danish = 'Danish',
+  English = 'English',
+  French = 'French',
+  German = 'German',
+  Italian = 'Italian',
+  Polish = 'Polish',
+  Portuguese = 'Portuguese',
+  Russian = 'Russian',
+  SimplifiedChinese = 'SimplifiedChinese',
+  Spanish = 'Spanish',
+  Swedish = 'Swedish',
+  TraditionalChinese = 'TraditionalChinese',
 }
 
 export enum MediaType {
-  Photo = "Photo",
-  Video = "Video",
+  Photo = 'Photo',
+  Video = 'Video',
 }
 
+/**
+ * Specified the type a particular notification is of
+ */
 export enum NotificationType {
-  Close = "Close",
-  Message = "Message",
-  Progress = "Progress",
+  Close = 'Close',
+  Message = 'Message',
+  Progress = 'Progress',
 }
 
+/**
+ * Used to specify which order to sort items in
+ */
 export enum OrderDirection {
-  ASC = "ASC",
-  DESC = "DESC",
+  ASC = 'ASC',
+  DESC = 'DESC',
 }
 
 //==============================================================
diff --git a/ui/src/__generated__/siteTranslation.ts b/ui/src/__generated__/siteTranslation.ts
index 66345d9..413e157 100644
--- a/ui/src/__generated__/siteTranslation.ts
+++ b/ui/src/__generated__/siteTranslation.ts
@@ -3,18 +3,21 @@
 // @generated
 // This file was automatically generated and should not be edited.
 
-import { LanguageTranslation } from "./globalTypes";
+import { LanguageTranslation } from './globalTypes'
 
 // ====================================================
 // GraphQL query operation: siteTranslation
 // ====================================================
 
 export interface siteTranslation_myUserPreferences {
-  __typename: "UserPreferences";
-  id: string;
-  language: LanguageTranslation | null;
+  __typename: 'UserPreferences'
+  id: string
+  language: LanguageTranslation | null
 }
 
 export interface siteTranslation {
-  myUserPreferences: siteTranslation_myUserPreferences;
+  /**
+   * User preferences for the logged in user
+   */
+  myUserPreferences: siteTranslation_myUserPreferences
 }
diff --git a/ui/src/components/album/__generated__/albumPathQuery.ts b/ui/src/components/album/__generated__/albumPathQuery.ts
index 258c586..586252d 100644
--- a/ui/src/components/album/__generated__/albumPathQuery.ts
+++ b/ui/src/components/album/__generated__/albumPathQuery.ts
@@ -8,15 +8,18 @@
 // ====================================================
 
 export interface albumPathQuery_album_path {
-  __typename: "Album";
-  id: string;
-  title: string;
+  __typename: 'Album'
+  id: string
+  title: string
 }
 
 export interface albumPathQuery_album {
-  __typename: "Album";
-  id: string;
-  path: albumPathQuery_album_path[];
+  __typename: 'Album'
+  id: string
+  /**
+   * A breadcrumb list of all parent albums down to this one
+   */
+  path: albumPathQuery_album_path[]
 }
 
 export interface albumPathQuery {
@@ -24,9 +27,9 @@ export interface albumPathQuery {
    * Get album by id, user must own the album or be admin
    * If valid tokenCredentials are provided, the album may be retrived without further authentication
    */
-  album: albumPathQuery_album;
+  album: albumPathQuery_album
 }
 
 export interface albumPathQueryVariables {
-  id: string;
+  id: string
 }
diff --git a/ui/src/components/header/__generated__/searchQuery.ts b/ui/src/components/header/__generated__/searchQuery.ts
index 434dd76..9dc2659 100644
--- a/ui/src/components/header/__generated__/searchQuery.ts
+++ b/ui/src/components/header/__generated__/searchQuery.ts
@@ -8,69 +8,81 @@
 // ====================================================
 
 export interface searchQuery_search_albums_thumbnail_thumbnail {
-  __typename: "MediaURL";
+  __typename: 'MediaURL'
   /**
    * URL for previewing the image
    */
-  url: string;
+  url: string
 }
 
 export interface searchQuery_search_albums_thumbnail {
-  __typename: "Media";
+  __typename: 'Media'
   /**
    * URL to display the media in a smaller resolution
    */
-  thumbnail: searchQuery_search_albums_thumbnail_thumbnail | null;
+  thumbnail: searchQuery_search_albums_thumbnail_thumbnail | null
 }
 
 export interface searchQuery_search_albums {
-  __typename: "Album";
-  id: string;
-  title: string;
+  __typename: 'Album'
+  id: string
+  title: string
   /**
    * An image in this album used for previewing this album
    */
-  thumbnail: searchQuery_search_albums_thumbnail | null;
+  thumbnail: searchQuery_search_albums_thumbnail | null
 }
 
 export interface searchQuery_search_media_thumbnail {
-  __typename: "MediaURL";
+  __typename: 'MediaURL'
   /**
    * URL for previewing the image
    */
-  url: string;
+  url: string
 }
 
 export interface searchQuery_search_media_album {
-  __typename: "Album";
-  id: string;
+  __typename: 'Album'
+  id: string
 }
 
 export interface searchQuery_search_media {
-  __typename: "Media";
-  id: string;
-  title: string;
+  __typename: 'Media'
+  id: string
+  title: string
   /**
    * URL to display the media in a smaller resolution
    */
-  thumbnail: searchQuery_search_media_thumbnail | null;
+  thumbnail: searchQuery_search_media_thumbnail | null
   /**
    * The album that holds the media
    */
-  album: searchQuery_search_media_album;
+  album: searchQuery_search_media_album
 }
 
 export interface searchQuery_search {
-  __typename: "SearchResult";
-  query: string;
-  albums: searchQuery_search_albums[];
-  media: searchQuery_search_media[];
+  __typename: 'SearchResult'
+  /**
+   * The string that was searched for
+   */
+  query: string
+  /**
+   * A list of albums that matched the query
+   */
+  albums: searchQuery_search_albums[]
+  /**
+   * A list of media that matched the query
+   */
+  media: searchQuery_search_media[]
 }
 
 export interface searchQuery {
-  search: searchQuery_search;
+  /**
+   * Perform a search query on the contents of the media library
+   */
+  search: searchQuery_search
 }
 
 export interface searchQueryVariables {
-  query: string;
+  query: string
 }
diff --git a/ui/src/components/layout/__generated__/adminQuery.ts b/ui/src/components/layout/__generated__/adminQuery.ts
index 232a958..bafb9e7 100644
--- a/ui/src/components/layout/__generated__/adminQuery.ts
+++ b/ui/src/components/layout/__generated__/adminQuery.ts
@@ -8,13 +8,16 @@
 // ====================================================
 
 export interface adminQuery_myUser {
-  __typename: "User";
-  admin: boolean;
+  __typename: 'User'
+  /**
+   * Whether or not the user has admin privileges
+   */
+  admin: boolean
 }
 
 export interface adminQuery {
   /**
    * Information about the currently logged in user
    */
-  myUser: adminQuery_myUser;
+  myUser: adminQuery_myUser
 }
diff --git a/ui/src/components/messages/__generated__/notificationSubscription.ts b/ui/src/components/messages/__generated__/notificationSubscription.ts
index abec660..f419369 100644
--- a/ui/src/components/messages/__generated__/notificationSubscription.ts
+++ b/ui/src/components/messages/__generated__/notificationSubscription.ts
@@ -3,27 +3,45 @@
 // @generated
 // This file was automatically generated and should not be edited.
 
-import { NotificationType } from "./../../../__generated__/globalTypes";
+import { NotificationType } from './../../../__generated__/globalTypes'
 
 // ====================================================
 // GraphQL subscription operation: notificationSubscription
 // ====================================================
 
 export interface notificationSubscription_notification {
-  __typename: "Notification";
-  key: string;
-  type: NotificationType;
-  header: string;
-  content: string;
-  progress: number | null;
-  positive: boolean;
-  negative: boolean;
+  __typename: 'Notification'
   /**
-   * Time in milliseconds before the notification will close
+   * A key used to identify the notification, new notification updates with the same key, should replace the old notifications
    */
-  timeout: number | null;
+  key: string
+  type: NotificationType
+  /**
+   * The text for the title of the notification
+   */
+  header: string
+  /**
+   * The text for the body of the notification
+   */
+  content: string
+  /**
+   * A value between 0 and 1 when the notification type is `Progress`
+   */
+  progress: number | null
+  /**
+   * Whether or not the message of the notification is positive, the UI might reflect this with a green color
+   */
+  positive: boolean
+  /**
+   * Whether or not the message of the notification is negative, the UI might reflect this with a red color
+   */
+  negative: boolean
+  /**
+   * Time in milliseconds before the notification should close
+   */
+  timeout: number | null
 }
 
 export interface notificationSubscription {
-  notification: notificationSubscription_notification;
+  notification: notificationSubscription_notification
 }
diff --git a/ui/src/components/sidebar/MediaSidebar/__generated__/sidebarMediaQuery.ts b/ui/src/components/sidebar/MediaSidebar/__generated__/sidebarMediaQuery.ts
index 13d8552..0bd4ce2 100644
--- a/ui/src/components/sidebar/MediaSidebar/__generated__/sidebarMediaQuery.ts
+++ b/ui/src/components/sidebar/MediaSidebar/__generated__/sidebarMediaQuery.ts
@@ -138,6 +138,9 @@ export interface sidebarMediaQuery_media_album {
   __typename: 'Album'
   id: string
   title: string
+  /**
+   * A breadcrumb list of all parent albums down to this one
+   */
   path: sidebarMediaQuery_media_album_path[]
 }
 
@@ -152,7 +155,13 @@ export interface sidebarMediaQuery_media_faces_rectangle {
 export interface sidebarMediaQuery_media_faces_faceGroup {
   __typename: 'FaceGroup'
   id: string
+  /**
+   * The name of the person
+   */
   label: string | null
+  /**
+   * The total number of images in this collection
+   */
   imageFaceCount: number
 }
 
@@ -185,8 +194,17 @@ export interface sidebarMediaQuery_media_faces_media {
 export interface sidebarMediaQuery_media_faces {
   __typename: 'ImageFace'
   id: string
+  /**
+   * A bounding box of where on the image the face is present
+   */
   rectangle: sidebarMediaQuery_media_faces_rectangle
+  /**
+   * The `FaceGroup` that contains this `ImageFace`
+   */
   faceGroup: sidebarMediaQuery_media_faces_faceGroup
+  /**
+   * A reference to the image the face appears on
+   */
   media: sidebarMediaQuery_media_faces_media
 }
 
@@ -213,6 +231,9 @@ export interface sidebarMediaQuery_media {
    * The album that holds the media
    */
   album: sidebarMediaQuery_media_album
+  /**
+   * A list of faces present on the image
+   */
   faces: sidebarMediaQuery_media_faces[]
 }
 
diff --git a/ui/src/components/sidebar/__generated__/sidebarDownloadQuery.ts b/ui/src/components/sidebar/__generated__/sidebarDownloadQuery.ts
index dd67886..8ca44f4 100644
--- a/ui/src/components/sidebar/__generated__/sidebarDownloadQuery.ts
+++ b/ui/src/components/sidebar/__generated__/sidebarDownloadQuery.ts
@@ -8,35 +8,41 @@
 // ====================================================
 
 export interface sidebarDownloadQuery_media_downloads_mediaUrl {
-  __typename: "MediaURL";
+  __typename: 'MediaURL'
   /**
    * URL for previewing the image
    */
-  url: string;
+  url: string
   /**
    * Width of the image in pixels
    */
-  width: number;
+  width: number
   /**
    * Height of the image in pixels
    */
-  height: number;
+  height: number
   /**
    * The file size of the resource in bytes
    */
-  fileSize: number;
+  fileSize: number
 }
 
 export interface sidebarDownloadQuery_media_downloads {
-  __typename: "MediaDownload";
-  title: string;
-  mediaUrl: sidebarDownloadQuery_media_downloads_mediaUrl;
+  __typename: 'MediaDownload'
+  /**
+   * A description of the role of the media file
+   */
+  title: string
+  mediaUrl: sidebarDownloadQuery_media_downloads_mediaUrl
 }
 
 export interface sidebarDownloadQuery_media {
-  __typename: "Media";
-  id: string;
-  downloads: sidebarDownloadQuery_media_downloads[];
+  __typename: 'Media'
+  id: string
+  /**
+   * A list of different versions of files for this media that can be downloaded by the user
+   */
+  downloads: sidebarDownloadQuery_media_downloads[]
 }
 
 export interface sidebarDownloadQuery {
@@ -44,9 +50,9 @@ export interface sidebarDownloadQuery {
    * Get media by id, user must own the media or be admin.
    * If valid tokenCredentials are provided, the media may be retrived without further authentication
    */
-  media: sidebarDownloadQuery_media;
+  media: sidebarDownloadQuery_media
 }
 
 export interface sidebarDownloadQueryVariables {
-  mediaId: string;
+  mediaId: string
 }
diff --git a/ui/src/components/sidebar/__generated__/sidebarGetAlbumShares.ts b/ui/src/components/sidebar/__generated__/sidebarGetAlbumShares.ts
index 7cb68ed..d3db0e4 100644
--- a/ui/src/components/sidebar/__generated__/sidebarGetAlbumShares.ts
+++ b/ui/src/components/sidebar/__generated__/sidebarGetAlbumShares.ts
@@ -8,19 +8,22 @@
 // ====================================================
 
 export interface sidebarGetAlbumShares_album_shares {
-  __typename: "ShareToken";
-  id: string;
-  token: string;
+  __typename: 'ShareToken'
+  id: string
+  token: string
   /**
    * Whether or not a password is needed to access the share
    */
-  hasPassword: boolean;
+  hasPassword: boolean
 }
 
 export interface sidebarGetAlbumShares_album {
-  __typename: "Album";
-  id: string;
-  shares: sidebarGetAlbumShares_album_shares[];
+  __typename: 'Album'
+  id: string
+  /**
+   * A list of share tokens pointing to this album, owned by the logged in user
+   */
+  shares: sidebarGetAlbumShares_album_shares[]
 }
 
 export interface sidebarGetAlbumShares {
@@ -28,9 +31,9 @@ export interface sidebarGetAlbumShares {
    * Get album by id, user must own the album or be admin
    * If valid tokenCredentials are provided, the album may be retrived without further authentication
    */
-  album: sidebarGetAlbumShares_album;
+  album: sidebarGetAlbumShares_album
 }
 
 export interface sidebarGetAlbumSharesVariables {
-  id: string;
+  id: string
 }
diff --git a/ui/src/components/sidebar/__generated__/sidebarGetPhotoShares.ts b/ui/src/components/sidebar/__generated__/sidebarGetPhotoShares.ts
index e38f4b2..17d698c 100644
--- a/ui/src/components/sidebar/__generated__/sidebarGetPhotoShares.ts
+++ b/ui/src/components/sidebar/__generated__/sidebarGetPhotoShares.ts
@@ -8,19 +8,22 @@
 // ====================================================
 
 export interface sidebarGetPhotoShares_media_shares {
-  __typename: "ShareToken";
-  id: string;
-  token: string;
+  __typename: 'ShareToken'
+  id: string
+  token: string
   /**
    * Whether or not a password is needed to access the share
    */
-  hasPassword: boolean;
+  hasPassword: boolean
 }
 
 export interface sidebarGetPhotoShares_media {
-  __typename: "Media";
-  id: string;
-  shares: sidebarGetPhotoShares_media_shares[];
+  __typename: 'Media'
+  id: string
+  /**
+   * A list of share tokens pointing to this media, owned byt the logged in user
+   */
+  shares: sidebarGetPhotoShares_media_shares[]
 }
 
 export interface sidebarGetPhotoShares {
@@ -28,9 +31,9 @@ export interface sidebarGetPhotoShares {
    * Get media by id, user must own the media or be admin.
    * If valid tokenCredentials are provided, the media may be retrived without further authentication
    */
-  media: sidebarGetPhotoShares_media;
+  media: sidebarGetPhotoShares_media
 }
 
 export interface sidebarGetPhotoSharesVariables {
-  id: string;
+  id: string
 }
