{"id":22917503,"url":"https://github.com/graphile-contrib/graphql-sse","last_synced_at":"2025-07-16T03:39:14.871Z","repository":{"id":57682371,"uuid":"434517509","full_name":"graphile-contrib/graphql-sse","owner":"graphile-contrib","description":"PostGraphile support for GraphQL over Server-Sent Events (SSE) powered by graphql-sse","archived":false,"fork":false,"pushed_at":"2022-04-15T09:11:41.000Z","size":875,"stargazers_count":15,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-16T15:19:02.334Z","etag":null,"topics":["graphile","graphql","postgraphile","realtime","server-sent-events","sse","subscriptions"],"latest_commit_sha":null,"homepage":"https://npm.im/@graphile-contrib/graphql-sse","language":"TypeScript","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/graphile-contrib.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":"2021-12-03T08:16:49.000Z","updated_at":"2024-12-19T09:55:39.000Z","dependencies_parsed_at":"2022-09-10T14:41:07.178Z","dependency_job_id":null,"html_url":"https://github.com/graphile-contrib/graphql-sse","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/graphile-contrib/graphql-sse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphile-contrib%2Fgraphql-sse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphile-contrib%2Fgraphql-sse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphile-contrib%2Fgraphql-sse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphile-contrib%2Fgraphql-sse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphile-contrib","download_url":"https://codeload.github.com/graphile-contrib/graphql-sse/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphile-contrib%2Fgraphql-sse/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265479705,"owners_count":23773595,"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":["graphile","graphql","postgraphile","realtime","server-sent-events","sse","subscriptions"],"created_at":"2024-12-14T06:18:22.638Z","updated_at":"2025-07-16T03:39:14.809Z","avatar_url":"https://github.com/graphile-contrib.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @graphile-contrib/graphql-sse\n\nPostGraphile support for [GraphQL over Server-Sent Events (SSE)](https://github.com/enisdenjo/graphql-sse/blob/master/PROTOCOL.md) powered by [graphql-sse](https://github.com/enisdenjo/graphql-sse).\n\n- Doesn't mess with the schema update stream on `eventSourceRoute`, both can exist on the same route\n- `PUT` and `DELETE` methods are allowed through CORS on the `eventSourceRoute` in order to support the [\"single connection mode\"](https://github.com/enisdenjo/graphql-sse/blob/master/PROTOCOL.md#single-connection-mode)\n- The client can use the `X-GraphQL-Event-Stream` header for SSE endpoint discovery\n\n## Getting started\n\n### Install\n\n```bash\nnpm install --save graphql-sse @graphile-contrib/graphql-sse\n```\n\nor\n\n```bash\nyarn add graphql-sse @graphile-contrib/graphql-sse\n```\n\n### Integrate the plugin\n\n#### PostGraphile CLI\n\n```bash\npostgraphile \\\n  --plugins @graphile/graphql-sse \\\n  ...\n```\n\n#### PostGraphile library\n\n```ts\nimport { postgraphile, makePluginHook } from 'postgraphile';\nimport GraphQLSSEPlugin from '@graphile-contrib/graphql-sse';\n\nconst postGraphileMiddleware = postgraphile(databaseUrl, 'app_public', {\n  pluginHook: makePluginHook([GraphQLSSEPlugin]),\n  eventStreamRoute: '/graphql/stream', // default\n});\n```\n\n### Use the client\n\nConnect to the specified `PostGraphileOptions.eventStreamRoute`.\n\nFor further usage inspiration, please consult the [`graphql-sse` readme](https://github.com/enisdenjo/graphql-sse#readme).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphile-contrib%2Fgraphql-sse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphile-contrib%2Fgraphql-sse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphile-contrib%2Fgraphql-sse/lists"}