{"id":19098876,"url":"https://github.com/ddliu/go-gqlclient","last_synced_at":"2026-05-16T18:03:09.144Z","repository":{"id":57532370,"uuid":"278516451","full_name":"ddliu/go-gqlclient","owner":"ddliu","description":"A simple Graphql client for Golang","archived":false,"fork":false,"pushed_at":"2020-07-10T05:47:50.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-22T09:45:07.590Z","etag":null,"topics":["apollo","client","graphql","mutation","query"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ddliu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-10T02:12:43.000Z","updated_at":"2020-07-10T05:47:52.000Z","dependencies_parsed_at":"2022-09-26T18:11:57.523Z","dependency_job_id":null,"html_url":"https://github.com/ddliu/go-gqlclient","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ddliu/go-gqlclient","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddliu%2Fgo-gqlclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddliu%2Fgo-gqlclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddliu%2Fgo-gqlclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddliu%2Fgo-gqlclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ddliu","download_url":"https://codeload.github.com/ddliu/go-gqlclient/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddliu%2Fgo-gqlclient/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273850702,"owners_count":25179357,"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","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["apollo","client","graphql","mutation","query"],"created_at":"2024-11-09T03:47:50.425Z","updated_at":"2026-05-16T18:03:09.084Z","avatar_url":"https://github.com/ddliu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-gqlclient\n\nA simple Graphql client for Golang.\n\n## Install\n\n```\ngo get -u github.com/ddliu/go-gqlclient\n```\n\n## Usage\n\n```go\nimport (\n    \"github.com/ddliu/go-gqlclient\"\n    \"net/http\"\n    \"context\"\n)\n\nclient = gqlclient.New(gqlclient.Options{\n    Endpoint: \"http://server/graphql\",\n    Header: http.Header{\n        \"some-secret\": []string{\"secret string\"},\n    },\n})\n\ndata, err := client.Query(context.Background(), `\nquery MyQuery {\n    post {\n        id\n        name\n    }\n}\n`, nil)\n\nprint(data.String(\"post.0.name\"))\n\n// Unmarshal data\nvar posts []Post\ndata.Unmarshal(\u0026posts)\n```\n\nWith variables:\n\n```go\nclient.Query(context.Background(), `\nquery MyQuery($limit: Int) {\n    post(limit: $limit) {\n        id\n        name\n    }\n}\n`, map[string]interface{} {\n    \"limit\": 10,\n})\n```\n\nCheck out [fractal](https://github.com/ddliu/fractal) for more information of the query result.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddliu%2Fgo-gqlclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fddliu%2Fgo-gqlclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddliu%2Fgo-gqlclient/lists"}