Build images:
docker-compose build --no-cache
Install node packages:
docker-compose run node npm i
Run containers:
docker-compose up
Step One: Populate elasticsearch container
Data Structure:
authors = [
{ id: 1, firstName: 'Tom', lastName: 'Coleman' },
{ id: 2, firstName: 'Sashko', lastName: 'Stubailo' },
{ id: 3, firstName: 'Mikhail', lastName: 'Novikov' },
];
posts = [
{ id: 1, authorId: 1, title: 'Introduction to GraphQL', votes: 2 },
{ id: 2, authorId: 2, title: 'Welcome to Apollo', votes: 3 },
{ id: 3, authorId: 2, title: 'Advanced GraphQL', votes: 1 },
{ id: 4, authorId: 3, title: 'Launchpad is Cool', votes: 7 },
]
Query used:
`{
posts {
id
title
author {
firstName
lastName
}
}
}`
Step Two: Query Result