@lssm/lib.graphql-federation 1.11.0 → 1.41.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/README.md +5 -0
- package/dist/index.js +1 -2
- package/package.json +6 -6
- package/dist/index.d.ts +0 -10
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import"@pothos/core";import"@pothos/plugin-federation";import{printSubgraphSchema as e}from"@apollo/subgraph";function t(t){return e(t)}function n(e,t,n,r,i){let a=e.objectRef(t);return a.implement({fields:r}),e.entity(t,{key:n.join(` `),resolveReference:i}),a}export{t as toSubgraphSDL,n as withEntityObject};
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import"@pothos/core";import"@pothos/plugin-federation";import{printSubgraphSchema as e}from"@apollo/subgraph";function t(t){return e(t)}function n(e,t,n,r,i){let a=e.objectRef(t);return a.implement({fields:r}),e.entity(t,{key:n.join(` `),resolveReference:i}),a}export{t as toSubgraphSDL,n as withEntityObject};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/lib.graphql-federation",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.41.0",
|
|
4
4
|
"description": "Pothos federation helpers and subgraph schema export utilities",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -19,21 +19,21 @@
|
|
|
19
19
|
"@pothos/plugin-federation": "^4.0.0",
|
|
20
20
|
"@pothos/plugin-directives": "^4.2.3",
|
|
21
21
|
"graphql": "^16.8.1",
|
|
22
|
-
"@apollo/subgraph": "^2.
|
|
22
|
+
"@apollo/subgraph": "^2.12.2"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"graphql": ">=16.0.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@lssm/tool.typescript": "
|
|
29
|
-
"@lssm/tool.tsdown": "
|
|
30
|
-
"tsdown": "^0.
|
|
28
|
+
"@lssm/tool.typescript": "workspace:*",
|
|
29
|
+
"@lssm/tool.tsdown": "workspace:*",
|
|
30
|
+
"tsdown": "^0.17.4",
|
|
31
31
|
"typescript": "^5.9.3"
|
|
32
32
|
},
|
|
33
33
|
"type": "module",
|
|
34
34
|
"module": "./dist/index.js",
|
|
35
35
|
"exports": {
|
|
36
|
-
".": "./
|
|
36
|
+
".": "./src/index.ts",
|
|
37
37
|
"./*": "./*"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|
package/dist/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { SchemaTypes } from "@pothos/core";
|
|
2
|
-
import "@pothos/plugin-federation";
|
|
3
|
-
import { GraphQLSchema } from "graphql";
|
|
4
|
-
|
|
5
|
-
//#region src/index.d.ts
|
|
6
|
-
declare function toSubgraphSDL(schema: GraphQLSchema): string;
|
|
7
|
-
declare function withEntityObject<T extends SchemaTypes>(builder: PothosSchemaTypes.SchemaBuilder<T>, name: string, keyFields: string[], fields: (t: any) => Record<string, any>, resolveReference: (ref: any, ctx: any) => Promise<any> | any): any;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { toSubgraphSDL, withEntityObject };
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;iBAKgB,aAAA,SAAsB;iBAItB,2BAA2B,sBAChC,iBAAA,CAAkB,cAAc,2DAGrB,+DACsB"}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { type SchemaTypes } from '@pothos/core';\nimport '@pothos/plugin-federation';\nimport { printSubgraphSchema } from '@apollo/subgraph';\nimport type { GraphQLSchema } from 'graphql';\n\nexport function toSubgraphSDL(schema: GraphQLSchema) {\n return printSubgraphSchema(schema);\n}\n\nexport function withEntityObject<T extends SchemaTypes>(\n builder: PothosSchemaTypes.SchemaBuilder<T>,\n name: string,\n keyFields: string[],\n fields: (t: any) => Record<string, any>,\n resolveReference: (ref: any, ctx: any) => Promise<any> | any\n) {\n const ref = (builder as any).objectRef(name);\n ref.implement({\n fields,\n });\n (builder as any).entity(name, {\n key: keyFields.join(' '),\n resolveReference,\n });\n return ref;\n}\n"],"mappings":"8GAKA,SAAgB,EAAc,EAAuB,CACnD,OAAO,EAAoB,EAAO,CAGpC,SAAgB,EACd,EACA,EACA,EACA,EACA,EACA,CACA,IAAM,EAAO,EAAgB,UAAU,EAAK,CAQ5C,OAPA,EAAI,UAAU,CACZ,SACD,CAAC,CACD,EAAgB,OAAO,EAAM,CAC5B,IAAK,EAAU,KAAK,IAAI,CACxB,mBACD,CAAC,CACK"}
|