{"id":37179249,"url":"https://github.com/bitquery/wsgraphql","last_synced_at":"2026-01-14T20:52:09.009Z","repository":{"id":59045798,"uuid":"531006411","full_name":"bitquery/wsgraphql","owner":"bitquery","description":"graphql-go over websockets using graphql-[transport-]ws protocols","archived":false,"fork":true,"pushed_at":"2022-09-08T14:22:14.000Z","size":99,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-20T11:49:06.972Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://gitlab.eientei.org/eientei/wsgraphql","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"eientei/wsgraphql","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitquery.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-08-31T08:57:54.000Z","updated_at":"2024-06-20T11:49:06.972Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bitquery/wsgraphql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bitquery/wsgraphql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitquery%2Fwsgraphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitquery%2Fwsgraphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitquery%2Fwsgraphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitquery%2Fwsgraphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitquery","download_url":"https://codeload.github.com/bitquery/wsgraphql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitquery%2Fwsgraphql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-14T20:52:07.263Z","updated_at":"2026-01-14T20:52:08.999Z","avatar_url":"https://github.com/bitquery.png","language":"Go","readme":"[![Go Doc Reference](https://godoc.org/github.com/bitquery/wsgraphql/v1?status.svg)](https://godoc.org/github.com/bitquery/wsgraphql/v1)\n[![Go Report Card](https://goreportcard.com/badge/github.com/bitquery/wsgraphql)](https://goreportcard.com/report/github.com/bitquery/wsgraphql)\n[![Maintainability](https://api.codeclimate.com/v1/badges/c626b5f2399b044bdebf/maintainability)](https://codeclimate.com/github/bitquery/wsgraphql)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/c626b5f2399b044bdebf/test_coverage)](https://codeclimate.com/github/bitquery/wsgraphql)\n\nAn implementation of websocket transport for\n[graphql-go](https://github.com/graphql-go/graphql).\n\nCurrently following flavors are supported:\n\n- `graphql-ws` subprotocol, older spec: https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md\n- `graphql-transport-ws` subprotocol, newer spec: https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md\n\nInspired by [graphqlws](https://github.com/functionalfoundry/graphqlws)\n\nKey features:\n\n- Subscription support\n- Callbacks at every stage of communication process for easy customization \n- Supports both websockets and plain http queries, with http chunked response for plain http subscriptions\n- [Mutable context](https://godoc.org/github.com/bitquery/wsgraphql/v1/mutable) allowing to keep request-scoped \n  connection/authentication data and operation-scoped state\n\nUsage\n-----\n\nAssuming [gorilla websocket](https://github.com/gorilla/websocket) upgrader\n\n```go\nimport (\n\t\"net/http\"\n\n\t\"github.com/bitquery/wsgraphql/v1\"\n\t\"github.com/bitquery/wsgraphql/v1/compat/gorillaws\"\n\t\"github.com/gorilla/websocket\"\n\t\"github.com/graphql-go/graphql\"\n)\n```\n\n```go\nschema, err := graphql.NewSchema(...)\nif err != nil {\n\tpanic(err)\n}\n\nsrv, err := wsgraphql.NewServer(\n\tschema,\n\twsgraphql.WithUpgrader(gorillaws.Wrap(\u0026websocket.Upgrader{\n\t\tSubprotocols: []string{\n\t\t\twsgraphql.WebsocketSubprotocolGraphqlWS.String(),\n\t\t\twsgraphql.WebsocketSubprotocolGraphqlTransportWS.String(),\n\t\t},\n\t})),\n)\nif err != nil {\n\tpanic(err)\n}\n\nhttp.Handle(\"/query\", srv)\n\nerr = http.ListenAndServe(\":8080\", nil)\nif err != nil {\n\tpanic(err)\n}\n```\n\nExamples\n--------\n\nSee [/v1/examples](/v1/examples)\n- [minimal-graphql-ws](/v1/examples/minimal-graphql-ws) `graphql-ws` / older subscriptions-transport-ws server setup\n- [minimal-graphql-transport-ws](/v1/examples/minimal-graphql-transport-ws) `graphql-transport-ws` / newer graphql-ws server setup\n- [simpleserver](/v1/examples/simpleserver) complete example with subscriptions, mutations and queries\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitquery%2Fwsgraphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitquery%2Fwsgraphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitquery%2Fwsgraphql/lists"}