In the Implementing a GraphQL CRUD BFF recipe, we discussed how the BFF pattern accelerates innovation. We have also discussed how different user groups interact with data at different stages in the data life cycle, and how different persistent mechanisms are more appropriate at the different stages. In this recipe, we will create a BFF service that supports the read-only consumption of data. The single responsibility of this service is indexing and retrieving data for a specific bounded context. It applies the CQRS pattern to create two materialized views that work in tandem, one in Elasticsearch and another in S3. The service exposes a RESTful API.
Implementing a search BFF
How to do it...
- Create the project from the following...