Skip to content

Commit fd9d472

Browse files
committed
style: Small fixes
1 parent d076ad1 commit fd9d472

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

examples/differentVersions/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import express from 'express';
22
import graphqlHTTP from 'express-graphql';
3-
import { GraphQLSchema, GraphQLObjectType } from 'graphql';
3+
import { graphql } from 'graphql-compose';
44
import { elasticApiFieldConfig } from '../../src'; // from 'graphql-compose-elasticsearch';
55

6+
const { GraphQLSchema, GraphQLObjectType } = graphql;
7+
68
const expressPort = process.env.port || process.env.PORT || 9201;
79

810
const generatedSchema = new GraphQLSchema({

examples/elastic50/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33

44
import express from 'express';
55
import graphqlHTTP from 'express-graphql';
6-
import { GraphQLSchema, GraphQLObjectType } from 'graphql';
6+
import { graphql } from 'graphql-compose';
77
import elasticsearch from 'elasticsearch';
88
import { composeWithElastic, elasticApiFieldConfig } from '../../src'; // from 'graphql-compose-elasticsearch';
99

10+
const { GraphQLSchema, GraphQLObjectType } = graphql;
11+
1012
const expressPort = process.env.port || process.env.PORT || 9201;
1113

1214
// mapping obtained from ElasticSearch server
@@ -127,7 +129,7 @@ const server = express();
127129
server.use(
128130
'/',
129131
graphqlHTTP({
130-
schema: generatedSchema,
132+
schema: (generatedSchema: any),
131133
graphiql: true,
132134
formatError: error => ({
133135
message: error.message,

src/ElasticApiParser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import type {
1313
GraphQLFieldConfigMap,
1414
GraphQLFieldConfigArgumentMap,
1515
GraphQLInputType,
16-
} from "graphql/type/definition"; // eslint-disable-line
16+
} from 'graphql-compose/lib/definition'; // eslint-disable-line
1717

1818
const {
1919
GraphQLString,

0 commit comments

Comments
 (0)