{"_id":"@autotelic/mercurius-postgraphile","_rev":"1-cc2c30d0883059d0af0d6ec00c2935d3","name":"@autotelic/mercurius-postgraphile","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@autotelic/mercurius-postgraphile","version":"0.1.0","description":"Plugin for fastify","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap --100 -j1 -R classic","example":"echo no example provided","lint":"standard","fix":"npm run lint -- --fix","validate":"npm run lint && npm run test"},"repository":{"type":"git","url":"git+https://github.com/autotelic/mercurius-postgraphile.git"},"keywords":["graphql","mercurius","fastify","postgraphile","plugin"],"author":{"name":"Autotelic Development Ltd","email":"info@autotelic.com"},"license":"MIT","bugs":{"url":"https://github.com/autotelic/mercurius-postgraphile/issues"},"homepage":"https://github.com/autotelic/mercurius-postgraphile#readme","dependencies":{"@graphql-tools/stitch":"^7.5.3","fastify-plugin":"^3.0.0","postgraphile":"^4.12.3"},"devDependencies":{"tap":"^15.0.6","fastify":"^3.0.0","fastify-cli":"^2.5.1","mercurius":"^7.9.1","pg":"^8.6.0","standard":"^16.0.3","lint-staged":"^10.2.11"},"lint-staged":{"*.{js,jsx}":["npm run fix"]},"gitHead":"470e340249cbc72aff3de6d9330389e38ccd0f13","_id":"@autotelic/mercurius-postgraphile@0.1.0","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-R/T/uAs0CIQ4knXx2a8A8MZZ7j/404YUUMur053SBjd/Lcd9WfTjl36vcv0mwhBaJ5ON8KFB6NRMFX9OfMpkVA==","shasum":"a6453f8224ba7fa5a5b640155c7fb2fabf81d6b7","tarball":"https://registry.npmjs.org/@autotelic/mercurius-postgraphile/-/mercurius-postgraphile-0.1.0.tgz","fileCount":4,"unpackedSize":6706,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7Nx5CRA9TVsSAnZWagAANpwQAIC5TYD77r4PcLhNbSCL\nJJOURQ8uE9GNTdrE9/8t/Z5gpxnCjn9WquJSIN7NS80wD//jMSl7hMXm0XgN\ns07utrMK0CYjWOPpllVzvOdkAIAw73cbDpST7RxbxfCEIz6X8+aPV4lQxmnE\nrq00Sq8mUV2x74WfYmzelv1zu9ePOADERxicpciqOxjsBZynJPebRUm+33Su\nBnYDbNtEUrwoDqnYMi61KcliPUt4oNAitnPSBlFmFpUxD1P1FF/Lkh2mKoEQ\nySK9wOji/OVoYp3E73pCqpi5pFkFx4splge9eKwRL5yWmYtMHI61tkvmlvlo\n7KVlMVl5jXuJngND/rio32WCumwGv4OnMPjg7mk+jdWTqNxq+hHeD7MXebk3\n06YaaFcl4WfOtDzFwpv6Jok4eknZssu2mducytyGcay4pwEcSEUNzdrJq7v7\nudTb+IPfs7vllaGvFcEo8V2aOMa0lQGHzw0c39nK86z8Oixf1kOebn/j+2MB\nKOmGShh+TB/8xuj4TGAYFSmxxuIjfEpzpgQV0OhOVKeMyaZ+EjBpE8MtOtIa\ntdDMIJ+XL/03mUXc9tv9o1JK+8Vl+7TrifSu/ciuF/cZeiYtJ9nPjbmUADor\nXNHo3KDxYTl6SPtrANfyu8u3lXahdg3lasEfvScn/13D6oSysb9oOI4WfVv6\n09oU\r\n=hX+a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDaFV6gd2l4I253+ailffTE6t8LeovnqQoG4DdOT9e6rAiAJNC0f5Mw2IhklMjhBw54zkrpsqsSao7pl9MN3D+jEcg=="}]},"_npmUser":{"name":"autotelic","email":"info+npm@autotelic.com"},"maintainers":[{"name":"autotelic","email":"info+npm@autotelic.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mercurius-postgraphile_0.1.0_1626135673361_0.9279454062431509"},"_hasShrinkwrap":false}},"time":{"created":"2021-07-13T00:21:13.320Z","0.1.0":"2021-07-13T00:21:13.535Z","modified":"2022-04-04T16:40:50.170Z"},"maintainers":[{"name":"autotelic","email":"info+npm@autotelic.com"}],"description":"Plugin for fastify","homepage":"https://github.com/autotelic/mercurius-postgraphile#readme","keywords":["graphql","mercurius","fastify","postgraphile","plugin"],"repository":{"type":"git","url":"git+https://github.com/autotelic/mercurius-postgraphile.git"},"author":{"name":"Autotelic Development Ltd","email":"info@autotelic.com"},"bugs":{"url":"https://github.com/autotelic/mercurius-postgraphile/issues"},"license":"MIT","readme":"# Mercurius PostGraphile\n\n> A [Fastify](https://www.fastify.io/docs/latest/) plugin for integrating [PostGraphile](https://www.graphile.org/postgraphile/) schemas with [Mercurius](https://mercurius.dev/)\n\n## Contents\n\n- [Usage](#usage)\n- [API](#api)\n- [Example](#example)\n\n## Usage\n\n```sh\nnpm i @autotelic/mercurius-postgraphile\n```\n\n```js\nconst mercuriusPostGraphile = require('@autotelic/mercurius-postgraphile')\nconst { Pool } = require('pg')\nconst connectionString = process.env.DATABASE_URL\nconst pgPool = new Pool({ connectionString })\n\nmodule.exports = async function (fastify, options) {\n  fastify.register(mercuriusPostGraphile, {\n    connectionString,\n    pgPool\n  })\n}\n```\n\n## API\n\n### `Options`\n\n| Name | Status | Type | Default | Description |\n| ------- | :---: | :---: | :---: | --- |\n| `connectionString` | **Required** | String | - | A postgreSQL database connection string, i.e. `postgres://postgres:password@0.0.0.0:5432/postgres?sslmode=disable`. |\n| `pgPool` | **Required** | Object | - | A client or pool instance that will be passed to the [pg](https://node-postgres.com/) library and used to connect to a PostgreSQL backend. |\n| `instanceName` | Optional | String | `public` | A string which specifies the PostgreSQL schema that PostGraphile will use to create a GraphQL schema. |\n| `localStitchOpts` | Optional | Object | `{}` | An object containing local subschema config options. |\n| `postGraphileStitchOpts` | Optional | Object | `{}` | An object containing PostGraphile subschema config options. `stitchOpts` for both the local and PostGraphile schemas implement the `SubschemaConfig` interface. [Documention can be found here](https://www.graphql-tools.com/docs/stitch-combining-schemas#subschema-configs) |\n| `postGraphileContextOpts` | Optional | Object/Function | `{}` | An object or callback function containing `withPostGraphileContext` options, outlined [here](https://www.graphile.org/postgraphile/usage-schema/#api-withpostgraphilecontextoptions-callback) |\n| `postGraphileSchemaOpts` | Optional | Object | `{}` | An object containing `createPostGraphileSchema` options, outlined [here](https://www.graphile.org/postgraphile/usage-schema/#api-createpostgraphileschemapgconfig-schemaname-options) |\n\n## Example\n\n```sh\nnpm i\ndocker-compose up -d\nnpm run test\n```\n","readmeFilename":"README.md"}