Skip to content

Commit

Permalink
fix(ElasticApiParser): Add resolve for nested methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
nodkz committed Mar 7, 2017
1 parent 5f82ccd commit c6b15ef
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions example/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const generatedSchema = new GraphQLSchema({
context.elasticClient = new elasticsearch.Client({ // eslint-disable-line no-param-reassign
host: args.host,
apiVersion: '5.0',
log: 'trace',
});
return {};
},
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@
},
"jest": {
"roots": [
"<rootDir>/src",
"<rootDir>/scripts"
"<rootDir>/src"
]
},
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions src/ElasticApiParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ export default class ElasticApiParser {
// $FlowFixMe
fields: () => {},
}),
resolve: () => { return {}; },
};
}
TypeComposer.create(result[name[0]].type).setField(name[1], fields[k]);
Expand Down
1 change: 1 addition & 0 deletions src/__tests__/__snapshots__/ElasticApiParser-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
exports[`ElasticApiParser parseSource() should return GraphQLInputFieldMap 1`] = `
Object {
"cat": Object {
"resolve": [Function],
"type": "ElasticMethods_Cat",
},
"search": Object {
Expand Down

0 comments on commit c6b15ef

Please sign in to comment.