@omnigraph/grpc 0.0.1-alpha-20241030140429-9c1473cb596c3f20d6df4a3685ffdaf944f0a091 → 0.0.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/cjs/directives.js +4 -4
- package/cjs/utils.js +5 -6
- package/esm/directives.js +4 -4
- package/esm/utils.js +5 -6
- package/package.json +2 -2
- package/typings/utils.d.cts +2 -2
- package/typings/utils.d.ts +2 -2
package/cjs/directives.js
CHANGED
|
@@ -82,7 +82,7 @@ exports.GrpcCredentialsSsl = new graphql_1.GraphQLInputObjectType({
|
|
|
82
82
|
privateKey: {
|
|
83
83
|
type: graphql_1.GraphQLString,
|
|
84
84
|
},
|
|
85
|
-
}
|
|
85
|
+
},
|
|
86
86
|
});
|
|
87
87
|
exports.TransportOptions = new graphql_1.GraphQLInputObjectType({
|
|
88
88
|
name: 'TransportOptions',
|
|
@@ -98,8 +98,8 @@ exports.TransportOptions = new graphql_1.GraphQLInputObjectType({
|
|
|
98
98
|
},
|
|
99
99
|
metaData: {
|
|
100
100
|
type: transport_common_1.ObjMapScalar,
|
|
101
|
-
}
|
|
102
|
-
}
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
103
|
});
|
|
104
104
|
exports.transportDirective = new graphql_1.GraphQLDirective({
|
|
105
105
|
name: 'transport',
|
|
@@ -115,7 +115,7 @@ exports.transportDirective = new graphql_1.GraphQLDirective({
|
|
|
115
115
|
},
|
|
116
116
|
options: {
|
|
117
117
|
type: exports.TransportOptions,
|
|
118
|
-
}
|
|
118
|
+
},
|
|
119
119
|
},
|
|
120
120
|
isRepeatable: true,
|
|
121
121
|
locations: [graphql_1.DirectiveLocation.SCHEMA],
|
package/cjs/utils.js
CHANGED
|
@@ -4,19 +4,18 @@ exports.addIncludePathResolver = addIncludePathResolver;
|
|
|
4
4
|
exports.getTypeName = getTypeName;
|
|
5
5
|
exports.walkToFindTypePath = walkToFindTypePath;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
|
-
const fs_1 = require("fs");
|
|
8
|
-
const path_1 = require("path");
|
|
9
|
-
const scalars_js_1 = require("./scalars.js");
|
|
10
7
|
const lodash_has_1 = tslib_1.__importDefault(require("lodash.has"));
|
|
8
|
+
const cross_helpers_1 = require("@graphql-mesh/cross-helpers");
|
|
9
|
+
const scalars_js_1 = require("./scalars.js");
|
|
11
10
|
function addIncludePathResolver(root, includePaths) {
|
|
12
11
|
const originalResolvePath = root.resolvePath;
|
|
13
12
|
root.resolvePath = (origin, target) => {
|
|
14
|
-
if (
|
|
13
|
+
if (cross_helpers_1.path.isAbsolute(target)) {
|
|
15
14
|
return target;
|
|
16
15
|
}
|
|
17
16
|
for (const directory of includePaths) {
|
|
18
|
-
const fullPath =
|
|
19
|
-
if (
|
|
17
|
+
const fullPath = cross_helpers_1.path.join(directory, target);
|
|
18
|
+
if (cross_helpers_1.fs.existsSync(fullPath)) {
|
|
20
19
|
return fullPath;
|
|
21
20
|
}
|
|
22
21
|
}
|
package/esm/directives.js
CHANGED
|
@@ -79,7 +79,7 @@ export const GrpcCredentialsSsl = new GraphQLInputObjectType({
|
|
|
79
79
|
privateKey: {
|
|
80
80
|
type: GraphQLString,
|
|
81
81
|
},
|
|
82
|
-
}
|
|
82
|
+
},
|
|
83
83
|
});
|
|
84
84
|
export const TransportOptions = new GraphQLInputObjectType({
|
|
85
85
|
name: 'TransportOptions',
|
|
@@ -95,8 +95,8 @@ export const TransportOptions = new GraphQLInputObjectType({
|
|
|
95
95
|
},
|
|
96
96
|
metaData: {
|
|
97
97
|
type: ObjMapScalar,
|
|
98
|
-
}
|
|
99
|
-
}
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
100
|
});
|
|
101
101
|
export const transportDirective = new GraphQLDirective({
|
|
102
102
|
name: 'transport',
|
|
@@ -112,7 +112,7 @@ export const transportDirective = new GraphQLDirective({
|
|
|
112
112
|
},
|
|
113
113
|
options: {
|
|
114
114
|
type: TransportOptions,
|
|
115
|
-
}
|
|
115
|
+
},
|
|
116
116
|
},
|
|
117
117
|
isRepeatable: true,
|
|
118
118
|
locations: [DirectiveLocation.SCHEMA],
|
package/esm/utils.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { existsSync } from "fs";
|
|
2
|
-
import { isAbsolute, join } from "path";
|
|
3
|
-
import { getGraphQLScalarForGrpc, isGrpcScalar } from "./scalars.js";
|
|
4
1
|
import lodashHas from 'lodash.has';
|
|
2
|
+
import { fs, path as pathModule } from '@graphql-mesh/cross-helpers';
|
|
3
|
+
import { getGraphQLScalarForGrpc, isGrpcScalar } from './scalars.js';
|
|
5
4
|
export function addIncludePathResolver(root, includePaths) {
|
|
6
5
|
const originalResolvePath = root.resolvePath;
|
|
7
6
|
root.resolvePath = (origin, target) => {
|
|
8
|
-
if (isAbsolute(target)) {
|
|
7
|
+
if (pathModule.isAbsolute(target)) {
|
|
9
8
|
return target;
|
|
10
9
|
}
|
|
11
10
|
for (const directory of includePaths) {
|
|
12
|
-
const fullPath = join(directory, target);
|
|
13
|
-
if (existsSync(fullPath)) {
|
|
11
|
+
const fullPath = pathModule.join(directory, target);
|
|
12
|
+
if (fs.existsSync(fullPath)) {
|
|
14
13
|
return fullPath;
|
|
15
14
|
}
|
|
16
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omnigraph/grpc",
|
|
3
|
-
"version": "0.0.1
|
|
3
|
+
"version": "0.0.1",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"graphql": "*"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"@ardatan/grpc-reflection-js": "^0.0.2",
|
|
10
10
|
"@graphql-mesh/cross-helpers": "^0.4.7",
|
|
11
11
|
"@graphql-mesh/string-interpolation": "^0.5.6",
|
|
12
|
-
"@graphql-mesh/transport-common": "0.7.12
|
|
12
|
+
"@graphql-mesh/transport-common": "^0.7.12",
|
|
13
13
|
"@graphql-tools/utils": "^10.5.5",
|
|
14
14
|
"@grpc/grpc-js": "^1.1.7",
|
|
15
15
|
"@whatwg-node/disposablestack": "^0.0.5",
|
package/typings/utils.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SchemaComposer } from
|
|
2
|
-
import type { INamespace, Root } from
|
|
1
|
+
import type { SchemaComposer } from 'graphql-compose';
|
|
2
|
+
import type { INamespace, Root } from 'protobufjs';
|
|
3
3
|
export declare function addIncludePathResolver(root: Root, includePaths: string[]): void;
|
|
4
4
|
export declare function getTypeName(schemaComposer: SchemaComposer, pathWithName: string[] | undefined, isInput: boolean): string;
|
|
5
5
|
export declare function walkToFindTypePath(rootJson: INamespace, pathWithName: string[], baseTypePath: string[]): string[];
|
package/typings/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SchemaComposer } from
|
|
2
|
-
import type { INamespace, Root } from
|
|
1
|
+
import type { SchemaComposer } from 'graphql-compose';
|
|
2
|
+
import type { INamespace, Root } from 'protobufjs';
|
|
3
3
|
export declare function addIncludePathResolver(root: Root, includePaths: string[]): void;
|
|
4
4
|
export declare function getTypeName(schemaComposer: SchemaComposer, pathWithName: string[] | undefined, isInput: boolean): string;
|
|
5
5
|
export declare function walkToFindTypePath(rootJson: INamespace, pathWithName: string[], baseTypePath: string[]): string[];
|