@contractspec/lib.graphql-federation 3.7.13 → 3.7.14
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/dist/browser/graphql-federation.feature.js +1 -0
- package/dist/browser/index.js +1 -21
- package/dist/graphql-federation.feature.d.ts +1 -0
- package/dist/graphql-federation.feature.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -21
- package/dist/node/graphql-federation.feature.js +1 -0
- package/dist/node/index.js +1 -21
- package/package.json +18 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineFeature as g}from"@contractspec/lib.contracts-spec/features";var j=g({meta:{key:"libs.graphql-federation",version:"1.0.0",title:"Graphql Federation",description:"Pothos federation helpers and subgraph schema export utilities",domain:"graphql-federation",owners:["@contractspec-core"],tags:["package","libs","graphql-federation"],stability:"experimental"}});export{j as GraphqlFederationFeature};
|
package/dist/browser/index.js
CHANGED
|
@@ -1,21 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import"@pothos/plugin-federation";
|
|
3
|
-
import { printSubgraphSchema } from "@apollo/subgraph";
|
|
4
|
-
function toSubgraphSDL(schema) {
|
|
5
|
-
return printSubgraphSchema(schema);
|
|
6
|
-
}
|
|
7
|
-
function withEntityObject(builder, name, keyFields, fields, resolveReference) {
|
|
8
|
-
const ref = builder.objectRef(name);
|
|
9
|
-
ref.implement({
|
|
10
|
-
fields
|
|
11
|
-
});
|
|
12
|
-
builder.entity(name, {
|
|
13
|
-
key: keyFields.join(" "),
|
|
14
|
-
resolveReference
|
|
15
|
-
});
|
|
16
|
-
return ref;
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
withEntityObject,
|
|
20
|
-
toSubgraphSDL
|
|
21
|
-
};
|
|
1
|
+
import{defineFeature as a}from"@contractspec/lib.contracts-spec/features";var h=a({meta:{key:"libs.graphql-federation",version:"1.0.0",title:"Graphql Federation",description:"Pothos federation helpers and subgraph schema export utilities",domain:"graphql-federation",owners:["@contractspec-core"],tags:["package","libs","graphql-federation"],stability:"experimental"}});import"@pothos/plugin-federation";import{printSubgraphSchema as m}from"@apollo/subgraph";function s(t){return m(t)}function f(t,r,o,n,p){let e=t.objectRef(r);return e.implement({fields:n}),t.entity(r,{key:o.join(" "),resolveReference:p}),e}export{f as withEntityObject,s as toSubgraphSDL,h as GraphqlFederationFeature};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GraphqlFederationFeature: import("@contractspec/lib.contracts-spec").FeatureModuleSpec;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{defineFeature as g}from"@contractspec/lib.contracts-spec/features";var j=g({meta:{key:"libs.graphql-federation",version:"1.0.0",title:"Graphql Federation",description:"Pothos federation helpers and subgraph schema export utilities",domain:"graphql-federation",owners:["@contractspec-core"],tags:["package","libs","graphql-federation"],stability:"experimental"}});export{j as GraphqlFederationFeature};
|
package/dist/index.d.ts
CHANGED
|
@@ -3,3 +3,4 @@ import '@pothos/plugin-federation';
|
|
|
3
3
|
import type { GraphQLSchema } from 'graphql';
|
|
4
4
|
export declare function toSubgraphSDL(schema: GraphQLSchema): string;
|
|
5
5
|
export 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;
|
|
6
|
+
export * from './graphql-federation.feature';
|
package/dist/index.js
CHANGED
|
@@ -1,22 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
import"@pothos/plugin-federation";
|
|
4
|
-
import { printSubgraphSchema } from "@apollo/subgraph";
|
|
5
|
-
function toSubgraphSDL(schema) {
|
|
6
|
-
return printSubgraphSchema(schema);
|
|
7
|
-
}
|
|
8
|
-
function withEntityObject(builder, name, keyFields, fields, resolveReference) {
|
|
9
|
-
const ref = builder.objectRef(name);
|
|
10
|
-
ref.implement({
|
|
11
|
-
fields
|
|
12
|
-
});
|
|
13
|
-
builder.entity(name, {
|
|
14
|
-
key: keyFields.join(" "),
|
|
15
|
-
resolveReference
|
|
16
|
-
});
|
|
17
|
-
return ref;
|
|
18
|
-
}
|
|
19
|
-
export {
|
|
20
|
-
withEntityObject,
|
|
21
|
-
toSubgraphSDL
|
|
22
|
-
};
|
|
2
|
+
import{defineFeature as a}from"@contractspec/lib.contracts-spec/features";var h=a({meta:{key:"libs.graphql-federation",version:"1.0.0",title:"Graphql Federation",description:"Pothos federation helpers and subgraph schema export utilities",domain:"graphql-federation",owners:["@contractspec-core"],tags:["package","libs","graphql-federation"],stability:"experimental"}});import"@pothos/plugin-federation";import{printSubgraphSchema as m}from"@apollo/subgraph";function s(t){return m(t)}function f(t,r,o,n,p){let e=t.objectRef(r);return e.implement({fields:n}),t.entity(r,{key:o.join(" "),resolveReference:p}),e}export{f as withEntityObject,s as toSubgraphSDL,h as GraphqlFederationFeature};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineFeature as g}from"@contractspec/lib.contracts-spec/features";var j=g({meta:{key:"libs.graphql-federation",version:"1.0.0",title:"Graphql Federation",description:"Pothos federation helpers and subgraph schema export utilities",domain:"graphql-federation",owners:["@contractspec-core"],tags:["package","libs","graphql-federation"],stability:"experimental"}});export{j as GraphqlFederationFeature};
|
package/dist/node/index.js
CHANGED
|
@@ -1,21 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import"@pothos/plugin-federation";
|
|
3
|
-
import { printSubgraphSchema } from "@apollo/subgraph";
|
|
4
|
-
function toSubgraphSDL(schema) {
|
|
5
|
-
return printSubgraphSchema(schema);
|
|
6
|
-
}
|
|
7
|
-
function withEntityObject(builder, name, keyFields, fields, resolveReference) {
|
|
8
|
-
const ref = builder.objectRef(name);
|
|
9
|
-
ref.implement({
|
|
10
|
-
fields
|
|
11
|
-
});
|
|
12
|
-
builder.entity(name, {
|
|
13
|
-
key: keyFields.join(" "),
|
|
14
|
-
resolveReference
|
|
15
|
-
});
|
|
16
|
-
return ref;
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
withEntityObject,
|
|
20
|
-
toSubgraphSDL
|
|
21
|
-
};
|
|
1
|
+
import{defineFeature as a}from"@contractspec/lib.contracts-spec/features";var h=a({meta:{key:"libs.graphql-federation",version:"1.0.0",title:"Graphql Federation",description:"Pothos federation helpers and subgraph schema export utilities",domain:"graphql-federation",owners:["@contractspec-core"],tags:["package","libs","graphql-federation"],stability:"experimental"}});import"@pothos/plugin-federation";import{printSubgraphSchema as m}from"@apollo/subgraph";function s(t){return m(t)}function f(t,r,o,n,p){let e=t.objectRef(r);return e.implement({fields:n}),t.entity(r,{key:o.join(" "),resolveReference:p}),e}export{f as withEntityObject,s as toSubgraphSDL,h as GraphqlFederationFeature};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/lib.graphql-federation",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.14",
|
|
4
4
|
"description": "Pothos federation helpers and subgraph schema export utilities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"contractspec",
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
"@pothos/plugin-federation": "^4.0.0",
|
|
32
32
|
"@pothos/plugin-directives": "^4.2.3",
|
|
33
33
|
"graphql": "^16.13.2",
|
|
34
|
-
"@apollo/subgraph": "^2.13.3"
|
|
34
|
+
"@apollo/subgraph": "^2.13.3",
|
|
35
|
+
"@contractspec/lib.contracts-spec": "5.5.0"
|
|
35
36
|
},
|
|
36
37
|
"peerDependencies": {
|
|
37
38
|
"graphql": ">=16.13.2"
|
|
@@ -39,7 +40,7 @@
|
|
|
39
40
|
"devDependencies": {
|
|
40
41
|
"@contractspec/tool.typescript": "3.7.13",
|
|
41
42
|
"typescript": "^5.9.3",
|
|
42
|
-
"@contractspec/tool.bun": "3.7.
|
|
43
|
+
"@contractspec/tool.bun": "3.7.15"
|
|
43
44
|
},
|
|
44
45
|
"type": "module",
|
|
45
46
|
"exports": {
|
|
@@ -49,6 +50,13 @@
|
|
|
49
50
|
"bun": "./dist/index.js",
|
|
50
51
|
"node": "./dist/node/index.js",
|
|
51
52
|
"default": "./dist/index.js"
|
|
53
|
+
},
|
|
54
|
+
"./graphql-federation.feature": {
|
|
55
|
+
"types": "./dist/graphql-federation.feature.d.ts",
|
|
56
|
+
"browser": "./dist/browser/graphql-federation.feature.js",
|
|
57
|
+
"bun": "./dist/graphql-federation.feature.js",
|
|
58
|
+
"node": "./dist/node/graphql-federation.feature.js",
|
|
59
|
+
"default": "./dist/graphql-federation.feature.js"
|
|
52
60
|
}
|
|
53
61
|
},
|
|
54
62
|
"publishConfig": {
|
|
@@ -60,6 +68,13 @@
|
|
|
60
68
|
"bun": "./dist/index.js",
|
|
61
69
|
"node": "./dist/node/index.js",
|
|
62
70
|
"default": "./dist/index.js"
|
|
71
|
+
},
|
|
72
|
+
"./graphql-federation.feature": {
|
|
73
|
+
"types": "./dist/graphql-federation.feature.d.ts",
|
|
74
|
+
"browser": "./dist/browser/graphql-federation.feature.js",
|
|
75
|
+
"bun": "./dist/graphql-federation.feature.js",
|
|
76
|
+
"node": "./dist/node/graphql-federation.feature.js",
|
|
77
|
+
"default": "./dist/graphql-federation.feature.js"
|
|
63
78
|
}
|
|
64
79
|
},
|
|
65
80
|
"registry": "https://registry.npmjs.org/"
|