Skip to content

Commit 4a3b24e

Browse files
author
Carlos Rufo
committed
fix: remove remote schema
1 parent 8078445 commit 4a3b24e

File tree

1 file changed

+4
-27
lines changed

1 file changed

+4
-27
lines changed

src/schema/index.ts

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,19 @@
22
import typeDefs from "./typeDefs";
33
import resolvers from "./resolvers";
44
import { rateLimit } from "../utils";
5-
import {
6-
makeExecutableSchema,
7-
makeRemoteExecutableSchema,
8-
introspectSchema,
9-
mergeSchemas
10-
} from "graphql-tools";
11-
import fetch from "node-fetch";
12-
import { HttpLink } from "apollo-link-http";
13-
14-
const uri = process.env.X_HASURA_URL;
15-
const headers = {
16-
"x-hasura-admin-secret": process.env.X_HASURA_ADMIN_SECRET
17-
};
18-
19-
const link = new HttpLink({
20-
uri,
21-
headers,
22-
fetch
23-
});
5+
import { makeExecutableSchema, mergeSchemas } from "graphql-tools";
246

257
export default async () => {
26-
const remoteSchema = makeRemoteExecutableSchema({
27-
schema: await introspectSchema(link),
28-
link
29-
});
30-
318
const localSchema = makeExecutableSchema({
329
typeDefs,
3310
resolvers,
3411
schemaDirectives: {
35-
rateLimit
36-
}
12+
rateLimit,
13+
},
3714
});
3815

3916
const schema = mergeSchemas({
40-
schemas: [remoteSchema, localSchema]
17+
schemas: [localSchema],
4118
});
4219

4320
return schema;

0 commit comments

Comments
 (0)