This is a GraphQL project in Go for managing a list of tasks (todos) using gqlgen.
Make sure you have Go installed on your machine. You can download it at https://golang.org/dl/.
- Clone this repository:
git clone https://github.com/your-username/gqlgen-todos.git
- Navigate to the project directory:
cd gqlgen-todos
- Install dependencies:
go mod download
Copy the .env.example file to a new file named .env:
cp .env.example .env
Edit the .env file as needed, configuring variables such as ports and database settings, if applicable.
Run the following command to start the server:
go run server/main.go
The GraphQL server will be available at http://localhost:8080.
You can use tools like Insomnia or Postman to make GraphQL queries.
Example query to get all todos:
query {
todos {
id
title
completed
}
}
Feel free to adjust this README as needed based on the specific details of your project. Make sure to provide enough information so that other developers can easily set up and run the project on their own machines.