brew install pyenv
pyenv install 3.9.1
pyenv global 3.9.1
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
curl -sSL https://install.python-poetry.org | python3 -
nano ~/.zshrc
echo 'export PATH="/Users/khyteanglim/.local/bin:$PATH"' >> ~/.zshrc
poetry --verison
Link: https://www.apollographql.com/docs/router/quickstart/
$ curl -sSL https://router.apollo.dev/download/nix/latest | sh
Link: https://www.apollographql.com/docs/rover/getting-started/
$ curl -sSL https://rover.apollo.dev/nix/latest | sh
# make sure you populate the .env
$ cp .sample.env .env
$ docker-compose build
# this command will spin up two databases and pgadmin
# port 5432 for patient-service
# port 5433 for order-service
$ docker-compose up -d
$ cd order-service
# make sure you populate the .env
$ cp .sample.env .env
$ poetry install
$ poetry run migrate
$ poetry run start
$ cd patient-service
# make sure you populate the .env
$ cp .sample.env .env
$ poetry install
$ poetry run migrate
$ poetry run start
# IF you're running on an M1, make sure you install Apple's Rosetta 2 software which emulates x86 code on the ARM chip
$ softwareupdate --install-rosetta
# this command will use all the specified subgraph from supergraph.yaml and generate a supergraph in supergraph-schema.graphql
$ rover supergraph compose --elv2-license=accept --config ./supergraph.yaml > supergraph-schema.graphql
# --dev flag will launch the router with a sandbox
# go to http://localhost:4000/
$ ./router --dev --supergraph supergraph-schema.graphql