Skip to content

Commit 72a0c4f

Browse files
committed
fix(Example): Cleanup
1 parent d653b74 commit 72a0c4f

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

example/index.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,12 @@ import ElasticApiParser from '../scripts/apiParser/ElasticApiParser';
66

77
const expressPort = process.env.port || process.env.PORT || 9201;
88

9-
const elasticClient = new elasticsearch.Client({
10-
host: 'http://localhost:9200',
11-
apiVersion: '5.0',
12-
log: 'trace',
13-
});
14-
159
const generatedSchema = new GraphQLSchema({
1610
query: new GraphQLObjectType({
1711
name: 'Query',
18-
// see node_modules/elasticsearch/src/lib/apis/ for available versions
1912
fields: {
13+
// see node_modules/elasticsearch/src/lib/apis/ for available versions
14+
2015
elastic50: {
2116
description: 'Elastic v5.0',
2217
type: new GraphQLObjectType({
@@ -88,7 +83,11 @@ server.use('/', graphqlHTTP({
8883
schema: generatedSchema,
8984
graphiql: true,
9085
context: {
91-
// elasticClient,
86+
// elasticClient: new elasticsearch.Client({
87+
// host: 'http://localhost:9200',
88+
// apiVersion: '5.0',
89+
// log: 'trace',
90+
// }),
9291
},
9392
}));
9493

0 commit comments

Comments
 (0)