graphql-server

This is a GraphQL Server that extracts the data from a PostgreSQL database.

This server will expose a GraphQL API to read the information from a database. This exercise does not include the INSERt/DELETE/UPDATE of the data from the API.

Database

In this exercise, the database is not present, and it's replaced by a in-memory list of elements.

Run the server

Run the server

./gradlew run

Test the server

curl --location --request POST 'http://localhost:8080/graphql' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query{contentById(id: \"1\") {id, title}}","variables":{}}'

Micronaut 3.8.7 Documentation


Feature http-client documentation

Feature graphql documentation