{"id":22983358,"url":"https://github.com/muthukumar89uk/go-with-graphql","last_synced_at":"2026-04-12T16:02:16.829Z","repository":{"id":250305588,"uuid":"834078201","full_name":"muthukumar89uk/go-with-graphql","owner":"muthukumar89uk","description":"This is a simple job posting application created with  Golang and graphql.GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data.","archived":false,"fork":false,"pushed_at":"2024-08-01T08:03:44.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-08T01:33:22.663Z","etag":null,"topics":["go","go-graphql","golang","gorm","gqlgen","graphql","mutations","query"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/muthukumar89uk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-26T11:19:50.000Z","updated_at":"2024-08-01T10:28:02.000Z","dependencies_parsed_at":"2024-07-26T13:04:35.656Z","dependency_job_id":"5cbea8c5-234e-49db-b177-628610841ac5","html_url":"https://github.com/muthukumar89uk/go-with-graphql","commit_stats":null,"previous_names":["muthukumar89uk/go-with-graphql"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muthukumar89uk%2Fgo-with-graphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muthukumar89uk%2Fgo-with-graphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muthukumar89uk%2Fgo-with-graphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muthukumar89uk%2Fgo-with-graphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/muthukumar89uk","download_url":"https://codeload.github.com/muthukumar89uk/go-with-graphql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246795011,"owners_count":20835112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","go-graphql","golang","gorm","gqlgen","graphql","mutations","query"],"created_at":"2024-12-15T02:38:28.286Z","updated_at":"2025-10-30T16:11:35.457Z","avatar_url":"https://github.com/muthukumar89uk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go GraphQL CRUD Example\n\nThis repository demonstrates how to set up a Go project to perform CRUD (Create, Read, Update, Delete) operations using GraphQL.\n\n## Features\n\n- GraphQL server implementation in Go\n- CRUD operations for a simple entity (e.g., User)\n- Basic schema definition and resolvers\n\n## Requirements\n\n- Go 1.15 or higher\n- Docker (optional but recommended for setting up a database)\n\n## Getting Started\n\n### Installation\n\n1. **Clone the repository:**\n\n      ```\n    git clone https://github.com/muthukumar89uk/go-with-graphql.git\n    ```\n  Click here to directly [download it](https://github.com/muthukumar89uk/go-with-graphql/zipball/master). \n\n2. **Install Go dependencies:**\n\n    ```sh\n    go mod tidy\n    ```\n\n### Setup Database\n1. **Locally:**\n\n    Install PostgreSQL from the [official PostgreSQL website](https://www.postgresql.org/download/).\n\n    Create a database named `graphql` and a user with appropriate privileges.\n\n### Generate GraphQL Folder Strucure\n\n  - For the generate graphql folder using the command:\n\n    ```\n    go run github.com/99designs/gqlgen init\n    ```\n\n### GraphQL Server\n\n1. **Create the GraphQL schema:**\n\n    Create a `schema.graphql` file in your project directory with the following content:\n\n    ```graphql\n    type User {\n       id: Int!\n       username: String!\n       email: String!\n       phone_number: String!\n       password: String!\n    }\n\n    type DeleteStatus{\n      iserror: Boolean!\n      message: String\n    }\n\n    input NewUser {\n       name: String!\n       email: String!\n       phoneNumber: String!\n       password: String!\n    }\n\n    type Query {\n       GetAllUsers: [User!]!\n       GetOneUserById(id: Int!): User!  \n    }\n\n    type Mutation {\n       createUser(input: NewUser!): User!\n       updateUser(id: Int!, input: NewUser!): User!\n       deleteUser(id: Int!): DeleteStatus\n    }\n    ```\n    \n2. **Create the resolver implementation:**\n\n    Create a `graph` directory with `resolver.go` and the generated code:\n\n    `resolver.go`:\n\n    Run the following command to generate the necessary GraphQL code:\n\n    ```sh\n    go run github.com/99designs/gqlgen generate\n    ```\n\n    Implement the CRUD operations in the generated resolver file (`graph/schema.resolvers.go`):\n\n\n### Run the Application\n\n1. **Run the GraphQL server:**\n\n    ```sh\n    go run .\n    ```\n\n2. **Access the GraphQL Playground:**\n\n    Open your browser and navigate to `http://localhost:8081/` to access the GraphQL Playground.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuthukumar89uk%2Fgo-with-graphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuthukumar89uk%2Fgo-with-graphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuthukumar89uk%2Fgo-with-graphql/lists"}