@powerhousedao/reactor-api 1.6.1 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -4
- package/dist/index.d.ts +51 -20
- package/dist/index.js +350 -150
- package/dist/index.js.map +1 -1
- package/package.json +14 -9
- package/src/router.ts +141 -93
- package/src/server.ts +15 -4
- package/src/subgraphs/drive/index.ts +4 -0
- package/src/subgraphs/drive/resolvers.ts +15 -14
- package/{dist/schema-2U4EFPTT.graphql → src/subgraphs/drive/type-defs.ts} +2 -1
- package/src/subgraphs/index.ts +2 -14
- package/src/subgraphs/system/index.ts +4 -0
- package/src/subgraphs/system/resolvers.ts +2 -1
- package/src/subgraphs/system/type-defs.ts +18 -0
- package/src/types.ts +15 -1
- package/src/utils/create-schema.ts +2 -1
- package/dist/schema-2TGHGOBQ.graphql +0 -18
- package/src/subgraphs/drive/schema.graphql +0 -135
- package/src/subgraphs/drive/subgraph.ts +0 -16
- package/src/subgraphs/system/schema.graphql +0 -18
- package/src/subgraphs/system/subgraph.ts +0 -16
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { GraphQLResolverMap } from "@apollo/subgraph/dist/schema-helper";
|
|
2
|
-
import { IDocumentDriveServer } from "document-drive";
|
|
3
|
-
import { readFileSync } from "node:fs";
|
|
4
|
-
import { dirname, resolve } from "node:path";
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
6
|
-
import { createSchema } from "src/utils/create-schema";
|
|
7
|
-
import { resolvers } from "./resolvers";
|
|
8
|
-
import schemaPath from "./schema.graphql";
|
|
9
|
-
|
|
10
|
-
const __dirname =
|
|
11
|
-
import.meta.dirname ?? dirname(fileURLToPath(import.meta.url));
|
|
12
|
-
|
|
13
|
-
const typeDefs = readFileSync(resolve(__dirname, schemaPath), "utf8");
|
|
14
|
-
|
|
15
|
-
export const getSchema = (driveServer: IDocumentDriveServer) =>
|
|
16
|
-
createSchema(driveServer, resolvers as GraphQLResolverMap, typeDefs);
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
type Query {
|
|
2
|
-
drives: [String!]!
|
|
3
|
-
driveIdBySlug(slug: String!): String
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
type Mutation {
|
|
7
|
-
addDrive(global: DocumentDriveStateInput!): DocumentDriveState
|
|
8
|
-
deleteDrive(id: ID!): Boolean
|
|
9
|
-
setDriveIcon(id: String!, icon: String!): Boolean
|
|
10
|
-
setDriveName(id: String!, name: String!): Boolean
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
input DocumentDriveStateInput {
|
|
14
|
-
name: String
|
|
15
|
-
id: String
|
|
16
|
-
slug: String
|
|
17
|
-
icon: String
|
|
18
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { GraphQLResolverMap } from "@apollo/subgraph/dist/schema-helper";
|
|
2
|
-
import { IDocumentDriveServer } from "document-drive";
|
|
3
|
-
import { readFileSync } from "fs";
|
|
4
|
-
import { dirname, resolve } from "path";
|
|
5
|
-
import { fileURLToPath } from "url";
|
|
6
|
-
import { createSchema } from "src/utils/create-schema";
|
|
7
|
-
import { resolvers } from "./resolvers";
|
|
8
|
-
import schemaPath from "./schema.graphql";
|
|
9
|
-
|
|
10
|
-
const __dirname =
|
|
11
|
-
import.meta.dirname ?? dirname(fileURLToPath(import.meta.url));
|
|
12
|
-
|
|
13
|
-
const typeDefs = readFileSync(resolve(__dirname, schemaPath), "utf8");
|
|
14
|
-
|
|
15
|
-
export const getSchema = (driveServer: IDocumentDriveServer) =>
|
|
16
|
-
createSchema(driveServer, resolvers as GraphQLResolverMap, typeDefs);
|