{"_id":"@brooklyn-labs/postgraphile-plugin-remove-foreign-key-fields","_rev":"6-19a67580b7db2cbedeeec33f1f3d4f89","name":"@brooklyn-labs/postgraphile-plugin-remove-foreign-key-fields","description":"PostGraphile plugin that removes all foreign key fields from the GraphQL schema while still allowing foreign relationships to be created. Primary key fields are not removed from the GraphQL schema.","dist-tags":{"latest":"1.3.2"},"versions":{"1.3.1":{"name":"@brooklyn-labs/postgraphile-plugin-remove-foreign-key-fields","version":"1.3.1","keywords":["graphile","postgraphile","plugin","foreign-key","remove","graphql","pg"],"author":{"name":"Brooklyn Labs"},"license":"MIT","_id":"@brooklyn-labs/postgraphile-plugin-remove-foreign-key-fields@1.3.1","maintainers":[{"name":"andrisak","email":"andrisak@gmail.com"},{"name":"johnciprian","email":"brooklynlabs@icloud.com"}],"homepage":"https://github.com/brooklyn-labs/postgraphile-plugin-remove-foreign-key-fields#readme","bugs":{"url":"https://github.com/brooklyn-labs/postgraphile-plugin-remove-foreign-key-fields/issues"},"dist":{"shasum":"f47a715e32a4125f7be05963a22e271de0fccd99","tarball":"https://registry.npmjs.org/@brooklyn-labs/postgraphile-plugin-remove-foreign-key-fields/-/postgraphile-plugin-remove-foreign-key-fields-1.3.1.tgz","fileCount":4,"integrity":"sha512-LaDbjSF5zrDw6i2mY/adOu0j+7VjzJ7ZPmbqrpv5FW69LEjg7YVAxRPANql0ZdPiuo2ofu4gHXDf/rEGaK9cug==","signatures":[{"sig":"MEUCIETAnSMmY9cRcOIvvKfcTfh9f8Alk9zpSvp66dfQ3BnnAiEA6qKpESsenhyLpbvilZBzUQq4DTa9MGpvP80rL96KddM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9283,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5kzuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrV7xAAj7/EPR/4GZdHnmo/5v19Tlritt+nlz+aU/TqklKB2w8bWSNa\r\nteLq3RQLwAalDdTV70zhIirXlrgr7VH+nCK7Ncnn6hH5eVqESIOhZs4iEXPf\r\nQSofIWjp/vrdEe7DafpCpWDaR2AJnuqixbWlxi4TGbAKs5u/JqlIpcPrJFFF\r\nDOQktcMPJWGr3oDwHSt5pqbJ2HahX0pefE2AmIhp98na1eABWiKVy3W7UGxV\r\nG1OJKD7RPmWX5V41gm0A1DVUGkX4Pog/wGehWAednxQSCHEr3hoWZM+0uwsa\r\n2r+ZYk7THffgr9hIHtK99VQnmOSF9OAAQ3t9EL7ZWqbGi9F+K27JylH4uFB7\r\nMjyH9xInzT7QhH8LFVLHX+QWhZnKHvJCvmsKuQ//O6lYnrBrdex+pu/SEpF+\r\ngbwmmvzx5SCY8+MGBetdtBr2JVNPA8YkpVMAmdScw1g+CvgZH/bm7mGDCuUV\r\ni1KetZFEpNBwmYFiYwT61+rMyVVbN+o6Sq1bPNK0/qZArqvNcJ7827e8AVDQ\r\n6Blm5GMMgYhMn9tGZCrgRuWNBLPv+C7J/hkKtd1oYZOq64NRbYJFteUWFYHt\r\n+jB9uP2sWR9xQR4SenNKc6fdrp1lE91e1D5SHNQtfDEkriI5P7wEFwxZYXGg\r\nb0akiTgWG86EiGIRyxT45TBzgkW6dOEbsuE=\r\n=0cqK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=10"},"gitHead":"2d4fe448f4458e00f36f04cff0580529473a822a","scripts":{"lint":"eslint src --ext .ts","build":"tsc --declaration"},"_npmUser":{"name":"johnciprian","email":"brooklynlabs@icloud.com"},"repository":{"url":"git+https://github.com/brooklyn-labs/postgraphile-plugin-remove-foreign-key-fields.git","type":"git"},"_npmVersion":"8.19.3","description":"PostGraphile plugin that removes all foreign key fields from the GraphQL schema while still allowing foreign relationships to be created. Primary key fields are not removed from the GraphQL schema.","directories":{},"_nodeVersion":"16.19.0","dependencies":{"lodash":"^4.17.20"},"_hasShrinkwrap":false,"devDependencies":{"pg":"^8.5.1","jest":"^26.6.3","eslint":"^7.10.0","graphql":"^14.0.0","ts-jest":"^26.4.4","prettier":"^2.2.1","jest-junit":"^12.0.0","typescript":"^4.1.3","@types/jest":"^26.0.19","postgraphile":"^4.10.0","@types/lodash":"^4.14.165","graphile-build-pg":"^4.10.0","eslint-plugin-jest":"~24.1.3","eslint-plugin-jsdoc":"^30.5.2","eslint-plugin-import":"^2.22.0","eslint-config-prettier":"^7.0.0","@typescript-eslint/parser":"^4.2.0","@typescript-eslint/eslint-plugin":"^4.2.0"},"_npmOperationalInternal":{"tmp":"tmp/postgraphile-plugin-remove-foreign-key-fields_1.3.1_1676037358227_0.18615435163027416","host":"s3://npm-registry-packages"}},"1.3.2":{"name":"@brooklyn-labs/postgraphile-plugin-remove-foreign-key-fields","version":"1.3.2","keywords":["graphile","postgraphile","plugin","foreign-key","remove","graphql","pg"],"author":{"name":"Brooklyn Labs"},"license":"MIT","_id":"@brooklyn-labs/postgraphile-plugin-remove-foreign-key-fields@1.3.2","maintainers":[{"name":"jkbjnsn","email":"jkbjnsn@outlook.com"},{"name":"andrisak","email":"andrisak@gmail.com"},{"name":"johnciprian","email":"brooklynlabs@icloud.com"}],"homepage":"https://github.com/brooklyn-labs/postgraphile-plugin-remove-foreign-key-fields#readme","bugs":{"url":"https://github.com/brooklyn-labs/postgraphile-plugin-remove-foreign-key-fields/issues"},"dist":{"shasum":"0bacce62f240309dee7a95442b2ee72b1405632e","tarball":"https://registry.npmjs.org/@brooklyn-labs/postgraphile-plugin-remove-foreign-key-fields/-/postgraphile-plugin-remove-foreign-key-fields-1.3.2.tgz","fileCount":4,"integrity":"sha512-q1E7j5RODyMnmQB5q4ub/jvbuEq3HSHfKdB3f6RmNQe3w154z5Z989KtI91demGc8bAcRUdl8IdlxRvVGs9bnQ==","signatures":[{"sig":"MEUCIQDXUK6LpIwN56JsaryelRg4gRWXGji2atAzYFUSP9xP0gIgXS6RI5DzNggdws+0XprCLC+l0/i2NOPEGnVsbO56jcI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9137,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5mmaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoPNQ/+Nm3p0m+G5NEDs3JlbjPqJti6BTBqe7NhuPS2S/TSWtKLtIuv\r\nvTR8mu46IakyHtw7Z5gLUwMlL/p+2lfELM9lbWGU80/U4XBkBfddOIiEOnqx\r\n0DO305OEmPR+PqN6yd+sw6tWObj773sRjFkwREwHPnYefYgHrwMW6F4PCEsr\r\na0p1Z0AmTwPRmZkr3X1KVa3xCyWB022iRqLk1ONTV4uwDB/N0BLw4Iwwj5zw\r\nSSveNQe8ZeGlOWXfjzKSbi4YrIsOT0clACh8cTtiZi9DEA3OtizNtcPalve/\r\nZDxQjl/2Jt5qk6VkQlVGIZQcZCIgbfFjOXxYI5xlwDmVd3aYIWxjGYKMU69t\r\nwOb0Sj78SxP4PMwBG8kJtDzrVk3ncCG6Nnyrj98sKQvjH9xS1LWfFaxCEUqr\r\nuzcPP2jSpEEwuTt0LrQRPWfo04S/XZhQhEZMc2cloNBW3XLHqltnn/8Ra+dg\r\noojBzTVnFrTcrHNYas1AhAG9zTUBxcEcglJlxEy8Q3OF4NZ4xx6tg08nyS8o\r\nKKgYtBdELpsA+QeJFC6wL72C7jpFFv1V1V4VA/XmGI/ZXxd8EAYtumY5Ou3H\r\nDNpF9n3Zb2YgZDD76Ds/KI13iYjSqWpIk5yPgBkAzwYR5rJOV9q9DFmFR+Nw\r\ni8+jig5cJ4SqevUFm7nyZFqXKFnITp0iws4=\r\n=pt5h\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=10"},"gitHead":"855eef9a949811b2caee69c065d14b46773334fb","scripts":{"lint":"eslint src --ext .ts","build":"tsc --declaration"},"_npmUser":{"name":"johnciprian","email":"brooklynlabs@icloud.com"},"repository":{"url":"git+https://github.com/brooklyn-labs/postgraphile-plugin-remove-foreign-key-fields.git","type":"git"},"_npmVersion":"8.19.3","description":"PostGraphile plugin that removes all foreign key fields from the GraphQL schema while still allowing foreign relationships to be created. Primary key fields are not removed from the GraphQL schema.","directories":{},"_nodeVersion":"16.19.0","dependencies":{"lodash":"^4.17.20"},"_hasShrinkwrap":false,"devDependencies":{"pg":"^8.5.1","jest":"^26.6.3","eslint":"^7.10.0","graphql":"^14.0.0","ts-jest":"^26.4.4","prettier":"^2.2.1","jest-junit":"^12.0.0","typescript":"^4.1.3","@types/jest":"^26.0.19","postgraphile":"^4.10.0","@types/lodash":"^4.14.165","graphile-build-pg":"^4.10.0","eslint-plugin-jest":"~24.1.3","eslint-plugin-jsdoc":"^30.5.2","eslint-plugin-import":"^2.22.0","eslint-config-prettier":"^7.0.0","@typescript-eslint/parser":"^4.2.0","@typescript-eslint/eslint-plugin":"^4.2.0"},"_npmOperationalInternal":{"tmp":"tmp/postgraphile-plugin-remove-foreign-key-fields_1.3.2_1676044697813_0.3308348392997309","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-02-10T13:55:58.155Z","modified":"2024-06-19T18:19:52.761Z","1.3.0":"2023-02-08T20:32:30.700Z","1.3.1":"2023-02-10T13:55:58.390Z","1.3.2":"2023-02-10T15:58:17.976Z"},"maintainers":[{"email":"jkbjnsn@outlook.com","name":"jkbjnsn"},{"email":"andrisak@gmail.com","name":"andrisak"}],"author":{"name":"Brooklyn Labs"},"repository":{"url":"git+https://github.com/brooklyn-labs/postgraphile-plugin-remove-foreign-key-fields.git","type":"git"},"keywords":["graphile","postgraphile","plugin","foreign-key","remove","graphql","pg"],"license":"MIT","homepage":"https://github.com/brooklyn-labs/postgraphile-plugin-remove-foreign-key-fields#readme","bugs":{"url":"https://github.com/brooklyn-labs/postgraphile-plugin-remove-foreign-key-fields/issues"},"readme":"# postgraphile-plugin-remove-foreign-key-fields\n\n[![GitHub Workflow Status (with branch)](https://img.shields.io/github/actions/workflow/status/brooklyn-labs/postgraphile-plugin-remove-foreign-key-fields/node.js.yml?branch=main&label=Build)](https://github.com/brooklyn-labs/postgraphile-plugin-remove-foreign-key-fields/actions/workflows/node.js.yml)\n[![npm (scoped)](https://img.shields.io/npm/v/@brooklyn-labs/postgraphile-plugin-remove-foreign-key-fields?label=NPM)](https://www.npmjs.com/package/@brooklyn-labs/postgraphile-plugin-remove-foreign-key-fields)\n[![License](https://img.shields.io/github/license/brooklyn-labs/postgraphile-plugin-remove-foreign-key-fields?label=License)](https://github.com/brooklyn-labs/postgraphile-plugin-remove-foreign-key-fields/blob/main/LICENSE)\n\n## Motivation\n\nThis PostGraphile plugin removes all foreign key fields from the GraphQL schema while still allowing foreign relationships to be created. Primary key fields (which may also be used as a foreign key) are not removed from the GraphQL schema.\n\nExample\n\n```graphql\ntype Person {\n  id\n  firstName\n  lastName\n  addressId\n  address {\n    id\n    street\n    city\n    state\n    postalCode\n  }\n}\n```\n\nThis extension will remove `addressId` from the `Person` type in an effort to simplify the schema.\n\n```graphql\ntype Person {\n  id\n  firstName\n  lastName\n  address {\n    id\n    street\n    city\n    state\n    postalCode\n  }\n}\n```\n\nYou can still get the address id through the `Address` type.\n\n`Person->address->id`.\n\n## Getting Started\n\nInstall npm package.\n\n```shell\nnpm install postgraphile-plugin-remove-foreign-key-fields\n```\n\nAdd plugin to postgraphile.\n\n```js\nimport express from \"express\";\nimport { postgraphile } from \"postgraphile\";\nimport { RemoveForeignKeyFieldsPlugin } from \"postgraphile-plugin-remove-foreign-key-fields\";\n\nconst app = express();\n\n// Add PostGraphile middleware.\napp.use(\n  postgraphile(`postgres://username:password@localhost:5432/postgres`, {\n    appendPlugins: [RemoveForeignKeyFieldsPlugin],\n  }),\n);\n\n// Start up server.\napp.listen(3000, \"localhost\", 511, () => {\n  logger.info(`🚀 Server listening at http://localhost:3000`);\n});\n```\n","readmeFilename":"README.md"}