{"_id":"@ams-pro/apollo-plugin-transaction","_rev":"4-cb624f156e97b3c4362de68f52346a65","name":"@ams-pro/apollo-plugin-transaction","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.0-alpha.1":{"name":"@ams-pro/apollo-plugin-transaction","version":"0.0.0-alpha.1","description":"A Plugin for automatic creation of a typeorm transaction per request","main":"dist/index.js","scripts":{"prebuild":"rm -rf dist","build":"tsc -p tsconfig.json","prepublish:npm":"yarn build","publish:npm":"npm publish --access public"},"author":{"name":"Matthias Vonend"},"license":"MIT","keywords":["apollo","typeorm","graphql","nestjs"],"dependencies":{"apollo-server-plugin-base":"^0.6.10","typeorm":"^0.2.22","type-graphql":"^0.17.6"},"devDependencies":{"typescript":"^3.7.5"},"optionalDependencies":{"type-graphql":"^0.17.6"},"gitHead":"f162911a2675a882bc917f492a5e073187700fdf","_id":"@ams-pro/apollo-plugin-transaction@0.0.0-alpha.1","_nodeVersion":"13.3.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-F6IMQWAQwmH22ZAq5ROLjuNR8ddiBWR98c7u0V4/HHaAPrfGvmQiRdZdYd47YE5p4lVNX7zVQel0HK9a9lhJLw==","shasum":"764c495e100078ae2723b1135d20a69b9508716e","tarball":"https://registry.npmjs.org/@ams-pro/apollo-plugin-transaction/-/apollo-plugin-transaction-0.0.0-alpha.1.tgz","fileCount":11,"unpackedSize":98305,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTmy1CRA9TVsSAnZWagAAgqcP/Agl9OnhPeoeFkTfuOsy\nBn60dJRhIUz7K1PuQODjhjQt97rSufzJbB+Wr+TT8oF7cdlsxb+YFACRSAI/\nyKoPHN5Cehhz1Y2VUarhLEzTIbiB7uGZ4GTYepoJMmknHNxlHfwJb+w8ir3k\nvUwx42VeqXnrqQy7VZHn7adowRiWimX4t3WDP0mfnQZYm19VsXfRx27z7Lmz\nIGczuSYmNj1JUY/xXZ2dq1MmFf665wAyROriY7pH/2QNCSh2438681yXAQmv\nbuf5NbgNDwrcjo22j0Bi8rmOggaM+tOqAcncvdHfwRdIxg7dfqaGo0kFr1gu\nKQWeUIBCVopSowuod0Exah4svQoXF3ISUipIgjdVr4zYuQTHANbpaIEffnrq\nORNfJ3BDAK5tJC3WsCdizcMJ0QmqFSGfyfgdXUFqUAz2t5pVD3Byej++f7R2\nQruNKjkP0pNGLsUxGveaBvxnxWaugnbwiXXtaGCGOhYK5IjPYwtnC132JiDX\nLQCjv7T262LgRvii1zWB4nc34ZMWuPhtSi9rZI1VEWLPNSTLdixUeqT3+bje\nHPuKaN8S/Af04i7SBytZR+bxbIAKOEVipoFWs2MwsLvTrnG2TIDmtL1ry3SJ\npLhHreeu+ju/1EIizRA96RpO6DXftM9uMMtfOO4dOctOkSfP9ZSpPPPOrHAP\nBdfh\r\n=5wdb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID8P6qah+FJaniLAiTODop/Mu78H7GvOAHYkzr+TNws8AiBhnuhCQZSc6lxHpk9XwciV1qPEe8upYljVLmCw+D9y6Q=="}]},"maintainers":[{"name":"ermodo","email":"matthias.vonend@outlook.de"},{"name":"aaronschweig","email":"aaron.schweig@gmail.com"}],"_npmUser":{"name":"aaronschweig","email":"aaron.schweig@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/apollo-plugin-transaction_0.0.0-alpha.1_1582197941184_0.7438447686736802"},"_hasShrinkwrap":false},"0.0.0-alpha.1.1":{"name":"@ams-pro/apollo-plugin-transaction","version":"0.0.0-alpha.1.1","description":"A Plugin for automatic creation of a typeorm transaction per request","main":"dist/index.js","repository":{"url":"https://github.com/ams-pro/apollo-plugin-transaction"},"scripts":{"prebuild":"rm -rf dist","build":"tsc -p tsconfig.json","prepublish:npm":"yarn build","publish:npm":"yarn publish --access public"},"author":{"name":"Matthias Vonend"},"license":"MIT","keywords":["apollo","typeorm","graphql","nestjs"],"dependencies":{"apollo-server-plugin-base":"^0.6.10","graphql":"^14.6.0","typeorm":"^0.2.22"},"devDependencies":{"typescript":"^3.7.5"},"optionalDependencies":{"type-graphql":"^0.17.6"},"_id":"@ams-pro/apollo-plugin-transaction@0.0.0-alpha.1.1","dist":{"shasum":"d2e5758b2c4bed4a70a0cce5c51806e3fac25721","integrity":"sha512-2MQxHZHDgNusFpdcdQhvYDQT+Lsmtta4RYvEQx/Llcsen6V1mnSC8Ibx4cGpiRFRJVtOMdC7Df3JcnIrj42ssQ==","tarball":"https://registry.npmjs.org/@ams-pro/apollo-plugin-transaction/-/apollo-plugin-transaction-0.0.0-alpha.1.1.tgz","fileCount":12,"unpackedSize":11529,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTnBXCRA9TVsSAnZWagAAJ2wP/0YKPAbhpOiecxD50BMD\nZHV96NdvCXqWUMZHw53OxHUuJ7unA/SOhWFs2rKrGxxBe3gLsuqehDTstkh/\nzWDmnd+tTXpWm02KM42tv8m/YSqj5Z7HLmGr59B+2Al+IqpzhJdlbAVKhIjz\nQe5K77wLqNWZdDNqxmfwQlT9+mlcVh9mLubQqXjQnePWvHo6eekINDlXRQtV\n/yyjwCMwVe4000qzX+QITsnzJTFTyuByVaDofUB9cFRXnIELkkizdPKOGLWQ\n868IxCArJmfENK7lZVJkN8bLD/Hsrxo19qouHiInkiYA2qLFJuHhmTXYHFsQ\nB0eqwxg5A7q3ToFmPss0+8/kqFONaEOFK92HGgnw2gjyp8Kk+F2Yyt7GvvKl\n5OvRe04zhpw+X5DdEsRLPmSzoudq/xqQ8ZYBhiTAGzM0tYeVS6k5+Xsf4vvd\nhNjKwZSKqSCcfUge745Hg7L5xsuBGTi/lNyLrPywMeL4hRFpuQOt55DUgorW\npL7nWydnmbqtbWGUn+DlIg8MIxUWcuSXc6SigWOvT5TEbw5dMwdpeZyA+saT\nqAcwYgF8fn4xvXhM38K4Dt1XZGVWL9vKrMPmCOaYN/qpI/T+hXsEU0YMbcbT\nSMAwkj7yBmU2V8nZQ7u4ZxC/xkjdxCgYBcY7j31ar2bNQ3ksehgUsmmnk5iy\n6xyx\r\n=yNVr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGUM//KHuaezWOzq9fxHTbvX5V9cdxGyjbe0IquEGapJAiEApJp4LOa65vmEHyPPAIyTRxxMq9phcQXxi0K5i62vyM8="}]},"maintainers":[{"name":"aaronschweig","email":"aaron.schweig@gmail.com"},{"name":"ermodo","email":"matthias.vonend@outlook.de"}],"_npmUser":{"name":"aaronschweig","email":"aaron.schweig@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/apollo-plugin-transaction_0.0.0-alpha.1.1_1582198870735_0.4788176530429149"},"_hasShrinkwrap":false},"0.0.1":{"name":"@ams-pro/apollo-plugin-transaction","version":"0.0.1","description":"A Plugin for automatic creation of a typeorm transaction per request","main":"dist/index.js","repository":{"type":"git","url":"https://github.com/ams-pro/apollo-plugin-transaction"},"scripts":{"test":"echo 'TBD'","prebuild":"rm -rf dist","build":"tsc -p tsconfig.json","prepublish:npm":"yarn build","publish:npm":"yarn publish --access public"},"author":{"name":"Matthias Vonend"},"license":"MIT","keywords":["apollo","typeorm","graphql","nestjs"],"dependencies":{"apollo-server-plugin-base":"^0.6.10","graphql":"^14.6.0","typeorm":"^0.2.22"},"devDependencies":{"typescript":"^3.7.5"},"optionalDependencies":{"type-graphql":"^0.17.6"},"_id":"@ams-pro/apollo-plugin-transaction@0.0.1","dist":{"shasum":"51f93793f4d9f758d7bc905f7781e825b646d67d","integrity":"sha512-Rl7p6YHKORlzASzAHoZbIBIEjWpuOSz2eBgFprhZcvuvvvFdkVoOjNq8aZ3e7eL+O02qB/G6gfI60Rv4Sa8D+Q==","tarball":"https://registry.npmjs.org/@ams-pro/apollo-plugin-transaction/-/apollo-plugin-transaction-0.0.1.tgz","fileCount":15,"unpackedSize":12578,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTng/CRA9TVsSAnZWagAAamsP/1Q48nuhNjZrxKwBImNr\nlBbd9FKh2/V9xs05Zd7Al1O72IEPnApeoYuds1hj1ZyKc/ImOXkR+d3Xg4q6\n6VvKNZ2YKAUkDNR8Xj7u5FSNzsMGRD2EPQ1tR58nHLAF47C/+1hhzo0QRjFB\nuJn6ePG2t4UlXBE14OjXN2/s8mX+LTFdACWXEpz5sA51WtNdTWStLsqf6N8B\n3emUFTiZ5PDAbrtmBwNHwCKcK1XhgWCi3Ap8WmvO4PmGS8IEiJGF7NClV2gL\n4EgL5KC0a58eKRugNpSYJlItmwyyJ0TgcF2CexOru6VLALUMEnJ8whWzWXrW\nqkRyDcri0j3qyhniSb8sdog1fKuDoKOXOW5v+2SSfZfJucogeiXEsSsSXkfp\nanSEDxnt59wg+S0Ac/CyigqIi0b9XFR2QfWPODShpb5bbCqkDUGY9aWltqw2\njciHXrR4dWzJqdFX26YmSJXTAhUt5oF36ZQsCQFpIJPLVoLofVZrV0TOcLVH\nSkHcYdcEo5vb8CY/03iuOypzcOH2hAgqVSV/t4IC7r1vIUAkUaLFFt5UgIUU\n+nUg8eGVyoA5MlhOD5bdrxmXcn44NTAUyV3GbVqvoJLMEnUqrht/rojx5vfk\n4fYjLqMI3tUXn+EDrNiIub4qekjPOy3yoAyJuYWeCEo5QRzuARjclvcVrqCT\nvTQd\r\n=ftmi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID2EFa9KnYVnXCsQGzLRq4BaT7nDCPUz+l7nauuFEWXuAiEA3VKfXLRDOLAgNJes3KB/JN4F2rXYkjxvb5UnR1uggtE="}]},"maintainers":[{"name":"aaronschweig","email":"aaron.schweig@gmail.com"},{"name":"ermodo","email":"matthias.vonend@outlook.de"}],"_npmUser":{"name":"aaronschweig","email":"aaron.schweig@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/apollo-plugin-transaction_0.0.1_1582200894414_0.06975233882552478"},"_hasShrinkwrap":false},"0.0.2":{"name":"@ams-pro/apollo-plugin-transaction","version":"0.0.2","description":"A Plugin for automatic creation of a typeorm transaction per request","main":"dist/index.js","repository":{"type":"git","url":"https://github.com/ams-pro/apollo-plugin-transaction"},"scripts":{"test":"echo 'TBD'","prebuild":"rm -rf dist","build":"tsc -p tsconfig.json","prepublish:npm":"yarn build","publish:npm":"yarn publish --access public"},"author":{"name":"Matthias Vonend"},"license":"MIT","keywords":["apollo","typeorm","graphql","nestjs"],"dependencies":{"apollo-server-plugin-base":"^0.6.10","graphql":"^14.6.0","typeorm":"^0.2.22"},"devDependencies":{"typescript":"^3.7.5"},"optionalDependencies":{"type-graphql":"^0.17.6"},"licenseText":"The MIT License\n\nCopyright (c) 2017 Google, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@ams-pro/apollo-plugin-transaction@0.0.2","dist":{"shasum":"c9ca59895c16884d81e4d710692bd20005682524","integrity":"sha512-9l8ndwpIvO/5kBjhsc0u99y7C5AkpnGeccWpnZehJBYihnzODjH8YoD0LlX/V0HCPyKkEWBNT+0MwRTkQeoZ1A==","tarball":"https://registry.npmjs.org/@ams-pro/apollo-plugin-transaction/-/apollo-plugin-transaction-0.0.2.tgz","fileCount":16,"unpackedSize":16305,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTueeCRA9TVsSAnZWagAABCIP/iG2mRTbO6FbyBaQ1D8I\ncC16RJQ/mpKK89epnXMfUuTNLK6CTCN58omnKqaz2/2/FCqQECidPk79vICA\nhNwz9jk5dWp/prw0NfWeImGrkT9GtiUBwghfIBXjbx2bxaILGVmQiejfj5fu\n/3LXAjNnO6v2b1SMM1riu20StkrvKjevDSmUq8YgDrrhwvoNxFWFBL7zxMvQ\nA1zFovAATUvg06QxxG1KRWLr12iyy1mwwueipycaIwhwjjeBSMqRDrIyIT9r\n4roHFztn/jCJSHZbIvpUPN0FJvmT5WP5o5LxZ+thzxLibTcF1QK5L96FjJnq\nXfqY7T5PcQ2Zm9m1oJ5eufepOx1oCCUPJpiH8d2HeQvVl1J2QqOENMLs6Veu\nyE3VvzhyTqktbVVncsPEsY5j5IM6KwlDSHKXJbOWq0v6q3WK3mXUVo9cuwsZ\nQ51K/GcJfGVs/G4SzjVI7upgPL0xn2F8BxWwiVnv42jONvzUtm89I9ev300M\nR+KIs36HQXxpsj/iUAT+2y/nbtJ+RQ7rPHz0qVx8SX/FY/scaCaFfgsFr6+Q\n1osqT5SWvN6hq7FtRjFZoHIYvwDsnYZJpcOPQT7z3fzv/zLKHm9LJwXxv/rG\nLi7L6JhBJkY9IvAt26OjZUzcKxk7/RuwdIl+sPvWg73L1cWmWcDY3whgikYN\ngSz5\r\n=XMSB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWhHDWDuRMPhz2TndH16meFk6hqbBCYcCnAj2xq2+61QIhAOpEXk4jydBa6WTN0bJkb8fQbhI2qgpOC3TOCqRxroqp"}]},"maintainers":[{"name":"aaronschweig","email":"aaron.schweig@gmail.com"},{"name":"ermodo","email":"matthias.vonend@outlook.de"}],"_npmUser":{"name":"aaronschweig","email":"aaron.schweig@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/apollo-plugin-transaction_0.0.2_1582229405668_0.6140341062144339"},"_hasShrinkwrap":false}},"time":{"created":"2020-02-20T11:25:40.955Z","0.0.0-alpha.1":"2020-02-20T11:25:41.341Z","modified":"2022-04-04T13:53:02.609Z","0.0.0-alpha.1.1":"2020-02-20T11:41:10.873Z","0.0.1":"2020-02-20T12:14:54.649Z","0.0.2":"2020-02-20T20:10:05.811Z"},"maintainers":[{"name":"aaronschweig","email":"aaron.schweig@gmail.com"},{"name":"ermodo","email":"matthias.vonend@outlook.de"}],"description":"A Plugin for automatic creation of a typeorm transaction per request","keywords":["apollo","typeorm","graphql","nestjs"],"author":{"name":"Matthias Vonend"},"license":"MIT","readme":"\n[![Issues][issues-shield]][issues-url]\n![MIT License][license-shield]\n\n\n\n<!-- PROJECT LOGO -->\n<br />\n<p align=\"center\">\n  <!-- <a href=\"https://github.com/github_username/repo\">\n    <img src=\"images/logo.png\" alt=\"Logo\" width=\"80\" height=\"80\">\n  </a> -->\n\n  <h3 align=\"center\">Apollo Transaction Plugin</h3>\n\n  <p align=\"center\">\n    A plugin for wrapping GraphQL requests into typeorm transactions\n    <br />\n    <br />\n    <a href=\"https://github.com/ams-pro/apollo-plugin-transaction/issues\">Report Bug</a>\n    ·\n    <a href=\"https://github.com/ams-pro/apollo-plugin-transaction/issues\">Request Feature</a>\n  </p>\n</p>\n\n\n## About The Project\n\nThe Plugin is a small plugin for automatic typeorm transactions. All requests are encapsulated into a typeorm transaction and a EntityManager for running database commands is attached to the context.  \n\n## Getting started\n\n### Installation\n\n```bash\nnpm install @ams-pro/apollo-plugin-transaction\n```\nor\n```bash\nyarn add @ams-pro/apollo-plugin-transaction\n```\n\n### Usage\n\n1. Initialize the Plugin\n    ```javascript\n    import { TransactionPlugin } from '@ams-pro/apollo-plugin-transaction';\n\n    // Setup database connection\n\n    const server = new ApolloServer({\n        resolvers: [...],\n        typeDefs: [...],\n        plugins: [\n            new TransactionPlugin(pluginOptions),\n        ]\n    });\n    ```\n2. Use database in resolver\n    ```javascript\n    import { getRunnerFromContext } from '@ams-pro/apollo-plugin-transaction';\n\n    const manager = getRunnerFromContext(context);\n    ```\n3. Configure\n    | Option | Required | Default | Description |\n    |----------|----------|---------|-------------|\n    | connection | Yes | | The Typeorm Connection used for database queries\n    | enableStuckControl| No | false | Automatically abort transaction which take longer than the transaction timeout\n    |transactionTimeout|No|60000|The transaction timeout used for the stuck control\n\n\n## Contributing\n\nAny contributions you make are **greatly appreciated**. \n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\n\n<!-- LICENSE -->\n## License\n\nDistributed under the MIT License.\n\n\n\n\n<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->\n[issues-shield]: https://img.shields.io/github/issues/othneildrew/Best-README-Template.svg?style=flat-square\n[issues-url]: https://github.com/ams-pro/apollo-plugin-transaction/issues\n[license-shield]: https://img.shields.io/github/license/othneildrew/Best-README-Template.svg?style=flat-square\n<!-- [license-url]:  -->\n","readmeFilename":"README.md","repository":{"type":"git","url":"https://github.com/ams-pro/apollo-plugin-transaction"}}