Skip to content

Commit 11736aa

Browse files
committed
fix: accounts-microservice example
1 parent 143b36a commit 11736aa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/accounts-microservice/src/app-server.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import 'reflect-metadata';
22
import fetch from 'node-fetch';
33
import { mergeTypeDefs } from '@graphql-tools/merge';
4-
import { introspectSchema } from '@graphql-tools/wrap';
4+
import { schemaFromExecutor } from '@graphql-tools/wrap';
55
import { stitchSchemas } from '@graphql-tools/stitch';
66
import { AsyncExecutor } from '@graphql-tools/utils';
7-
import { print } from 'graphql';
7+
import { OperationTypeNode, print } from 'graphql';
88
import {
99
authDirective,
1010
authenticated,
@@ -51,7 +51,7 @@ const accountsServerUri = 'http://localhost:4003/';
5151
resolve: (parent, args, context, info) => {
5252
return delegateToSchema({
5353
schema: remoteSubschema,
54-
operation: 'query',
54+
operation: OperationTypeNode.QUERY,
5555
fieldName: 'getUser',
5656
args,
5757
context,
@@ -93,7 +93,7 @@ const accountsServerUri = 'http://localhost:4003/';
9393
};
9494

9595
const remoteSubschema = {
96-
schema: await introspectSchema(remoteExecutor),
96+
schema: await schemaFromExecutor(remoteExecutor),
9797
executor: remoteExecutor,
9898
};
9999

0 commit comments

Comments
 (0)