GraphQL resolvers support multi es indexes
Closed this issue · 3 comments
I am using your graphql-compose-elasticsearch module, it is great! Thanks for the good work.
I was however unable to figure out, how to use GraphQL resolver to join several results based on nested parameters.
As an example, in a regular GraphQL situation, I could have two indexes: people and houses and to figure out which people lived in which houses I could join the result like this:
{ houses { id, street, zipcode, city, resident_ids people { id, first_name, last_name } } }
However, moving the indexes into elasticsearch, I cannot seem to figure out how to do the nested query for people based on the id of the house.
I then noticed you had this comment:
..more resolvers will be later after my vacation: suggest, getById, updateById and others
Does this mean, this is not possible today? Or am I just not knowing how to do so..
I do realize that with document databasing like elasticsearch, you would just add the people as a nested object, however having the option for using GraphQL resolvers will make the library even more flexible
findById and updateById seems not to have been implemented, this issue should be closed :-)
Thanks for the feature.
Yep it was implemented a half year ago 😅
Yea I noticed while cleaning my long and forgotten issues. I will look into the library again now :-) Great job @nodkz