- Clone the repository
- Make directories "temp" and "log" (writable)
- Copy
.env.exampleto.envto set the environment variables - Start up development environment
make up- Initialize the project
make init- Go to URL
http://localhost/graphiql - Use GraphiQL to test the API
Use the following queries to test the API:
List all contacts:
query Contacts {
contacts {
id
firstName
lastName
phone
createdAt
updatedAt
}
}Details of a specific contact:
query Contact {
contact(phone: "420123456789") {
id
firstName
lastName
phone
createdAt
updatedAt
}
}Create a new contact:
mutation CreateContact {
createContact (
firstName: "Foo",
lastName: "Bar",
phone: "420724606098",
) {
id
firstName
lastName
phone
createdAt
updatedAt
}
}Update an existing contact:
mutation UpdateContact {
updateContact (
id: 1,
firstName: "FooFoo",
lastName: "BarBar",
phone: "421456456456",
) {
id
firstName
lastName
phone
createdAt
updatedAt
}
}