{"id":20253553,"url":"https://github.com/graphile/postgraphile-apollo-server","last_synced_at":"2025-04-10T23:43:22.060Z","repository":{"id":71111085,"uuid":"156561214","full_name":"graphile/postgraphile-apollo-server","owner":"graphile","description":null,"archived":false,"fork":false,"pushed_at":"2020-06-22T20:16:23.000Z","size":6,"stargazers_count":41,"open_issues_count":4,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-10T23:43:15.185Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/graphile.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-11-07T14:46:33.000Z","updated_at":"2024-10-08T06:06:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"a7682b4e-4fc4-4bce-b4fa-eb3098f6d5d7","html_url":"https://github.com/graphile/postgraphile-apollo-server","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphile%2Fpostgraphile-apollo-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphile%2Fpostgraphile-apollo-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphile%2Fpostgraphile-apollo-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphile%2Fpostgraphile-apollo-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphile","download_url":"https://codeload.github.com/graphile/postgraphile-apollo-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248317726,"owners_count":21083527,"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":[],"created_at":"2024-11-14T10:25:39.595Z","updated_at":"2025-04-10T23:43:22.036Z","avatar_url":"https://github.com/graphile.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# postgraphile-apollo-server\n\nThis module performs some of the boilerplate for using PostGraphile with Apollo\nServer.\n\n## Usage\n\n```js\nconst pg = require(\"pg\");\nconst { ApolloServer } = require(\"apollo-server\");\nconst { makeSchemaAndPlugin } = require(\"postgraphile-apollo-server\");\n\nconst pgPool = new pg.Pool({\n  connectionString: process.env.DATABASE_URL\n});\n\nasync function main() {\n  const { schema, plugin } = await makeSchemaAndPlugin(\n    pgPool,\n    'public', // PostgreSQL schema to use\n    {\n      // PostGraphile options, see:\n      // https://www.graphile.org/postgraphile/usage-library/\n    }\n  );\n\n  const server = new ApolloServer({\n    schema,\n    plugins: [plugin]\n  });\n\n  const { url } = await server.listen();\n  console.log(`🚀 Server ready at ${url}`);\n}\n\nmain().catch(e =\u003e {\n  console.error(e);\n  process.exit(1);\n});\n```\n\n## Limitations\n\nNot all PostGraphile library options are supported at this time; for example\n`watchPg` is not.\n\n## Example\n\nhttps://github.com/graphile/postgraphile-example-apollo-server\n\n## Changelog\n\n- v0.1.0 - initial release\n- v0.1.1 - fix headers after Apollo Server breaking change (thanks @miguelocarvajal)\n\n## TODO:\n\n- [ ] Improve this README!\n- [ ] Compile a list of the unsupported PostGraphile library options\n- [ ] Don't require a `pgPool` to be passed - allow a connection string instead\n- [ ] Add tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphile%2Fpostgraphile-apollo-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphile%2Fpostgraphile-apollo-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphile%2Fpostgraphile-apollo-server/lists"}