Event Sourcing PoC read model
This read model fetches & consumes events from event stores and in turn serves person views, using a GraphQL server. It supports the following queries:
How to run
The serve_gql
binary expects a path to a configuration file, which can be supplied using the --config-path
CLI arg or by setting the CONFIG_PATH
ENV variable.
This configuration file should conform to the following format:
bind_addr: $hostname:$port_number
event_stores:
- id: $event_store_uuid
url: $event_store_graphql_endpoint
api_key: $event_store_api_key
Development
The following tools are required to be able to develop on this project:
A Makefile has been created, which contains the following targets:
- check: verify if required tools are available.
- serve_gql: build & start the GraphQL server.
- watch_serve_gql: build & start the GraphQL server, and re[start|build] it in case a change has been made to the source code.
- container: build a container, and tag it as
registry.int.tooling.digilab.network/digilab.overheid.nl/research/event-sourcing/read-model-person:latest
. - udeps: find unused dependencies.
- clippy: run linter.