🐳 Added graphql deps

This commit is contained in:
2025-07-14 11:58:42 -04:00
parent b332d9d75a
commit 136a7f494f
5 changed files with 1065 additions and 122 deletions

24
models/graphql/typedef.ts Normal file
View File

@@ -0,0 +1,24 @@
import { gql } from "graphql-tag";
export const typeDefs = gql`
type Query {
comic(id: ID!): Comic
comics(limit: Int = 10): [Comic]
}
type Comic {
id: ID!
title: String
volume: Int
issueNumber: String
publicationDate: String
coverUrl: String
creators: [Creator]
source: String
}
type Creator {
name: String
role: String
}
`;

1142
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -38,6 +38,7 @@
"uuid": "^9.0.0"
},
"dependencies": {
"@apollo/server": "^4.12.2",
"@bluelovers/fast-glob": "https://github.com/rishighan/fast-glob-v2-api.git",
"@elastic/elasticsearch": "^8.13.1",
"@jorgeferrero/stream-to-buffer": "^2.0.6",
@@ -58,6 +59,8 @@
"dotenv": "^10.0.0",
"filename-parser": "^1.0.4",
"fs-extra": "^10.0.0",
"graphql": "^16.11.0",
"graphql-tag": "^2.12.6",
"http-response-stream": "^1.0.9",
"image-js": "^0.34.0",
"imghash": "^0.0.9",

View File

@@ -176,6 +176,7 @@ export default class ApiService extends Service {
"library.walkFolders",
{ basePathToWalk: filePath }
);
// this would have to be a call to importDownloadedComic
await this.broker.call("importqueue.processImport", {
fileObject: {
filePath,

View File

@@ -24,6 +24,23 @@ export default class SettingsService extends Service {
settings: {},
hooks: {},
actions: {
getEnvironmentVariables: {
rest: "GET /getEnvironmentVariables",
params: {},
handler: async (ctx: Context<{}>) => {
return {
comicsDirectory: process.env.COMICS_DIRECTORY,
userdataDirectory: process.env.USERDATA_DIRECTORY,
redisURI: process.env.REDIS_URI,
elasticsearchURI: process.env.ELASTICSEARCH_URI,
mongoURI: process.env.MONGO_URI,
kafkaBroker: process.env.KAFKA_BROKER,
unrarBinPath: process.env.UNRAR_BIN_PATH,
sevenzBinPath: process.env.SEVENZ_BINARY_PATH,
comicvineAPIKey: process.env.COMICVINE_API_KEY,
}
}
},
getSettings: {
rest: "GET /getAllSettings",
params: {},