@omnigraph/grpc 0.0.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.
@@ -0,0 +1,28 @@
1
+ import type { Logger, YamlConfig } from "@graphql-mesh/types";
2
+ import { type ChannelCredentials } from '@grpc/grpc-js';
3
+ import protobufjs, { type AnyNestedObject } from 'protobufjs';
4
+ import { type MaybePromise } from "@graphql-tools/utils";
5
+ export declare class gRPCLoader implements AsyncDisposable {
6
+ private subgraphName;
7
+ private baseDir;
8
+ private logger;
9
+ private config;
10
+ private schemaComposer;
11
+ private asyncDisposableStack;
12
+ constructor(subgraphName: string, baseDir: string, logger: Logger, config: YamlConfig.GrpcHandler);
13
+ [Symbol.asyncDispose](): Promise<void>;
14
+ buildSchema(): Promise<import("graphql").GraphQLSchema>;
15
+ private processReflection;
16
+ private processDescriptorFile;
17
+ private processProtoFile;
18
+ private getDescriptorSets;
19
+ getCredentials(): MaybePromise<ChannelCredentials>;
20
+ visit({ nested, name, currentPath, rootJsonName, rootJson, rootLogger: logger, }: {
21
+ nested: AnyNestedObject;
22
+ name: string;
23
+ currentPath: string[];
24
+ rootJsonName: string;
25
+ rootJson: protobufjs.INamespace;
26
+ rootLogger: Logger;
27
+ }): void;
28
+ }
@@ -0,0 +1,28 @@
1
+ import type { Logger, YamlConfig } from "@graphql-mesh/types";
2
+ import { type ChannelCredentials } from '@grpc/grpc-js';
3
+ import protobufjs, { type AnyNestedObject } from 'protobufjs';
4
+ import { type MaybePromise } from "@graphql-tools/utils";
5
+ export declare class gRPCLoader implements AsyncDisposable {
6
+ private subgraphName;
7
+ private baseDir;
8
+ private logger;
9
+ private config;
10
+ private schemaComposer;
11
+ private asyncDisposableStack;
12
+ constructor(subgraphName: string, baseDir: string, logger: Logger, config: YamlConfig.GrpcHandler);
13
+ [Symbol.asyncDispose](): Promise<void>;
14
+ buildSchema(): Promise<import("graphql").GraphQLSchema>;
15
+ private processReflection;
16
+ private processDescriptorFile;
17
+ private processProtoFile;
18
+ private getDescriptorSets;
19
+ getCredentials(): MaybePromise<ChannelCredentials>;
20
+ visit({ nested, name, currentPath, rootJsonName, rootJson, rootLogger: logger, }: {
21
+ nested: AnyNestedObject;
22
+ name: string;
23
+ currentPath: string[];
24
+ rootJsonName: string;
25
+ rootJson: protobufjs.INamespace;
26
+ rootLogger: Logger;
27
+ }): void;
28
+ }
@@ -0,0 +1,10 @@
1
+ import type { Logger, YamlConfig } from "@graphql-mesh/types";
2
+ interface LoaderContext {
3
+ cwd: string;
4
+ logger: Logger;
5
+ }
6
+ export declare function loadGrpcSubgraph(name: string, options: YamlConfig.GrpcHandler): (ctx: LoaderContext) => {
7
+ name: string;
8
+ schema$: Promise<import("graphql").GraphQLSchema>;
9
+ };
10
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { Logger, YamlConfig } from "@graphql-mesh/types";
2
+ interface LoaderContext {
3
+ cwd: string;
4
+ logger: Logger;
5
+ }
6
+ export declare function loadGrpcSubgraph(name: string, options: YamlConfig.GrpcHandler): (ctx: LoaderContext) => {
7
+ name: string;
8
+ schema$: Promise<import("graphql").GraphQLSchema>;
9
+ };
10
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare function isGrpcScalar(type: string): boolean;
2
+ export declare function getGraphQLScalarForGrpc(scalarType: string): string;
@@ -0,0 +1,2 @@
1
+ export declare function isGrpcScalar(type: string): boolean;
2
+ export declare function getGraphQLScalarForGrpc(scalarType: string): string;
@@ -0,0 +1,5 @@
1
+ import type { SchemaComposer } from "graphql-compose";
2
+ import type { INamespace, Root } from "protobufjs";
3
+ export declare function addIncludePathResolver(root: Root, includePaths: string[]): void;
4
+ export declare function getTypeName(schemaComposer: SchemaComposer, pathWithName: string[] | undefined, isInput: boolean): string;
5
+ export declare function walkToFindTypePath(rootJson: INamespace, pathWithName: string[], baseTypePath: string[]): string[];
@@ -0,0 +1,5 @@
1
+ import type { SchemaComposer } from "graphql-compose";
2
+ import type { INamespace, Root } from "protobufjs";
3
+ export declare function addIncludePathResolver(root: Root, includePaths: string[]): void;
4
+ export declare function getTypeName(schemaComposer: SchemaComposer, pathWithName: string[] | undefined, isInput: boolean): string;
5
+ export declare function walkToFindTypePath(rootJson: INamespace, pathWithName: string[], baseTypePath: string[]): string[];