@graphql-mesh/grpc 0.94.3 → 0.94.4
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/index.js +3 -0
- package/esm/index.js +4 -1
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -543,6 +543,9 @@ class GrpcHandler {
|
|
|
543
543
|
}
|
|
544
544
|
// graphql-compose doesn't add @defer and @stream to the schema
|
|
545
545
|
graphql_1.specifiedDirectives.forEach(directive => this.schemaComposer.addDirective(directive));
|
|
546
|
+
if (!this.schemaComposer.hasDirective('stream')) {
|
|
547
|
+
this.schemaComposer.addDirective(utils_2.GraphQLStreamDirective);
|
|
548
|
+
}
|
|
546
549
|
this.logger.debug(`Building the final GraphQL Schema`);
|
|
547
550
|
const schema = this.schemaComposer.buildSchema();
|
|
548
551
|
return schema;
|
package/esm/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import { fs, path, process } from '@graphql-mesh/cross-helpers';
|
|
|
12
12
|
import { PredefinedProxyOptions } from '@graphql-mesh/store';
|
|
13
13
|
import { stringInterpolator } from '@graphql-mesh/string-interpolation';
|
|
14
14
|
import { readFileOrUrl } from '@graphql-mesh/utils';
|
|
15
|
-
import { getDirective, getDirectives, getRootTypes } from '@graphql-tools/utils';
|
|
15
|
+
import { getDirective, getDirectives, getRootTypes, GraphQLStreamDirective, } from '@graphql-tools/utils';
|
|
16
16
|
import { credentials, loadPackageDefinition } from '@grpc/grpc-js';
|
|
17
17
|
import { fromJSON } from '@grpc/proto-loader';
|
|
18
18
|
import { grpcConnectivityStateDirective, grpcMethodDirective, grpcRootJsonDirective, ObjMapScalar, } from './directives.js';
|
|
@@ -540,6 +540,9 @@ export default class GrpcHandler {
|
|
|
540
540
|
}
|
|
541
541
|
// graphql-compose doesn't add @defer and @stream to the schema
|
|
542
542
|
specifiedDirectives.forEach(directive => this.schemaComposer.addDirective(directive));
|
|
543
|
+
if (!this.schemaComposer.hasDirective('stream')) {
|
|
544
|
+
this.schemaComposer.addDirective(GraphQLStreamDirective);
|
|
545
|
+
}
|
|
543
546
|
this.logger.debug(`Building the final GraphQL Schema`);
|
|
544
547
|
const schema = this.schemaComposer.buildSchema();
|
|
545
548
|
return schema;
|