{"_id":"@alkindix/nestjs-graphql-utils","_rev":"2-c3539442fbec0f3b0710452c975bd57d","name":"@alkindix/nestjs-graphql-utils","dist-tags":{"latest":"1.6.6"},"versions":{"1.6.4":{"name":"@alkindix/nestjs-graphql-utils","version":"1.6.4","description":"NestJS utilities and decorators built around @alkindix/graphql-utils.","main":"dist/index.js","contributors":[{"name":"Dominik Berger","url":"https://doemuulive-56e78.web.app/"},{"name":"RaviAnand Mohabir","email":"moravrav@gmail.com","url":"https://ravianand.web.app"},{"name":"Mohammed Alkindi","email":"salkindi2009@gmail.com"}],"keywords":["typescript","graphql","graphql-utils","ast","nestjs"],"homepage":"https://jenyus-org.github.io/graphql-utils/","scripts":{"build":"tsc","prepare":"npm run build","test":"mocha -r ts-node/register src/**/*.test.ts"},"repository":{"type":"git","url":"git+https://github.com/Jenyus-Org/graphql-utils.git"},"license":"MIT","private":false,"types":"dist/index.d.ts","dependencies":{"@alkindix/graphql-utils":"^1.5.1","@nestjs/common":"^8.4.5","@nestjs/core":"^8.4.5","@nestjs/graphql":"^10.0.18","express":"^4.18.1","rxjs":"^7.5.6","ts-morph":"^15.1.0"},"devDependencies":{"@nestjs/testing":"^8.4.5","@types/express":"^4.17.7","@types/chai":"^4.3.3","@types/mocha":"^9.1.1","chai":"^4.3.6","mocha":"^10.0.0","node-mocks-http":"^1.11.0","reflect-metadata":"^0.1.13","ts-node":"^10.9.1","typescript":"^4.7.4"},"gitHead":"32438667d3ae6f28758515a3a2f4709484edcff0","bugs":{"url":"https://github.com/Jenyus-Org/graphql-utils/issues"},"_id":"@alkindix/nestjs-graphql-utils@1.6.4","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-zk+Lx5+198iEuil7vjUXoYV/J0hD4qpu5393wVsjw4Srp2gS8TelgrW3IGZVvHFf2udIaJs4hZdxZNtOO358rA==","shasum":"9feed1574101b39e2beff2e701da29605cedde14","tarball":"https://registry.npmjs.org/@alkindix/nestjs-graphql-utils/-/nestjs-graphql-utils-1.6.4.tgz","fileCount":51,"unpackedSize":44572,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID+9xpoW0nyfTWEjdf/XhUUqiviVqwWZOsy+NKNdixRBAiBTV4/4jEF5qjJdfbMd2E78U8JCfsCNddukViaD1hM8gg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/KXAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpnEg//YFx8V+PLGlvc1fVh8Tv8Rfxj+QXfEaL9Qq3ZiA3qGQuFL7/J\r\n2Le3Ha76Y/Gyyi+TaYPE41MhsNURww/XyGn51UXaotT9+zqkvuglQCpt0f+b\r\nGclMxzmKV1MtGN64IcXKTPh0zYg/4UmQJwASmMXtm7qxTGMmbEDQFAlwT46T\r\ne6ORSpoblir/PFl87KOJdpGIA0MxvKNK8jUmulzdoD1o4qBwuWrVF0PGTvP8\r\ncX0FrXuu/tbNSApGhVt+uDF37DTf/7QHaTQDh+tZJvAOUdN2NML9l0huQyv7\r\niFWo+NR1jStuAHhQu1SDPvQLTh8ZDfWvoAXK4S/cOyU8RQIhPNz9QAg7X7Hl\r\n7J42M5lXdbe9w/uCpUZHWYVIppqa2e3/Ax4FZ4TDZkquBRamlZ0g9lAHSG0S\r\ne/vqXYaumvBjJ2nEvlJLS8c8TiNAJ8T5DoeVwgFP+daznkpbIQ8+khDALbgc\r\nctob93PFcOqnOv8IZfdlobsBognsFpx4lWm2BS/tW4een45lFY2Bd5Y2TUzU\r\njRJHr3JNl/eqjzST9XUHBUAjefTZAcgetJS0B7De8PimNc3xEbv5cxO/HIZM\r\nGxdSfcG9xTkFSgcoU/v9oQYZUzyzpRc9koB+gTjX1VXmhJ7dylzafKA+pmoE\r\nQ69RyE3dTRGusKXYxiGlu46rZdduoMzMj8M=\r\n=uMWS\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"alkindix","email":"salkindi2009@gmail.com"},"directories":{},"maintainers":[{"name":"alkindix","email":"salkindi2009@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-graphql-utils_1.6.4_1660724672705_0.4393031290648657"},"_hasShrinkwrap":false},"1.6.5":{"name":"@alkindix/nestjs-graphql-utils","version":"1.6.5","description":"NestJS utilities and decorators built around @alkindix/graphql-utils.","main":"dist/index.js","contributors":[{"name":"Dominik Berger","url":"https://doemuulive-56e78.web.app/"},{"name":"RaviAnand Mohabir","email":"moravrav@gmail.com","url":"https://ravianand.web.app"},{"name":"Mohammed Alkindi","email":"salkindi2009@gmail.com"}],"keywords":["typescript","graphql","graphql-utils","ast","nestjs"],"homepage":"https://jenyus-org.github.io/graphql-utils/","scripts":{"build":"tsc","prepare":"npm run build","test":"mocha -r ts-node/register src/**/*.test.ts"},"repository":{"type":"git","url":"git+https://github.com/Jenyus-Org/graphql-utils.git"},"license":"MIT","private":false,"types":"dist/index.d.ts","dependencies":{"@alkindix/graphql-utils":"^1.5.1","@nestjs/common":"^8.4.5","@nestjs/core":"^8.4.5","@nestjs/graphql":"^10.0.18","express":"^4.18.1","rxjs":"^7.5.6","ts-morph":"^15.1.0"},"devDependencies":{"@nestjs/testing":"^8.4.5","@types/express":"^4.17.7","@types/chai":"^4.3.3","@types/mocha":"^9.1.1","chai":"^4.3.6","mocha":"^10.0.0","node-mocks-http":"^1.11.0","reflect-metadata":"^0.1.13","ts-node":"^10.9.1","typescript":"^4.7.4"},"gitHead":"1c955644374039389ef5de7d96d55f4b8b747c62","bugs":{"url":"https://github.com/Jenyus-Org/graphql-utils/issues"},"_id":"@alkindix/nestjs-graphql-utils@1.6.5","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-vclBTMuGrO0kkV5jALuiTXtSOxS4WY/wcE1AJSIYxDc3mrIxi7WqJ9GKoD4VZVMye3QWEFneqJ2jycTTyQZvFw==","shasum":"4eb47bb07fc70bbcc07ad8be384e7f6fd2f205c6","tarball":"https://registry.npmjs.org/@alkindix/nestjs-graphql-utils/-/nestjs-graphql-utils-1.6.5.tgz","fileCount":51,"unpackedSize":44572,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEV9Dd6r5YzIIg4A+6FEJnC1Yr9yQ4wkT+RW91bKe+fSAiBwloAKTdoJrIM/K7sU95oXax7N/S9HNPBIPDoIFvmy+g=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/KXiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmobKRAAm8OZKPCAfAdm3xCDY1MSbp5tHZRkTyUPLtiFfBLF/zM7tmSQ\r\ny5ztre+SxeqXjiW7FALu+11en1wSAKJXXFBXFx3Z9iJTZZ8O6GVtk7vPtHBq\r\nc/PEPRarU81PPAD6EjeP9iqjCb2iF16K6oQi0D+xA3Q13dpwjK0gxk5Sz2Oe\r\nwP1zNCUIaxeEJfbVsYsDnkOUVP8vU12ZsLcCoGt8rpTe7kVU7eYDxBTumbeJ\r\n1LHOLISx13nv9O55OKTfpAV5KHYvze+vbM9SD5yui7G28Fc0DarVqNtxPDXQ\r\nqQC80Q1S48R3laTUjvfdCMUHeuO1rFv2VMASaygMioGelawxDDBs8ANBuDp9\r\nW11lKFBkSiguH8LnQ7zkA3F1A8PqTCeBc0tE1YIE4PbjFXi5Rdt7lZvFMbrC\r\nIOG+G/yxX58VvUG4WtNEcdAuUgZ88znpD/pHNVd6XJgP8P73OyJGOHeDOtuI\r\nD38A1RhsY7Ff0ew6PnKxKsXml2AUKM9KqfQ+SQyhOhg0+eGJdZehNHP/J1xS\r\nIBwIHD7riFmXd5M2W/mSFKjSWtMTeJMZXwZUpk4hDCUK37fSVHH8TopWaq9h\r\nRTV2uB6Y42rwaVNSgpx7H9T75XB71h1N4vS8/NZueLLOKqjApQIKiQ9kfmCf\r\n6QV1pZ7NccO+kULVynhF80a28Yb6X3I1XAc=\r\n=SMHr\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"alkindix","email":"salkindi2009@gmail.com"},"directories":{},"maintainers":[{"name":"alkindix","email":"salkindi2009@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-graphql-utils_1.6.5_1660724706625_0.8182794873144625"},"_hasShrinkwrap":false},"1.6.6":{"name":"@alkindix/nestjs-graphql-utils","version":"1.6.6","description":"NestJS utilities and decorators built around @alkindix/graphql-utils.","main":"dist/index.js","contributors":[{"name":"Dominik Berger","url":"https://doemuulive-56e78.web.app/"},{"name":"RaviAnand Mohabir","email":"moravrav@gmail.com","url":"https://ravianand.web.app"},{"name":"Mohammed Alkindi","email":"salkindi2009@gmail.com"}],"keywords":["typescript","graphql","graphql-utils","ast","nestjs"],"homepage":"https://jenyus-org.github.io/graphql-utils/","scripts":{"build":"tsc","prepare":"npm run build","test":"mocha -r ts-node/register src/**/*.test.ts"},"repository":{"type":"git","url":"git+https://github.com/AlkindiX/nestjs-graphql-utils.git"},"license":"MIT","private":false,"types":"dist/index.d.ts","dependencies":{"@alkindix/graphql-utils":"^1.5.1","@nestjs/common":"^8.4.5","@nestjs/core":"^8.4.5","@nestjs/graphql":"^10.0.18","express":"^4.18.1","rxjs":"^7.5.6","ts-morph":"^15.1.0"},"devDependencies":{"@nestjs/testing":"^8.4.5","@types/express":"^4.17.7","@types/chai":"^4.3.3","@types/mocha":"^9.1.1","chai":"^4.3.6","mocha":"^10.0.0","node-mocks-http":"^1.11.0","reflect-metadata":"^0.1.13","ts-node":"^10.9.1","typescript":"^4.7.4"},"gitHead":"4da385d0819ac495c89612ff297ab0789f8a5ba4","bugs":{"url":"https://github.com/AlkindiX/nestjs-graphql-utils/issues"},"_id":"@alkindix/nestjs-graphql-utils@1.6.6","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-A5IPszUzA/V6e+8Vvezdhk6fHkLWsrXXNTWYuJvy1LQq9SK5wcLAeQmMKgeRscK2Vzk0Gf5Yq4Z6Vur5vgjC7A==","shasum":"ff3fe4f9246cad6fe4f7e5ebb1054635259398d7","tarball":"https://registry.npmjs.org/@alkindix/nestjs-graphql-utils/-/nestjs-graphql-utils-1.6.6.tgz","fileCount":51,"unpackedSize":44577,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEx35bg3JVTCDSuV5sMszxpze0b0PuXtxj0oTMJD/42yAiEAqxLz8xAFU+VDDUQdVF4JbVv28tTIxki9lW8TPyWGKqM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/KY1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr9aQ/+M0GmE2is7XvHY7XyLxw86i/BiCtPTfrVShfAYeEK24aWQ0t4\r\n9lohKvzRloj7SknBmO15DtuvQdVEKB84YBkQVW9DKI0qRF+na7+Eph8UeQzI\r\ntu5mPWy4vTqD1hIvlC6DfCQz0AC4a2HxYwWC99IV+bDsjS5tmXfBe6PNJDe8\r\njE3qlhLEVbWMS9BHhZuhbTUf0p9YjZgSw0ZwmI4FcBucsTDGpD/a+zG8p/kI\r\nOdPrOM13M9+nPBq4pyHmo4NtdIHo46v2599fO+SZq3APAjJC9MqMzoU4Ii5N\r\nyavdd54BHexbTVFDPRHwGew8Ss+LBmoLXvnsxyLNSXvfRBcnq6y6g9oufQlE\r\n38lWpdXOulOA7Ab9aM1o+/6CvfGnkQ0rk5oAHyQu/WUYr4Lcaawdjkc6X/Iu\r\nn9QO5y0ns/puN9i0Bc11+AEm4dYVMQMq2BpeUaWDi77vtf+oWrZ7piCyk7vc\r\nUHV8E2aO7F+Wmi09KGaOVys71CvoaXcIaB1+/FmlF9jyLjuCbvdSC99V+q3o\r\nHYs28jgViDzSvtPDYbyT4SDQiKtvj4TVjBiK50r3THjaAo9/6y7m88GHfPgA\r\nfR3a2qO1o0m2nw6/76ONOhjMVkJpMn69cCiLOVkuatd57dLzxy0Ay0W90+Mz\r\nZyIqV14IxiGM7aw/XqFnJ0poiPZ2dScmMFw=\r\n=jI/g\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"alkindix","email":"salkindi2009@gmail.com"},"directories":{},"maintainers":[{"name":"alkindix","email":"salkindi2009@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-graphql-utils_1.6.6_1660724789573_0.7704528356970786"},"_hasShrinkwrap":false}},"time":{"created":"2022-08-17T08:24:32.621Z","1.6.4":"2022-08-17T08:24:32.868Z","modified":"2022-08-17T08:26:29.883Z","1.6.5":"2022-08-17T08:25:06.870Z","1.6.6":"2022-08-17T08:26:29.818Z"},"maintainers":[{"name":"alkindix","email":"salkindi2009@gmail.com"}],"description":"NestJS utilities and decorators built around @alkindix/graphql-utils.","homepage":"https://jenyus-org.github.io/graphql-utils/","keywords":["typescript","graphql","graphql-utils","ast","nestjs"],"repository":{"type":"git","url":"git+https://github.com/AlkindiX/nestjs-graphql-utils.git"},"contributors":[{"name":"Dominik Berger","url":"https://doemuulive-56e78.web.app/"},{"name":"RaviAnand Mohabir","email":"moravrav@gmail.com","url":"https://ravianand.web.app"},{"name":"Mohammed Alkindi","email":"salkindi2009@gmail.com"}],"bugs":{"url":"https://github.com/AlkindiX/nestjs-graphql-utils/issues"},"license":"MIT","readme":"# nestjs-graphql-utils\n\n![License: MIT](https://img.shields.io/github/license/Jenyus-Org/graphql-utils)\n[![NPM Release](https://img.shields.io/npm/v/@jenyus-org/nestjs-graphql-utils)](https://www.npmjs.com/package/@jenyus-org/nestjs-graphql-utils)\n[![NPM Downloads](https://img.shields.io/npm/dw/@jenyus-org/nestjs-graphql-utils)](https://www.npmjs.com/package/@jenyus-org/nestjs-graphql-utils)\n[![NPM Type Definitions](https://img.shields.io/npm/types/@alkindix/graphql-utils)](https://www.npmjs.com/package/@jenyus-org/nestjs-graphql-utils)\n\n`@jenyus-org/nestjs-graphql-utils` is a collection of utilities and decorators built on top of [`@alkindix/graphql-utils`](../graphql-utils/) to encourage the stateless nature of NestJS GraphQL resolvers and simplify the usage of helpers.\n\n- [nestjs-graphql-utils](#nestjs-graphql-utils)\n  - [Documentation](#documentation)\n  - [Installation](#installation)\n  - [Getting Started](#getting-started)\n\n## Documentation\n\nThe full documentation with live code sandboxes can be found [here](https://jenyus-org.github.io/graphql-utils/).\n\n## Installation\n\n`@jenyus-org/nestjs-graphql-utils` can be installed from NPM by running one of the following commands:\n\nNPM:\n\n```bash\nnpm i --save @jenyus-org/nestjs-graphql-utils\n```\n\nYarn:\n\n```bash\nyarn add @jenyus-org/nestjs-graphql-utils\n```\n\nThis will install `@jenyus-org/nestjs-graphql-utils` and all its dependencies.\n\n## Getting Started\n\nTypically, you will want to use the NestJS GraphQL-Utils package and its decorators to optimize your SQL `SELECT` and `JOIN` statements. You can use the `@Selections()` decorator and [wildcards](https://jenyus-org.github.io/graphql-utils/docs/recipes/resolving-selections) to get the precise fields and relations to populate:\n\n```ts\nimport { Selections } from \"@jenyus-org/nestjs-graphql-utils\";\nimport { Parent, Query, ResolveField, Resolver } from \"@nestjs/graphql\";\nimport { UserObject } from \"../users/dto/user.object\";\nimport { UsersService } from \"../users/users.service\";\nimport { PostObject } from \"./dto/post.object\";\nimport { Post } from \"./entities/post.entity\";\nimport { PostsService } from \"./posts.service\";\n\n@Resolver(() => PostObject)\nclass PostsResolver {\n  constructor(private postsService: PostsService, private usersService: UsersService) {}\n\n  @Query(() => [PostObject])\n  posts(\n    @Selections(\"posts\", [\"**.**\"])\n    relations: string[],\n    @Selections(\"posts\", [\"*.\"]) fields: string[]\n  ) {\n    return await this.postsService.findAll({ relations, fields });\n  }\n\n  @ResolveField(() => UserObject)\n  async author(@Parent() post: Post) {\n    if (post.author) {\n      return post.author;\n    }\n    return await this.usersService.findOne({ postId: post.id });\n  }\n}\n```\n","readmeFilename":"README.md"}