Skip to content

Commit c6b15ef

Browse files
committed
fix(ElasticApiParser): Add resolve for nested methods.
1 parent 5f82ccd commit c6b15ef

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

example/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const generatedSchema = new GraphQLSchema({
2828
context.elasticClient = new elasticsearch.Client({ // eslint-disable-line no-param-reassign
2929
host: args.host,
3030
apiVersion: '5.0',
31+
log: 'trace',
3132
});
3233
return {};
3334
},

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@
6363
},
6464
"jest": {
6565
"roots": [
66-
"<rootDir>/src",
67-
"<rootDir>/scripts"
66+
"<rootDir>/src"
6867
]
6968
},
7069
"scripts": {

src/ElasticApiParser.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ export default class ElasticApiParser {
348348
// $FlowFixMe
349349
fields: () => {},
350350
}),
351+
resolve: () => { return {}; },
351352
};
352353
}
353354
TypeComposer.create(result[name[0]].type).setField(name[1], fields[k]);

src/__tests__/__snapshots__/ElasticApiParser-test.js.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
exports[`ElasticApiParser parseSource() should return GraphQLInputFieldMap 1`] = `
44
Object {
55
"cat": Object {
6+
"resolve": [Function],
67
"type": "ElasticMethods_Cat",
78
},
89
"search": Object {

0 commit comments

Comments
 (0)