{"id":22314523,"url":"https://github.com/desuuuu/gqlgenws","last_synced_at":"2025-03-26T02:46:26.027Z","repository":{"id":119743108,"uuid":"512024748","full_name":"Desuuuu/gqlgenws","owner":"Desuuuu","description":"WebSocket transports for gqlgen","archived":false,"fork":false,"pushed_at":"2022-11-02T17:02:56.000Z","size":35,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-31T00:19:13.254Z","etag":null,"topics":["go","golang","gqlgen","graphql-ws","subscriptions-transport-ws","transport","websocket"],"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/Desuuuu.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-08T20:57:41.000Z","updated_at":"2022-11-02T17:04:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"d06dadf4-2884-4e50-925e-f151909b8eea","html_url":"https://github.com/Desuuuu/gqlgenws","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Desuuuu%2Fgqlgenws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Desuuuu%2Fgqlgenws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Desuuuu%2Fgqlgenws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Desuuuu%2Fgqlgenws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Desuuuu","download_url":"https://codeload.github.com/Desuuuu/gqlgenws/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245579581,"owners_count":20638676,"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","golang","gqlgen","graphql-ws","subscriptions-transport-ws","transport","websocket"],"created_at":"2024-12-03T22:10:17.866Z","updated_at":"2025-03-26T02:46:26.008Z","avatar_url":"https://github.com/Desuuuu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gqlgenws\n\n[![Go Doc Badge]][Go Doc] [![Go Report Card Badge]][Go Report Card]\n\nWebSocket transports for [gqlgen](https://github.com/99designs/gqlgen).\n\nProvided protocol implementations follow their respective specification as\nclosely as possible.\n\n## Protocols\n\n* [graphql-ws](https://github.com/enisdenjo/graphql-ws) in the `graphqlws` package.\n* [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) in the `transportws` package.\n\n## Usage\n\n```go\nsrv := handler.New(executableSchema)\n\ninitFunc := func(r *http.Request, p wsutil.ObjectPayload) (context.Context, wsutil.ObjectPayload, error) {\n    ctx := r.Context()\n    // ...\n    return ctx, nil, nil\n}\n\np1 := \u0026graphqlws.Protocol{\n    InitFunc: initFunc,\n    PingInterval: 25 * time.Second,\n}\n\np2 := \u0026transportws.Protocol{\n    InitFunc: initFunc,\n    KeepAliveInterval: 25 * time.Second,\n}\n\n// Use the protocol directly as a transport.\nsrv.AddTransport(p1)\nsrv.AddTransport(p2)\n\n// OR\n\n// Use with Negotiator to do protocol negotiation.\nsrv.AddTransport(wstransport.NewNegotiator(p1, p2))\n```\n\n[Go Doc]: https://pkg.go.dev/github.com/Desuuuu/gqlgenws\n[Go Doc Badge]: https://pkg.go.dev/badge/github.com/Desuuuu/gqlgenws.svg\n[Go Report Card]: https://goreportcard.com/report/github.com/Desuuuu/gqlgenws\n[Go Report Card Badge]: https://goreportcard.com/badge/github.com/Desuuuu/gqlgenws\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesuuuu%2Fgqlgenws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdesuuuu%2Fgqlgenws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesuuuu%2Fgqlgenws/lists"}