The largest private capital investment fund on the pan-African scene, AL MADA, is digitizing by programming a database management system. Creates a query execution environment with database data passing through APIs. Facilitates the integration of data processing in a transaction. Configure a GraphQL server with Node.js and Express. use express middleware express-graphql . Learn how to use client-side GraphQL to send queries and mutations to the server.
Install the necessary dependencies:
npm install express express-graphql graphql
{
clients {
name
}
}
{
client(id: 1) {
name
email
}
}
{
projects {
name
status
}
}
{
project(id: 1) {
name
description,
client {
name
email
}
}
}
mutation {
addClient(name: "Tony Stark", email: "[email protected]", phone: "955-365-3376") {
id
name
email
phone
}
}
mutation {
deleteClient(id: 1) {
id
}
}
mutation {
addProject(name: "Mobile App", description: "This is the project description", status: "new", clientId: "1") {
name
description
}
}
mutation {
updateProject(status: "completed") {
name
status
}
}
npm i @apollo/client graphql react-router-dom react-icons
1 - Create a Dockerfile in the root directory of the project
docker build -t my-image .
2 - Run the image
docker run -p 3000:3000 my-image
3 - Open the browser and go to http://localhost:5000/graphql
1 - Create a docker-compose.yml file in the root directory of the project
docker compose up