Files
suwayomi-material-you-webui/src/lib/graphql/extension/ExtensionMutation.ts
T

60 lines
1.5 KiB
TypeScript
Raw Normal View History

2023-08-05 01:03:40 +02:00
/*
* Copyright (C) Contributors to the Suwayomi project
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import gql from 'graphql-tag';
2025-12-22 14:00:44 +01:00
import { EXTENSION_LIST_FIELDS } from '@/lib/graphql/extension/ExtensionFragments.ts';
2023-08-05 01:03:40 +02:00
// makes the server fetch and return the latest extensions
export const GET_EXTENSIONS_FETCH = gql`
2024-07-06 15:55:58 +02:00
${EXTENSION_LIST_FIELDS}
2023-08-05 01:03:40 +02:00
mutation GET_EXTENSIONS_FETCH($input: FetchExtensionsInput = {}) {
fetchExtensions(input: $input) {
extensions {
2024-07-06 15:55:58 +02:00
...EXTENSION_LIST_FIELDS
2023-08-05 01:03:40 +02:00
}
}
}
`;
export const UPDATE_EXTENSION = gql`
2024-07-06 15:55:58 +02:00
${EXTENSION_LIST_FIELDS}
2023-08-05 01:03:40 +02:00
mutation UPDATE_EXTENSION($input: UpdateExtensionInput!) {
updateExtension(input: $input) {
extension {
2024-07-06 15:55:58 +02:00
...EXTENSION_LIST_FIELDS
2023-08-05 01:03:40 +02:00
}
}
}
`;
export const UPDATE_EXTENSIONS = gql`
2024-07-06 15:55:58 +02:00
${EXTENSION_LIST_FIELDS}
2023-08-05 01:03:40 +02:00
mutation UPDATE_EXTENSIONS($input: UpdateExtensionsInput!) {
updateExtensions(input: $input) {
extensions {
2024-07-06 15:55:58 +02:00
...EXTENSION_LIST_FIELDS
2023-08-05 01:03:40 +02:00
}
}
}
`;
export const INSTALL_EXTERNAL_EXTENSION = gql`
2024-07-06 15:55:58 +02:00
${EXTENSION_LIST_FIELDS}
2023-08-05 01:03:40 +02:00
mutation INSTALL_EXTERNAL_EXTENSION($file: Upload!) {
installExternalExtension(input: { extensionFile: $file }) {
extension {
2024-07-06 15:55:58 +02:00
...EXTENSION_LIST_FIELDS
2023-08-05 01:03:40 +02:00
}
}
}
`;