Showcases how to use Realtime GraphQL using Redis Streams and real-time search usingRedis Searchin Java
Prerequisites:
- Java 11
- Maven 3.2+
- Docker
- Redis + Modules 6.0.1 or greater
-
Start the Docker Compose application:
cd redi2hack docker-compose up -
Run the Spring Boot app to build the application.
./mvnw clean -Dspring-boot.run.profiles=local spring-boot:run
GraphQL is supported using Spring Boot which is backed by Redis enterprise data store.
The data flows from left to right - from GraphQL->Redis and Redis->GraphQL.
-
createCustomer,updateCustomer, anddeleteCustomerGraphQL mutations use Redis hash and stream data to store the state and push the events. -
subscribeEvents(GraphQL subscription) uses Redis Stream to fetch all customer events or the latest customer events. -
searchCustomersGraphQL query usesRedis Searchto search customers. -
customersandfindCustomeruse Redis Hash to find the all or a particular customer.
This project shows how to use GraphQL Subscription to push event data from the server using Redis Streams and support real-time search using Redis Search.
- RediStreams: to capture all the customer events
- Redis Search: to support search customer capabilities
- RediHash: to store customer data
- GraphQL:
- Subscription: to push real time customer events
- Mutation: to create/update/delete the customer state
- Query: to query/search customer information
- Goto: redi2hack.herokuapp.com
Note: The app comes with the necessary sample code to follow.
To make deploys work, you need to create free account in https://redislabs.com/try-free/



