This is a sample Ballerina repository for a movie database. It demonstrates how to use Ballerina persistence support to store and retrieve data from a database and expose it as a GraphQL service.
- Download and install Ballerina.
- Install Ballerina VSCode plugin.
- A MySQL database. Optionally, you can use the docker-compose file provided in the repository to start a MySQL database using Docker.
-
Clone the repository.
-
Navigate to the
movie-database
directory.cd movie-database
-
Start the MySQL database using Docker.
docker-compose up
-
Generate the persistence layer by running the following command.
bal persist generate
-
Run the Ballerina service.
bal run