{"_id":"@dmamontov/graphql-mesh-constraint-plugin","_rev":"5-5cf0087bef264cd6701729d945345946","name":"@dmamontov/graphql-mesh-constraint-plugin","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@dmamontov/graphql-mesh-constraint-plugin","version":"1.0.0","author":{"name":"Dmitry Mamontov"},"type":"module","repository":{"type":"git","url":"git+https://github.com/dmamontov/graphql-mesh-constraint-plugin.git"},"license":"MIT","engines":{"node":">=20.0.0"},"main":"dist/cjs/index.js","module":"dist/esm/index.js","exports":{".":{"require":{"types":"./dist/typings/index.d.cts","default":"./dist/cjs/index.js"},"import":{"types":"./dist/typings/index.d.ts","default":"./dist/esm/index.js"},"default":{"types":"./dist/typings/index.d.ts","default":"./dist/esm/index.js"}},"./package.json":"./package.json"},"typings":"dist/typings/index.d.ts","scripts":{"build":"bob build","lint":"eslint ."},"peerDependencies":{"graphql":"*"},"dependencies":{"@envelop/core":"^5.0.0","@graphql-mesh/string-interpolation":"^0.5.3","@graphql-mesh/types":"^0.97.5","graphql":"*","graphql-constraint-directive":"^5.4.3","graphql-yoga":"^5.1.1"},"devDependencies":{"@babel/core":"7.24.5","@eslint/js":"8.57.0","@theguild/prettier-config":"2.0.6","@types/node":"20.12.2","@typescript-eslint/eslint-plugin":"7.4.0","@typescript-eslint/parser":"7.4.0","bob-the-bundler":"7.0.1","eslint":"8.57.0","eslint-config-love":"43.1.0","eslint-config-prettier":"9.1.0","eslint-config-standard":"17.1.0","eslint-formatter-stylish":"8.40.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"3.6.1","eslint-plugin-import":"2.29.1","eslint-plugin-jsonc":"2.14.1","eslint-plugin-n":"16.6.2","eslint-plugin-prettier":"5.1.3","eslint-plugin-promise":"6.1.1","eslint-plugin-sonar":"0.13.2","eslint-plugin-standard":"5.0.0","eslint-plugin-unicorn":"51.0.1","prettier":"3.2.5","ts-node":"10.9.2","typescript":"5.4.3"},"publishConfig":{"access":"public","directory":"dist"},"sideEffects":false,"typescript":{"definition":"dist/typings/index.d.ts"},"bob":{"build":{"copy":["./src/constraint-directive.graphql"]}},"_id":"@dmamontov/graphql-mesh-constraint-plugin@1.0.0","gitHead":"b3cbd2e2d0e97a1a607f50a43dfc620ed6656ed8","description":"Constraint Plugin is a plugin for GraphQL Mesh that allows you to add validation rules to your GraphQL schema using the [graphql-constraint-directive](https://github.com/confuser/graphql-constraint-directive) library. This plugin enhances your API by enfo","bugs":{"url":"https://github.com/dmamontov/graphql-mesh-constraint-plugin/issues"},"homepage":"https://github.com/dmamontov/graphql-mesh-constraint-plugin#readme","_nodeVersion":"20.5.1","_npmVersion":"9.8.0","dist":{"integrity":"sha512-pC2mw7x1xPEiYY5dholXaMd7zZZOYcyns28Zuyc+FbGGhMCZbrAFIMVY962289PC7mFprQi60TVkJLXVVhCjRA==","shasum":"be5d2b927ef6c77a28d1e04fdb060eb0955b4475","tarball":"https://registry.npmjs.org/@dmamontov/graphql-mesh-constraint-plugin/-/graphql-mesh-constraint-plugin-1.0.0.tgz","fileCount":23,"unpackedSize":17458,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA2kp2UaUHKQSrLpDKI075yd2SU7qMolUpB5QgK66ciqAiEAsJ6cOsEfccgA22CnLFMY5QMBMyw75EfKm9hxLS6AvPY="}]},"_npmUser":{"name":"dmamontov","email":"d.slonyara@gmail.com"},"directories":{},"maintainers":[{"name":"dmamontov","email":"d.slonyara@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-mesh-constraint-plugin_1.0.0_1715172309671_0.9103080757525484"},"_hasShrinkwrap":false},"1.0.1":{"name":"@dmamontov/graphql-mesh-constraint-plugin","version":"1.0.1","sideEffects":false,"peerDependencies":{"graphql":"*"},"dependencies":{"@envelop/core":"^5.0.0","@graphql-mesh/string-interpolation":"^0.5.3","@graphql-mesh/types":"^0.97.5","graphql":"*","graphql-constraint-directive":"^5.4.3","graphql-yoga":"^5.1.1"},"repository":{"type":"git","url":"git+https://github.com/dmamontov/graphql-mesh-constraint-plugin.git"},"author":{"name":"Dmitry Mamontov"},"license":"MIT","engines":{"node":">=20.0.0"},"main":"cjs/index.js","module":"esm/index.js","typings":"typings/index.d.ts","typescript":{"definition":"typings/index.d.ts"},"type":"module","exports":{".":{"require":{"types":"./typings/index.d.cts","default":"./cjs/index.js"},"import":{"types":"./typings/index.d.ts","default":"./esm/index.js"},"default":{"types":"./typings/index.d.ts","default":"./esm/index.js"}},"./package.json":"./package.json"},"_id":"@dmamontov/graphql-mesh-constraint-plugin@1.0.1","gitHead":"2c3ace7b0e75f8dd5e0e65599084d8914fbdb9d1","description":"Constraint Plugin is a plugin for GraphQL Mesh that allows you to add validation rules to your GraphQL schema using the [graphql-constraint-directive](https://github.com/confuser/graphql-constraint-directive) library. This plugin enhances your API by enfo","bugs":{"url":"https://github.com/dmamontov/graphql-mesh-constraint-plugin/issues"},"homepage":"https://github.com/dmamontov/graphql-mesh-constraint-plugin#readme","_nodeVersion":"20.5.1","_npmVersion":"9.8.0","dist":{"integrity":"sha512-VKnNcsoHZ91iUi02Oo2pNikrP0mlwMzW65aOCRHRqECfQj5U0pOSZz0Gu2/eFIW5ltpB7emwjJQeSvcZd88uUw==","shasum":"2446e25ae64838c3f189532fd8452646cdb86adc","tarball":"https://registry.npmjs.org/@dmamontov/graphql-mesh-constraint-plugin/-/graphql-mesh-constraint-plugin-1.0.1.tgz","fileCount":13,"unpackedSize":5539,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICbZlM++hig8RFCLLFHB+KKOztVNB8skkn1IBV0szVJ1AiAnpmTaPjmK1XLCg3yGozvFhM9E/N5M+IvQvRtVrTIQPQ=="}]},"_npmUser":{"name":"dmamontov","email":"d.slonyara@gmail.com"},"directories":{},"maintainers":[{"name":"dmamontov","email":"d.slonyara@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-mesh-constraint-plugin_1.0.1_1715172395420_0.4292469895542692"},"_hasShrinkwrap":false},"1.0.2-alpha1":{"name":"@dmamontov/graphql-mesh-constraint-plugin","version":"1.0.2-alpha1","sideEffects":false,"peerDependencies":{"graphql":"*"},"dependencies":{"@envelop/core":"^5.0.0","@graphql-mesh/string-interpolation":"^0.5.3","@graphql-mesh/types":"^0.97.5","@graphql-tools/schema":"^9.0.0","@graphql-tools/utils":"^9.0.0","graphql":"*","graphql-yoga":"^5.1.1","validator":"^13.6.0"},"repository":{"type":"git","url":"git+https://github.com/dmamontov/graphql-mesh-constraint-plugin.git"},"author":{"name":"Dmitry Mamontov"},"license":"MIT","engines":{"node":">=20.0.0"},"main":"cjs/index.js","module":"esm/index.js","typings":"typings/index.d.ts","typescript":{"definition":"typings/index.d.ts"},"type":"module","exports":{".":{"require":{"types":"./typings/index.d.cts","default":"./cjs/index.js"},"import":{"types":"./typings/index.d.ts","default":"./esm/index.js"},"default":{"types":"./typings/index.d.ts","default":"./esm/index.js"}},"./package.json":"./package.json"},"_id":"@dmamontov/graphql-mesh-constraint-plugin@1.0.2-alpha1","gitHead":"2c3ace7b0e75f8dd5e0e65599084d8914fbdb9d1","description":"Constraint Plugin is a plugin for GraphQL Mesh that allows you to add validation rules to your GraphQL schema using the [graphql-constraint-directive](https://github.com/confuser/graphql-constraint-directive) library. This plugin enhances your API by enfo","bugs":{"url":"https://github.com/dmamontov/graphql-mesh-constraint-plugin/issues"},"homepage":"https://github.com/dmamontov/graphql-mesh-constraint-plugin#readme","_nodeVersion":"20.5.1","_npmVersion":"9.8.0","dist":{"integrity":"sha512-rw2RgtQi9okQ1FcxFdbpeIFvEvhLcubH0C/GKvHmagKZx9GRwLzK/OED4a+1EyENzd4VlqxZ+qXscbAk24Q65g==","shasum":"e1a3b0ffebcddbb4eef6a1b5b7b37371bbf91fad","tarball":"https://registry.npmjs.org/@dmamontov/graphql-mesh-constraint-plugin/-/graphql-mesh-constraint-plugin-1.0.2-alpha1.tgz","fileCount":77,"unpackedSize":80455,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDx8vTEFL9GHb3NLReDna48nOu/vn7CDhqKBguSHxiIuQIgW2ZWXrBXvwlbPenYBozxlaHdekz/P953+Zfw0QJ1pz8="}]},"_npmUser":{"name":"dmamontov","email":"d.slonyara@gmail.com"},"directories":{},"maintainers":[{"name":"dmamontov","email":"d.slonyara@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-mesh-constraint-plugin_1.0.2-alpha1_1715284945461_0.8283615592273916"},"_hasShrinkwrap":false},"1.0.2":{"name":"@dmamontov/graphql-mesh-constraint-plugin","version":"1.0.2","sideEffects":false,"peerDependencies":{"graphql":"*"},"dependencies":{"@envelop/core":"^5.0.0","@graphql-mesh/string-interpolation":"^0.5.3","@graphql-mesh/types":"^0.97.5","@graphql-tools/schema":"^9.0.0","@graphql-tools/utils":"^9.0.0","graphql":"*","graphql-yoga":"^5.1.1","validator":"^13.6.0"},"repository":{"type":"git","url":"git+https://github.com/dmamontov/graphql-mesh-constraint-plugin.git"},"author":{"name":"Dmitry Mamontov"},"license":"MIT","engines":{"node":">=20.0.0"},"main":"cjs/index.js","module":"esm/index.js","typings":"typings/index.d.ts","typescript":{"definition":"typings/index.d.ts"},"type":"module","exports":{".":{"require":{"types":"./typings/index.d.cts","default":"./cjs/index.js"},"import":{"types":"./typings/index.d.ts","default":"./esm/index.js"},"default":{"types":"./typings/index.d.ts","default":"./esm/index.js"}},"./package.json":"./package.json"},"_id":"@dmamontov/graphql-mesh-constraint-plugin@1.0.2","gitHead":"2c3ace7b0e75f8dd5e0e65599084d8914fbdb9d1","description":"Constraint Plugin is a plugin for GraphQL Mesh that allows you to add validation rules to your GraphQL schema using the [graphql-constraint-directive](https://github.com/confuser/graphql-constraint-directive) library. This plugin enhances your API by enfo","bugs":{"url":"https://github.com/dmamontov/graphql-mesh-constraint-plugin/issues"},"homepage":"https://github.com/dmamontov/graphql-mesh-constraint-plugin#readme","_nodeVersion":"20.5.1","_npmVersion":"9.8.0","dist":{"integrity":"sha512-Ri7GqhqCe3VGSt4J3xo3WtJxaA7kwmTi8yH0+XAKFiT9ZHokw33R+KllbzkRRCd3ONhCxMrWGUB8adt54CS4wQ==","shasum":"9c8df9c65d58a1508aacef3ae46b49383e803c86","tarball":"https://registry.npmjs.org/@dmamontov/graphql-mesh-constraint-plugin/-/graphql-mesh-constraint-plugin-1.0.2.tgz","fileCount":77,"unpackedSize":80448,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIa2LX29MDJ+Wh5Z0/aFrsIQeX3iO7DvDEpTXJByrxPAIgDPVhMdjIAwRP/YQDqDR/NfCL/u3uzcfdlhS1HgSHF+8="}]},"_npmUser":{"name":"dmamontov","email":"d.slonyara@gmail.com"},"directories":{},"maintainers":[{"name":"dmamontov","email":"d.slonyara@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-mesh-constraint-plugin_1.0.2_1715285059687_0.27702780062218557"},"_hasShrinkwrap":false},"1.0.3":{"name":"@dmamontov/graphql-mesh-constraint-plugin","version":"1.0.3","sideEffects":false,"peerDependencies":{"graphql":"*"},"dependencies":{"@envelop/core":"^5.0.0","@graphql-mesh/string-interpolation":"^0.5.3","@graphql-mesh/types":"^0.97.5","@graphql-tools/schema":"^9.0.0","@graphql-tools/utils":"^9.0.0","graphql":"*","graphql-yoga":"^5.1.1","validator":"^13.6.0"},"repository":{"type":"git","url":"git+https://github.com/dmamontov/graphql-mesh-constraint-plugin.git"},"author":{"name":"Dmitry Mamontov"},"license":"MIT","engines":{"node":">=20.0.0"},"main":"cjs/index.js","module":"esm/index.js","typings":"typings/index.d.ts","typescript":{"definition":"typings/index.d.ts"},"type":"module","exports":{".":{"require":{"types":"./typings/index.d.cts","default":"./cjs/index.js"},"import":{"types":"./typings/index.d.ts","default":"./esm/index.js"},"default":{"types":"./typings/index.d.ts","default":"./esm/index.js"}},"./package.json":"./package.json"},"_id":"@dmamontov/graphql-mesh-constraint-plugin@1.0.3","gitHead":"7584f8cd1719519019cbec2b185f715a5a2dbe93","description":"Constraint Plugin is a plugin for GraphQL Mesh that allows you to add validation rules to your GraphQL schema using the [graphql-constraint-directive](https://github.com/confuser/graphql-constraint-directive) library. This plugin enhances your API by enfo","bugs":{"url":"https://github.com/dmamontov/graphql-mesh-constraint-plugin/issues"},"homepage":"https://github.com/dmamontov/graphql-mesh-constraint-plugin#readme","_nodeVersion":"20.5.1","_npmVersion":"9.8.0","dist":{"integrity":"sha512-U/etfNORCRMjnhxTUsJWyq9IOpnfN/KPWsrXYRF59buJN1r269Il+5t8X7+0r2taxoeAUg8XZeazY9Hr1kHuwQ==","shasum":"2f2d1af3ba9a55e691e67d9a988f021009b791d5","tarball":"https://registry.npmjs.org/@dmamontov/graphql-mesh-constraint-plugin/-/graphql-mesh-constraint-plugin-1.0.3.tgz","fileCount":77,"unpackedSize":80416,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBDKCFM3EDwESPH/pHQfEqUseQqygpR2av97GBRDkna7AiEA2pIrfRhV4MQ5c1WjJ/S3WG5DsVrElIxZpXeT/jSITkg="}]},"_npmUser":{"name":"dmamontov","email":"d.slonyara@gmail.com"},"directories":{},"maintainers":[{"name":"dmamontov","email":"d.slonyara@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-mesh-constraint-plugin_1.0.3_1715341127325_0.2010995657192618"},"_hasShrinkwrap":false},"1.0.4":{"name":"@dmamontov/graphql-mesh-constraint-plugin","version":"1.0.4","sideEffects":false,"peerDependencies":{"graphql":"*"},"dependencies":{"@envelop/core":"^5.0.0","@graphql-mesh/string-interpolation":"^0.5.3","@graphql-mesh/types":"^0.97.5","@graphql-tools/schema":"^9.0.0","@graphql-tools/utils":"^9.0.0","graphql":"*","graphql-yoga":"^5.1.1","validator":"^13.6.0"},"repository":{"type":"git","url":"git+https://github.com/dmamontov/graphql-mesh-constraint-plugin.git"},"author":{"name":"Dmitry Mamontov"},"license":"MIT","engines":{"node":">=20.0.0"},"main":"cjs/index.js","module":"esm/index.js","typings":"typings/index.d.ts","typescript":{"definition":"typings/index.d.ts"},"type":"module","exports":{".":{"require":{"types":"./typings/index.d.cts","default":"./cjs/index.js"},"import":{"types":"./typings/index.d.ts","default":"./esm/index.js"},"default":{"types":"./typings/index.d.ts","default":"./esm/index.js"}},"./package.json":"./package.json"},"_id":"@dmamontov/graphql-mesh-constraint-plugin@1.0.4","gitHead":"2cdd2dfb90844a41cc282f8a493b2ca5a0697678","description":"Constraint Plugin is a plugin for GraphQL Mesh that allows you to add validation rules to your GraphQL schema using the [graphql-constraint-directive](https://github.com/confuser/graphql-constraint-directive) library. This plugin enhances your API by enfo","bugs":{"url":"https://github.com/dmamontov/graphql-mesh-constraint-plugin/issues"},"homepage":"https://github.com/dmamontov/graphql-mesh-constraint-plugin#readme","_nodeVersion":"20.5.1","_npmVersion":"9.8.0","dist":{"integrity":"sha512-dKf6EfvbanzeYYOKfOsGG+oc3NCYH55S9XxfxrRaQqvw5rZ1Ybf75/pHAq1N67QbY1Y9idt9OAm9XMz98SBp8g==","shasum":"51ab8cb935ce56f61e482c39e94f469a7f4e68cc","tarball":"https://registry.npmjs.org/@dmamontov/graphql-mesh-constraint-plugin/-/graphql-mesh-constraint-plugin-1.0.4.tgz","fileCount":77,"unpackedSize":80432,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGWdHrnVkJe16JFjGLGdK0mOcsyawGxLfm+k61CJpfv0AiEA56lAU2jRNjfS3q+GgWrJwqqdIb4oga9l+bNvTur0REc="}]},"_npmUser":{"name":"dmamontov","email":"d.slonyara@gmail.com"},"directories":{},"maintainers":[{"name":"dmamontov","email":"d.slonyara@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-mesh-constraint-plugin_1.0.4_1715341697732_0.03294582211283914"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-08T12:45:09.544Z","1.0.0":"2024-05-08T12:45:09.841Z","modified":"2024-05-10T11:48:18.104Z","1.0.1":"2024-05-08T12:46:35.578Z","1.0.2-alpha1":"2024-05-09T20:02:25.636Z","1.0.2":"2024-05-09T20:04:19.829Z","1.0.3":"2024-05-10T11:38:47.515Z","1.0.4":"2024-05-10T11:48:17.928Z"},"maintainers":[{"name":"dmamontov","email":"d.slonyara@gmail.com"}],"description":"Constraint Plugin is a plugin for GraphQL Mesh that allows you to add validation rules to your GraphQL schema using the [graphql-constraint-directive](https://github.com/confuser/graphql-constraint-directive) library. This plugin enhances your API by enfo","homepage":"https://github.com/dmamontov/graphql-mesh-constraint-plugin#readme","repository":{"type":"git","url":"git+https://github.com/dmamontov/graphql-mesh-constraint-plugin.git"},"author":{"name":"Dmitry Mamontov"},"bugs":{"url":"https://github.com/dmamontov/graphql-mesh-constraint-plugin/issues"},"license":"MIT","readme":"# Constraint Plugin for GraphQL Mesh\n\nConstraint Plugin is a plugin for GraphQL Mesh that allows you to add validation rules to your GraphQL schema using the [graphql-constraint-directive](https://github.com/confuser/graphql-constraint-directive) library. This plugin enhances your API by enforcing constraints directly in your schema, making your API more robust and reliable.\n\n## Installation\n\nBefore you can use the Constraint Plugin, you need to install it along with GraphQL Mesh if you haven't already done so. You can install these using npm or yarn.\n\n```bash\nnpm install @dmamontov/graphql-mesh-constraint-plugin\n```\n\nor\n\n```bash\nyarn add @dmamontov/graphql-mesh-constraint-plugin\n```\n\n## Configuration\n\n### Modifying tsconfig.json\n\nTo make TypeScript recognize the Constraint Plugin, you need to add an alias in your tsconfig.json.\n\nAdd the following paths configuration under the compilerOptions in your tsconfig.json file:\n\n```json\n{\n  \"compilerOptions\": {\n    \"paths\": {\n       \"constraint\": [\"node_modules/@dmamontov/graphql-mesh-constraint-plugin\"]\n    }\n  }\n}\n```\n\n### Adding the Plugin to GraphQL Mesh\n\nYou need to include the Constraint Plugin in your GraphQL Mesh configuration file (usually .meshrc.yaml). Below is an example configuration that demonstrates how to use this plugin:\n\n```yaml\nadditionalTypeDefs:\n  - node_modules/@dmamontov/graphql-mesh-constraint-plugin/esm/constraint-directive.graphql\n  \nplugins:\n  - constraint:\n      enabled: true\n```\n\n## Conclusion\n\nRemember, always test your configurations in a development environment before applying them in production to ensure that everything works as expected.","readmeFilename":"README.md"}