@lssm/lib.graphql-federation 0.0.0-canary-20251217073102 → 0.0.0-canary-20251217080011

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.
Files changed (2) hide show
  1. package/dist/index.js +20 -1
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1 +1,20 @@
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};
1
+ import "@pothos/core";
2
+ import "@pothos/plugin-federation";
3
+ import { printSubgraphSchema } from "@apollo/subgraph";
4
+
5
+ //#region src/index.ts
6
+ function toSubgraphSDL(schema) {
7
+ return printSubgraphSchema(schema);
8
+ }
9
+ function withEntityObject(builder, name, keyFields, fields, resolveReference) {
10
+ const ref = builder.objectRef(name);
11
+ ref.implement({ fields });
12
+ builder.entity(name, {
13
+ key: keyFields.join(" "),
14
+ resolveReference
15
+ });
16
+ return ref;
17
+ }
18
+
19
+ //#endregion
20
+ export { toSubgraphSDL, withEntityObject };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lssm/lib.graphql-federation",
3
- "version": "0.0.0-canary-20251217073102",
3
+ "version": "0.0.0-canary-20251217080011",
4
4
  "description": "Pothos federation helpers and subgraph schema export utilities",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -26,8 +26,8 @@
26
26
  "graphql": ">=16.0.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@lssm/tool.typescript": "0.0.0-canary-20251217073102",
30
- "@lssm/tool.tsdown": "0.0.0-canary-20251217073102",
29
+ "@lssm/tool.typescript": "0.0.0-canary-20251217080011",
30
+ "@lssm/tool.tsdown": "0.0.0-canary-20251217080011",
31
31
  "tsdown": "^0.17.4",
32
32
  "typescript": "^5.9.3"
33
33
  },