@lssm/lib.graphql-federation 1.10.0 → 1.11.1
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 +11 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -2
- package/package.json +5 -2
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -6,5 +6,4 @@ import { GraphQLSchema } from "graphql";
|
|
|
6
6
|
declare function toSubgraphSDL(schema: GraphQLSchema): string;
|
|
7
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
8
|
//#endregion
|
|
9
|
-
export { toSubgraphSDL, withEntityObject };
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
|
9
|
+
export { toSubgraphSDL, withEntityObject };
|
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.11.1",
|
|
4
4
|
"description": "Pothos federation helpers and subgraph schema export utilities",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"README.md"
|
|
10
10
|
],
|
|
11
11
|
"scripts": {
|
|
12
|
+
"publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
|
|
12
13
|
"build": "tsdown",
|
|
13
14
|
"dev": "tsup --watch",
|
|
14
15
|
"clean": "rm -rf dist"
|
|
@@ -24,7 +25,8 @@
|
|
|
24
25
|
"graphql": ">=16.0.0"
|
|
25
26
|
},
|
|
26
27
|
"devDependencies": {
|
|
27
|
-
"@lssm/tool.
|
|
28
|
+
"@lssm/tool.typescript": "0.11.1",
|
|
29
|
+
"@lssm/tool.tsdown": "0.12.1",
|
|
28
30
|
"tsdown": "^0.16.6",
|
|
29
31
|
"typescript": "^5.9.3"
|
|
30
32
|
},
|
|
@@ -35,6 +37,7 @@
|
|
|
35
37
|
"./*": "./*"
|
|
36
38
|
},
|
|
37
39
|
"publishConfig": {
|
|
40
|
+
"access": "public",
|
|
38
41
|
"exports": {
|
|
39
42
|
".": "./dist/index.js",
|
|
40
43
|
"./*": "./*"
|
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"}
|