{"id":13724067,"url":"https://github.com/hookactions/gqlgen-relay","last_synced_at":"2025-05-07T17:32:38.583Z","repository":{"id":57488025,"uuid":"200352286","full_name":"hookactions/gqlgen-relay","owner":"hookactions","description":"GraphQL Relay support for gqlgen. Moved to GitLab.","archived":true,"fork":false,"pushed_at":"2019-08-17T16:09:26.000Z","size":11,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-14T13:37:18.685Z","etag":null,"topics":["gqlgen","graphql"],"latest_commit_sha":null,"homepage":"https://gitlab.com/hookactions/gqlgen-relay","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/hookactions.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":"2019-08-03T08:35:45.000Z","updated_at":"2023-01-28T17:27:44.000Z","dependencies_parsed_at":"2022-08-29T13:30:58.714Z","dependency_job_id":null,"html_url":"https://github.com/hookactions/gqlgen-relay","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hookactions%2Fgqlgen-relay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hookactions%2Fgqlgen-relay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hookactions%2Fgqlgen-relay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hookactions%2Fgqlgen-relay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hookactions","download_url":"https://codeload.github.com/hookactions/gqlgen-relay/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252926758,"owners_count":21826361,"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":["gqlgen","graphql"],"created_at":"2024-08-03T01:01:49.529Z","updated_at":"2025-05-07T17:32:38.576Z","avatar_url":"https://github.com/hookactions.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# gqlgen-relay\nGraphQL Relay support for gqlgen\n\n## Usage\n1. Add relay\n```bash\ngo get -u github.com/hookactions/gqlgen-relay\n```\n\n2. Add to code\n\n2a. Go code\n```go\n//go:generate sh -c \"go run github.com/hookactions/gqlgen-relay -pkg model -name User -type *User -cursor \u003e user_relay.go\"\npackage model\n\ntype User struct {\n\tFirstName string \n    LastName string\n}\n```\n\n2b. schema.graphql\n\n```graphql\ninterface Node {\n    id: ID!\n}\n\ntype PageInfo {\n    hasNextPage: Boolean!\n    hasPreviousPage: Boolean!\n    startCursor: String\n    endCursor: String\n}\n\ntype User {\n    firstName: String!\n    lastName: String!\n}\n\ntype UserEdge {\n    node: User\n    cursor: String\n}\n\ntype UserConnection {\n    edges: [UserEdge]\n    pageInfo: PageInfo!\n    totalCount: Int\n}\n```\n\n2c. gqlgen.yaml\n\n```yaml\n...\nmodels:\n  # existing config\n  # ...\n  # New\n  PageInfo:\n    model: github.com/hookactions/gqlgen-relay/relay.PageInfo\n  Node:\n    model: github.com/hookactions/gqlgen-relay/relay.Node\n  User:\n    model: github.com/your/package/model.User\n  UserEdge:\n    model: github.com/your/package/model.UserEdge\n  UserConnection:\n    model: github.com/your/package/model.UserConnection\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhookactions%2Fgqlgen-relay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhookactions%2Fgqlgen-relay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhookactions%2Fgqlgen-relay/lists"}