{"_id":"@enigmatis/polaris-core","_rev":"86-8af42692546333cb29f1a3ad694065fa","name":"@enigmatis/polaris-core","dist-tags":{"latest":"2.0.0-beta.29","development":"2.0.0-development.2","beta":"2.0.0-beta.66"},"versions":{"1.0.0":{"name":"@enigmatis/polaris-core","version":"1.0.0","description":"Apollo Server based library with extra features","main":"dist/src/main.js","types":"dist/src/main.d.ts","scripts":{"build":"rimraf dist && tsc -p tsconfig.json","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.0.8","@enigmatis/polaris-graphql-logger":"^1.0.4","@enigmatis/polaris-logs":"^2.5.5","@enigmatis/polaris-middlewares":"^1.1.0","@enigmatis/polaris-schema":"^1.0.5","@enigmatis/polaris-typeorm":"^1.1.2","apollo-server-express":"^2.9.9","apollo-server-plugin-base":"^0.6.5","express":"^4.17.1","graphql":"^14.5.8","graphql-middleware":"^4.0.2","http-status":"^1.4.1","ip":"^1.1.5","uuid":"^3.3.3"},"devDependencies":{"@commitlint/cli":"^8.2.0","@commitlint/config-conventional":"^8.2.0","@semantic-release/changelog":"^3.0.5","@semantic-release/git":"^7.0.18","@types/express":"^4.17.2","@types/graphql":"^14.5.0","@types/ip":"^1.1.0","@types/jest":"^24.0.23","@types/uuid":"^3.4.6","husky":"^3.1.0","jest":"24.1.0","prettier":"^1.19.1","rimraf":"^3.0.0","travis-deploy-once":"^5.0.11","ts-jest":"^24.1.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.0.1","typescript":"^3.7.2"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"a122899464406d2e2c864d4f0d1a193bdafb871d","_id":"@enigmatis/polaris-core@1.0.0","_nodeVersion":"12.13.1","_npmVersion":"6.12.1","dist":{"integrity":"sha512-310gWbtIZyGksYiV+gXtA3WoTeDtojyqTjEQdvlPNeWqlQedPza3cXtfx7PEAfkA3ES5bqH4t5kzFKfpA95OfA==","shasum":"e12a3dcf28889cc49b3e8a67f1e7557b47155cfa","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-1.0.0.tgz","fileCount":36,"unpackedSize":29320,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1jltCRA9TVsSAnZWagAACYkP/jIqjZ6N8ZQOcysgJ315\np+gGMylLB5K6Ff282h+aNCR4hfr0OAkiRCU8VgA3TXqZJC5fAFwqps+pbUb5\nrgzIWYCnx9YQwn3dHyzELEsKRqXhjkTRCBMtxTRJbAp1b9abvMuV77kLL8wW\ngQO4u39gVO/6QWnqDI7PlVUl6hFfCjAgHm1w4xYIV6AGH6MPTcAgG+6cXk8e\nEHUotDvWz05aver8hJFyPjfAeDaPpqgqcpPhGQZ6gPlPJkq9yyj6K1ROMGb1\nY2S9cz5useweXyrOVuh/zyxLeSpsL7EhPRYxV+vqptk4IawRcrFKrGe17YXg\nm6kCMzIWPCS7xasAVcpDdtPlnUBrjMMT0Zimib5pXWYElMmsRjXM42r4prFb\nGzd7RVXfiNgBQD3X+YIvZWr5U9Rk0NXmYLeSyz3FuGzSyaLHF/lfu54iLFdX\nWgLT7J4pctKlL/hlrPTyIirGJ1YGpkW5Y4RYS37vtK/muCO2dNgwGGbPShvr\nhe6gJJulLs15tdLcbWbr0pjFDaaNuRiPae6UC0EMNDlAsLmarDYfEtztRSa1\nCVOA08fsVapuVtBgJmPje14u27MbZ5Fihi76prJzUkPVtAyB2TeGP1xBZfbZ\nH3K981NcCoYaSMKwUIiBModRRNXzNnMvw+YpISDEEPzcYMvZChNABUiRDaU7\n34F7\r\n=9XZ4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDedrsbU8Jy6O53v3nfxCWw1KPACJgX+FOYcjl2bev4FgIhAK/TdNrrTd49VEzLBHNIpZLM/MboRB0NXvJtpwnLNvh+"}]},"maintainers":[{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_1.0.0_1574320493469_0.5094272788340832"},"_hasShrinkwrap":false},"1.0.1":{"name":"@enigmatis/polaris-core","version":"1.0.1","description":"Apollo Server based library with extra features","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"build":"rimraf dist && tsc -p tsconfig.json","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.0.8","@enigmatis/polaris-graphql-logger":"^1.0.4","@enigmatis/polaris-logs":"^2.5.5","@enigmatis/polaris-middlewares":"^1.1.0","@enigmatis/polaris-schema":"^1.0.5","@enigmatis/polaris-typeorm":"^1.1.2","apollo-server-express":"^2.9.9","apollo-server-plugin-base":"^0.6.5","express":"^4.17.1","graphql":"^14.5.8","graphql-middleware":"^4.0.2","http-status":"^1.4.1","ip":"^1.1.5","uuid":"^3.3.3"},"devDependencies":{"@commitlint/cli":"^8.2.0","@commitlint/config-conventional":"^8.2.0","@semantic-release/changelog":"^3.0.5","@semantic-release/git":"^7.0.18","@types/express":"^4.17.2","@types/graphql":"^14.5.0","@types/ip":"^1.1.0","@types/jest":"^24.0.23","@types/uuid":"^3.4.6","husky":"^3.1.0","jest":"24.1.0","prettier":"^1.19.1","rimraf":"^3.0.0","travis-deploy-once":"^5.0.11","ts-jest":"^24.1.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.0.1","typescript":"^3.7.2"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"aef1e7f27c9055e47f1b4ab47b1503b45a5c6460","_id":"@enigmatis/polaris-core@1.0.1","_nodeVersion":"12.13.1","_npmVersion":"6.12.1","dist":{"integrity":"sha512-JabGXqeMLAPaXrR0eradVJG8Pu4ezWehoS4/+6dmnhyQgtX0fFfdBEMfL+5j9MvlYz+8ZBJ/LrpWDKvAbW2QPg==","shasum":"0bb27df35b07e195a6e74e92d06771061f0fa80c","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-1.0.1.tgz","fileCount":36,"unpackedSize":29573,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1k4sCRA9TVsSAnZWagAATk4P+gN8DUKg2sZ9HuPUzN18\nXrmT9kMGQy7FJ/vvixWhQ7u8tTqiawLWC3T17y+nZYm7tRBVPdkn5L+QLITH\ngpX5oOyYXi/gzUI/oNjFYMw+ZvIuZGkO427szvl3FK16/CDQQ5thQbHxngB2\nWE1tBkOfTuLog43lyLGIHpmLIm+lEVEcBcfk5QsZtEFi5UDd6v+CoELwXkTf\nhdLp9+5dn3mUUTIdbfcjVhEHwET2QEBK5/rSoOjbQGFjvSq/zBPbU2iqN634\n5OGToBZzJY/lQtZsEvYpzZVL3HInYVB7PMI/7N7I6uNCiI1Hni1JZeWutfPw\nQCSjRUHFW2ZJD2SXCku/N+AYt8t+WDl0Qq3Ll/U1+qgLj1PXhcBg5FCz//Un\n/E7lScahQ9VYDBhETXZRSi1u3sI9lWTj8F6GCa8SL9MvPsMgLKSJDKA2ymy8\njVGPe9PSjfCN7ZSworDlOL1VYrZDGr+2mbJ19xKlx+0ak6ws0auWk/Lv3XMU\nXeUVq83aTh5vmjGVGGRu/c4FB49bnLTAw4/DXpZ40RzO3TTinwbzLYYXOdYe\nPJNHdrW+GTk8XiSsKODaCAunAkZmWA23yFK9szvtv8vGlf2IPjq/wd9Pmuu2\ngyF4SQV0vdYieNlmjy7e9s5KAGbjhd66jVa7JEa+zqm9Jn/E4YlKmFI5xoKT\nsSCF\r\n=AImz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKySwHje1QVQns+hgcdu8ggMw4flTKJIb6j6zfefqN8gIhALfjauUHC1ctesJ6AhRwkZKe0l7Cpw8kGhIhxdhSm8A5"}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_1.0.1_1574325803918_0.70968087893659"},"_hasShrinkwrap":false},"1.0.2":{"name":"@enigmatis/polaris-core","version":"1.0.2","description":"Apollo Server based library with extra features","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"build":"rimraf dist && tsc -p tsconfig.json","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.0.8","@enigmatis/polaris-graphql-logger":"^1.0.4","@enigmatis/polaris-logs":"^2.5.5","@enigmatis/polaris-middlewares":"^1.1.0","@enigmatis/polaris-schema":"^1.0.5","@enigmatis/polaris-typeorm":"^1.1.2","apollo-server-express":"^2.9.9","apollo-server-plugin-base":"^0.6.5","express":"^4.17.1","graphql":"^14.5.8","graphql-middleware":"^4.0.2","http-status":"^1.4.1","ip":"^1.1.5","uuid":"^3.3.3"},"devDependencies":{"@commitlint/cli":"^8.2.0","@commitlint/config-conventional":"^8.2.0","@semantic-release/changelog":"^3.0.5","@semantic-release/git":"^7.0.18","@types/express":"^4.17.2","@types/graphql":"^14.5.0","@types/ip":"^1.1.0","@types/jest":"^24.0.23","@types/uuid":"^3.4.6","husky":"^3.1.0","jest":"24.1.0","prettier":"^1.19.1","rimraf":"^3.0.0","travis-deploy-once":"^5.0.11","ts-jest":"^24.1.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.0.1","typescript":"^3.7.2"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"ddae7d8adb32bfcb21f9adc2a278559af805892c","_id":"@enigmatis/polaris-core@1.0.2","_nodeVersion":"12.13.1","_npmVersion":"6.12.1","dist":{"integrity":"sha512-P7azQB9I66I2c8Pf023gp+WUY294TflwHcBTRPKAywaBwGk0zWvNUsYWPtVnueom66ZFGO4ZQWUDWeDKyFFIsw==","shasum":"545fa21ca24aa97a7ccdd21c29d51214d81ccf5e","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-1.0.2.tgz","fileCount":36,"unpackedSize":29905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd2503CRA9TVsSAnZWagAAozkP/3IyZl46E+zCHO5fZmv5\n0BLEDraQ3To+ogkL5KeT0pt3AVqdnyO0QWBVf5SmmHRWMsV+V8J4cQ8AmicY\nmt+fsTl26vCopVp82DajcS8QKqhWIMILJe2aD/FFko6BIuxKKCPs3ET9cgSa\npBXdpzbsmhqiRi7RtYfE2+V3YxcspLVfgoui0OxjBLE8BAvc7YX/ZsJfsZqZ\nzrm3/1Bk/3Pm3ZLT8gTBYsb2H3JAh+bhBez+LGx49LLDuM43Hd9BO6q1updx\nfZCY00iztxO2mPKdN68AQLGB6FCPDUb0Xde2nqmp6CVsdj1APb6xHht6E/Wl\nSWJjjSx5XTd+2jPr80l1O0X0WlE0BeuEeStbryLC3nK+ULIAn/cz2dDg1Ip+\nju2/uDrGnKd+9dpOvK21pIxbslP6YjulVNxDl6w3WJtId1qNPZI/pbWtuI02\nz2LGJjHQGedA7nSWaR1DYLK9M/NlyHuFv0jKUB6yyZ1nYUJAxY8AOKbyMzua\nGEt+Xp4v9Pw7pKKKifOukBjS56cscPOH0VegDs5tj0xIbzRm1Gw8rBy5n5at\nodjGkPUIZ0TeSHKx96+pAQbK8mII5LzZUKfmfRVsBCwtj6vmo8QAuH4bm01U\nxyf3HU70jwJQ0ayHdrGPy6Jyl7pbDbJP1O6HXZMTAaBuZUUa0TpCXt3hZ17n\n5UNo\r\n=72Ig\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDIfsos/6oZ5YXLZQtGEA33p6TN8xFm4URm6zyP5K69AIgcSKTfkmEM04fHj+S7wk89zimXYG1lQ278JR/lBA5euQ="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_1.0.2_1574673718882_0.13014477916272416"},"_hasShrinkwrap":false},"1.0.3":{"name":"@enigmatis/polaris-core","version":"1.0.3","description":"Apollo Server based library with extra features","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"build":"rimraf dist && tsc -p tsconfig.json","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.0.8","@enigmatis/polaris-graphql-logger":"^1.0.4","@enigmatis/polaris-logs":"^2.5.5","@enigmatis/polaris-middlewares":"^1.1.0","@enigmatis/polaris-schema":"^1.0.5","@enigmatis/polaris-typeorm":"^1.1.2","apollo-server-express":"^2.9.9","apollo-server-plugin-base":"^0.6.5","express":"^4.17.1","graphql":"^14.5.8","graphql-middleware":"^4.0.2","http-status":"^1.4.1","ip":"^1.1.5","uuid":"^3.3.3"},"devDependencies":{"@commitlint/cli":"^8.2.0","@commitlint/config-conventional":"^8.2.0","@semantic-release/changelog":"^3.0.5","@semantic-release/git":"^7.0.18","@types/express":"^4.17.2","@types/graphql":"^14.5.0","@types/ip":"^1.1.0","@types/jest":"^24.0.23","@types/uuid":"^3.4.6","husky":"^3.1.0","jest":"24.1.0","prettier":"^1.19.1","rimraf":"^3.0.0","travis-deploy-once":"^5.0.11","ts-jest":"^24.1.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.0.1","typescript":"^3.7.2"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"05776039bca53eefaa858e5a80849d047fdee20e","_id":"@enigmatis/polaris-core@1.0.3","_nodeVersion":"12.13.1","_npmVersion":"6.12.1","dist":{"integrity":"sha512-mGYT5ohC3g6yuegOTBDRPox8iCn4yk/Lmu9KF7QZh96cSJkv16l8w0snV2jrJNdj3hZ6KTZXWnP1JP16r6VL3w==","shasum":"b77461fe11237bd6025894b97b0ae946fae3b3e2","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-1.0.3.tgz","fileCount":36,"unpackedSize":30146,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd44SjCRA9TVsSAnZWagAAEz0P/0T1ckCrCAifTFWBBt9d\nm9fHoTRPU7MGK9wRsTppyanjY/rpLLQaGpwbexW2cUNVoJia0yvkTm4c//rB\n4F8X/tAtngYQr1YllSS+rTPEgrw4cy2JwUEw8PigT0Zxt2Yx+Ql34AdtQWrw\n4GCMW8xjsYbTTmUAr0If1TYQ0Ly+Gwf2Rsg147f1FJ+6q9Y0Yb0n9/sncMsg\nwr1O37LaktuLjQVnm7p3ZYSB6RPbBJUzqWcn9/oGb/YQyvQXLLeybnoBatRy\n/U0fEyDTkzuNqa0SKRMNdfq+5EwGt3NrWVlk+26MxqOJ7s7YLRI1prd5cwrP\nJlvKmVKdEx8UMnIHnKm1Vv+HjfRiPt1uW21HaFooTV9VTJ/H0kEugivG6oWt\nXrJIM1BGdEXrZNU5ywe95wZxBtCqdiqIkJG9lFn/bhOxXdidKIo4lDb25RGi\nIS5Z2pSq3DH9GR1HgnhNg+gYGH1CCFMsSF/l+9DwvEo4XwF9mPWHHDxfCfOt\npuAmMEpl0qb0O3lfheutOp5VAgduIWmiPOPOhKs+xP9VPblnB2tkklYKEmeg\ne5nSALmmOE52ASjNmxvi5QRJeDWDxF2zyRdFgbxFgqgDnj0aTbl5iz5xJfRN\nJqqLpLerGQuu0O8IafW1IykEvs+0X2dhaoEka+p1f1fSXo9S2e8Xt/k1zCS0\nOAPv\r\n=plvb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLO5PJo3DeoDKFfE+vRsAYC6LBrjKmJDO5mfLaEidLRgIgRb+PmggtKQhSf5erW6/pr40OZEPmqxj90zs0tMfX+8Q="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_1.0.3_1575191715422_0.3442943217650496"},"_hasShrinkwrap":false},"1.0.4":{"name":"@enigmatis/polaris-core","version":"1.0.4","description":"Apollo Server based library with extra features","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"build":"rimraf dist && tsc -p tsconfig.json","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.0.9","@enigmatis/polaris-graphql-logger":"^1.1.0","@enigmatis/polaris-logs":"^2.6.0","@enigmatis/polaris-middlewares":"^1.1.0","@enigmatis/polaris-schema":"^1.0.5","@enigmatis/polaris-typeorm":"^1.1.3","apollo-server-express":"^2.9.12","apollo-server-plugin-base":"^0.6.8","express":"^4.17.1","graphql":"^14.5.8","graphql-middleware":"^4.0.2","http-status":"^1.4.1","ip":"^1.1.5","uuid":"^3.3.3"},"devDependencies":{"@commitlint/cli":"^8.2.0","@commitlint/config-conventional":"^8.2.0","@semantic-release/changelog":"^3.0.6","@semantic-release/git":"^7.0.18","@types/express":"^4.17.2","@types/graphql":"^14.5.0","@types/ip":"^1.1.0","@types/jest":"^24.0.23","@types/uuid":"^3.4.6","husky":"^3.1.0","jest":"24.1.0","prettier":"^1.19.1","rimraf":"^3.0.0","travis-deploy-once":"^5.0.11","ts-jest":"^24.2.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.0.1","typescript":"^3.7.2"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"e92594854464e1825df96e6247ac15aef63c6ebe","_id":"@enigmatis/polaris-core@1.0.4","_nodeVersion":"12.13.1","_npmVersion":"6.12.1","dist":{"integrity":"sha512-fWV8YdEodXu9BUDJsMhsS/j1Xo6MQ1RaJaz63FGECpYT4I90FeNS1zTTJt1w+B5PKJtmKc8CHc24ZO2VJqTRhQ==","shasum":"e7abe63d15817271f26d85c72c3aaded769ead98","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-1.0.4.tgz","fileCount":36,"unpackedSize":31765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd49qTCRA9TVsSAnZWagAAckQP/RiOH/7FnKU2VUY3RILN\nYDoUm/dZmCQ+mCzxR0ef9k/g8O2yKqAu7gYM4yjR07saSENX/yDQm6vQCXaV\nuAq5PZJ1915MBVttHC2rM6eJRxSglVluVHn3P2cFmoLbrgE1K7fRrR7kZgms\neZTee3fDWERre+J+7fp4oElIDuCT/plILgFom7Rokgem3rFV8bfUx5elt2wV\nHdzVBj3a7rdPyvc7TfOtSu4VXZmT/35fGSMOACTzhkX1yetTfFh1U7Xemky1\nyHNJ/x389Gdl8vXs9EWCTw/8hI5bvSVp0NskICCdzlJ3iIXi7Cmi3mn+ffG7\nwnCOVZ9hOa2FhkBMgAX/jwkBDdsZVzVja1ib6R05I1gsTjacv7paog908Blz\nsf7EfA+ya9SP5//Zj9eg8akw/Yqhmxym2naTqJslj/DHVSamxMMVY9KIM+XB\nMPmxcl704HxkTFfXMZu/ss6mwE1wg6fksH2/MeqeusmjyUGofAP/wZuyMcMA\nIbmDmy2KcAjwCWX+To7Y+vHF8g2p/RKh6UYkD7geicSodJgEYEvc69+LXPT8\na9k+cTqK5MUMOJnKmsH6RABWgjOOCfZxkgU51KwKxhcBdXXTDL+oMXsnX5h4\n5NhMNhdGXbBmxTpFSPUHpNnTbpsaJYiKt/D4mGFSBHWnHxAur7m1NtoHgpaJ\n/fNd\r\n=yCB6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDsVs3eWheLFL0QieyrUO4ukncoQUSRpMtNrGpiz7RyKwIgBqKu4NnIsdh8X7ORJvkeVpXDcNMqG1GXe7ZQTPwT53M="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_1.0.4_1575213714759_0.03127339864442402"},"_hasShrinkwrap":false},"1.0.5":{"name":"@enigmatis/polaris-core","version":"1.0.5","description":"Apollo Server based library with extra features","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"build":"rimraf dist && tsc -p tsconfig.json","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.0.10","@enigmatis/polaris-graphql-logger":"^1.1.1","@enigmatis/polaris-logs":"^2.6.1","@enigmatis/polaris-middlewares":"^1.1.5","@enigmatis/polaris-schema":"^1.0.6","@enigmatis/polaris-typeorm":"^1.1.12","apollo-server-express":"^2.9.13","apollo-server-plugin-base":"^0.6.8","express":"^4.17.1","graphql":"^14.5.8","graphql-middleware":"^4.0.2","http-status":"^1.4.2","ip":"^1.1.5","ts-node":"^8.5.4","uuid":"^3.3.3"},"devDependencies":{"@commitlint/cli":"^8.2.0","@commitlint/config-conventional":"^8.2.0","@semantic-release/changelog":"^3.0.6","@semantic-release/git":"^7.0.18","@types/express":"^4.17.2","@types/graphql":"^14.5.0","@types/ip":"^1.1.0","@types/jest":"^24.0.23","@types/uuid":"^3.4.6","axios":"^0.19.0","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^24.9.0","pg":"^7.14.0","prettier":"^1.19.1","rimraf":"^3.0.0","travis-deploy-once":"^5.0.11","ts-jest":"^24.2.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.0.1","typescript":"^3.7.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"803c81dcd54fb417914cc13df2e2011c79f1fa9c","_id":"@enigmatis/polaris-core@1.0.5","_nodeVersion":"12.14.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-sZTMTpH5VfJVPnO8+PEVgGBCnz3mPkvh4Ktn3xJ+LLCWi8lw2pRaXFxItldfZ41x9sK/Dv+0GYNXZX/CSqfNeQ==","shasum":"6e8aa779d3e320f13f729932348142672fd3910b","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-1.0.5.tgz","fileCount":38,"unpackedSize":74099,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFDQHCRA9TVsSAnZWagAAyhEP/05dwlYx5PK/+MNGBQla\n4fj5LmO0928ZW+6QpZLMsT+H6X2otp7yY85sW1dUKFUb/P3xN+Mp1wGlHsxt\n9Kr36EfeSl5g1FHJgQD1TGk4eX7MLBwyDD5nH3fARD5bcegRUlFAmNJAqrWK\n8UAMjaNcCyMq8MUHghXbjF8bsRGccNqxoPHG+mQaZ/3SYPv9a8m2fwJSDXYQ\ne0Y4DLvnk+T+aYVnBPOsoeA7IjHgxvlGzYxJ+C9ZYdDVPNCG5K8Mkf2Brg8W\n9LaPHVjB2qhFShnhCQ34SioqpKAKZdmCe/FZwXCqDgI9FocO1yZo9km2qneE\nMZUsGqskGuKyd1d1iFxhxiLC+nWEpYl23i8oMXLxcGKrPb7rBNwskMTXsfDF\nA6cyK+d5tQEei889ISelXjtrYcWeE8EmMcfuOd/8GSeRNJBW6RdCQtX2Ka5Z\nb78/7uOdtafKfZ2AWcOo+wndH0zfhSVRhXc7p9VsUabK4DR5C/DIrAucSVvk\nqPS2X6QBuYdXeOBMQBzlbkgxF/5NRP6doqq6klT7Q7iAdEl93blyJ1wmH5tY\nNwvwGF+K9DqdkYsc698Kqgjr3it/RHAmYegU+50Kr62Z1A5DlxRaWsk2Nmc/\n+TF5QqQCaXPaKx2NYOyiiFgYIofpuIxQjCKJj9ZmY+Z01O+yOuwNqQVrqHk+\niBjr\r\n=ZBB1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTcYPV0h2u6td3w65nALINOCns8at6cjUOiFdMDz+vlwIhAId0+3liBeDwonkojjnWdpMh7t41yf33pC7Tvcrh0182"}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_1.0.5_1578382342623_0.20642140137999831"},"_hasShrinkwrap":false},"1.0.6":{"name":"@enigmatis/polaris-core","version":"1.0.6","description":"Apollo Server based library with extra features","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"build":"rimraf dist && tsc -p tsconfig.json","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.0.10","@enigmatis/polaris-graphql-logger":"^1.1.1","@enigmatis/polaris-logs":"^2.6.1","@enigmatis/polaris-middlewares":"^1.1.6","@enigmatis/polaris-schema":"^1.0.6","apollo-server-express":"^2.9.13","apollo-server-plugin-base":"^0.6.8","express":"^4.17.1","graphql":"^14.5.8","graphql-middleware":"^4.0.2","http-status":"^1.4.2","ip":"^1.1.5","ts-node":"^8.5.4","uuid":"^3.3.3"},"devDependencies":{"@enigmatis/polaris-typeorm":"^1.1.12","@commitlint/cli":"^8.2.0","@commitlint/config-conventional":"^8.2.0","@semantic-release/changelog":"^3.0.6","@semantic-release/git":"^7.0.18","@types/express":"^4.17.2","@types/graphql":"^14.5.0","@types/ip":"^1.1.0","@types/jest":"^24.0.23","@types/uuid":"^3.4.6","axios":"^0.19.0","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^24.9.0","pg":"^7.14.0","prettier":"^1.19.1","rimraf":"^3.0.0","travis-deploy-once":"^5.0.11","ts-jest":"^24.2.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.0.1","typescript":"^3.7.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"52af1267102bb5d988923f49267430f392763c2b","_id":"@enigmatis/polaris-core@1.0.6","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-p/3qBWjPDA4Ah1MqJ7ABdCupK9z7YO9up8mfKoOafsiNJOs9ynav+NaAGNdpEsl8XTHHX6bhynCwENfgPQB5dg==","shasum":"59aaff2bdb3d6b570f148be326befcbb177a1198","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-1.0.6.tgz","fileCount":37,"unpackedSize":63288,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFu8TCRA9TVsSAnZWagAAEaYQAIP/UbnwuqYkoHeeUnNA\nbV3TT73/B7RcFT1hxt7jou08h+1LF8Pp84XvtvtWYfl9PSTTcOh3z6TyFTUi\n6DjkGp0+sCVEpDATW6LBsiu+JdGdiSFWgZgkAraGxVASm/pF6pYskCr7hThx\nGXJ4QaOrlvQMvdt9D9FMNYZQhSOEeqU/x5w/GhX7OJfcD61zBOG+5UQJ1tcG\ngy9niqDoaghWNpsxZRsKfOg2Hn/dLOJ4CvMQPEt1hrYz0jQE2VEMEZyl15Tq\nFUCLaQng0B1CcqokA56qJX97IKRz7Gcsl5s8E3i+JPudkRWmJtb8EJPDMKst\ngyZwIfpl6GV6ERCmCHZrWCtGQ5AnWc5qK2vtEGuYKS9dP2VVz/dSD4PuZ8Fb\nQSRQMUStcsnUIjXKX0eu3yzQWdNHJa/OOR7YgjgPQYSC3536FL2xqwZGjdU3\neIhz7aXdkNHS6mIy5CjPr6/K3BTOOT50RfNsNzUe0Apw7+2GdllGMYgcQWyf\nPb8MZVmx7hGOelcdnqcFYa2aEkZqAEDX2BA0IEWs0Ap9vfGwfVbg4/26RcLH\n9uT02hz/PBD6yY53nTZF7kIQAeHJKW0Wf78lUf5hnV+mFHG46fkQkWuYTcWo\ntZ6n9Ahms6a0WD/Ui7cNrBIXqBsH1T26aUGgEiH/2CFGI3UoZVsPA10CqMCK\nNEEr\r\n=fbP3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHVPiuJj/p3cEDBAmml+XnJY1hcoXcgz2+140sXCkbP6AiEAtvut7ZplCvAeIcIhcLmaLnJRxbdF62nMtbs2ZCZVyLY="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_1.0.6_1578561299578_0.0013594854636076459"},"_hasShrinkwrap":false},"1.0.7":{"name":"@enigmatis/polaris-core","version":"1.0.7","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.0.10","@enigmatis/polaris-graphql-logger":"^1.1.1","@enigmatis/polaris-logs":"^2.6.1","@enigmatis/polaris-middlewares":"^1.1.7","@enigmatis/polaris-schema":"^1.0.6","@enigmatis/polaris-typeorm":"^1.1.12","apollo-server-express":"^2.9.15","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.5.8","graphql-middleware":"^4.0.2","http-status":"^1.4.2","ip":"^1.1.5","ts-node":"^8.5.4","uuid":"^3.3.3"},"devDependencies":{"@commitlint/cli":"^8.3.4","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^3.0.6","@semantic-release/git":"^7.0.18","@types/express":"^4.17.2","@types/graphql":"^14.5.0","@types/ip":"^1.1.0","@types/jest":"^24.0.25","@types/uuid":"^3.4.6","axios":"^0.19.1","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^24.9.0","pg":"^7.17.0","prettier":"^1.19.1","rimraf":"^3.0.0","travis-deploy-once":"^5.0.11","ts-jest":"^24.3.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.1.0","typescript":"^3.7.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"920dadaa146e7e6bad2c5fd7e32e4a20a894ddc2","_id":"@enigmatis/polaris-core@1.0.7","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-ew35tPbdr4FqBdB4cGf1o/QZQgD4cjrlb6EDaiXZ7uA5qjf7C9uRsByKt/B0LSV39pWdbE9fhOb3JXlKtSgMGw==","shasum":"c94e2cdae6136d9fdde3c778bc7365021fb29ec5","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-1.0.7.tgz","fileCount":46,"unpackedSize":2179513,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFyBXCRA9TVsSAnZWagAAiR0P/isdnxOp0UU07uadAvn1\nu+v6H21qSHXlKrO2KjaI8+EkiKhka/hq5wtPAPazEjuL0rCrnMNTNf2qNuzB\nrELUeipxLcOjW2FKm2h10q/RF3HaHpVXf6ahMk2OrzQwapdx7Ujs8twriMqv\nccR0UAJ2WmxVWQlbV0Et5PG6BPLgrlPnskEfQhuZvnGfA5QYAC5gskgBEfIz\njZfMqu0uQDT2JT6XtAeonGiJRwNTm8fYEAKPL3w88ewp/4RmCgYeHJ91clYN\nAl9X4YrbSFmmFUJP+cdjKkY4rcA0abjQ5dJLbVHBS4n616ynMHoc3Nkmfnpx\nWJqyunLOv6V3e924HpypEiiOPc0DSb/LhlUWGljmjepcM5BckC/pIyMNXXpK\nDGcbT31UQBL4VjynKBkeq8d/6HRJWQdyjOztsAcT28ad73N8nAPLTe52i4rD\nR1sT4frQ597T4TiASOi2Sbe9i8ZpNYtA9lFFkwqnavUSfkOj7BcMebEbhAGL\n9jKv7hE1tlVzASfDJnjVyX3HobMOCXn10EkmxUSgIL8mIT0VCgcAj1dJj5L2\nI00tV/AMekuY4OBcJJxSq3rFmp4Frv8S2qVtj13rM1nxK4eAlAcz8zcWOevc\nFttSU19y6KP1sfli2Y1OQFfH3YJqpc5nZW2wu7k3XKjqTgOuS52Ci+mG5psj\nMLZl\r\n=bL3z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9hM8U8Cf/2IOhLEaMl+Oxzbf168wHYGEpZZr3GUDJTQIgWShgrCpDXjHhZemTSweifr5XaCR4f4E+1H9UvI1KAfw="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_1.0.7_1578573910416_0.22335774970372846"},"_hasShrinkwrap":false},"1.0.8":{"name":"@enigmatis/polaris-core","version":"1.0.8","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.0.10","@enigmatis/polaris-graphql-logger":"^1.1.1","@enigmatis/polaris-logs":"^2.6.1","@enigmatis/polaris-middlewares":"^1.1.7","@enigmatis/polaris-schema":"^1.0.6","@enigmatis/polaris-typeorm":"^1.1.12","apollo-server-express":"^2.9.15","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.5.8","graphql-middleware":"^4.0.2","http-status":"^1.4.2","ip":"^1.1.5","ts-node":"^8.5.4","uuid":"^3.3.3"},"devDependencies":{"@commitlint/cli":"^8.3.4","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^3.0.6","@semantic-release/git":"^7.0.18","@types/express":"^4.17.2","@types/graphql":"^14.5.0","@types/ip":"^1.1.0","@types/jest":"^24.0.25","@types/uuid":"^3.4.6","axios":"^0.19.1","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^24.9.0","pg":"^7.17.0","prettier":"^1.19.1","rimraf":"^3.0.0","travis-deploy-once":"^5.0.11","ts-jest":"^24.3.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.1.0","typescript":"^3.7.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"e32d57e8a2e0cc4fc4a0b92db949d3b7a9324251","_id":"@enigmatis/polaris-core@1.0.8","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-s71ayTZoFPdcKVdeRqTgN7r3elt45wcCHrJbxyZ2GQoe86XcXPNJj+d0DQigxBxDoZ0VpyigGXhRJPJxtthoEA==","shasum":"5188ac8acbbc5bc3a1f1dc3d6a50e29f38c3a8c3","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-1.0.8.tgz","fileCount":49,"unpackedSize":2180639,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFyz3CRA9TVsSAnZWagAAn8oP/iFD5txBaX+QjTrpl5EH\na+3njtWD7sJui9KEmMtKrmkUP+/n+sbi0NSMvnJ/Ee6DV/Ova2Jn8HQToCOO\nIqH8BNZ1C2vQJgfcFQHdSBh53N3X+Hfl4/w4ldfbdZhjJ/Lfct/BiHqJazqx\n93nb2tmc7kZWkj/JwUrvA/JF9r1AwDzd/LnvVh31O/FXr1yxTYiXMjnAJuLR\n5mQz98GtrGxhbPNsad+6tWZhLhDQ39yuOuqll3KYF0Zlk3gSWg6k2+tehISm\nDkR2ZUZwEjT0pT/iWOO2w7suy4TkwJOhgvq8tB/0oqBPc0q4te1ioJkatxnq\njuK/wo8UQ5P32IZ+SW2ClrGlOobsVFzkD+JefB9fjYwTqhUx+P1c7Nw+F9he\nv44bTLYnUxoJYv+pvBH1AzjYIPeUvi5KSlYmegTh8OGUMTI+DFOHe564MNtK\nZNKaBIGD+i1/ZJzCLzmu9bAIfEh/ZJLQD/3Rg5WLp1PlZj1rtkJFVj4nmf4l\nogF0KNsH9FhWUFBO2cLLXxEHz+kdZHCFkWfoXX3O9+uqr0CyAvY2c9S+zb0U\n/CD31B4YoRFG3WRgsz9RqbwpHsnR7aiA1S0wgSFS86dqo90rGNSaq3as3gKh\nIjoEQV95b1CfMt7puGC1gJg0jDj3+D20OKyOgKlcGn+hiV02BgyaxZ58sIx4\ncOiw\r\n=xytt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCH5l8AeUlWo2UCKyHtk2+YR4lXw0g1jmH59fO+Ib5yzwIgSQ4jHbeuh2f5QyiJsrnqP1EhoBq8+oFD+WFRAv2AW30="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_1.0.8_1578577143152_0.3618295434761478"},"_hasShrinkwrap":false},"1.0.9":{"name":"@enigmatis/polaris-core","version":"1.0.9","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.0.10","@enigmatis/polaris-graphql-logger":"^1.1.1","@enigmatis/polaris-logs":"^2.6.2","@enigmatis/polaris-middlewares":"^1.1.7","@enigmatis/polaris-schema":"^1.0.6","@enigmatis/polaris-typeorm":"^1.1.13","apollo-server-express":"^2.9.16","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","ip":"^1.1.5","ts-node":"^8.6.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^3.0.6","@semantic-release/git":"latest","@types/express":"^4.17.2","@types/graphql":"^14.5.0","@types/ip":"^1.1.0","@types/jest":"^24.9.1","@types/uuid":"^3.4.6","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^24.9.0","pg":"^7.17.1","prettier":"^1.19.1","rimraf":"^3.0.1","travis-deploy-once":"^5.0.11","ts-jest":"^24.3.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.1.0","typescript":"^3.7.5"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"ae9d015b7065295751f3c360ee88b4c7b65f6dd2","_id":"@enigmatis/polaris-core@1.0.9","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-t9XovHqAEA5ga7I9SB+dIv1cEp9LAp+3wvL+42oaNMSE2zkQDeZddU3fPHlQ+A+dCNdu6Kt1og8x+XFCx8ZAEw==","shasum":"bacf729f2beddb5d0eeed2e28d2fdef3e35dfa05","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-1.0.9.tgz","fileCount":49,"unpackedSize":2182603,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMDXTCRA9TVsSAnZWagAA+A8P/0VE5eTH+KJ12qLIjLyc\n9uQKcmJcJsIQoNw7r7mY14XwSU+rQlMmO8sTpJ1AmK6VBKTsBXZKMB3dWSzc\nBrbvw2/2Jn8Dhrpv9WKdjr2cXnbmKr6vNiWzBtKQE52svipHzRanGSkvwkbh\nH41Cg7Erqnd1MVzxtvPMPRNlFIZQdtD1ykMunet+2OY7c7r+lhBp+nl55cho\nwTmrZhTKlV9V51I9+Df97r98hHEXa9bvJ+leLCl4QXlZ3bdwe3YTeitV1XAR\njQAZLAvGhe4m7VFSVx20MI6+BgY36CWylui48KToJ8HhDMuvOpmzyUbbZO7Q\nxN0VZSqmXceRursoE3CIxjhWgCRJ60gRUo6qehWpjjbYEPyL2FljnuEnXzFp\nSqH+DR4T9MS3ZD558mLQo397cUCAmnApFUia/NgTQtydoRrWvx7gfWrypLz0\nxLkhYbJTdtMcxGyNiC3Cn33119/zfPeYpuK2Mvv5CG7CCzpo73c9PXw/EVsV\nidVoJPuYYtG3xgV4pksJQ8WAGNhGszp2XLIix6/0bDKLe7NEd0mR6AUaV9LM\nEvWbdtM/CxBhn37U6TsbIT1zJltbvmzUguLfKpxRtflcjZEODKpXBsjfVYz0\nvAky5qB50QggCMt4gGeoErW480lHEiUq0LoSfrwzSMGa11TgUpwR8PN7IqdU\nDtWS\r\n=DRJy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFuf4IthXuElXyBCzxIFkYTW8PPUrcr5JLUWzTQS2/WwIhAJbJnMmC9CpsLu7FaQmUvoJ9DCk4usQ9eiPvsOjGXJRt"}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_1.0.9_1580217811237_0.45605169315468364"},"_hasShrinkwrap":false},"1.1.0":{"name":"@enigmatis/polaris-core","version":"1.1.0","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"semantic-release","travis-deploy-once":"travis-deploy-once","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.0.10","@enigmatis/polaris-graphql-logger":"^1.1.1","@enigmatis/polaris-logs":"^2.6.2","@enigmatis/polaris-middlewares":"^1.2.0","@enigmatis/polaris-schema":"^1.0.6","@enigmatis/polaris-typeorm":"^1.1.13","apollo-server-express":"^2.9.16","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","ip":"^1.1.5","ts-node":"^8.6.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^3.0.6","@semantic-release/git":"latest","@types/express":"^4.17.2","@types/graphql":"^14.5.0","@types/ip":"^1.1.0","@types/jest":"^24.9.1","@types/uuid":"^3.4.6","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^24.9.0","pg":"^7.17.1","prettier":"^1.19.1","rimraf":"^3.0.1","travis-deploy-once":"^5.0.11","ts-jest":"^24.3.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.1.0","typescript":"^3.7.5"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"19f8e84643cb64d177f22380009799c8a41ff2aa","_id":"@enigmatis/polaris-core@1.1.0","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-s3/PFsvrfSENzHnlQgz6x63HnY5o0OdHor8IBFws5TQsAAI66Kj9kLZo9xRaCdEkVLwpnfd7bHUnh6EghXW+dg==","shasum":"6d4c98f7b4df3b584931482eab69d4b83b604801","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-1.1.0.tgz","fileCount":7,"unpackedSize":2153776,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOSf0CRA9TVsSAnZWagAAQEYP/04fM3de/GondOO1POYQ\nUHNZqxF+plrrnRz3SeLBFdy6n9Jht/sdicHTy57cRfH3EwtPZ/9ULENn6Iwq\n3ai4ESfX2rfncIakgpE8bbFHfH3/n5JeqU+UcIDqzCyJ1P5IY4r+xSYXTeLO\nM26mbEj4DLFmKWMJZR+KJCuDTmhLpwp77qR/2qRPbEcmT2h4Anxk+TNxKUdc\ndY58I0dXeo83ZZHPynfjMi8mmZCBTQrVuOyykeAD1+MSW25NZPuDubtQZdfR\nk4lclFXGe/Dfq3faR7//us+UMOOmhbB8Djn0qMj6Vm1+wA/LkBN50xyvVqLL\nCAwL36nkSdtZbt3oGucllBOEb2UlH+FH81kegHm0qC0VYU3iHoGIDUxg8Jq7\n+yTtIklrBbc/BLw9SBGpXO4SBlzlAjGH1vKZ7U4eI38OFWJGtmF4oX2TWD2r\nGswjytE9+bTghFjPj11hXZGUEX9A2s6WybpuAVgzfv1N/vUHBVNwIgYvVkjN\nfoEdiowiYSwTz1zV7XmxBf2xxUFUX/UqpI9d2OvooDL37wgrfjg+UDAQpPQD\nYgo7qJiUGCWgPhqlajTOe3s9pZ76VxoifMNzRyUrBzvX8HPCO3011hLA/B91\nFaenGCWIe+HegD1P+W7BDw9TFYO7YbsECLeVpxHQKVf0jOB6JGB6LfLYXMrr\nKMMd\r\n=r6gf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEtNNKPc5LJa+FA/6h4Q3kcDtLq4M07LmvT0uU0tLOSKAiAb7jk504JTYsWooHJBLk+K3AsCB4YoSKIf/KJI+TuvBw=="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_1.1.0_1580804084342_0.7447026277244992"},"_hasShrinkwrap":false},"1.1.1":{"name":"@enigmatis/polaris-core","version":"1.1.1","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.0.10","@enigmatis/polaris-graphql-logger":"^1.1.1","@enigmatis/polaris-logs":"^2.6.2","@enigmatis/polaris-middlewares":"^1.2.0","@enigmatis/polaris-schema":"^1.0.6","@enigmatis/polaris-typeorm":"^1.1.13","apollo-server-express":"^2.9.16","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","ip":"^1.1.5","ts-node":"^8.6.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^3.0.6","@semantic-release/git":"latest","@types/express":"^4.17.2","@types/graphql":"^14.5.0","@types/ip":"^1.1.0","@types/jest":"^24.9.1","@types/uuid":"^3.4.6","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^24.9.0","pg":"^7.17.1","prettier":"^1.19.1","rimraf":"^3.0.1","travis-deploy-once":"^5.0.11","ts-jest":"^24.3.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.1.0","typescript":"^3.7.5"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"af45ddf307dd9c4876d00cb1beb14be797485c98","_id":"@enigmatis/polaris-core@1.1.1","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-s3FuG+RXttD4S+anr7a1QcGe9YRo7hgIuL75AMtrNswKn/0gxQv2i162rLhNgc3R0i8fVgu2tECrhqPINuNawQ==","shasum":"219fae76ce4554cb3c84f611941abeea08eb756f","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-1.1.1.tgz","fileCount":49,"unpackedSize":2184256,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOs9JCRA9TVsSAnZWagAAIkMP/2Wx4t1mfkj1TYcbi0Q/\n9rs68D9upncUHp4F5GNFVyTGfPU1u4FGo1HIAn1sRqu/1OQK8nEEbbMuQH8x\ny4XS/QQj7E1A5j7QVCTvAlFTfM6TYVi5+71Q/O9YG8vHXYpaJarJ8QBeqvte\nkyWXGJ1ylSsYi6Sw7iOkYXTSrPYe/3Ak8GK+1za1+9H+cZ3enImgH3l03OLh\nVvaPRWKwiZ+S+ghT9lVuwlTPEbCFM/AwTKWsjMIDtlov+s67Xg1bU4cA0diU\naE40oIeiwNi1MfuEbgh2R81lMimTEcbcGOiz/bpHp2l2UBSMZxWKSZzdJfQz\nBkFf4pLv+6l5k3aFAsjb+uI627QDtS/cWMV+sYH1pWMmjOtCF5l7xqr4VZh+\nNrT2D0FajsI5kq69gaPU7N4aUsRPTcnF6dLl8TmDKehdkDSVKrf8yCE8WAd3\npn0GGNzkljL4Ta1c/2QfyUYG58mUx3A/x3B0b6XPj9lYfDQMlysPTnNMVIB6\nnrEYVdA7ipMOjDPnZeB8siFq4O96V7E77KvL/6CzusY6H/r07q2scSmwm6y2\nBl47ufLKPtHQMgqczuzsLrqEK2myhEMk5RxogD3K/hAgqNHHKoWGSvuW/XFa\ndY8k0WUJ3cfZeQB9JbtuIldkk9lOKMqF1jdLXQibjwlcjcpjHQyM8A/T9do+\nKHsU\r\n=VgX9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwQ5ne94VM7mDYFTJcuto570aZKBV6XebV+8hHGxcYegIgZNjRrQaPK4rqp5mHZOXWsvkZsF/dXTXA2k+yXE7yz2s="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_1.1.1_1580912456526_0.6147510685423858"},"_hasShrinkwrap":false},"1.2.0":{"name":"@enigmatis/polaris-core","version":"1.2.0","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.0.12","@enigmatis/polaris-graphql-logger":"^1.2.0","@enigmatis/polaris-logs":"^2.6.2","@enigmatis/polaris-middlewares":"^1.2.1","@enigmatis/polaris-schema":"^1.0.6","@enigmatis/polaris-typeorm":"^1.1.14","apollo-server-express":"^2.10.0","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","ip":"^1.1.5","ts-node":"^8.6.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^3.0.6","@semantic-release/git":"latest","@types/express":"^4.17.2","@types/graphql":"^14.5.0","@types/ip":"^1.1.0","@types/jest":"^24.9.1","@types/uuid":"^3.4.7","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^24.9.0","pg":"^7.18.1","prettier":"^1.19.1","rimraf":"^3.0.1","travis-deploy-once":"^5.0.11","ts-jest":"^24.3.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.1.0","typescript":"^3.7.5"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"3640b2c8f64e9b31d27c2587ce89deda0048c8ab","_id":"@enigmatis/polaris-core@1.2.0","_nodeVersion":"12.15.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-ixHTcOl16ShHPoCahpzKjeq4FcvFH2uvc3b4XNKRriKwTJRpXov8XAPDuWSzTEQKjhoLIJrzvu+Cginf+slYcQ==","shasum":"7922829151c48565240cf7114efa55135dc451c7","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-1.2.0.tgz","fileCount":46,"unpackedSize":2184693,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQRQWCRA9TVsSAnZWagAAsDUP/iwbg5eduh+fM3MwQy14\nNQVv7vVY/V/STi6AYqJmk6ZNWK6wUS6w7t5eAgRDR5yBxnuzjSPDOh9D7cMw\nI77VSeHzaPXej/FQxcUiGhrlMisGK1i3BWIlS8B6h5q8ua+n3TzXMlEkDrH2\nWRfQiZouD4VOe2YYpHsj/tT29tc3Emmsl8GMSzIkt/bhvh1/yfnd31bxr3VM\nwnHTepJ6vjeww8nUlFm1ueYyTXpf0v/EZgtXoWbsNUQ/NMEIYzQaD6mqs9K/\npxlnVYVEeijQCwILRVrEsHDNXIwYLZQ3eGWxjprv5rvOhMYiJwKddrNGJoex\nAQ15cmG4BGdfXgLhAefZ74yCZPlA1HqP2UNlEf9vGkFmgWDTs8Y/AAhaCA06\nvHwgIxMBLYwRl9ECt8GahCds+IUM7L+fE4SWzk1k1SSnA7ZynGfaTSaFrhkF\ntMU4IaZ2V51hkv9PHXwRGdeuQntcB/71L5PoHrIcFtYLXEenS2St4U1fsPS1\nFK2qIkHwTHGr8TVV6WXd339wTaH0QJ5Hfjc8Dbx7ozi/7ydmpGLIK0Nht0q4\nhFnoCb8Ln+/mlpZ5cp5kMXyDfMclIXnZZrKaJZOqUNBUR7/qoNp2O3zrKduk\nq67tyu6CzTDIt5pR0xzYEpGHLFwBjJDnK2pRFAiuc1HWSzdaILX0Z6/oVBxE\nfZCY\r\n=7CG/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCLPZ+PiR/aIHecpEIlWAFevfmIuLnz84yJiAwts9pTEwIhAIJBrb1etPFB87o6KbLx2bb5QSOm2UYi9srCtOmTfNIK"}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_1.2.0_1581323285743_0.21055730601019218"},"_hasShrinkwrap":false},"1.3.0":{"name":"@enigmatis/polaris-core","version":"1.3.0","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.0.12","@enigmatis/polaris-graphql-logger":"^1.3.0","@enigmatis/polaris-logs":"^2.7.0","@enigmatis/polaris-middlewares":"^1.2.1","@enigmatis/polaris-schema":"^1.0.6","@enigmatis/polaris-typeorm":"^1.1.14","apollo-server-express":"^2.10.0","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","ip":"^1.1.5","ts-node":"^8.6.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^3.0.6","@semantic-release/git":"latest","@types/express":"^4.17.2","@types/graphql":"^14.5.0","@types/ip":"^1.1.0","@types/jest":"^24.9.1","@types/uuid":"^3.4.7","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^24.9.0","pg":"^7.18.1","prettier":"^1.19.1","rimraf":"^3.0.1","travis-deploy-once":"^5.0.11","ts-jest":"^24.3.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.1.0","typescript":"^3.7.5"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"c2b93c37eaa26e5d3096d1890cb69169d6e06f95","_id":"@enigmatis/polaris-core@1.3.0","_nodeVersion":"12.15.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-FJvrF0FDRU9rKvhV+yrvEWkMcv8yd0LV4cBPmL15xgTouItdv+YBvtKEyTYP+z7A3f2GSQhx+b7WSd6re0LqzA==","shasum":"07d3735f7a998501049de5dfdc7a6ee345724884","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-1.3.0.tgz","fileCount":46,"unpackedSize":2184796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQXeRCRA9TVsSAnZWagAA9RUP/3lKPLq/Ck+dBM+oDgZJ\n6IWIBYXd2WVjMK7wv2ZFe7Cx9jsjiy2iOTtqxrC7hzC1gkgEBdsC8FPEPw8J\npKAzF0IofR4jFSaZpcJbH98HqLeN/1j49sOPX2BkLiRg5Gpr2jSa9pnKU/rS\n5rS14Ubp0FfzJh7mfbVOf6iRFgXgqvVMX+0up4Zj6CQIwyY80Lm0CAeISvru\ncJRa/VsMKuiX90tDSdR92UQHRzgGQ6KZbHNYV43s5jL/8eYdsmpd9VDKLeHQ\nLpdi/QN74qcWV6Z9D1yicZfDoeznIhX1UYwBL8MxSbBDhUz/oZMz7POUTSMe\n9y8wVRM0wX4ZfhAsafL1IzSxk61u5cUAbFNBab+igvA0EoSXLc9v6oT1lRl5\n70MZPW75FKpwhwagUE49ZZkKxwo9hUuWg/sVOkKX8lO5BuoKx8jGW82z79Zi\n/jzCkX+APSktbfKytbzYuQNj6tuuaHUdwgsTx221T9sE1Z0k56D4lBc46UC/\n1oPssGMIr1KOHM0VK1BUIb/PDHNRATgfsY/SNKv0cWsphKU/JCSKrBtbWI6E\nqnbTptYOHyQNIgcLN9c3D4Y6O5Ki3HNSJ8uU1EwFkswJpyAP0DfC5M7KcQC9\nAvUlVI72K4fJdlD56kCit72yZRQ1hzpgRIM6CR6ySLylK38iPjfgUPSSJAFh\nWNXW\r\n=Weop\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEadHvfMJuWGr2Jbz05Cug/dg2QDMHsUVswFl4c/8z4HAiEAqoAHN2RGx0zs4MT5TAE93qiNVOnufvJZFTSGDIs/oBE="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_1.3.0_1581348752915_0.6425608382136627"},"_hasShrinkwrap":false},"1.4.0":{"name":"@enigmatis/polaris-core","version":"1.4.0","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.0.12","@enigmatis/polaris-graphql-logger":"^1.3.0","@enigmatis/polaris-logs":"^2.7.0","@enigmatis/polaris-middlewares":"^1.2.1","@enigmatis/polaris-schema":"^1.0.6","@enigmatis/polaris-typeorm":"^1.1.14","apollo-server-express":"^2.10.0","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","ip":"^1.1.5","ts-node":"^8.6.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^3.0.6","@semantic-release/git":"latest","@types/express":"^4.17.2","@types/graphql":"^14.5.0","@types/ip":"^1.1.0","@types/jest":"^24.9.1","@types/uuid":"^3.4.7","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^24.9.0","pg":"^7.18.1","prettier":"^1.19.1","rimraf":"^3.0.1","travis-deploy-once":"^5.0.11","ts-jest":"^24.3.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.1.0","typescript":"^3.7.5"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"89ed892f1f6b0cfcc833dcd4e674d145c886e1c0","_id":"@enigmatis/polaris-core@1.4.0","_nodeVersion":"12.15.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-XQuEi8J7Rw/fmfPew65PXmRHF03q5am5YgsbSIEvPyCcDZuSBEpElryLVDjZExdWj/fIuQiQnAm1sQwpSMgOsw==","shasum":"0bea443fe4bb8c44934deb8255fd463a19a22da7","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-1.4.0.tgz","fileCount":46,"unpackedSize":2185761,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQpYoCRA9TVsSAnZWagAAwq4P/2I9mJfDDWpfdLaSZl5o\np09fwCpk+9V6BudqPplyZF9cNkD1uPWt/YtrYX+cGSYmiwmUjKKTALSNlJe7\nQyWbG2w58cC9ABKdtDIHrvsj/8j/ohVKoqr/IfOHOaEH5arG8EJ+hg9+L0B4\n+TWGMydahMlsIq0gKzw3OWjHwXferBRvq5zQh2I8QcwAeeBZH8vVhtGvvbWb\nDTRW0rHg9qoLEdmn8Bp4+URuitls0gXxR8XzQYx6b4dddUlFRPB5waAHbCPR\nfwRae3KHbr2hFaRcIVzgpKAZIsylsEAAf8emkTDiairhucHlNQbSny5Qsl+Z\nC9Vw66bxJLbXerbLJ7AMdn3kyRL/qX+1+bHsw8vOUPd52v2Mu/Vw1toia8Bz\nkMkN9MIUHZToYUNmsTBrFUSVbh6GOk8Y/LVjJhMVl6jX0p8baOIy307BfRUy\nBapcKWEDvKqgZ9whKPWDk4RwCI5GBmSjPooztCRMIeqpmh7CESD2XcE62m1E\ncSKQaFBZ9wr3bU9Od0r//NKJgzeR4aP/FtAlutoC14b4FiXvW5aPOcj2cIDu\neBtps62Fl8FicjYFZISG6Fcw3lnjCmzcdNzhQc/6wjS6gpyF2ZHxa7dEpxNi\nkzElbY0Oh0bD0C2x/RfHPMs530uMyxH96Vb/HO6RXptaRFglew4GaFk9xBsm\njuCk\r\n=a/20\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4mgA/Wk+isaD8XjJQ/98xk3ztUJfIBDYKU7490KjNpQIhAKeiaQ51JDnaWNOrlte/Nu0YvBjO2qBEEyJPfSUJkaF1"}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_1.4.0_1581422119980_0.0065385088842822014"},"_hasShrinkwrap":false},"1.4.1":{"name":"@enigmatis/polaris-core","version":"1.4.1","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.0.12","@enigmatis/polaris-graphql-logger":"^1.3.0","@enigmatis/polaris-logs":"^2.7.0","@enigmatis/polaris-middlewares":"^1.2.1","@enigmatis/polaris-schema":"^1.0.6","@enigmatis/polaris-typeorm":"^1.1.14","apollo-server-express":"^2.10.0","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","ip":"^1.1.5","ts-node":"^8.6.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^3.0.6","@semantic-release/git":"latest","@types/express":"^4.17.2","@types/graphql":"^14.5.0","@types/ip":"^1.1.0","@types/jest":"^24.9.1","@types/uuid":"^3.4.7","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^24.9.0","pg":"^7.18.1","prettier":"^1.19.1","rimraf":"^3.0.1","travis-deploy-once":"^5.0.11","ts-jest":"^24.3.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.1.0","typescript":"^3.7.5"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"9bc795dc89ea629c24eef92a23266e45a452504d","_id":"@enigmatis/polaris-core@1.4.1","_nodeVersion":"12.15.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-bBJHQe0rib0l9BAg5CgMfqOVGv2nnlqEewxNEnxP0iqiI3XwLvBJqJJd9mXJGTsiG8NJ+bicecj+xlqHpPF3eA==","shasum":"f16f6494b4f842a183fcf10715c3e12cfa04d934","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-1.4.1.tgz","fileCount":46,"unpackedSize":2186232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQp/NCRA9TVsSAnZWagAAhZ0P/1ZqkRxPm8hToNvRgtuN\nN53Zet6o8yNFsOl11fAs7LVJf5Gbz8habAEuyXVAXthonG9w0HCzxLtxfoJf\nmD/cJw8dVuRe7SpWLIksWcYPo1S+dBtTs0bo+RSgrfjlXSeYwV4/UMEMYmu4\nzOafTYzmADj3ryjCeDTJxV4iE5/+evCxZ0Tst5zDIxjO0FEcVenyBVhV09PL\nTLpGKjkdnvw1YJE5Lks/l4XFTz0JE+iiWnQsS9eJRvCAwPHQQr8M6NoQuFKs\nujfqpXOhE0GpGp3j6t1OuWDBzIVuuApY426QzxrFl18pq67KY4vwsJyafGYJ\nPJP6ZrZfOtIBHsbyAVu2gsYMpHXHp8Y5GFqxEe2DH9p+UexSrYL3L1jkkBmH\nM+6xLoKwtDjto7y43M1YtSxxc2AURGNLUydIZwyihxwZIEwu16x3IbbYWk8c\n9nu5wxzF70R+bDm4UYEvf8h0D2wPAvR3x8y6YF1Nq+pSu2ZUkYYHclYPU+vB\ngzuegXLDPUSgkqgFdP2Tn8FgFzYdeOEurI/fL653FMRdxaq+dp7K4FVQY8zo\n3PL9TqUsMO3I6GBC64EHdzALnOoPqLOlKsh5f7pP5BQlj23D9zlHcie+q/ii\nwQwEjm4piRlo5NphlI4669F7HYyM8iF9V705QkRxGQNyDsWQ+J0usyzG1TKB\nLT+T\r\n=mT4x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDV2aIyx0OIFOF5zbxjEJIw1rRUNVysl9FJfOt9rXj7BQIgVLTtfsUtcWt9Tl/Zz8J/V9Gd0t43ga5NhI+Jq5ILbRw="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_1.4.1_1581424588926_0.5138761849249016"},"_hasShrinkwrap":false},"2.0.0-development.1":{"name":"@enigmatis/polaris-core","version":"2.0.0-development.1","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"development","prerelease":"development"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.1.1","@enigmatis/polaris-graphql-logger":"^1.4.1","@enigmatis/polaris-logs":"^2.8.1","@enigmatis/polaris-middlewares":"^1.3.3","@enigmatis/polaris-schema":"^1.0.6","@enigmatis/polaris-typeorm":"^2.0.2","apollo-server-express":"^2.10.1","apollo-server-plugin-base":"^0.6.10","deepmerge":"^4.2.2","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.6.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^3.0.6","@semantic-release/git":"latest","@types/express":"^4.17.2","@types/graphql":"^14.5.0","@types/ip":"^1.1.0","@types/jest":"^24.9.1","@types/uuid":"^3.4.8","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^24.9.0","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","travis-deploy-once":"^5.0.11","ts-jest":"^24.3.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.1.0","typescript":"^3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"f242e431b0d133ef6fa70f5cecbf423f106a0f09","readme":"![Polaris-logo](static/img/polariscoolsm.png)\n\n# polaris-core\n\n[![NPM version](https://img.shields.io/npm/v/@enigmatis/polaris-core.svg?style=flat-square)](https://www.npmjs.com/package/@enigmatis/polaris-core)\n[![Build Status](https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master)](https://travis-ci.com/Enigmatis/polaris-core)\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerConfig\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-development.1","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-nNsZMmpvbToxOv1AdP7Ij8D7YUIs3CVC2rFNBJkyzthcwBEd8l9T1xxFBqWUoQk7B7cU2HQ1x6UVhVAiH2P9sg==","shasum":"8dc7c83a53f051bbeac3fd73ac0daabdf7daea54","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-development.1.tgz","fileCount":46,"unpackedSize":2190456,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXmtnCRA9TVsSAnZWagAAkukQAIS/Ufifg7I5wQ9yBBsB\n/gmjBOYJGkwSFqvW2/1/vURsNMEwphhNv/E8cg2BqXVnaAsY+7dcfCMfkhFq\nbvSwMZAyDDQWJS3SJYDi/if9hIrrQYo6oiiAdIjJItdFHuoeV4OyX2HB5/KV\nc6tJ0S4wmMSI9QhDlFVbG8TErj/vGxxIQ4NoB8QZvrB0F7D/hhgGEvzmLhhN\nbUcAXV0XG3X8F8GWOI8cB+a3l69mBFzBnc1wN+S1f28R4Ut0eYruYQeHYSVK\n/t0Hb8svuo3OUAwOQcotsbGil1ELobOovGdISZa/0dKhNKAjqW7TUSK0Jdmt\niGHRI4jpdChUbIwz704gWe3NlIBQtO7Ma7iqgDF7JpvxQQcDIXIP8jAypiY0\nCErAVLRxkg8T0GDhFOAhbvMyq9/s9j3iymxPB98TbDWTe9Bl51JntF7igGQH\nNNOb5khOdui4mOrUCXI5nzP8kLlqh6d28WUYeCfIx/rM9QfA3nhyJEztGuGs\n21ZzGB60iRKlS/ZKfxCSyoLkgtP9xgI6wk62mVXE3e8Py9oRwzbCbxJ21ifB\nSNdgqwrjDSrLcxjcyKq2wTHjzcNpVkaN8LYbSgPn9skJszM/ahIXz9Lvgn2S\nwkY2wBwSw6oAnaTGidi2oM9BmAyQsGUQEVR34YigiTh68WVn7m7uAnG4zs5M\npP4k\r\n=iM1l\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH1YjmcYgq1E7F04X6h5PI8MK15h291ZCpKOXBhzgMYCAiEAws6q7B6hc+XL8A2X4G7drLDYh940wIEB0MGg7L65C/g="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-development.1_1583246182767_0.5420404832104591"},"_hasShrinkwrap":false},"2.0.0-development.2":{"name":"@enigmatis/polaris-core","version":"2.0.0-development.2","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"development","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.1.1","@enigmatis/polaris-graphql-logger":"^1.4.1","@enigmatis/polaris-logs":"^2.8.1","@enigmatis/polaris-middlewares":"^1.3.3","@enigmatis/polaris-schema":"^1.0.6","@enigmatis/polaris-typeorm":"^2.0.2","apollo-server-express":"^2.10.1","apollo-server-plugin-base":"^0.6.10","deepmerge":"^4.2.2","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.6.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^3.0.6","@semantic-release/git":"latest","@types/express":"^4.17.2","@types/graphql":"^14.5.0","@types/ip":"^1.1.0","@types/jest":"^24.9.1","@types/uuid":"^3.4.8","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^24.9.0","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","travis-deploy-once":"^5.0.11","ts-jest":"^24.3.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.1.0","typescript":"^3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"bfc838f631e20bab743ae8f39c0dee56c628fcb7","readme":"![Polaris-logo](static/img/polariscoolsm.png)\n\n# polaris-core\n\n[![NPM version](https://img.shields.io/npm/v/@enigmatis/polaris-core.svg?style=flat-square)](https://www.npmjs.com/package/@enigmatis/polaris-core)\n[![Build Status](https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master)](https://travis-ci.com/Enigmatis/polaris-core)\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerConfig\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-development.2","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-RyjYV3PNhgIwKElaQrIzs3W4KQQpgaNLakYguwJ9CHDQ6uWqSn5nrB9J/ENym/mSbv2W/+uSeu5+ZO8CITLctg==","shasum":"44084352fb41af24eadb2abcbe9e09d1fa45525a","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-development.2.tgz","fileCount":46,"unpackedSize":2190713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeX3HDCRA9TVsSAnZWagAA73QP/jug/LQouVeSE3gRY3za\n5oApP32dLV+da7gQwPyCj8Rpz2H3j4HKzWpFZql3tqirA6zFdeypLhzppyi7\ni7GmS6Qykbw675WslHdfVrORPa1dHQ11WXXchmGpRo0JJaNQgbXi+eOcZt63\nutwWcu+LjPz6dR2kqxkWsDwXinxFZZ/1V5S/hLIltBXEGeUo4MY3q4cW86qn\n6OC8kd+ZT+TUfviOa6i4Kn9sT9Qckm0Rpfbu/kECnA91u5xGa7eFyzlk3IUJ\nXuzEO1kDrLpZaZoomOpqZk7ix0M97X9XmtZGS1S3RFekUxZ3AYsHWvaDdia4\nNP+71gGT1PRv/MNBI2nR/rMMyTqjY+fH92SoofDqBJCpAMQDWCJvCFR/myqX\nK7O2zrf6BsUkxgevQrO+9R0hyfIPQE1LH2XKrAYUXYVcRfDGN33CYE/iLXhX\nmeoybysUMYgCxSYlHaMdttwd3X1IawqK5jJEFZ9CnOxaONc93T5GQVvwOYxg\nD6MnculRkn0WWjXu6tiSIL8rEWKMOqb+TdqPie9inkiAZv/Vo5arxdvx6tDy\nC/DF0hH2PYWrL24RII+l6WAWZAh7RU3fBhiF7PuZJ4RZqVgHxiYki4iclo7U\ndbq2nvGqI5D1Zu1k8P3JI1rjI4uwyMqbIdtm7w/2gR3N57dUxZi/cMujvL+G\nf4IV\r\n=MGIU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAXiuZn/beIj6cR2x6EdHsZRry0P2MWTt+1SVUhZpxNaAiEAydpDLiVri93aZ1dMzRLUxYDL3JfyPQjOMzAgGNp8stE="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-development.2_1583313347120_0.18120013005792357"},"_hasShrinkwrap":false},"2.0.0-beta.1":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.1","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.1.1","@enigmatis/polaris-graphql-logger":"^1.4.1","@enigmatis/polaris-logs":"^2.8.1","@enigmatis/polaris-middlewares":"^1.3.3","@enigmatis/polaris-schema":"^1.0.6","@enigmatis/polaris-typeorm":"^2.0.2","apollo-server-express":"^2.10.1","apollo-server-plugin-base":"^0.6.10","deepmerge":"^4.2.2","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.6.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^3.0.6","@semantic-release/git":"latest","@types/express":"^4.17.2","@types/graphql":"^14.5.0","@types/ip":"^1.1.0","@types/jest":"^24.9.1","@types/uuid":"^3.4.8","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^24.9.0","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","travis-deploy-once":"^5.0.11","ts-jest":"^24.3.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.1.0","typescript":"^3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"3ce5a9eedef964b9616a67bfe58bca4f714d7bc8","readme":"![Polaris-logo](static/img/polariscoolsm.png)\n\n# polaris-core\n\n[![NPM version](https://img.shields.io/npm/v/@enigmatis/polaris-core.svg?style=flat-square)](https://www.npmjs.com/package/@enigmatis/polaris-core)\n[![Build Status](https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master)](https://travis-ci.com/Enigmatis/polaris-core)\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerConfig\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.1","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-Dk3b3/Jhvho8AKThdFTO73RiWLZI5InTFDNBwCJ/yMNhN6C9Y8bphtfmXZcCMdRrS8u8538I4uFdVxkMnIYqcw==","shasum":"30781454e28c8e9408056561c49faef536fa4f45","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.1.tgz","fileCount":46,"unpackedSize":2192516,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeX3RCCRA9TVsSAnZWagAA+o4P/1DDriUucJ3NIJf+aINe\nxm6MAavF/mTe5CIKKD8Q3EpfhPZNiEc97/bnTzQ6YCk6aeLO4WttGwdTGZ3C\nrcHVJ82/uS6sbRmv5S88GaPLyPMFimSuBLcUZdxad08dwe4FOoXNo1Bxb2Za\nqU3AcxooQzpJxG9GYDkFpqrlyh1GYqPWq3F2HKIPO2ZgqRUweACXGaKx1plD\nhvd/zFIKRoY6mL1SRc1D5nnWCyJn+MROXUafaA7meH0FDYIbHlyHEEEBfx80\nz6RHDPCkFezDPEn+MzRm2731vox6F3WO/ueK+S4Li4KL3x3wTdW+M7rz2mVT\nO5UtUk9NM+WJXIHbT5uEpgrjhonKWR5HgxVlsEtv8I6VmDzMa+JXfmaPpdkQ\nvLt42mTh8cqSmAvDrT9j4tVtMcB0a+cfZr4X75R4ezQOQuClqni5R7JAutb4\nq0hcrI7gN2/vztE0ETlCdHG2G+Qk4/MF1mIUx02UzNsxwC7SXEsNTQnmsPVM\nylTgCcvWEWsQmimrxGiLGYjraJPGN7g3yoofod7s8Gk2mv61VkgW3unbOeC+\nCVeE2xiVj2mePlWv5Kz1jN1QGKzgekn31EUc2dV97AXk6NtZnXlUQiciJ0TY\n3qW74rtvwln2m5ipvF+WgL9CfIgOprETlwVqvmpGh0qoKSb4bmL0/43zASIR\nPwqd\r\n=6D2N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHqn3KcZcxlFSA2sRZBtf6ZrjhRh31Q0NBhTDbJBSL/sAiEAnzIg8ZsBFzjIZwy1fntVW0dmSLTyCaNhv7u6ssJuupc="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.1_1583313986185_0.0018855190198490135"},"_hasShrinkwrap":false},"2.0.0-beta.2":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.2","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.1.1","@enigmatis/polaris-graphql-logger":"^1.4.1","@enigmatis/polaris-logs":"^2.8.1","@enigmatis/polaris-middlewares":"^1.3.3","@enigmatis/polaris-schema":"^1.0.6","@enigmatis/polaris-typeorm":"^2.0.2","apollo-server-express":"^2.10.1","apollo-server-plugin-base":"^0.6.10","deepmerge":"^4.2.2","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.6.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^3.0.6","@semantic-release/git":"latest","@types/express":"^4.17.2","@types/graphql":"^14.5.0","@types/ip":"^1.1.0","@types/jest":"^24.9.1","@types/uuid":"^3.4.8","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^24.9.0","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","travis-deploy-once":"^5.0.11","ts-jest":"^24.3.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.1.0","typescript":"^3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"35b90633fee2f7fe296481c37294730ad3ff5ffc","readme":"![Polaris-logo](static/img/polariscoolsm.png)\n\n# polaris-core\n\n[![NPM version](https://img.shields.io/npm/v/@enigmatis/polaris-core.svg?style=flat-square)](https://www.npmjs.com/package/@enigmatis/polaris-core)\n[![Build Status](https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master)](https://travis-ci.com/Enigmatis/polaris-core)\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerConfig\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.2","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-HuCKuGCL/6LDY3yaxQXtGXCjxmex2kqous0JBSHMVCWRBLtNf9OwkUoAJg+IFLPQO6z03PMQRSZ2JTGkaVFwDw==","shasum":"a66656d396e0106a79312cf2b1c63eb15c1fa7eb","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.2.tgz","fileCount":46,"unpackedSize":2193782,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZM+1CRA9TVsSAnZWagAAVHMQAJ+wDNeFVR/BIXzyCfCT\n0tEMoVxfgXjgB115OWK1UyZU0ddLR3joB4FcgEaFSq4zvs7Rlzk6lMLMlR8c\nxG+44f3+piQo/HF/e0oYBNyE9P5z5603KJJs5JxjP1F+yFSwdvREfk3HL0u6\n9iPM1AK2+EqWIq2RcegmP/jRdyZA/2rFUkevoefPx0hBF21iYn09qdcUyMmk\nnE9pdd51QkaANidHo+Gv3ZdkV92UdYGS/rYPjEoz07SONu9A5AV/rfxYs9KZ\nEBP/YRvSYRts+y9Aqo4qQNT5lwB+aeyaNdRa+d5fHYpHHrHlO14sVplRw4Yh\n4JWJdAuTMyhQLnQ04434cMn6fkpHVQsgcRRFY5IzYYAPEZp7w0n82yE4zSsj\nlB2WdOqzhGJUtGEHH8DFdyc+gQRlWJ4BXD4WCgOOAuQz/M4i4HCulZPiGk5Y\nQMe8/JRI8sFtInrNIZjWsS013TqeKa8Q1VDxatcsRuIrMywZzM6sIJgfbvo/\nDdFSLd5wbzi+jwWF/Um65Io4jCqF2CdopROdEEZQo7ezbj6IigQuRd56+XvG\npfIFK8JTDcjxOB23Xz/2UktRSaETbR9tGT8PLLrOHsTmEMB9s6EC7U6Z9/ah\nqfPCHRrYrFUZMPkHnP9fawZUjNzJb7md0IgWOy+ZvtMKaRS0xX4u88jhHktR\nMKNL\r\n=uZpA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDg9WVLGGFerl5D+2N9b7tl0phlCj47tAYM9srzNI+49QIgHUdxOqypgUBZ+Rde2vG5DHDg5P7voSVtbiRndwhNuO8="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.2_1583665076580_0.716707728161678"},"_hasShrinkwrap":false},"2.0.0-beta.3":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.3","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.1.1","@enigmatis/polaris-graphql-logger":"^1.4.1","@enigmatis/polaris-logs":"^2.8.1","@enigmatis/polaris-middlewares":"^1.3.4","@enigmatis/polaris-schema":"^1.0.7","@enigmatis/polaris-typeorm":"^2.1.0","apollo-server-express":"^2.11.0","apollo-server-plugin-base":"^0.6.10","deepmerge":"^4.2.2","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.6.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.0","@semantic-release/git":"^9.0.0","@types/express":"^4.17.3","@types/graphql":"^14.5.0","@types/jest":"^25.1.4","@types/uuid":"^3.4.8","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^25.1.0","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.0.4","travis-deploy-once":"^5.0.11","ts-jest":"^25.2.1","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.1.0","typescript":"^3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"a75ac224167bb863c275c4649d974e2a84dbf761","readme":"![Polaris-logo](static/img/polariscoolsm.png)\n\n# polaris-core\n\n[![NPM version](https://img.shields.io/npm/v/@enigmatis/polaris-core.svg?style=flat-square)](https://www.npmjs.com/package/@enigmatis/polaris-core)\n[![Build Status](https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master)](https://travis-ci.com/Enigmatis/polaris-core)\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerConfig\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.3","_nodeVersion":"12.16.1","_npmVersion":"6.14.2","dist":{"integrity":"sha512-DqdWG9DdFl5b8UiUZmT08PNZhjNNvpKw2ckZL8/3AgPeN/9fl23VyWTyqcZSQj9tdH+VwewuHV5LQC3j6B5eaQ==","shasum":"c85e5ef4cec857acb3d511272f01535e76125869","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.3.tgz","fileCount":46,"unpackedSize":2194321,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZhylCRA9TVsSAnZWagAAT+4P/Rko0I/kGafnfOgI61eh\nVwVxDYjmU21/oBIJwKtyGRAVmhvDjNREdebGvQ7pEj0zhqFgsrH2MFebEp1a\nh7J0LDxpdqAUzI2ohpFJX9POVPTO5Wri43VH6KtgxXRPQ2TYMXK3IPdWlK49\nsvceYCIUP2kvHo+MlM0xiLWlXB0LpO1BaxiExkEvzUu1SvFlzDDgHbfJMnZx\nXLxGkNHdm+SKrW8L6M+fQACwpCUW2/AwE/gXAG8hiWVJp9NFx8IaBw8YjRYA\nPhCWuMAueH3h2GlB8gB9R5IRo1LmXhEhbtvFtASgVd7RVSalSt20+ypeAPhO\ni/2MQ+WLK9XvH63/rTvE4ahmg/7SmXwIF1hHSKThar493KkP2Ggzd7KrdPZ9\nE0IreNPLVWwKvYCttrLVNOO8sSxm7FT6RXqbl/8baTIb2qiv6abWuBTc915P\nw79QmEZIV61og92BOEBdDLUNCsSeE0Kv/pAEedZbT3y++gXD8ZR3LtE/ELkv\nGmXAsQLeGyY1sgtybhVhyBgMq8WGN0F+Y3DEmatLX2vRgflu5wmELlaBtxuA\nejVURnLeGoZT+FB9Yo/P/ieGo444xiloj5k6zXks6ZSxJwEsiDWDzXiqykxW\nNRpvuqsQiSSlwWvfWWX2YwJuskw2pUUOmZbBCAdk+tZpbJgpb9ZCOX58S52O\nUKqb\r\n=uZLq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkwp/eA87Toj/+pYqol9DVkTn2z1kg2HLcp51a7URAGAIhAJc7dlhoi0cb8CHbmcOPS7+9iei1Rl7BbCRUUYsPD9l1"}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.3_1583750309026_0.3752832594831359"},"_hasShrinkwrap":false},"2.0.0-beta.4":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.4","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.1.1","@enigmatis/polaris-graphql-logger":"^1.4.1","@enigmatis/polaris-logs":"^2.8.1","@enigmatis/polaris-middlewares":"^1.3.4","@enigmatis/polaris-schema":"^1.0.7","@enigmatis/polaris-typeorm":"^2.1.0","apollo-server-express":"^2.11.0","apollo-server-plugin-base":"^0.6.10","deepmerge":"^4.2.2","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.6.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.0","@semantic-release/git":"^9.0.0","@types/express":"^4.17.3","@types/graphql":"^14.5.0","@types/jest":"^25.1.4","@types/uuid":"^3.4.8","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^25.1.0","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.0.4","travis-deploy-once":"^5.0.11","ts-jest":"^25.2.1","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.1.0","typescript":"^3.8.3","ws":"^7.2.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"d633e66f2d9b4272440682f9cff6da72bc78d80f","readme":"![Polaris-logo](static/img/polariscoolsm.png)\n\n# polaris-core\n\n[![NPM version](https://img.shields.io/npm/v/@enigmatis/polaris-core.svg?style=flat-square)](https://www.npmjs.com/package/@enigmatis/polaris-core)\n[![Build Status](https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master)](https://travis-ci.com/Enigmatis/polaris-core)\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerConfig\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.4","_nodeVersion":"12.16.1","_npmVersion":"6.14.2","dist":{"integrity":"sha512-ydHmEPsDyGVw6MXnqyr1FEJhZsUVJYDHMSP8FFNid8ZB39VpU7DWQSVbq6FLkB6JQ7RO3VIJxy8PcpV893dOWg==","shasum":"d197a444ac9e332de6d5fe66911cbbfdc91040a1","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.4.tgz","fileCount":46,"unpackedSize":2196269,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJecIalCRA9TVsSAnZWagAAfMUQAJZlEYJPor2oHiVzaRMu\nb0SbYKUD981OXKg2xV01H9hjiWFVxfj7GezTqNbz6PgxfaGWxMWfCUBldsNL\n21/sgeiQb0ZY14p2rwy94spG+TzjMY+BmEGeon5y/zLMvmC4Y/NPR2VmIbpP\nFz4Kfl+C45cwuVkIC64O6xbRRYY6Ll0jPkX40e0oXx6aCbJM00zLfUPU9ZIz\nNCq9ANj2aCJh5lV5mxLYLllkzNqCFYsS5jT97fHsP/cNuNzwIN5bAGANZli8\nNsj1Vfpfz6GWIcguQeZHLKITLZAeH58S0Avrgmndkeyi5oZfCFi5zAA1tWPZ\nW695Cdm0G/u20BbivWUBiqO/3sgz6wzy6SAYOPjz9Ntv7mAyq2zHggQqsZ2v\nCH3ObH9ERALmaxORLYY7PfhD9mP2CugCi200+TDuoJPkHGC2XMUo0hPd9Kz7\nMTQKqStlOhltIU3HYxB7sxvBMAiyJK0/v+dWwyE2ukyC6n49Qm/tXPv8ckRS\nkXoQZfBPUOdc/dHF/Bj9kCTkTT5o+PJBcs+XQEJ4rE6XTZ+DKsh+/n/CPznJ\nWqnavw0qQSDSXVv4Bou6mYjfSL7u8XOptP59i8KmkU317erJ/hl5EaOYbdG5\n65sCHDmTz7bPeWBo4R4uwi1OeaurSWXzg6zZnuV7m003W6BCngydS37wAf4n\nvZ0I\r\n=l2mu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICcTfa9P5Z/5zN9B4UBbsKH0CwHISfqNVZKPJLUoooy/AiEAkPOhH4NqYGWCkd+0tPGwXHKWmDlPcuX5UYe6EylxiXI="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.4_1584432804559_0.08448680649108642"},"_hasShrinkwrap":false},"2.0.0-beta.5":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.5","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.3.0","@enigmatis/polaris-graphql-logger":"^1.4.1","@enigmatis/polaris-logs":"^2.8.1","@enigmatis/polaris-middlewares":"^1.3.5","@enigmatis/polaris-schema":"^1.1.0","@enigmatis/polaris-typeorm":"^2.1.0","apollo-server-express":"^2.11.0","apollo-server-plugin-base":"^0.6.10","deepmerge":"^4.2.2","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.6.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.0","@semantic-release/git":"^9.0.0","@types/express":"^4.17.3","@types/graphql":"^14.5.0","@types/jest":"^25.1.4","@types/uuid":"^3.4.8","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^25.1.0","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.0.4","travis-deploy-once":"^5.0.11","ts-jest":"^25.2.1","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.2.0","typescript":"^3.8.3","ws":"^7.2.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"ef92c834a6b0c5b9bbec0e313c9072392d3bcbbf","readme":"![Polaris-logo](static/img/polariscoolsm.png)\n\n# polaris-core\n\n[![NPM version](https://img.shields.io/npm/v/@enigmatis/polaris-core.svg?style=flat-square)](https://www.npmjs.com/package/@enigmatis/polaris-core)\n[![Build Status](https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master)](https://travis-ci.com/Enigmatis/polaris-core)\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerConfig\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not. \n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n```json{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\n            \"warning 1\",\n            \"warning 2\"\n        ]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.5","_nodeVersion":"12.16.1","_npmVersion":"6.14.2","dist":{"integrity":"sha512-2zJf9oBXACU71LRqVGozE5UOI2CZsoXrZkfo+DHVXewYdOszgnoUeer7BBYn1UFYP3ldnma3MfQmz6pipyb7oA==","shasum":"9e9d2778bbe918cd81c5dbe789af83deb165df59","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.5.tgz","fileCount":46,"unpackedSize":2199621,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJec0jBCRA9TVsSAnZWagAAXY0QAJ7vf76UUKKIL+94eNqy\nzTaBychC29ZxbThLEv7A3tyrTinFDYhCz+CdoHCAntBPUFm4TQswFHLprbAm\nz3r9RfneElf++4Uhh5mi27vzbjK5tmsfeqLRwoN1Es/Jkh+c52nsXXKm7lhv\ntRZaKBDWNrPuUiAQ6N/NLzUmxV4omYhr8St/VjTGRiaY8vUrqDmmofYeTaMl\n7FsJ5FS3oXDp1jZwinhZFK00G38B5jJrefN/do1ZTq90jAsef/lM4/rCstbP\n/Z/6W/7fY1qeguWj0rido1t3ys9lzoqt9lbdx51fUvIkt7XRJfRJFR7xbQbj\nU+z1r+hyPGfViUZyZzvNb/2e7huIepxE9m0EKQV0UwgNoNLarJ9oqcpe5f24\nxXMwCZA172qstpG9TPmcite8yI/ag2obzcMxZrwvPW4lbilZERHdoiXwVo7c\n4vjn8i6er5/9Cb24HSGxgKsvlP8YWBEfU6qgiOJr1BHWQV2t1702B9NmTdtk\nDBNEqOJo46T84P/Q02yDSWYezFYuKxCoooybDI54gSPg8g/KK1EfAqNWcb/4\ndOQ/wClSK32jNB+zZ5tz6mYplBg1tf6DJqk2IAP2PBMhD/TQInzjpX73XPzl\nKnJMDtrMlK2DnbcZgSLD2Vi1ojewIpbE8LB+NagtvyvD86SM1tl/DOuN9Y4x\nOKXR\r\n=KP3f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEHcZJ75hjl8Me18PfRSfq0MTENN0PlImtctTpQrDovQIhAIFAm1bBQvwh3Bu6yE8fydTthyh6kyAIhbm00nPQ8lYb"}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.5_1584613569276_0.41904794073146756"},"_hasShrinkwrap":false},"2.0.0-beta.6":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.6","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.3.0","@enigmatis/polaris-graphql-logger":"^1.4.1","@enigmatis/polaris-logs":"^2.8.1","@enigmatis/polaris-middlewares":"^1.3.5","@enigmatis/polaris-schema":"^1.1.0","@enigmatis/polaris-typeorm":"^2.1.0","apollo-server-express":"^2.11.0","apollo-server-plugin-base":"^0.6.10","deepmerge":"^4.2.2","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.6.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.0","@semantic-release/git":"^9.0.0","@types/express":"^4.17.3","@types/graphql":"^14.5.0","@types/jest":"^25.1.4","@types/uuid":"^3.4.8","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^25.1.0","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.0.4","travis-deploy-once":"^5.0.11","ts-jest":"^25.2.1","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.2.0","typescript":"^3.8.3","ws":"^7.2.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"c78ea1bd8c5b3f8b217230852f2f5ccb412b32e5","readme":"![Polaris-logo](static/img/polariscoolsm.png)\n\n# polaris-core\n\n[![NPM version](https://img.shields.io/npm/v/@enigmatis/polaris-core.svg?style=flat-square)](https://www.npmjs.com/package/@enigmatis/polaris-core)\n[![Build Status](https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master)](https://travis-ci.com/Enigmatis/polaris-core)\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.6","_nodeVersion":"12.16.1","_npmVersion":"6.14.2","dist":{"integrity":"sha512-1P07PcO8ecjVp6PTE17A1l6X3qrdR3qnQzUJ7wIGVLXUzBKA69yX2TuTx8nHZSYUNC3uwLYZMHkm1sTzlw86mw==","shasum":"29ec1ed6eeb4e67bee0c6c9c94aa0a94711864e0","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.6.tgz","fileCount":46,"unpackedSize":2201196,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJec2tDCRA9TVsSAnZWagAAaegP+gIm/lQV+mDx7QwEZp0g\nyr9lF5k0nwbwHls0H/aVWZWuwD0fNIWk5PBvlQOT7FJTPb3rId40ksWg3IjG\nsFo/nCgWhZ60Gg3lLZOPN9aEWqj5h2Myu6RL180J2n8NG5FEGBzjQbBAvhzV\nv3WS22Dyihy37fRJkq1qfrY/g21phEy7JMgq6OsdiDFUS6v8DA88X28hW6HO\nzdVE76hPmnekjdeORIl4u4/vZEO18rIX+VsU22liDD/He20WUFaukmvYHC63\nImTD3Mi2mDgO6c5le/utQEuEFKJm0vsCW8uQNXnexx8efAhQGlxV37Dj3kJF\n8QG7pt7FU/hqXc+nZ91Jx+2LzJvAn7iztPvEeNp4H8ZsEOGIZq0EtcMr8PFI\nGan3QFXwFeK7lj5IDJfCVavrF4jzyaUMdlECYHoo5EyuB8MJQlsmqWr5jNQa\nwpilTD7DVKzcZVyQ3rKYkWOqEwJPsCCWrrkYVMJqoadnKuqqNQXGy8iSUCdb\nZpiC2sRWzw8dK1gzkAP27YnODHzJ+Z4A7DqfxD77WH3xQ1kB8NEStcOL8A/C\n2Snxxfc4K792BuvsWEc0sL6Z9uwAC5X03CrK6ad5q2wugn5MPMukDaQuHSWz\n0JRJqS/84cTGZKb5wO+VP49gV2cqHBfR7yIKhZOkFAth6tW7N7kTZM6X3qxZ\njzi+\r\n=+1m5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEHRxwkinCHZawykv+SLCy72PyWFp6DFHbv2hwgfqaLjAiEAx38mFEdFFZWP+gh584m4GALHyLxQr8+J5bOTr4MM6Cc="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.6_1584622403216_0.30849911593372004"},"_hasShrinkwrap":false},"2.0.0-beta.7":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.7","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.3.0","@enigmatis/polaris-graphql-logger":"^1.4.1","@enigmatis/polaris-logs":"^2.8.1","@enigmatis/polaris-middlewares":"^1.3.5","@enigmatis/polaris-schema":"^1.1.0","@enigmatis/polaris-typeorm":"^2.1.0","apollo-server-express":"^2.11.0","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.15","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.6.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.0","@semantic-release/git":"^9.0.0","@types/express":"^4.17.3","@types/graphql":"^14.5.0","@types/jest":"^25.1.4","@types/lodash":"^4.14.149","@types/uuid":"^3.4.8","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^25.1.0","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.0.4","travis-deploy-once":"^5.0.11","ts-jest":"^25.2.1","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.2.0","typescript":"^3.8.3","ws":"^7.2.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"0c54851128a2a6e109603b3f620c3ba812ed5d0a","readme":"![Polaris-logo](static/img/polariscoolsm.png)\n\n# polaris-core\n\n[![NPM version](https://img.shields.io/npm/v/@enigmatis/polaris-core.svg?style=flat-square)](https://www.npmjs.com/package/@enigmatis/polaris-core)\n[![Build Status](https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master)](https://travis-ci.com/Enigmatis/polaris-core)\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.7","_nodeVersion":"12.16.1","_npmVersion":"6.14.2","dist":{"integrity":"sha512-OID+ViFcB1GT2jodpBoZFCZMYO8/aogpvTHRm6T5AIrh8SLmb2u48JTSNEYFJM70sr/Z8X2AmX6t8ikGuTS/vg==","shasum":"41d7bf67051b7483d4aba3292ec6fe696448afd0","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.7.tgz","fileCount":46,"unpackedSize":2202287,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJec5apCRA9TVsSAnZWagAAHcEP/22mU7pKLp9WWUbuShKo\nr4Bink3wOgdDBGwWE7mvMDG+W9j83NOCdkL+pUpdDplYsGWi8YS4UK4M0OJr\n/NYAGcd/Ij1t67DXimREg8Rftmbwe04O7so8iCXJ00BnhOfwFdqMCiZmuuk5\n/5uoVmprQBxgrg3ix81okhZuKFLz/zVgeTSsInrsC1fRqDECKIxxdJMeK3Vn\ncBqguuNi0Ke07hbNSGvTBmnZxNwDSz3Czd9KqvcUjZOpqGgXiiNZMovVMg2S\nvjO2j+AkXSMHX9Na8vdJjCRBH9oHhSr29sHuOKhf9joyVyKXxUZqfhGEuDVt\n8SI42CjnotU6KrR3LVEVPN4gtujxagODvcXVOhDG3KWmRYwJ3hoGwVerUK9P\nuCksln548cr3qgMUvBCjXWEefLBKGuEat4tnazPWR9QubC80YH0NihNN6vxu\n3ySbiTGTEiiUBoX5uncjolfDEPb3OhrkReFkn+8S/Uhi+IioA/DlKFWrm6DS\noqo7SxABIvDFIPJsjsWi8mVsbWmc1saBUA2swt0CgNSRMjRKeq4gj74zQfdK\nzlLknLdriczg76/XBtMEqXBwttdHrmFe3z0CiTsAOsGkjPdRNEdRK+1RgG8S\nTeTR8ngNd5bfBYd/4pJsaeSVqlWw8NIVIeGhQNoLw4vVEmwJ9USvprU0HWaV\n+Yzy\r\n=TvwA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFHBmJI2KWOxTgcMT3LP8dhfCeuHbspJO0O0DQ+5u8zPAiEAoYdU3Oxxn0lFvSifIHD2884Y4ovPSeX2lpcNece4qJ0="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.7_1584633513030_0.27026258037405837"},"_hasShrinkwrap":false},"2.0.0-beta.8":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.8","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.3.0","@enigmatis/polaris-graphql-logger":"^1.4.1","@enigmatis/polaris-logs":"^2.8.1","@enigmatis/polaris-middlewares":"^1.3.5","@enigmatis/polaris-schema":"^1.1.0","@enigmatis/polaris-typeorm":"^2.1.1","apollo-server-express":"^2.11.0","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","graphql-tools":"^4.0.7","http-status":"^1.4.2","lodash":"^4.17.15","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.7.0","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.0","@semantic-release/git":"^9.0.0","@types/express":"^4.17.3","@types/graphql":"^14.5.0","@types/jest":"^25.1.4","@types/lodash":"^4.14.149","@types/uuid":"^3.4.8","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^25.1.0","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.0.4","travis-deploy-once":"^5.0.11","ts-jest":"^25.2.1","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.2.0","typescript":"^3.8.3","ws":"^7.2.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"dca33c7ee5c90361c965e409fbd4f57ba3337011","readme":"![Polaris-logo](static/img/polariscoolsm.png)\n\n# polaris-core\n\n[![NPM version](https://img.shields.io/npm/v/@enigmatis/polaris-core.svg?style=flat-square)](https://www.npmjs.com/package/@enigmatis/polaris-core)\n[![Build Status](https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master)](https://travis-ci.com/Enigmatis/polaris-core)\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.8","_nodeVersion":"12.16.1","_npmVersion":"6.14.2","dist":{"integrity":"sha512-pFqsg4mgUOvI5sDYJwRfGnibneX5peK52r3D6PY61YMQk1kEEI+UTGUqWu6Pop/WRQ5qk2aaVFuQc8KHTKp9lA==","shasum":"daa46f5681748c6209e962238f8e2d0889e22d6a","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.8.tgz","fileCount":46,"unpackedSize":2203364,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedxt8CRA9TVsSAnZWagAAfh0P/2t0lnVflDtz7EDuiovp\nNHzxK0dkRbk6UNz/ebEFf057wkDGW+Vilv3DfwCm8khJlj60ht2Y1ub3/8uv\nrW+MKI34m1rmlfz28VfgxTZeCsuad+IsM0aOc/I7C2YVb4EFdxh0L4E6aiGT\nEksr10JUtmIM+M0K+QNPBv/uHzX6P2itxNoG71Zqg2Xi+7YnXnUNN5Cmna5h\nopuLnUegtma6kBje9aoGlYBCGwehfz4pWNVYNMGNMdEhDRvJbMknfAC84SVX\nDj7NL9SSqQE22h9/SZdDvde+3HdbmmqpUS8GW0Q449eexkEGhYeS0RV9wkeP\nLO66REEXKw0QA0oJs5V3A5YwAzBAifuKpJ+nplqSL4RuJIS6RY+bUrGNmumI\nlhJjmcbvwobQRlnvOSomowmkNLwDMR/D4UGWf6HQ2Mk+tYeZI1csh8Zk+EFY\np/rT7LHRQJ/7u2RcJeG4TRpES0QtSwBO2O9bBWdh1+3Vc2GTzm8gusn4SPIM\nwFoY9YlT6JDDcEoPJcga7tPvAG4S+Lixffrq2KuykTiE2WiBDlFUs+wwPHsm\n9QEJmvPRu1aZlsDuBcq+hz4dD2jBe2Yb6wbzkLOssRy7yZkL42mzaU3ujslc\nyfMgiZ4b33qbRaggXF3Hr2G3QjSx07FMysNwlpdnu03R+Rh9nz5fB9mOY4YL\n2mx+\r\n=O0fL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFuR+zEkO5XoRXlhWeFt56+TJI35GNL3W1K/pwAQd+nwIhAPdLb0rhcJ6H/ofKyoc7lYHuhmhRda5Ycnv8Gnn0tr+v"}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.8_1584864124155_0.9128875731700905"},"_hasShrinkwrap":false},"2.0.0-beta.9":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.9","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.3.0","@enigmatis/polaris-graphql-logger":"^1.4.1","@enigmatis/polaris-logs":"^2.8.1","@enigmatis/polaris-middlewares":"^1.3.5","@enigmatis/polaris-schema":"^1.1.0","@enigmatis/polaris-typeorm":"^2.1.1","apollo-server-express":"^2.11.0","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","graphql-tools":"^4.0.7","http-status":"^1.4.2","lodash":"^4.17.15","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.8.1","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.0","@semantic-release/git":"^9.0.0","@types/express":"^4.17.3","@types/graphql":"^14.5.0","@types/jest":"^25.1.4","@types/lodash":"^4.14.149","@types/uuid":"^3.4.8","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^25.1.0","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.0.4","travis-deploy-once":"^5.0.11","ts-jest":"^25.2.1","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.2.0","typescript":"^3.8.3","ws":"^7.2.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"94a868c60c2c78d0107b74f95f15cda737f80b11","readme":"![Polaris-logo](static/img/polariscoolsm.png)\n\n# polaris-core\n\n[![NPM version](https://img.shields.io/npm/v/@enigmatis/polaris-core.svg?style=flat-square)](https://www.npmjs.com/package/@enigmatis/polaris-core)\n[![Build Status](https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master)](https://travis-ci.com/Enigmatis/polaris-core)\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.9","_nodeVersion":"12.16.1","_npmVersion":"6.14.3","dist":{"integrity":"sha512-UBfHVVpE19K9rw6qGeNE6vpyCQh5ZNruhS06UaGE7chotyR9XbgTkddRpYYPuSuzZMCHlZWsS/0LgqnTll3DHg==","shasum":"4ce1baba473f1cbe519570d89ad480310ef0b0a3","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.9.tgz","fileCount":46,"unpackedSize":2203814,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJed3jTCRA9TVsSAnZWagAAT/MP/jz+bsqpHZ4e11qXubd8\nhK0DPFBfhUUeQ+1GYUeU1iFgBODZ2OETbGgLPa8bvX11jSss7meCCyU3reVA\nI/5uDFcM8aSnz4GWUpAXi3GvdJpuQkNrSMAUJVjetOdqUbvACvuKbW6Wx7N1\nZe5N9lieN3UnJQFjzi3eN4Sfebi9nbcs0heIdbmahrQ7RDhHt4Juik/R8W81\nqyS4FIWWRi1nfjG/VXZP6wRrsJsIRD9hCgLv8OjOV1Szf4APivXhRv7l2kmn\nzHfjqfsSxiLrO2+2O0uDIBYmwPgR99ryp8c8BH+8BTVgZh0abXuZJAAeAG2e\ngD8suJCdn3lrvjYalsFnJ8urrLraY5E2wxXZblITPAw6mHeJIOcwor1mKhDY\nhLk2HXwR7K9kq3qZS4CBkAQNSubfB8c/qqkw8/ROest1+lFBOtx1nQ18HC5D\nBFzpYhQC2ISBZ+z1gRUxwspN6MZfQ7Whuv+5DwB/rx48HV1ZZ+rJ/xre4m89\nymR/DGOUrres2Jt3NSHarrG7MRZL8Z75Mft1aiznb6xIbqChwIHSwZbJICnd\nEn4KqClqYF4ALcFB1amgV9JXo6JgOvF6Tk+oWFzAIS0ju38dnjm11IYeJkqL\nWpoImAnKcaviK013eshTtXevPm+tb3f7b81MXhrbOMYZGUWwZHyW83bjSyx3\ngdKE\r\n=Q1Vz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGXHh5phfj3byTMsStbG6t2mJC1ejPJ/NKi8TF6qPN1iAiEAmIkutuwX5yBs20ilf2OGgJIB6TMpshgBdYKuehHVXsQ="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.9_1584888018620_0.8395296169874056"},"_hasShrinkwrap":false},"2.0.0-beta.10":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.10","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.4.1","@enigmatis/polaris-graphql-logger":"^1.4.1","@enigmatis/polaris-logs":"^2.8.2","@enigmatis/polaris-middlewares":"^1.3.5","@enigmatis/polaris-schema":"^1.1.0","@enigmatis/polaris-typeorm":"^2.3.1","apollo-server-express":"^2.11.0","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","graphql-tools":"^4.0.7","http-status":"^1.4.2","lodash":"^4.17.15","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.8.1","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@types/express":"^4.17.4","@types/graphql":"^14.5.0","@types/jest":"^25.1.4","@types/lodash":"^4.14.149","@types/uuid":"^3.4.8","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^25.2.6","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.0.4","travis-deploy-once":"^5.0.11","ts-jest":"^25.3.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.8.3","ws":"^7.2.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"7bebeaebc7c4b14440f1af94b211995b1c455a94","readme":"![Polaris-logo](static/img/polariscoolsm.png)\n\n# polaris-core\n\n[![NPM version](https://img.shields.io/npm/v/@enigmatis/polaris-core.svg?style=flat-square)](https://www.npmjs.com/package/@enigmatis/polaris-core)\n[![Build Status](https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master)](https://travis-ci.com/Enigmatis/polaris-core)\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.10","_nodeVersion":"12.16.1","_npmVersion":"6.14.3","dist":{"integrity":"sha512-UFHuIOJk4FyRY+10/kdNbcxa9y9F+JvTRjJubQiQiOOugnx5u6r05tk04mVNakrGw9MRp/OXX2vh3WCVfZIF8w==","shasum":"0291bea474de55e0df6ec3f1f71df502c7215ce9","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.10.tgz","fileCount":61,"unpackedSize":2221770,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehezzCRA9TVsSAnZWagAACIkP/jgH38E2Nt3EUxKiusx6\noTgNtxeMsA2SscAUzgJAV5Caa+DeUCJ0ht7owp3NaBol5w0bAlGKQ6YgCH0X\nkiQW3gWB3RGOPz+nODOmNY3Ck8dW4zCydlOJFARsALtG/XJc0vRGa8X83rYM\niqCAY4v3egqLkBrHl97TKlK2IvCJUohKL50lL48rV5Z4uCZBjiJPo1TsjcEC\n/bGxfzcKWkpDTKFMVHzvI4QN8fLvSnRL+NL86MiyV9QcofXqD7DwLHZ6jf+S\nSip9jhmsksxa5n3MQXI2QVhaLGtrQO7uMZtHoaQEoApSuEHSoiP1nHSbKNXL\n5KgAsvFbhTRPaAXSIUSzsnHq7LzsXN3Ui5ROOp37uxMEmAD+pPPdipcpAVxo\nTOXzz+hTjhh0OwlFh2bKp+qWsn7VNq58XJfqk5F5fCr7cVli0tTo0T1gLQJl\nD1FM8yuAw3sLC1M2KhfbxIZZi/605zdSihIflg3C5YBBZPmUIUr/KjDi6oZ7\nwjYUa5Zeu3gyfvNXzkO2bJWUFPgprypSmBRZ3D4mvCE4aSMypHaj2/Tmi56X\ne6JrIG6hF18bQosyRACmVwBnAklohmEtmA/4f7ZZUljngmJULRO+4JxsBRhn\n+cNYlo++fKkfP2H4qimb+UKpGCVb9NA7zeo0IqRWosS7331UNpW6Dr+uLsC2\nJHGj\r\n=2esr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICX0vay53BYyuxVbXZK1PsuJC1ybDiMRIgAOkXZT/dRNAiBY+aiVnngqQhgkVnqCP5kKROU0OhiwkstksOG94Jo+uw=="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.10_1585835251441_0.2399949456705439"},"_hasShrinkwrap":false},"2.0.0-beta.11":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.11","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.4.1","@enigmatis/polaris-graphql-logger":"^1.4.1","@enigmatis/polaris-logs":"^2.8.2","@enigmatis/polaris-middlewares":"^1.3.5","@enigmatis/polaris-schema":"^1.1.0","@enigmatis/polaris-typeorm":"^2.3.1","apollo-server-express":"^2.11.0","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","graphql-tools":"^4.0.7","http-status":"^1.4.2","lodash":"^4.17.15","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.8.1","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@types/express":"^4.17.4","@types/graphql":"^14.5.0","@types/jest":"^25.1.4","@types/lodash":"^4.14.149","@types/uuid":"^3.4.8","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^25.2.6","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.0.4","travis-deploy-once":"^5.0.11","ts-jest":"^25.3.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.8.3","ws":"^7.2.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"0e64197bc4c1fe1aa26b2a1449566313511a1058","readme":"![Polaris-logo](static/img/polariscoolsm.png)\n\n# polaris-core\n\n[![NPM version](https://img.shields.io/npm/v/@enigmatis/polaris-core.svg?style=flat-square)](https://www.npmjs.com/package/@enigmatis/polaris-core)\n[![Build Status](https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master)](https://travis-ci.com/Enigmatis/polaris-core)\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.11","_nodeVersion":"12.16.2","_npmVersion":"6.14.3","dist":{"integrity":"sha512-bYC8/R7KNMb1AkksaZwTxem/QR/Z54oyYEx0Ds/fpugUBfOGn2VNyFBIQXsQydT/AamWoUF3YOO+fSLgPhOskg==","shasum":"ec3049b55759f29ae7e78f754b6345be01aa777b","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.11.tgz","fileCount":64,"unpackedSize":2225153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJenVF7CRA9TVsSAnZWagAAapoP/1rp24RLVplKgbgxB84p\nTcyS7gK0zDHO4rhZDAS6B/NNBWnc1Eix9APrKkratKYyNVZHro+VTtqUyweh\n4ZeQsK2IIy8stHiSyR5hHFlhfzlgJvnn2puNITJOjc5zQ7OTPXYPopDmVuT9\nbjflFPoEAtXZl6ilSEvfImuOuObY0QDAriiG/+m4JFOc1L2UUnolNAMEUPsg\nXMegDE4qAUDNbsfHiq3tT7qVySkCtcJXmGHukfrRxHcuDtZLBAvbDz5c+aU7\nybmUmMhOp8JoFJCkpY/88bw3wC7EhY5wRhXT/j2f1JiUz3YR3vUMenQvme7X\nTwnwX+kkl6CMewtJtXLmOGQWg762TisuTMNyAwR8a5KrfmV2JKvZ0bcRDc82\n9wDKle3geJDAnJyj/kPOc40VLim9GtGv67z1PHEfn1YowSS5/uYR4xJhbCdw\nCQd/NAgq/8BPfjakZ2J6a7+PpLtu/2+nU9TRGoEUeQZoUIIEez+L4uuk6vz1\nIIUks/AWcQ3BaYWjmSj6ZYGsX9G3+MxKdIMy07C318rWnD992tnE4aMhpWMD\nXWtrIbAEEL7z8DqT9etvA85irfe+ld8Gn2M7XE6ITLNAFH0buqwudK8wCe/i\nxV6qIzPN2UKFz7wFzfUvd38fGxX8ySsE1z4XrIIlXYzX0/6uZtfJxTvc988T\nbXQx\r\n=OQ05\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCgHDA8P0ifk5i54u2o0wYCkb29q15xN5QlzzpYDzLEnQIhAL9IqjriJJGioWQK7F3rgERtF0ZH+DR+WkfSeXX2WZCJ"}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.11_1587368315263_0.04591816866449738"},"_hasShrinkwrap":false},"2.0.0-beta.12":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.12","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.4.1","@enigmatis/polaris-graphql-logger":"^1.4.1","@enigmatis/polaris-logs":"^2.8.2","@enigmatis/polaris-middlewares":"^1.3.5","@enigmatis/polaris-schema":"^1.1.0","@enigmatis/polaris-typeorm":"^2.3.4","apollo-server-express":"2.11.0","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","graphql-tools":"^4.0.7","http-status":"^1.4.2","lodash":"^4.17.15","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.8.1","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@types/express":"^4.17.4","@types/graphql":"^14.5.0","@types/jest":"^25.1.4","@types/lodash":"^4.14.149","@types/uuid":"^3.4.8","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^25.2.6","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.0.4","travis-deploy-once":"^5.0.11","ts-jest":"^25.3.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.8.3","ws":"^7.2.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"43e39db7780b2aee51faab9a8105982b18f6439a","readme":"![Polaris-logo](static/img/polariscoolsm.png)\n\n# polaris-core\n\n[![NPM version](https://img.shields.io/npm/v/@enigmatis/polaris-core.svg?style=flat-square)](https://www.npmjs.com/package/@enigmatis/polaris-core)\n[![Build Status](https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master)](https://travis-ci.com/Enigmatis/polaris-core)\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.12","_nodeVersion":"12.16.2","_npmVersion":"6.14.3","dist":{"integrity":"sha512-sZbEWLFmZpeHidLiDpA/DgiDQ2RLo3trOT95ESQVDkJcYPY4SOWGf/VNOvfjfvHpf+0jXqr3XjDAEICW09imNg==","shasum":"df386b8649e1418788438b0a1598111889a04686","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.12.tgz","fileCount":64,"unpackedSize":2225873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJenrYeCRA9TVsSAnZWagAAbfIP/jh0hznnFRzkD9f+vaU6\nJXpKRVSS2vmeejy1LwfqK/D9Y0Iz2QXC/gdz4VOqLj7MI8SHWZDk4tY6Cjvd\nmV+UgX3OHxBqdtjpWatpolUd4K/+DwyB04zOK4TBR+YOhUo0uSgA1zoZI4ps\nz1sDnN2e0oSPhPWpqsliwkVRj3VwEdw49IcG8w02ugoDWK8P8P+WsCehlLG2\ndJQu9BObCi790wyBh8dTtRhH5IDXDyiyFI6nH8zOKejVHAw2E+/TpkmkRi/x\nUAHubWbFlSnItkKZQj8NGxM+aPO46kML+iiHWOxQY2qvWzdycbNloDK28tEE\n6v/es7bLRwcPOsXXsq1yFUOI0M78R6kdxTFcNj0BKCzxMZ2RiDrpgVS2Jan7\n7m/zHSiw5QyIPsVh90vNOCUK141ZKuCCRQxSvaTkGehUQri9st83aKOcoutu\nqZJXa6av96YBRRs1UQn3LP4v76iWEVV/vEA5Fccexv5oZ0gSkHxfCi6eHn2o\nt46lSIMNviu+PDmjtb4byPyVWTxBlriJhMNnLmJZ3O1QV69/nh7BjWYReRcH\n6RzGI3i8ER/oADy/F4AsC+4J8ihQW5aVuoV9Ymwn092MsY0Wqx1/YbjKia9F\nXMJD3Y4XIDTDbdu6mxGpCeYBDtqJcLChlYmxiL/GyqjrwsOSWNjD7Qf7ThCs\nbxp8\r\n=s9Lz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgMDjWKoJufoQ+zphN5FiEiMkMVMLOmecSnC5H4pTrIAIgHqSHUzTQGVZg0w3ZcSncJUEL7LB59ug4CpZJ6ZTm3sY="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.12_1587459613873_0.37648524830480845"},"_hasShrinkwrap":false},"2.0.0-beta.13":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.13","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.4.1","@enigmatis/polaris-graphql-logger":"^1.4.1","@enigmatis/polaris-logs":"^2.8.2","@enigmatis/polaris-middlewares":"^1.3.5","@enigmatis/polaris-schema":"^1.1.0","@enigmatis/polaris-typeorm":"^2.3.4","apollo-server-express":"2.11.0","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","graphql-tools":"^4.0.7","http-status":"^1.4.2","lodash":"^4.17.15","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.8.1","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@types/express":"^4.17.4","@types/graphql":"^14.5.0","@types/jest":"^25.1.4","@types/lodash":"^4.14.149","@types/uuid":"^3.4.8","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^25.2.6","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.0.4","travis-deploy-once":"^5.0.11","ts-jest":"^25.3.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.8.3","ws":"^7.2.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"cbfea5ed519e30fd2c8bd97e119d3c0b770694a7","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.13","_nodeVersion":"12.16.2","_npmVersion":"6.14.3","dist":{"integrity":"sha512-r7OXpxYorpvgbGAYWu/aU8GWKWzcTBq7H4OSpRKfreV4mwqq8wxTgKtLRZjjm9hhqnlexnD0oXgXLUhmOIL5zA==","shasum":"cbd4b88e835b74f1e691cd4843ce2b731de8cfa3","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.13.tgz","fileCount":64,"unpackedSize":2229043,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeoWrsCRA9TVsSAnZWagAAJ/wP/1qMA8ldQs9drnpI6x6c\nHuKJGMgsokrIYmAKQ1bOLCeSN1ti7m+zX75PDFNFZ1cwx5nMhGs6tpKrKz1T\ni5DKxe9o2m87xdHPaH3LgAYiTJiEzlxf8dxxZZ3cUfI97WdARcT3GjuysNS7\nro5ly+jH3iSe6LFJz/8xwo62H3P4MFBjyOBUN1uX5rxCG1LA4z6NnADgnphy\na3+TQwbjomlKrICczIo4dy9cCHOfnWzRkRm45G1rx5+Ge+ghw4JdXFnoBZbl\nrmEi2GtWqtKX4UBk8cweDyfLeO0oNcozb20mJGRuh2Pyp4Hxvi1XXphJPVQv\nc3T5jTMOMKxxm/sq6epgvHJPtItHWmgbM4yv6W+MeI47P3W0yo5gdT5wNFGt\nlfXmbznx4q1APBJgJeICb3RLcxh4/5hOJ7mtgN+/VAawUmMv9QDJ/+vd6SCu\nZOLF0FvjIbVaOBv7WVtD9hTRXaDBzUrDSdI8GqD51qS6o9zT+86rL2z9gEdv\nxsSoTuU0L+gsfOJIPkuRkzwKWsUUzPoQ3pPfL4qjD2KBp1zi52pZkc3gYqwc\n6X1zd1F5TTm/yGeNAfLhclcpaiJ+SVkgPgnB5cFDaTG/0uVFCincnzGdJi8/\nzXEJF7Tudd4sscaHbYFBWBh3xC9XJz29eoY6D9rCb2RyKZbWxw/Pq91mJ8nm\nGz6B\r\n=KcRH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH2qm5nd/ynUwHhIb0K0jU0ocyM+/rfZHS1qwpqbGDtRAiEAumoxxN2t/vMT5Jvef8mP9mMD9kz/MFrDrtzzXKWNV6A="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.13_1587636972129_0.48406415643488776"},"_hasShrinkwrap":false},"2.0.0-beta.14":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.14","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.4.1","@enigmatis/polaris-graphql-logger":"^1.4.1","@enigmatis/polaris-logs":"^2.8.2","@enigmatis/polaris-middlewares":"^1.4.2","@enigmatis/polaris-schema":"^1.1.0","@enigmatis/polaris-typeorm":"^2.3.4","apollo-server-express":"2.11.0","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.15","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.9.1","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@types/express":"^4.17.4","@types/graphql":"^14.5.0","@types/jest":"^25.2.1","@types/lodash":"^4.14.150","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^25.4.0","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.0.7","travis-deploy-once":"^5.0.11","ts-jest":"^25.4.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.8.3","ws":"^7.2.5"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"8d337fa22b98b70bd138502f72f86478915a892c","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.14","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-ZjdZwDiJcChuWqytG3ez7URxuuAGLrVuw6vGDPNIxntTpnE3sCKiKn4a7govBEs1MjvTwOBr70Ky54v6ZqNXfQ==","shasum":"2d5b7f0394d8fa242b14db365821588fde90f803","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.14.tgz","fileCount":64,"unpackedSize":2230963,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqm7iCRA9TVsSAnZWagAA4JIP/2KP+NrF5LH05347IzdC\n2QT3ePRHIX5raTlNtSh+sFSOQauR4yinCWO8j3Y4SZZQyZ/SSjAXEUEgkAS5\n8tZUjfylIAjS/PSI9Kt5z8qhLHqoDlJlpYuVtH4429ajRH2htVGDaeBMDglV\nirY/SNcBxDne1ISg92/6XWfaTdVk+wCkPmC9YGRyztrDIxKFyieaVcg0zeWu\n08CWq6d+QuatA9QaTc2rnaWPohoKCtTkC44oryV9cY9iJL/lx1wzCZqxxNCt\n7scB1rXmKW8tzCF8KO2Y3UbeJbn3Rg+ZsVUco4nIGLRbNEQtrtacPgvF3dMM\nDnGdWrrBVdQ3+jLzFjRnvzy9VnoWqfolzI6cPV+VYAgNtcmFKpKHl10m5Tuj\ntUY3hdgUZQrkCrsWyVm4Cct6u6PkeNxEreqcPZ0KmmG44Ndxjrv/15krbIgy\nnwQa/4kHtR9PBmkkwUMFe0onYzWgUJ5US68SOmCvcxNrYvJyxGMRphX8Ls+z\nTnJKV4mGbUbedXwo91I3U8D45H5QPyjt1RdMVjzAgCotd7qIT0FE4htSZ2OW\n3e59YNGoc0C6BbK3454fMNrrflzj4G2VHjBMnCS6Oa/tAH5w88HrfSfnhCBe\nlwTLI+NKrkBjSUvgna0KujY8CfqYMcoz73Kq+VcbKRZZRreOIf9fkvBg4jEZ\nFCId\r\n=Jlau\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCI0T8Y6KgESqwJWF73Qfa51//5BWBYaQQgj1M4i4yCgQIgPfuWyozW5Dx8AhkTUpy2+MVvDmu4dQM2FbXQBWF2cD4="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.14_1588227810372_0.4857286304442332"},"_hasShrinkwrap":false},"2.0.0-beta.15":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.15","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.4.1","@enigmatis/polaris-graphql-logger":"^1.4.1","@enigmatis/polaris-logs":"^2.8.2","@enigmatis/polaris-middlewares":"^1.4.2","@enigmatis/polaris-schema":"^1.1.0","@enigmatis/polaris-typeorm":"^2.3.4","apollo-server-express":"2.11.0","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.15","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.9.1","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@types/express":"^4.17.4","@types/graphql":"^14.5.0","@types/jest":"^25.2.1","@types/lodash":"^4.14.150","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^25.4.0","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.0.7","travis-deploy-once":"^5.0.11","ts-jest":"^25.4.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.8.3","ws":"^7.2.5"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"77e5b52b3b4c8b44d1b04dadac2e46681e41d63a","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.15","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-M6jbBbPLYL+Ztq5YdXHVzcHPlFNSOWgdFUaRXbres7Br9OBeadVhbusR78M55HMFQPfBcGQ48WkC/wjK/gW+2w==","shasum":"ad83f245580839acbb3b7b7c931c050409ce47c0","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.15.tgz","fileCount":64,"unpackedSize":2231889,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqoMcCRA9TVsSAnZWagAAaAEP/R7a+PR+tErkM3idh1vD\naNPWelrzYCFalsbecNxtB9ME7w4/gX3z5F1zJ1YXi/kCVl0p4ThKeBFpdqGW\nw+PlOFT+8fqM+R2Ofumht0q97amR0oyrdVJHPMkJvj8k/QfWzruCGx7qDr03\nQjmj6MYXSpaYB3Qy0RAv907XxgYy4VH8OflL958sx9+/ES4l0utOMh1DoIOW\ngdBpDGZeejbXuk8a7LU/VGUgKZlNF77kGyPJbDiUYcXCw+nBUqlnCLS7yjXS\nM8ljwhxNIJi/AsI9QCU/yroUKLTxbwi8Dw0o0rHADGPASkl+nfSbs/BHkE8q\nHxSW9cHsgN2CYLvSjITJ+VaR8pTPY2M1Xoa9KXEolseZ3/gwlbqgSLN2aY9U\nJ/7sltd8MfKczRCH9F8r3tW6X74e0DM35Nhu1PdDCbgXA1bjhOeOvTBf3Hct\nNsblQG4uhRjgsLRp7FuysBoXKp4UkIYqKD94JB7Ctw8yVqEQF9Zr2kOAmUlt\nGEgbsx4tU57WvfyTrFk8gNZ/PivskXgxjfkFU5wuzhrbV78dI+0bmrNrKbDa\nyl9DiNhTXghhWlepLkv/8s4WG363E9sn06DlVNbevSrz9U6grWth6REx+IY4\nfvWvuIXWEDTH58TnEpzotn06JdVAu0osDXrq7uhu6DGK1swGds+hV2WG57M3\n3StI\r\n=g/jt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3p1mKDK4ADvhkveYfZogNSKuxlx8Hc54r0lB44cIV3QIgWxdZxX/FKDA8sYnDnFJkbinxPDYk4PD60Nnw/fFvnaM="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.15_1588232988226_0.23069520717358882"},"_hasShrinkwrap":false},"2.0.0-beta.16":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.16","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.4.1","@enigmatis/polaris-graphql-logger":"^1.4.1","@enigmatis/polaris-logs":"^2.8.2","@enigmatis/polaris-middlewares":"^1.4.2","@enigmatis/polaris-schema":"^1.1.0","@enigmatis/polaris-typeorm":"^2.3.4","apollo-server-express":"2.11.0","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.15","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.9.1","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@types/express":"^4.17.4","@types/graphql":"^14.5.0","@types/jest":"^25.2.1","@types/lodash":"^4.14.150","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^25.4.0","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.0.7","travis-deploy-once":"^5.0.11","ts-jest":"^25.4.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.8.3","ws":"^7.2.5"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"95371238b783535a4b2ba71861054d077d8845cb","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.16","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-7FQWJTqFNLpKLf8XPgc+EG5x/ZdKBTk5UaXOlIQTnQqAU3RUNcm/wXlTX4iqFtjlDN7m3eQKFkmbQRp4p90t6A==","shasum":"6eea8fcb4c0eeb575f8f3abfa1465b52b877eba4","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.16.tgz","fileCount":125,"unpackedSize":2779624,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJero02CRA9TVsSAnZWagAAKv4QAIkVZ3a4f0xQqRrjSkmP\n8qTK14aARh7Ap0vQTKhsL7+kRLviF2YNKH6z1SHLYL0gy3UMVy/2usKDVPYj\np8BE8BG8lvt7nigDruZk2mNQ8LIDHNzIu+F72L2W7iREyvxivT7M+RtLS3VZ\nPMxz3F4gshjHP81ZvjrPPMNcwpm2GKZ6zTsS5KqeeWN1g4MH57BK/j4szjIH\nReVhfujuCd+E93LcVt3lsOTjzb9Gpe1GLJRrGIS9uJoad038tZxEYwE5eluc\nDcLe9Dsa0UdaeWc8JYffRfr8qDZGmzb0mXD9FJMXAuPgXQYwdVqx9VfORb9E\nqIzARlziRg2t+JaH1icAQyOxK/F1xDK2AOo1NZNawE/tulYiKYTRodwWgBSp\nUaf9VqTBDwVetkzgNpvOEUnvMC6HRNL/UNULfGBts3+xxKwV1o2umrScIzTJ\nUKydHIv+tvo75Lvj8XixKOOK5k9Ki6Br7hMw+wVp/W4WJ/ZfVs8nRZw2qwnl\nGzcAhfHKZzQ8hmwk1r5zLCJkJmyD6JkHAjvPzBVeZVRvqP3XRTlU3fYzvezF\naZJ4hepQIZJLFmYoA0PIuwsPRJeHM2yY7T7THisHuqbAjh5o4Ra9q4mS4UTP\nnBUSlLq5d+7GhMYmQ2gJMGPRsWqJIUT6R0QpTEkrPObEkriBWgaY7zvI0zNV\n+paI\r\n=Qowg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDa2pDvTySLQUSZKuaX+DGoy5OoUQwdBJoavtfvM2RNLAIgM+i2xO8cbWZjusvIf3Cue5O6AOwSbtHAICeiiHykpPg="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.16_1588497717968_0.2639703220757248"},"_hasShrinkwrap":false},"2.0.0-beta.17":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.17","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.4.3","@enigmatis/polaris-graphql-logger":"^1.4.2","@enigmatis/polaris-logs":"^2.8.2","@enigmatis/polaris-middlewares":"^1.4.4","@enigmatis/polaris-schema":"^1.1.1","@enigmatis/polaris-typeorm":"^2.3.4","apollo-server-express":"2.11.0","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.15","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.10.1","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@types/express":"4.17.4","@types/graphql":"^14.5.0","@types/jest":"^25.2.1","@types/lodash":"^4.14.150","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^25.5.4","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.0.7","travis-deploy-once":"^5.0.11","ts-jest":"^25.4.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.8.3","ws":"^7.2.5"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"95cc248cf1ca7788fc340f627a57688e7092f715","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.17","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-oXWimloXwkmydtheLevKrKMG9Krkqp2RRnDCpisYT0g/Kcyd6DK2OmG7EFQMUijEtU3yvvWmC34oJxswChn9DA==","shasum":"daba824ef0405e9bd164a063b677e1b00dd72ab1","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.17.tgz","fileCount":125,"unpackedSize":2797813,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesTNhCRA9TVsSAnZWagAA19sP/jCNmdRZCrRT8vnAjquM\n/J6F8wRpTTlOTN3B5b+8OwglCjWiqInharNry4IjNaMHIOnC2wLGVmnvMGt9\nZ1L+OGeTcHh5OtGYkKfjJ5Sy94Fxka4Hea6Zu3BPhQrmW8gj7pOV+YUea5Q3\nxY0vJTv/iaalo/WFclFHVHpNp5XM7KbJh2iV/jxr6ciVVstcSB3an4gW67KJ\na4MCQgWtftAQIpqrcHobfGhuKx3IpjlROWKPRL5QsUN/Z0FmmF439IRHBoM2\nXOlMqQgqGSmOiMx0BIK3QrsQegKf/MReei90WYDB3CLbTl2bNz+HcjVPEAvY\nCgHsIKpblPnP74cyUkcInnNwahpxfM4T+pUQwrbmJBday2sMLvlE1ExL2geF\nEGkuAgYzMbjuOeTLb38wr+X7tqS9CD/XTXDfgqf+uA15NSMpiDCt/VogBUFH\nydNs64w8AyqqOiDwLA2599ZIsEyCB4il07n08YFbRlAMcNyw8BUVzS5FLpqn\nO9xYwWykZuRHyqbxbI0La8VaW/lmzXQnotrJjr33SACQsA1KMMWg8VyAJ95v\n7DAWysLoICGJibG9BpsXx7G1IjsYQqBYvJHw2y6BRZ46MUVhQdvMk63oExSa\nPdrXhnOC7JTKGj1uB2jD6OOv8Sy7ln37Hn1n/iXuJI4wfPseTeA90wfX9PaF\nsN6r\r\n=S1gA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCvUa1d8TM2qGisZRG5DdeSclCn6C72ELlzDSj6/FCQAIgEsYX276upR4hBKnmQJ7QU/hMf1L2p+EjYLzflJJorG8="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.17_1588671329032_0.4674849431543737"},"_hasShrinkwrap":false},"2.0.0-beta.18":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.18","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.4.3","@enigmatis/polaris-graphql-logger":"^1.4.2","@enigmatis/polaris-logs":"^2.8.2","@enigmatis/polaris-middlewares":"^1.4.4","@enigmatis/polaris-schema":"^1.1.1","@enigmatis/polaris-typeorm":"^2.3.4","apollo-server-express":"2.11.0","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.15","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.10.1","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@types/express":"4.17.4","@types/graphql":"^14.5.0","@types/jest":"^25.2.1","@types/lodash":"^4.14.150","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^25.5.4","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.0.7","travis-deploy-once":"^5.0.11","ts-jest":"^25.4.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.8.3","ws":"^7.2.5"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"813d039dea0d860e710c7932b5b4b4f6711f6528","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.18","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-ex1gyE9KgEkl/GJggWAdsvLmegbHeH09BpWJoYDAHtcNOZMEg4dpz3GDxbWMuu9rupba+OHIVJEMhJaO13FnGg==","shasum":"cb55fa0c9255f22d276aa5d2c97e70f490cde4cf","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.18.tgz","fileCount":125,"unpackedSize":2796408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeu/a/CRA9TVsSAnZWagAAv9sP/R9tj94vgJQwjH2HEg3z\nxZXhQW6zBywYPWEnL3JsbFO/RPu97qhOD7ELWPxKI+thsodB3mvyZ/7lkqOS\n/OntnC8w8INopDOd8NuRi3j36ASaXldKImEIh8NmUxHQ3HwZ42nTOH1jTbAP\n9GuJjGEx0TVw9NsREhGadDvbcPu+phtOVV8JfO2pSeu4LdPNgGzk9Dq4YFtz\nFHgITvfdVOGMyHI5w4QSIqc1uM/jlspWU7pRoMFujhhOehn50IHzyN/oz4oo\nh0Q1eHb13nQfc6wGE8YQQufp5anBsM8IjM0T6OQJoRYoNVAfVFAPPf+SfYem\n8DPHvLXch/C7fNJBO/ulcKx+FbEDsa3zEtNUXtjBHkDE6pk93Y3maBs3Q5FE\nqKudXMX9+WyRBu+0gBxmxnVjN7Ls8sAqXRNt5GE04eLlcm34SNnO95TxkdM0\nCUJZwXAdBlU/LGg5uumgiHHI7nOuGjPsln1HRqnIJmhRsQHMrtPM82Q+fpwn\n+Gk4HbBVOOoOmuW3z2vRc0r+Vuhk9bDsBHWjxaI6K0uJ5F9BIiJV+Pe5ItM0\nNb6GX+zyzhheBhN8RtdkUFUmofrkLqlTkTyuFbpb5T5QYcVuw8KFePWqp8bb\nV1LBZ92wQVpC23Bf4rlaExUMEfQTrXzkRFv/XAo1vY3mo8Ok0YJbJ/CBAEB6\n4P9A\r\n=aslv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCaFJxYmx9xtK12Wp3asgNXsRNhp79lbGU8xOvF730oEAIhAPliC45DIdKvG2XcfvAqUqapib5sjD8Q8z+jC8r8G3HV"}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.18_1589376702835_0.06835038327759091"},"_hasShrinkwrap":false},"2.0.0-beta.19":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.19","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.4.3","@enigmatis/polaris-graphql-logger":"^1.4.2","@enigmatis/polaris-logs":"^2.8.2","@enigmatis/polaris-middlewares":"^1.4.4","@enigmatis/polaris-schema":"^1.1.1","@enigmatis/polaris-typeorm":"^2.3.4","apollo-server-express":"2.11.0","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.15","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.10.1","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@types/express":"4.17.4","@types/graphql":"^14.5.0","@types/jest":"^25.2.1","@types/lodash":"^4.14.150","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^25.5.4","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.0.7","travis-deploy-once":"^5.0.11","ts-jest":"^25.4.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.8.3","ws":"^7.2.5"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"4998850c54fac12607668fefb078d2636b590feb","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.19","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-jLWIZBWNPSbAlw8Sh7jsIsAfPbg4nrdYTsuXOgVK2Wj1+hHuyk+a+6/zm74fzrBXhlAGim9sHUafZPTztzZCtA==","shasum":"0d9c299e8d206aa8069890a95aa7a8dcd6c762c3","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.19.tgz","fileCount":125,"unpackedSize":2804922,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezMp5CRA9TVsSAnZWagAAnWYP+QC7o5FpdnM+lfNnE/jG\n8MkJE82aB7dv5gDOOMB0OremOXw/9gOW1L4lJAQrZ7ddeLtNORNYM5oFAP2o\nkm1UK2tBQb2cv0HCVoHLAIHqW8bZuTLe4rtF+LJx3SoEIyl2/cmNwYcist5t\n8lJxLlBGDgoA4lRX1HnMIXrGzRwjKlWohiKmZ1htMeczc+WPGMoqfhNE4Yif\nvhB5QRtzZnMZ7YwPUzHqwqMMhUXhBBY42wQry2Cr9e4V38DcU+KCaejtJC6L\nFWop5W9CsK2MBe1tgKC3fPopTxiCM7XAs3wp8nRN9TQAhGY8ztyC+d/AS+lz\nMtpZdBLRG/OUGOSQKO2Gai8XRhVnTzUtYQ8eE62X9B4VTQ6sHU3a1mmq3QCm\nPXKaiqJqMK037zj6YDcULIqb0LDbFWAwAq+LdBhU46NwwHDKv2CGu3f13FuR\nthP36RU5dUlQGWYPWCWJ3A+M+ayuMul0VW1uLXkqQIoH9NqhVA7RQdI4zUy/\nvrOpzGY/O6jzpNgiDHMI3fVLdxXuxjQZGydQfIUes2phwCmFwBgE2cAVwu1p\nJYBO++jtrFYmotIiT1EQIk4W3U4CakWEkGHoJDMYjMg5LDABqKhu2113ZyYI\nuUd/QD9eTK/SaQW86BZf/V7RCnvx+1jUPpXFEnyyRSdoqbSPDK2/9tnGprqN\notOv\r\n=WZRS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3dF7MitOhnjSMrg5lyls5m4DF0qfbi17nJpvVu/6bCgIgJQm77eIoVvsU/USGEcj9CNYoTwlc0TtV8eYl7dbct6Y="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.19_1590479481204_0.6802057282330873"},"_hasShrinkwrap":false},"2.0.0-beta.20":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.20","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.4.3","@enigmatis/polaris-graphql-logger":"^1.4.2","@enigmatis/polaris-logs":"^2.8.2","@enigmatis/polaris-middlewares":"^1.4.5","@enigmatis/polaris-schema":"^1.1.1","@enigmatis/polaris-typeorm":"^2.3.4","apollo-server-express":"2.11.0","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.15","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.10.1","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@types/express":"4.17.4","@types/graphql":"^14.5.0","@types/jest":"^25.2.1","@types/lodash":"^4.14.150","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^25.5.4","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.0.7","travis-deploy-once":"^5.0.11","ts-jest":"^25.4.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.8.3","ws":"^7.2.5"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"ab06be25fb0508d231003925e4df4d6ec0417a84","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.20","_nodeVersion":"12.18.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-stHNsd7q7p9CkADUFBTLeEdZzPLmta7idFX+ZSPgIa4esDR8PYiT8vfJ9LawwZhU2nOy/AvR82ftUuJBNG1YwA==","shasum":"c5e0f2c06dd39dea61dba16d3014d73857e4fcb9","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.20.tgz","fileCount":125,"unpackedSize":2806159,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3mDbCRA9TVsSAnZWagAAA0oP/1z67bcuEKwuAx8buRdN\nixAP/ImnuxfKOE1C98shwcFLfbiFeOTIxbSCp1JahHTcLlw7vpV9rShg4LIu\nxd/mX+eMVzJD4eD+NwswGr/IotYyWFz/9L/GIO0Ww5Nf+MEQl3Vzazv5sYVB\nY8S5WJW3AVa+cilkey6EmulwGxLg2aCvQFFbGs3+ax8TfrIOrHJsAO7FrdwK\nEG/c8srH1nJix50SA3DXNyyZxi6KAOE0TJGtT1LDbzeTwbc1ZulssiThGYaK\n0lYMxV4VpjnQZytywCzeVJYQyPGVSghrOYUHfrtIoifSn1H7/SShNF8f7HFO\nGmhXfvg7gSbPZWUJX4EyfEG0IP5Y1V6nETBZFVjtMniwXJWpjiFkCTTWgEjd\n9nWFL7AXtt0ou+ovejVGRdnBBGLJVSluLmBj1UlznNN7vXt2MVdPGa0FlB8E\nEkRBL3pezK8pLN2EvoLcrzdVtFFhuFCP+5nSF/YjKoophzdzDFIxhTU9pUZ/\nIMQbT86R5ty6gFLwcIxJOvwPRwT3D7rApPh/ifMGxh15PU18HjpzfD3Fsgs7\nMeag9x8gqAOJpU8ayjYLRdRzknR+x7HnFWBue4ElHyL2Pac8VXXZ2YEYdwQn\n3sf4XH8mZPgIfg+mbMNdzxKtdDhLwcUW5mAr7aQUUqbJt9sG7obDzccayIrL\njdEt\r\n=IIf4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDeitZqPHstZ5gtEwreHkpgwHvpQTV72k2TFCRCOnEmsAIhAPUtVWRMnNgAMmdcNjIDlNUW+3hpTS362P47/AnQEe1+"}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.20_1591632091063_0.44138644020300055"},"_hasShrinkwrap":false},"2.0.0-beta.21":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.21","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.4.4","@enigmatis/polaris-graphql-logger":"^1.4.2","@enigmatis/polaris-logs":"^2.8.2","@enigmatis/polaris-middlewares":"^1.4.5","@enigmatis/polaris-schema":"^1.1.1","@enigmatis/polaris-typeorm":"^2.3.4","apollo-server-express":"^2.14.3","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.6.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.15","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.10.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@types/express":"4.17.4","@types/graphql":"^14.5.0","@types/jest":"^25.2.3","@types/lodash":"^4.14.155","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^25.5.4","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.0.8","travis-deploy-once":"^5.0.11","ts-jest":"^25.5.1","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.9.5","ws":"^7.3.0"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"1fa98212115427509f1bada33562bac7b4410861","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.21","_nodeVersion":"12.18.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-8nQ+J7QKrIRSzAj0pLw89yINUJ10pe5BLVn4Q/NP89D2bDr6ZeNehrbK2UgYZzdcN79VETplbgAn3vxrCoIjYw==","shasum":"75f75c8686315d48fd116baa964bd22be9d96a96","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.21.tgz","fileCount":125,"unpackedSize":2811878,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe5dxnCRA9TVsSAnZWagAAZjAP/iaHbr1PER3TBYgfAJuw\n3Mh30G0Fr6rTT4F7poB/LuMUxHGWjzaXRPuL/B4knDxrvNd94xQ2jL4HPhdE\nD37UE8wHIiyLQS0GH0fKhvL5V/tUZYetE1zogSOKR8TiQzN+27w4plqQbEZk\nDEtt4jaW87zScHhmRykCCamLC1fzSPMwhtOmtxWoLWI9uJiCEgjE02jG9T4N\n52jtZwkR6hl37UDbWMGWTEbHWIZon9rjiG88V8KrP1m/Wc7AYbX2zJRPAjGl\n3XLkA3oOrrynPIuo1vCD6IYuIkzpZxLctYM3dSw38yTfHDvDJf640wJeUBdu\n37HxaJi92GVbBl9e4PSzONilrdQKJ3WAGNaO4olstf6jgrc9BmS6comk9Qck\nVfQP9ilys4UHP0aj/0F+H3SM790BHHE+mJTTPcJ6DHebYVBacmQvP2B/Cv/Y\nJBKcJoSQm6fBMR3K13Dr55yW+QdbBniu1hN62v3TT6RdrkBVvC4aAVo9bA1K\nsJ6bKyRQ4kIR73sG2xzWvFVmbS2E/jCjbuatwZe9bUrKAIuzWkoxDAtw47YS\nJcYdWRDPTdISTpKQSzPN9kPsQnsHOl40MVWhn83khB82B7ffKNKsFkX32Cca\nUEd02vxTOWs03MEUO38SGEtgEPEEOglkE+ifYUHHl3XAew2Kg3bl84/KVAHB\nwLaJ\r\n=8TA9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBtHM0KA7gMPfkMIGXiQGkCd2efMehx+rKGfU5p9IxeYAiAV13+rfheJc7WQnfoiooyTTXkm6ncBztx393IrG40BnQ=="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.21_1592122470485_0.6648417205603849"},"_hasShrinkwrap":false},"2.0.0-beta.22":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.22","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.4.4","@enigmatis/polaris-graphql-logger":"^1.4.2","@enigmatis/polaris-logs":"^2.8.2","@enigmatis/polaris-middlewares":"^1.4.6","@enigmatis/polaris-schema":"^1.1.1","@enigmatis/polaris-typeorm":"^2.3.5","apollo-server-express":"^2.15.1","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.7.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.19","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.10.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@types/express":"4.17.4","@types/graphql":"^14.5.0","@types/jest":"^25.2.3","@types/lodash":"^4.14.157","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^25.5.4","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.1.1","travis-deploy-once":"^5.0.11","ts-jest":"^25.5.1","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.9.6","ws":"^7.3.1"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"b1c9990bbcd5e9bdf202e5941439d47b9732a378","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.22","_nodeVersion":"12.18.2","_npmVersion":"6.14.6","dist":{"integrity":"sha512-pf6Nd4TZ8N9Ow+n9th0Q7l292TkzH6IHLQVh58d65vHB4TJ84K816NU4wnqU/f9XtzQtL2u8yFoH4NE+9l0BXQ==","shasum":"be2287aae7e1041cb043c590e3c25c96f9a85f8e","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.22.tgz","fileCount":67,"unpackedSize":2245543,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBwlUCRA9TVsSAnZWagAAO2sQAJEt4FA87HNEvRTWhNtO\nth2jC0BlJKSUjdnhCu4ZmgAF6hvwWQvb2sge+Qx5Clgjp9WYjVTnL4z+/huC\nrgKyCSl4rnp15h9uXSyNyz5fmPuX2XehcFaqzp/T6g3x5ZT3eqWj12gk5YEZ\naiWk78U2e8bMOvhD84SG3yOzqC+FiYNN8UaccUH9XQOxTgBCXwBeCvQki/wX\nC/Qgks5YtRS4jutItxrUN7MPiRM7MMASgBBM+z/yDpNeEXzZsEDAx9TXm45c\n/iRJnl+wdCNnOyWMhhRIHlpFVrf6G0W/KnCXbZ1Wo5teF0dRxjglZOLTXY+8\n6heLkUROf14eiKdrzgidqRPLqnpK8FhKV+2NYVef0yiVa8kBO/Km08yJUg19\nYRwAjkyke9EyZNQkz71xoPi5JrAyT7nqkmZiJhpeWeOW5EEv/ro8e4lc0Sf9\nsHM5BaXS1J0T8bTmNS4B1hj1s6pnoJJC24+XeFamcQzohIZw0NPRn+ZQPl+X\nQ8BbH8+g3x9czDCM2IZkX9TdPp1BVo1idqmLRJdhr/gWUq7cvtvb6FDIFTl9\nfcbiL2SDyfWCGu3mF0D8BuSwMmvLgcybCt6gj9vk/Md/LtfY/HImR1yGcJJW\n+D5qxUpyNC6qCBwdjxzOuN846TTu1lNhjzqdpcjx53ntzBIpq9YTJxPbEvKh\na3Sn\r\n=+ww4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCIDl0L9Nz0a+kvRo9vw0MDj2eOOyl4macyU8EvKEQQMVqAh9rof4cL34Z8Rm403qnAQqEBJgrWAtHirGeN6AXdf8x"}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.22_1594296660272_0.9993805846472521"},"_hasShrinkwrap":false},"2.0.0-beta.23":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.23","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.4.4","@enigmatis/polaris-graphql-logger":"^1.4.2","@enigmatis/polaris-logs":"^2.8.2","@enigmatis/polaris-middlewares":"^1.4.6","@enigmatis/polaris-schema":"^1.1.1","@enigmatis/polaris-typeorm":"^2.3.5","apollo-server-express":"^2.15.1","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.7.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.19","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.10.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@types/express":"4.17.4","@types/graphql":"^14.5.0","@types/jest":"^25.2.3","@types/lodash":"^4.14.157","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^25.5.4","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.1.1","travis-deploy-once":"^5.0.11","ts-jest":"^25.5.1","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.9.6","ws":"^7.3.1"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"9c08a4969549d03677e8f53d60abd18774d2e4af","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.23","_nodeVersion":"12.18.2","_npmVersion":"6.14.6","dist":{"integrity":"sha512-Qeqt48q7e+Ntz15JMbEifv2XzNnuD0sRoQIe3fcBcqVLHHsjYTzIzYUFWkejqE3QhG1+HRld+d/n/V/eL/4iVA==","shasum":"e2526f15a7accb623ac3951b1610f9415b8b911e","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.23.tgz","fileCount":67,"unpackedSize":2245967,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBxMgCRA9TVsSAnZWagAA/zcQAKIhAzEqbUS6weGNyS/b\n4HTHjiB46ksvNizMWawsW3bA22q9gE67Gr8fHb/BH5owNoPk8fSxv6Jk5X3z\n47jo7s3zqIPxr76cvLDSUGTZIlUsS2ak8TVli1rZtc64iiPByUB/Zo3b5dG4\ntiutQQMDjd1fs56zDmkX+592qkEM3uuh4fi7wF/OKJuBqy0B98iUaR18ASgM\nNaWTDluxte532j5Qr35j0nyKJCZNLdiYj1EruHsx4PxdWucmFZLI7AzUe5Sg\nxx3ZyUmdOCWpkdP+ipsc8tLG8NHa5wlc5N4hKboCsycj2Aqgd7++cAxp5uGp\n60yUsEzbSDyRJGapucqIJo5AlnMfdYnl+1a5HHRJEqhFR5ReuDJYundGbzTb\nRCL/bD349VZ8z1yE8GhGPf7UYURTszlGFuDqPUW5gEDwWTOmaI57n/RZUlJU\ns5vCEFvOEMVPMs/4axhqsj1mPHPJht/9TWLNXPewNd11v0zPAub5Baq1Pvh0\n7nsYPjI6riHADg14lTgrDP2z0zRr0j6Uw1n0MFAxNgJ+BEBX9v26AxkKMOfT\nJplha6bB+ruEIU19RNHk++FVf+q74r0GOiu8yNkGRPK5Mkawo4oUWl72d6KV\n5wlhavdfB+6luzYwTyHKGZsa+1RfkENNu4k6kI7spWT0juLjW95Jm+J1WHCA\n2KU1\r\n=So3y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDbaNocGs3HJbvhwYeD92a//shrEwIx81onLj/OwmAb2AiEA/adGqL1S0Dj6e/S8qv3n2WtF9llRFin7EhzpzOdTVGU="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.23_1594299168290_0.33260089482763555"},"_hasShrinkwrap":false},"2.0.0-beta.24":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.24","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.4.4","@enigmatis/polaris-graphql-logger":"^1.4.2","@enigmatis/polaris-logs":"^2.8.2","@enigmatis/polaris-middlewares":"^1.4.6","@enigmatis/polaris-schema":"^1.1.1","@enigmatis/polaris-typeorm":"^2.3.5","apollo-server-express":"^2.15.1","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.7.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.19","subscriptions-transport-ws":"^0.9.16","ts-node":"^8.10.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@types/express":"4.17.4","@types/graphql":"^14.5.0","@types/jest":"^25.2.3","@types/lodash":"^4.14.157","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^25.5.4","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.1.1","travis-deploy-once":"^5.0.11","ts-jest":"^25.5.1","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.9.6","ws":"^7.3.1"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"6c2e37feab8ee3e5191369cab0bbd7452d2c0421","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.24","_nodeVersion":"12.18.2","_npmVersion":"6.14.6","dist":{"integrity":"sha512-1u0S39yUDP/E+PC8+qQ+jer9c6bjYUp7/IfR2fCEFgQ6wKWFZRpTeQDMqm6KCeG6nofx2zPVuHHBiOYVibWiQA==","shasum":"3f6559462045a6f0d0cac937e17fb792352ea244","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.24.tgz","fileCount":67,"unpackedSize":2246238,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfCxSNCRA9TVsSAnZWagAAfaYQAKOC809VkzWJ1VHColpe\n1GoDFxEmiJp3QXsXjlm/gWlAN7f2tgZzzJ3iJxS93Wn1IW/p2t0XOCsWQ+oN\noJO4qCaEwXjYuVe5IQv549D7320FZRR3SwuAo1lyawanum+bCsv7lAw1TNjX\nxyToNsdfvPiCl5/0iOn8Qp8p9raAvJsTFjbNB+5VVCHTV8qVy8ADOyi/WDAh\nePjNEHXZ0cvcJCeEJgZeTL1W2pJZ6zDD+0ZcUL1tXWOcf9A6/c8kOzdIAJNy\nLGpDOWwRa5hZ6ZMKxheI6PE0vaiTcTGSS8M2cgWp6zpJl3dx7n6g9rQZjK9q\nut2aOpsD+FMXICCF71Aa1Unbom/01r5AF1hdoama51L4tISg4ftKTflasIm5\nTFNnzKoncZi0Sg/SZwixa6UHlOStT7Vcz4s0Hyz83k8HL9EjjKOFB0EWk19R\nQ53QA1fbffTnNuyo8h+Y8DO+60gozfVJE7GleNH3v+BQixUD7z7s1nuwYaCe\npuS3trHHgf2XvUn822xa3FYAMQcZLzLeeRCKHmOmoleb8B5W3NZV2n7igND7\ndKtFvevolN7/ZCnuKVlxIzseimVL3069b7blLMf5+q+OOworq22xo+uMBMot\nXsVqHgoissDcyaaXwHmqcV83l/zbEaeXGWPbz7kO5XGlqC1Gp3V1GlDE/k+l\n6rkf\r\n=Roq4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDgV9o6omoqtd9mDMHaVMrg1HUl/5rsHTQGTw0OKYgSvAiEAwxclyIdO6pHEJYA/fXzDtKPmhfpmiFJhgaehKHOeI9k="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.24_1594561676465_0.4162520688385656"},"_hasShrinkwrap":false},"2.0.0-beta.25":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.25","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.4.4","@enigmatis/polaris-graphql-logger":"^1.4.2","@enigmatis/polaris-logs":"^2.8.2","@enigmatis/polaris-middlewares":"^1.4.7","@enigmatis/polaris-schema":"^1.1.1","@enigmatis/polaris-typeorm":"^2.3.5","apollo-server-express":"^2.15.1","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.7.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.19","subscriptions-transport-ws":"^0.9.17","ts-node":"^8.10.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@types/express":"4.17.4","@types/graphql":"^14.5.0","@types/jest":"^26.0.4","@types/lodash":"^4.14.157","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^26.1.0","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.1.1","travis-deploy-once":"^5.0.11","ts-jest":"^26.1.2","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.9.6","ws":"^7.3.1"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"940b5d4925ef42f607115254165993dae136ea29","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.25","_nodeVersion":"12.18.2","_npmVersion":"6.14.6","dist":{"integrity":"sha512-WaiBBj3lGj/dbhFPOAd8ghNg8SoCcT/PLd1pcwMlRHtg3skXdMxrPIJFgGZmGcOFiQ848ktzQVcqhOclZof1PA==","shasum":"b88d222f42d45c1e0e4095678f3eec1177329120","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.25.tgz","fileCount":67,"unpackedSize":2246541,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfF/vfCRA9TVsSAnZWagAABXAP/i9Ow4JMpw1G1waKtKo0\nRJSFoxpPs/fBGmnMBigqGdYk9KvjbppF9g1PmkukyUoQ+tOzBpP4G/FbMG+O\nG/rQ6p00hg6OMSvjiGkU49FFnAcXR2bdmtTatkwbt3/Retv1TrkHOuDnXi3a\nOuQaWVAz/lVIQK40abinkJk4UTGgQL97Pjz7DIIS+qzm/UGsWTwKtZmxcUqE\nRXUojtgcDdy6O3Od6YwX+TKRE6VJjw2J3EGI6hIWHgVIGwqWvzwQYTVwuYdt\nHSZkDj0JonV/WTCMflDwhz/YghyEKK0P0lMt0YDyZxKUqnk88WbLtJzC2mOb\nKwh65kfZPm3mZ+4GZeQBnC0OL0rN5D/Z1a1THw/GPkUA1Pc8gVGSLe0Eu1+M\nOJ1tdwr2JkhlUktn5dxf8fRMC/HrCFQd9xui2hXHaRJmybfNYpSP2gMHkiA5\nMi4MmmQv2kNvxnT54egS6F9AqRiBfFxYz0MTABYMe4KGP2ueBtt1qAdIWqyl\nv/P1jVn7EDqJuyLxK95wGj1+nzr9E06lctTeFW3SWWkL/0GRfSc3BmkInHau\ngTZzDiZ8P5tBcYBvlr8zrE9d0GrueOdqMnTkqDG39xdVYCAlyBBF+nsXmkPF\nAMkmTFOhfCHJzyI3PVzB8N+oRlnyb0oSMrV+XNqPQa2RC1QwyysG/hyIAyi1\nqUu2\r\n=JG9A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFq8936QLeiMu+3qcyFjWl6iH5fctCXSHfVM1ut/VWv8AiEAm0t7iRXlTiuZ2T8k01gAZt9qJLG3FsE/OIKbuMzak+Q="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.25_1595407326922_0.6610090235197017"},"_hasShrinkwrap":false},"2.0.0-beta.26":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.26","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.4.5","@enigmatis/polaris-graphql-logger":"^1.4.2","@enigmatis/polaris-logs":"^2.8.2","@enigmatis/polaris-middlewares":"^1.4.7","@enigmatis/polaris-schema":"^1.1.1","@enigmatis/polaris-typeorm":"^2.3.7","apollo-server-express":"^2.16.0","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.7.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.19","subscriptions-transport-ws":"^0.9.17","ts-node":"^8.10.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@types/express":"4.17.4","@types/graphql":"^14.5.0","@types/jest":"^26.0.4","@types/lodash":"^4.14.158","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^26.1.0","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.1.1","travis-deploy-once":"^5.0.11","ts-jest":"^26.1.2","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.9.7","ws":"^7.3.1"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"783da3637fe10221f3f22626e8c27589c1e3adc7","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.26","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-agObnELtKJVAq3xfwUJiH0fn5qagCue5JslPUC2cfc0oTIT99lVXkv5vNntmkPjHa19Ui3iP0rCvObiYguW7pA==","shasum":"63e51e39a0768e6da5b490ead388f71a062c1c4f","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.26.tgz","fileCount":70,"unpackedSize":2262293,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfICu7CRA9TVsSAnZWagAAzKoQAINMhOKt7C5RUA4ellkS\nMMGpmLw2JLeESU8ZxUI6IWFJ9/WBp38I0LXBFHBRnO9WOT4es7Xf9ZVL5x+j\nl2+tVAZ0fz4gJW+GrPtDRY9ylQkmmqDKd1bOUJrkIFM03Lwzzv9/Y5+wa+zK\ncsROQZroNytem/1d2z9dGevC8Jr5dTcM5Knw9YrUZXewtBph3vMPRJZZvNyP\ny9JaDmXuaJ5mMKsXcPa3C8qNLQG58CzuUP9i7toTKmnuI03RoLWyqbtoDeMS\n0NE5E6gmN0G8fSP82L5aXlNi8t7zwlImHBF67hhSnS1gIn1eCUjYG9AHPqOO\ncUQ/nGTFWK5od3R+S8IMzbls78crwbWzTnSLZKnF5jVS/BKcHbZMxWiAoxll\nHLJNnzWZ/VblPTKjOJW98/xWqpSr3SeqTvsUHcfW1/LUDOKwxhx7OtTQc7Df\nBnmJ42m+00Kkwt310RTOyjV1Qj3dyueZ/NxOvQGgXpHit1nalH/v0uwA3q+1\nSSgBCRQxgG1x9SSPdSaIqyFZsIKiPwRFikWKkIe2+sWsm9fL97qxUMjkK4Fh\nVT4mzjj8b7fwmLp2o6FaKPqrtcW+n2au5/+PzDZMewbibQsG2q8ZX4LPYACR\nRi31NNvLs8tw8BFeBRCxwTTDwgppVMbk92BRkjKfR7NqD7wJvW//trJsN2V3\nTwWc\r\n=s2fG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0Ulk4Nf3bUWaZRibf/iu+vnRsLBzbKnywntHcrUXMyQIgWfKdtAz5VyC9RJgcy3hRcETSfIPAM8nmcyHBBtUuTn0="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.26_1595943867034_0.024657740511323967"},"_hasShrinkwrap":false},"2.0.0-beta.27":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.27","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.4.5","@enigmatis/polaris-graphql-logger":"^1.4.2","@enigmatis/polaris-logs":"^2.8.2","@enigmatis/polaris-middlewares":"^1.4.7","@enigmatis/polaris-schema":"^1.1.1","@enigmatis/polaris-typeorm":"^2.3.7","apollo-server-express":"^2.16.1","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.7.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.19","subscriptions-transport-ws":"^0.9.17","ts-node":"^8.10.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@types/express":"4.17.4","@types/graphql":"^14.5.0","@types/jest":"^26.0.8","@types/lodash":"^4.14.158","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^26.2.2","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.1.1","travis-deploy-once":"^5.0.11","ts-jest":"^26.1.4","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.9.7","ws":"^7.3.1"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"b591eba1e95c2e49dc8899383b87cced9b60e14d","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-core.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.27","_nodeVersion":"12.18.3","_npmVersion":"6.14.7","dist":{"integrity":"sha512-xh8oQrGY2lxSujWtZSU7CYCw4nnXTxVXIi5jINwcgCZ5e5mw7hniyxWP3c6lgovIt0RSyk8mh1yP/fKjSPDRSQ==","shasum":"692a2c9ec62bcdb696062e8b425c66ffe6eeaf0e","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.27.tgz","fileCount":70,"unpackedSize":2265896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfJs7SCRA9TVsSAnZWagAAAUQP/2X/XMUnEqNpX8RiTmCr\nCS7iAxT3Lbszr16LUx2/axfkZo4Wi3X3b21MfB0E4jdKF9xJUjq+zaQjlg2I\nIkXYiOcEnaY3YAx0vix58cV3CTLMjXg5QnSQIOXUy7xC2dQoZlTaUxl0eAQG\nOmCiwXN3hLeUKM+iRxm0cx0kBI9X3llW+iO4StWPPzw8icfmOQhhUvXEt5Sj\nl7A0m8m3B3It+PE/b6bnLw0gGtTJ/GNJb8BIF5hy2+pU14W9h5Wm/ApZbXbD\nuLtHEJACRDyNIKIPVU9fxwIPthEFenlpy9T2hVO92RFjxvb43YAauQEFN0Fu\nZKsl+uJN3sukOlw5RKMU1oGr9mgiBf2qU2NCOuAyCNLl+9REx1FQP+IAAsM9\nlL6RL2U0rIF62xYpbxe7164vlp16r6YDevJs2QiGrW7UoTSrz66XEqAuofmS\nvzm0mvrao2yBu9DWkA5x2XceKRej7nFfXw9Oe8LkFuGIJxipjrVGrrAle5DN\nSHOvU3wpfLszSqJ3rBwRjvDQUI6H+L5RkSIt02BlC2qcnGHyEjWlwIf8hp7j\nkNgqSMZdcWymhXsBeAgl2KrhS800ZZFy/QSRqALKobEjUQqQ532CtChh7hMW\n7MjRoy9q3A2tiB+6OLtWmRILYtPkIVOE/DjPRKU9kV7JOjcBKnQ0ZMbvvwDz\nOLDh\r\n=rEf0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGXW6hwb2kO2eV4EdCmZky3TsrGQcgHrThu042F6kAndAiEAzskU2RWHNlJqh6BTzyED/J2H3yFJHSWdyanl77TBOkQ="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.27_1596378833840_0.9586055227134465"},"_hasShrinkwrap":false},"2.0.0-beta.29":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.29","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","semantic-release":"npx semantic-release","travis-deploy-once":"travis-deploy-once","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/npm",{"npmPublish":true}],"@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm",{"path":"@semantic-release/git","assets":["package.json","package-lock.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}],"branches":[{"name":"development","channel":"beta","prerelease":"beta"},{"name":"master"}]},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.5.0","@enigmatis/polaris-graphql-logger":"^1.4.2","@enigmatis/polaris-logs":"^2.8.2","@enigmatis/polaris-middlewares":"^1.4.9","@enigmatis/polaris-schema":"^1.2.0","@enigmatis/polaris-typeorm":"^2.3.9","apollo-server-express":"^2.16.1","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.7.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.19","subscriptions-transport-ws":"^0.9.17","ts-node":"^8.10.2","uuid":"^3.4.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@types/express":"4.17.4","@types/graphql":"^14.5.0","@types/jest":"^26.0.8","@types/lodash":"^4.14.158","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","husky":"^3.1.0","jest":"^26.2.2","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","semantic-release":"^17.1.1","travis-deploy-once":"^5.0.11","ts-jest":"^26.1.4","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.9.7","ws":"^7.3.1"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm run lint:fix"}},"gitHead":"6d9e4a77c00dcbf118123dc4f539c95cb4386258","_id":"@enigmatis/polaris-core@2.0.0-beta.29","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.22.1/node@v10.20.1+x64 (win32)","dist":{"integrity":"sha512-BHdeLoBFlccqtpv4DNCl1yrCbJ+/j1B9EDo6z/311cRxDLJPxAW+UBTLuTuyMiiH6KhaPasTYb52vFQ2AGe9jw==","shasum":"c937fa11c3c5db85e3c750b5353af9403c981294","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.29.tgz","fileCount":70,"unpackedSize":2269101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfL+SoCRA9TVsSAnZWagAA398P/1aWd5ON9/MCI4aKTUpG\nFDugbRlsu9maIPMHGP7IMWlyHdyzUmk7ZJ7lpusj/ltj1q8NC+REt7t2muQ6\nykHN1AaoTXIrkBzKzz4Ls77tszp4+VKtDstCTNFyNeBwqjtm+qVQ+7XGJTfR\nwnWMgWVQrKnLpjy2eng3D/GLYdYUt+CKDhFCK9FIYzUByqaEGFiFVKX8LLMe\n8KPUe08dWrKdyFp/VQQDhRvXCpfOX/Jj4Nauscr6Q+3aS6WLjBuU0+miRLpj\n/t6INEdQ/MfN3vFp4CGNdC96DRyqaBL2BX0UT6lJ1r0GVSb2tUOl11xi1N8B\nAtRzjjkVFMeYW3Y7/4ngwAyxEcHf/1fwxQC1aghbcizyJKvbS+uJNN2mlL0S\nMbD59qcy1n68OZdVhrVKFu5KiSu+90vUShHpbisfK2JkJbaXiLRIBTJ9RrGU\n45kmEA/hXrNOtixHW+ZdCj7UYVmpbXkoEN/iBeHUkYglvbZrxYJB76nWkzy/\nEfmODLVVxeqfGWkIDgd4R4uVEeiqCj0TISDLH5x1Fo91wrrzIY5cq9ISaNkX\nTGsNc/bYwYwrIVaCx5LepqbYGTk/swuqM1pgRGLlT2dhGYqcp029WoJjitXi\nyUftScF//PotOAVjvH+h08voKHZQ1HmYx3ZIoDam+kbrd8NFGFmuuqautEOm\n5Hxl\r\n=OUxR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID0w2TnIC5KKYuGdcnt1YdPJSEa+0Epk57PyEzc708QjAiEA9DloDyZ33UOKVwxKR6i3GitQBYWeTDcdDfqO5eYvhPg="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"yarinvak","email":"yarinvak@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.29_1596974248451_0.2384588756288184"},"_hasShrinkwrap":false},"2.0.0-beta.33":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.33","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.5.4","@enigmatis/polaris-graphql-logger":"^1.4.2","@enigmatis/polaris-logs":"^2.8.2","@enigmatis/polaris-middlewares":"^1.4.13","@enigmatis/polaris-schema":"^1.2.4","@enigmatis/polaris-typeorm":"^2.3.13","apollo-server-express":"^2.16.1","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.7.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.19","subscriptions-transport-ws":"^0.9.17","ts-node":"^8.10.2","uuid":"^3.4.0"},"devDependencies":{"@types/express":"4.17.4","@types/graphql":"^14.5.0","@types/jest":"^26.0.8","@types/lodash":"^4.14.158","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","jest":"^26.2.2","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","ts-jest":"^26.1.4","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.9.7","ws":"^7.3.1"},"gitHead":"786fed826fddd27e32f4ca246f30beaee60333c7","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.33","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-61w9p7Hfx/HkGW/FBip5lQY7uK0Xw8PuXo4KkdjBUEcilQ1M0okmH0zjLoQND4t+MyP6ZdyBQliNwN2ghxyBBA==","shasum":"bb4a8bc3ab0d0038050722921a1917755e0bacda","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.33.tgz","fileCount":70,"unpackedSize":2267122,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfM7VZCRA9TVsSAnZWagAAZQAQAIdJ4mgfVWZPSmjN3zWF\nNQmXbaApUyTtOO3ygJeZbl910rNiZVWu759udHJJc7otAmiH/LW+O8THgAgS\nWa+PdTbfNbLCRZd+khEW6oPw+azRNjjpsLuj4Y1S1dA4YsuOFGpxaT5WnAl6\ngh+TJE1hgOPzgtzA90TC8J2HvHvgRJ0oZxbmtys5rbxglw3uhJCfLCD1EZrt\nkoqJsHkTadC9cnTVxJknqAsWuARKVdin/IX+cd7Slmx4KwyuleHPNMGDCIWO\nN0hN4FcldDobMZar6A0t/3f64biP406MfOculQqC1lzb+OPzPEv+UxQ1DTMV\n7UJrgt+0nNNUvmBbPrf9bm+uU5+oep1RBiUGJHZVAg42DE7Z/eIGGfArcrT4\nPJGVvVSHC+iMzLJgM7lqJBaYWpwIKUIK71bcCIUzLtKjW4IY1jkfzOHE3kdO\ndU/hd2DBeqJJpXc9CekuRVGY48EwCrj3FNTzdaym/ylQQW0DXZHjiZS+a/PJ\ndV7fbUXH744bFp7511lLZVdTcJgIydS0BhZyEMSUkCLCES3iBDX8ghwht8od\nQK4NQwZeSIIovlndPShNcpLOrKVI9SxM8ua486IdJF8lFXWr58qCpOaLD4V5\nkl+6XX+ls5EoIzIY2nJeLobZtAIGcPDJL3R5bHPmfzA+JBSicJTNckYh9D1B\n9bj0\r\n=Z7eP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBd5+n14pV9kYWmHliweeIZwTnnD9XNy9wscfJdY5o86AiEA+lRh06T3LUvuZAHDjMabFNQSkhy/l+jVZvU4A5kFDtM="}]},"maintainers":[{"name":"bikov95","email":"bikov95@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.33_1597224281193_0.5950275099889264"},"_hasShrinkwrap":false},"2.0.0-beta.34":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.34","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.5.4","@enigmatis/polaris-graphql-logger":"^1.4.2","@enigmatis/polaris-logs":"^2.8.2","@enigmatis/polaris-middlewares":"^1.4.14","@enigmatis/polaris-schema":"^1.2.4","@enigmatis/polaris-typeorm":"^2.3.13","apollo-server-express":"^2.16.1","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.7.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.19","subscriptions-transport-ws":"^0.9.17","ts-node":"^8.10.2","uuid":"^3.4.0"},"devDependencies":{"@types/express":"4.17.4","@types/graphql":"^14.5.0","@types/jest":"^26.0.8","@types/lodash":"^4.14.158","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","jest":"^26.2.2","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","ts-jest":"^26.1.4","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.9.7","ws":"^7.3.1"},"gitHead":"e7826c66edd46cb897a6f45a0d3c684dafaccc67","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.34","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-Bxe7fszd0MKttwFOOY04Romgolvmfc/gA4VyRyvnmvzSyN0/Zb+HkjEtGLyvDRxImVrBfpaAc7KEfdDaDBOA+w==","shasum":"1e540dde91636111b354a62b5f72f19bb1e1f1e0","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.34.tgz","fileCount":70,"unpackedSize":2267427,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOpSgCRA9TVsSAnZWagAAvWUP/iVMo0cF3OhJvW2E/cmZ\nJa/x9YFnUfRB8Hh66bcnUPWyqSemSmbOEvdoY8Ja/UdzohVaVZhcA8wDkax3\nv3f6MNBSQgKYdB5ByntDtDgHEGQzgxgfEgML7wraGr8FTd3qAHZ4RBo9nGH2\njk6FGwW1awO2qKsmnZ/PvmoO/d0a6eRdX8Hzs1liddsj5WacXBfrthGySMgF\n6hFe32Z/jR7vJ/XoveqAIaEbKaZOKPkjhKAYPlmG78p9MMERTZve2glC/WWq\nn76C4EbHwg5ENgcbIqDI55/4R1XMuQEcW42f1BQJg/HoP1P1/zqR+JHr3fHY\nI6Dqsl9YLreZf38POBGbAxd9fPbsRV56UrmImASeO1Bvu7IBCcX+YBGwAoI5\nyUppjxIXibMERIoHFrR6pbFmH61XXflY4c/JwfYOsWrAwEeHevHfL1P3ZIJ9\nKB+pyFjjO51yxT9kPq9sKNUbK47T44xT/gHWEXsjTUIlFmkc5tdgFvwVgLT7\nORy/lb3M25ZqVAcGvj84t51Q6R3g3vfhjVdx6B4ZlT9giDaNYfHhWgD9054f\nCTln0+DeDpPHj23Z5ubarjC1pX2TWKNB78kU/1Fa18tAcVlMMNp4nAFi3lqp\nImU9lTEa2octA6SkK+7L6UqgPuJGIY2RsmW/yLU40UW+i8TMuwVG+jKYW5F0\nsO6a\r\n=GY16\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE/PrG4Xe6qu8W/dYELG3o1Al7ZxPFjYY42ae5ZCvTMXAiAg1Ni7NeW4MVp7RbQEUydl67Ks+t35VD1MQVOYRIdpgA=="}]},"maintainers":[{"email":"bikov95@gmail.com","name":"bikov95"},{"email":"furmanmail@gmail.com","name":"drvoid"},{"email":"osher.sade@gmail.com","name":"osher-sade"},{"email":"yarinvak@gmail.com","name":"yarinvak"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.34_1597674656133_0.2065219350975971"},"_hasShrinkwrap":false},"2.0.0-beta.35":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.35","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.5.4","@enigmatis/polaris-graphql-logger":"^2.0.0","@enigmatis/polaris-logs":"^4.1.0","@enigmatis/polaris-middlewares":"^1.4.15","@enigmatis/polaris-schema":"^1.2.5","@enigmatis/polaris-typeorm":"^2.3.14","apollo-server-express":"^2.16.1","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.7.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.19","subscriptions-transport-ws":"^0.9.17","ts-node":"^8.10.2","uuid":"^3.4.0"},"devDependencies":{"@types/express":"4.17.4","@types/graphql":"^14.5.0","@types/jest":"^26.0.8","@types/lodash":"^4.14.158","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","jest":"^26.2.2","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","ts-jest":"^26.1.4","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.9.7","ws":"^7.3.1"},"gitHead":"086d406be977e6c3f77077aac0166eedeaa881d4","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.35","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-quKfnquGHDwNykavK/X0XHzBsweCqiKpXq2BBWSdQG97aQGX0KN/dATeZyOQuSqG8d6agtbMyhUfB/1BgahR9w==","shasum":"da66782a093068c9815ea97a0d2efd45a99bc36c","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.35.tgz","fileCount":70,"unpackedSize":2268236,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPONvCRA9TVsSAnZWagAA04YP/1zKlx8kT6ccgmXU6bqY\nY142iZ/jYAp1GU6212fzOcDCJ5PPRyvUBhqm4sRt7KtRxT9vqI81jjBhefWP\ne4xYH6C1oaIAIQ7kqpk13zyNpKGTZKxIlXs0rQTV6CKCHHz988bjttO+Ac2D\nbUR22iW1hg8LifcK57Wfv1tmsZddCjyP2wuc9TQcJcVIGYgv2SuJOFsSrciD\nQEp2cC8uQxY9wIFdlDoNrPDVty1fTx8LUTDU6uPE2nBR5SdZzO5ALdEzDq49\n24B4aFAkIR/Uw/fUNvbF3Z7QliV0F9fgtzOAPG6ppCvWncMp8cFO4u1LNM16\nOxIviAJ3O/5vUFCfAJr4fLJMD6oHOySKPXyoNn7WK2uqzHOPaEbBoI8xbHkk\nFafx7Er8SpPqy1kFelrS23BIq2wtYfMEybFYtfr+8nucEJAnMAHKSc3Mkiav\n9hvoRy+4u2bmdmztO2/WBirepncBxweIly3cn9PvgQ3n+PGksZ4WlFkSIit0\nccNo9CUNllpPXDfw0nuZRo2hBnU6UQtxLsm66Jfnj7FGz6IzQ08AOs1naJ56\nS1W4Sdi1eWsY+EUB8FRqEb2YOuyaiuywvyQfquFVQ7gjBHtl7UtBYiUHCoWb\npOOAlO06NtA1aZiyv357kgrTfzmkjHrr+DIDqvVy5WXIlWfDg+bjiRUcZbsN\ni4ec\r\n=+0vd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRaYZ9dYdG4mFKiomSTffQHkaZKWF4DKxT5D9eA67BqQIhANwPj4juP+6xctO+SeXcor28ebD1UThJv96l57ZkYP3+"}]},"maintainers":[{"email":"bikov95@gmail.com","name":"bikov95"},{"email":"furmanmail@gmail.com","name":"drvoid"},{"email":"osher.sade@gmail.com","name":"osher-sade"},{"email":"yarinvak@gmail.com","name":"yarinvak"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.35_1597825903121_0.9680224965363051"},"_hasShrinkwrap":false},"2.0.0-beta.36":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.36","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.5.4","@enigmatis/polaris-graphql-logger":"^2.0.0","@enigmatis/polaris-logs":"^4.1.0","@enigmatis/polaris-middlewares":"^1.4.16","@enigmatis/polaris-schema":"^1.2.5","@enigmatis/polaris-typeorm":"^2.3.15","apollo-server-express":"^2.16.1","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.7.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.19","subscriptions-transport-ws":"^0.9.17","ts-node":"^8.10.2","uuid":"^3.4.0"},"devDependencies":{"@types/express":"4.17.4","@types/graphql":"^14.5.0","@types/jest":"^26.0.8","@types/lodash":"^4.14.158","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","jest":"^26.2.2","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","ts-jest":"^26.1.4","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.9.7","ws":"^7.3.1"},"gitHead":"a95b57aa8205b79c6a65c7364d24a31dd965466c","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.36","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-1IM9gKvRKrY5aPMp4xN0gCpbOnXItG3k8nz2cYbArlrRtzvSQ0unofbqHuVdgkopidHL+8aPuabuG+gIdiIVbA==","shasum":"c69b9d184e43dcc2d5565b3884d6ed0bca8ee542","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.36.tgz","fileCount":70,"unpackedSize":2268466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfR1BRCRA9TVsSAnZWagAAtHoP/0KtF4ND6UildYSdOY31\nQs78J3BH8JJjVGZUGaNRGKbzh0+TfEL3cobNG4/5HHa/jf0p36hVfv2UCrWG\nf+oWKKho7BXoYyHcT03l+AV2HAQBn6dQiN3Z4lqkjsnvbp/p/mp/IqQqOR+C\nqtvxQWc+jnwzFDKo2ApSjnj4IVMkHqzoQsgVydhWxNijdQjuS+kHJAUjGlFU\n2YKUvnJLSaNxskUQhRNZOZ69Rl98/s+OWuE94ODaLagn9MHtQvHdM90Od6XN\nWfp75T1fMl7BGYL08Y+XdDaH5iun34ETCNYVldzTxSorf5R4bGwPKsvrnlcc\npuiPfrufgiGw3DP2dVrQwrC6ZYycbaSO2NvPzjV0+8eyFFp/wdQnK7weKQOM\nVTtvNF2KxZhc+olJGI2V4L2rOGWeYSOgodurNNo1o7VkAf9BFvzejkN0MaKe\n455UqfseetLI65ftZDLd6CzMUSCjkyQ3DkEWI6MSK7oPDg0XjU+TenE+7V5R\nPWoiTWX783dYEoIewWJFNIICvCaSRfMkYiesa4TCpVgJrOaXBow1fgTabi8i\nDfbqkNXaqmS6XJ1iQdTAcIk5oXFGfZfmL2WJ0MZT9AsoltsSF0olagNVPv8m\nP/oMTSsx/wFMUHuarvggJW9dfJ9ysX4v7DdRcKdecKJX2IJC/QlJuzyeeH8t\ninI3\r\n=NB9J\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDQ/xqmRgnbFCcYBx+/Rk4Fp1Krnz2fKCkGF5WOnesSbAiEAy6+V1MfYobv6N2kgRf2okJgGFGvMznLWAcepyyTnnF4="}]},"maintainers":[{"email":"bikov95@gmail.com","name":"bikov95"},{"email":"furmanmail@gmail.com","name":"drvoid"},{"email":"osher.sade@gmail.com","name":"osher-sade"},{"email":"yarinvak@gmail.com","name":"yarinvak"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.36_1598509137369_0.9154948367524687"},"_hasShrinkwrap":false},"2.0.0-beta.37":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.37","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.5.4","@enigmatis/polaris-graphql-logger":"^2.0.0","@enigmatis/polaris-logs":"^4.1.0","@enigmatis/polaris-middlewares":"^1.4.17","@enigmatis/polaris-schema":"^1.2.5","@enigmatis/polaris-typeorm":"^2.3.16","apollo-server-express":"^2.16.1","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.7.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.19","subscriptions-transport-ws":"^0.9.17","ts-node":"^8.10.2","uuid":"^3.4.0"},"devDependencies":{"@types/express":"4.17.4","@types/graphql":"^14.5.0","@types/jest":"^26.0.8","@types/lodash":"^4.14.158","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","jest":"^26.2.2","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","ts-jest":"^26.1.4","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.9.7","ws":"^7.3.1"},"gitHead":"ce537e900030946c6887c3d92c9d172295b611e7","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.37","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-PuZWT8sDNChJ0nKgcxxn5/aaC0HCIiCX/k9do6eqA52Lo8ZYVi7YxU6JBwx8YBH1CqwzPnsi/dMUTK8fgsEO6A==","shasum":"b71c2c1f5a2bf410e71c5b8bc07e181f7113aa99","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.37.tgz","fileCount":70,"unpackedSize":2270675,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTMA5CRA9TVsSAnZWagAAmBEP/3dP6CyAKCeBOOQu6DAn\nppZikQXx1a4af0TWyHdzQiTIsl8N2XBAUrrk5gD+2XH8NlXyi8OUtNLrwlUF\nVEAnMToKwY3fzmSB2rqXwyGQE2/TJo5ebtdWy5Jf9ywkJ5SNOg7KMK8/+huQ\nZkRWeJNdnRJ3r0W3VlRaYC3XA7spWHBV2O+Xkiu9QSBHcODpcLje9N5jh71w\nOmR2Rc4IoN2/wUCUfbylzUwDU2Rg4i9tr4Olhs2uzc9ar9aBMIbbl+q7fd6a\nondG16PN1F76sALmU9gfHSbfosXqt/s8t3ds184wG1NnGQXsPwivDa3Fidxd\nMXOAK8ghXFvei2kdyYwiZDEkCsFgMA4ugbwPdefbDd7Z2kKhCv9tCf78DwOs\n1tbZOLMiGakKQN76QmTTbXQ+NAfJ0Y3ZIDEdrqbI4ChdmOibP+JiVp2/H3B1\nkkkF4ucdJIx6ZOqisqaqBe4cunm5VT5yQrMWAuKGP2pZWQD1iszNNTEUNsNz\nEkcx41a6/GXBLgXZGGgl4u6RtfI9aQTQFD7VjTQiqCOnfOgtAkBcp6y9vUwt\nTGZVly8CB+7xC2/qa4VMerastyWHa2kB1cY1tCtfziSmJlo4AtCQvyPkwcno\nYedaKum+BihwBC/6jk/WD1nTvd1NsnB30bRhpYg2/ysukXyyHbBQ9C/Y7jLK\ng9yu\r\n=xMK+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHAe+UfszeS3IEQQnS9d1VXkALA+fhBlelJ2Vsdmj2N+AiA8CAhe2DkBAGX2gzDW4wspMP8aFug7naQc7GGcxwq/xA=="}]},"maintainers":[{"email":"bikov95@gmail.com","name":"bikov95"},{"email":"furmanmail@gmail.com","name":"drvoid"},{"email":"osher.sade@gmail.com","name":"osher-sade"},{"email":"yarinvak@gmail.com","name":"yarinvak"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.37_1598865464977_0.5136761623269306"},"_hasShrinkwrap":false},"2.0.0-beta.38":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.38","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.5.4","@enigmatis/polaris-graphql-logger":"^2.0.1","@enigmatis/polaris-logs":"^4.1.0","@enigmatis/polaris-middlewares":"^1.4.18","@enigmatis/polaris-schema":"^1.2.5","@enigmatis/polaris-typeorm":"^2.3.17","apollo-server-express":"^2.16.1","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.7.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.19","subscriptions-transport-ws":"^0.9.17","ts-node":"^8.10.2","uuid":"^3.4.0"},"devDependencies":{"@types/express":"4.17.4","@types/graphql":"^14.5.0","@types/jest":"^26.0.8","@types/lodash":"^4.14.158","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","jest":"^26.2.2","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","ts-jest":"^26.1.4","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.9.7","ws":"^7.3.1"},"gitHead":"ab89f032a9ecd5825ec3b5afd410d4a6b3f20870","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.38","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-kBF/sjunoiDDqRjH5CfVyj8ZvA2UYeHomzgHKctv5ea4dfVoX0c0hSHKbvIK9kEiTPEptnHg2cXhc2eKIKnKfA==","shasum":"6195c4dc7eee633b698397efb6ea63f500077b0d","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.38.tgz","fileCount":70,"unpackedSize":2270114,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT6CbCRA9TVsSAnZWagAAqToP/3bF0p+KoQqBKh19W1Qc\nqDRZoPjO2GJGXw/kalMyfp6b4D+Kldm1vcFc2Ng+ElwXfuHYliiKnxnq0Gdv\nlpkfNF6HDOPOjr3WVSgFcFLONQHL6L2bmCJEUC2ER7zumRzo8aOzc697o+a9\nRipMGup/8cr3DTBSDzA1sgxpGhROkxVo/9Oq1TrV1/2CD7UlZbpz+SCgj887\nY4uQzinFHPUByHVdIJteYvcFFlWo68bj0olhdkImv2PHh7OvEp+ulV994qmn\nfbffv7MyLXjYrne5NPjY2v+ZBHCKbUqzaC5to7Oh58AEcxEoLaowu38OwB2A\n1V4z8TS5EwGmvN2EWe/J8wKxzqv7mk/oiTbnpc05YjHh3RnNCoc3stFAf2aF\nYFv+DoNQmYB7d/NO5zPvweTS8Blha7lW9TKO/NUTl75IMJ9BMIhJcmlmYvcu\nfxiI8ZL840oyxaQuhsWVcc/I3DunH6tQZFhtloHsFWxUDu4EduXxsANW4hXl\nbz6mU+g4iIG7NtRGtKEi0el5KqAJE933FqqZPtExd60RPgOK5MuQBzU3/zXt\nh9q3xMKAKN5qAm0RCG8zt+TZfy5u2qswDJvu9X3YTu24CptCeUPT3kjIfDFG\ne3wGOACLDlEa1NF4TeTRl8NC3x5tuSitce8NjOR1Rav+end27SlPN8lGliec\nGWHx\r\n=hCat\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDA1FNhiWekzQca5U6IwjQJnDrdONCQ1KleTHC2BTmyVQIhANzY+A7xV1Pa8N4fDMg9Z+Li8Ii4rhk5kpjXzaYEklqY"}]},"maintainers":[{"email":"bikov95@gmail.com","name":"bikov95"},{"email":"furmanmail@gmail.com","name":"drvoid"},{"email":"osher.sade@gmail.com","name":"osher-sade"},{"email":"yarinvak@gmail.com","name":"yarinvak"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.38_1599053978709_0.7869866776753356"},"_hasShrinkwrap":false},"2.0.0-beta.39":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.39","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.5.4","@enigmatis/polaris-graphql-logger":"^2.0.1","@enigmatis/polaris-logs":"^4.1.0","@enigmatis/polaris-middlewares":"^1.4.19","@enigmatis/polaris-schema":"^1.2.5","@enigmatis/polaris-typeorm":"^2.3.18","apollo-server-express":"^2.16.1","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.7.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.19","subscriptions-transport-ws":"^0.9.17","ts-node":"^8.10.2","uuid":"^3.4.0"},"devDependencies":{"@types/express":"4.17.4","@types/graphql":"^14.5.0","@types/jest":"^26.0.8","@types/lodash":"^4.14.158","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","jest":"^26.2.2","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","ts-jest":"^26.1.4","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.9.7","ws":"^7.3.1"},"gitHead":"a11f5aabbb2abe37f3fdce2225800a93303ecac8","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.39","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-CMoB1AXmT9HCuLmHpis5dGQ755o2QR5vMvTM2SXrsD2QbuYm7Mdy8+BZKj4lmbOvOIiwJ+hRi8TVisdKGdGjGg==","shasum":"056fe9bc4ae4ecd20f08b5b8f1e8146bff0f8e85","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.39.tgz","fileCount":70,"unpackedSize":2270899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfVN1KCRA9TVsSAnZWagAAV28P/Axm4sCQ3wkUmkfHHptb\n9qYXLywBUnXYWm6bG8DzqlSVa694ztsHuqXExxenIPDg5f0cfm55vwDS4KGz\n1pvVnF51tn6a5QQD9tNPVrPoltB5KktRPJyX5xnTLdJ+MgE7swQlbNb1Yv09\n5p9UHlSNtiQk8o+8rXjk5hOEO/grqUM1ivO4tfo/kYNaJJzyUbLUNigMgOi1\nMQEaHB1BEmDWUAUgJQy5KihxDs5nDjpW27mPSseNP+1d/vaW9HrvuUisPzg8\ntwPDcyRDKNS22SfGQlgp/MQi2SNZp5+tFvgr07iKTtcwrwO2HvtlZMmEvwWy\n6yT67TKCZTtChawD+DdaW63S2fkCK31LfrNScwf+IRcS++5sAwqzuj8zKlGC\nLccHSsl99HVsvpfeAWltQr4gmsOFe67+ADoynCeEDTqD3Vv83wV+VM6YCV99\nIqx9JF/SJGBN3TUDPsHgzK5FL157bIRj21rTQCv40Z/6t7cmb/fRgvZHq1SY\nDhK4GdfWdP+FudhsP2KAHO5+FXxMNGiLCPDKgP/xe0dhn+/trZqlr/UrGlow\nch2J6qJUdzVDmBYjbXVyV7QSCgaEGnjWQmg/LAED+cH93BmwIud5kf3dzdpu\nM2XfEB9an2teiKCT6PZIGYeH9qVqB2jFxFJ7qJKQZUC0IhEt1QFh56dkwLeW\nNym+\r\n=3YBN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEUPkAbbXv9NMuEcId1gGeBBHFKeGyRQpaDxWDA6H6NIAiA9bx3azLk49yYCTR3XT+dr0fgCl3poVkiqNg0UN+5OYg=="}]},"maintainers":[{"email":"furmanmail@gmail.com","name":"drvoid"},{"email":"osher.sade@gmail.com","name":"osher-sade"},{"email":"ron.katzzz@gmail.com","name":"ron-katz"},{"email":"yarinvak@gmail.com","name":"yarinvak"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.39_1599397193972_0.6100333394565549"},"_hasShrinkwrap":false},"2.0.0-beta.40":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.40","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.5.5","@enigmatis/polaris-graphql-logger":"^2.0.2","@enigmatis/polaris-logs":"^4.1.1","@enigmatis/polaris-middlewares":"^1.4.20","@enigmatis/polaris-schema":"^1.2.6","@enigmatis/polaris-typeorm":"^2.3.19","apollo-server-express":"^2.16.1","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.7.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.17","ts-node":"^8.10.2","uuid":"^3.4.0"},"devDependencies":{"@types/express":"4.17.4","@types/graphql":"^14.5.0","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","jest":"^26.4.2","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.9.7","ws":"^7.3.1"},"gitHead":"8a3a16936f7afc4904bb7d9a99a5c7411cdd8072","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.40","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-88FVfNaihfTlIpR3TrSCAI1AVow8qpst9y4CWlJKg54UQ0dp+/DS9Tg6sIr2eaNroQLiIf4zYsNirLARFY/YVA==","shasum":"3c4605a7a35df007bc0dc614cc77f99359222a6c","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.40.tgz","fileCount":70,"unpackedSize":2271282,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfVdpJCRA9TVsSAnZWagAAkH8P/1EHOg6PDO9Z9V4fXn+v\nHRIUJ1bm+r3EJ2XWQAD3l2iMXyplBLUIOPf61Rau+/3ryVM3O6qslc328/Sq\neA7aOUrzJF1LlFBBpfvlC1cHQEgqFTzd6Pft/dh2Ipp5ld5rpyHUNTq+Ly9r\nTloVcaaxXdveashaa5wNIH/C69uzuahDt8G6IB96kAQ3hVf+emS+8+IJuAIc\n9A9RL/uSMoBuOeVTGx6fCCunN0nqZo6nVjTDZPsInlhf39wS2I6KAInfZOVY\nRZ5MEu8bvCHUlcwQ4qCQQqNXOANbSOmENHvVBlgtQnHfEHG5dVzkCexYK+vH\nKPql1JTrMIzI4ES7GYsbPpjBWeK1SRzE9R6pRk9flpnJOyvHl+gRHjFlPUNT\nBK718uxmxKC0ljo5TMoWdaKp2hxBFuvBXo+TkB/qx9zkMtmY23DFcpcppnq3\nBQT11WEXNIf+u8MP57/bZ7QaBjkyAPzdYVFDwjAXdtnqVkuBEMZp4nf6Ylip\nQttZX1lgXCC7aAHIPDlJtFXTXrbgXRczkT36P3oGjopRablDXUPJpMGcnBRQ\n8S3xdSnZGCdslNHT5t73YZ09uIx1gNYT4vZJB9lFimLXFk81MmPszZ9pViIY\nIkfEzszicO0CRSsGYdWhYiXH3RK8b1vVYGmmAi2Jj+bMngnFhSnr30JkQGUD\nXQoT\r\n=2ocr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHl7gDR+1yhHm9IfTRqS+GSgr2ElzqluGtFsudmcHYhmAiEAhgj+v1Bzed0/sBFjOwns8wM1NHePjsYpMaYh4iMflsA="}]},"maintainers":[{"email":"furmanmail@gmail.com","name":"drvoid"},{"email":"osher.sade@gmail.com","name":"osher-sade"},{"email":"ron.katzzz@gmail.com","name":"ron-katz"},{"email":"yarinvak@gmail.com","name":"yarinvak"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.40_1599461961000_0.026124320404252277"},"_hasShrinkwrap":false},"2.0.0-beta.41":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.41","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.6.0","@enigmatis/polaris-graphql-logger":"^2.0.3","@enigmatis/polaris-logs":"^4.1.1","@enigmatis/polaris-middlewares":"^1.4.21","@enigmatis/polaris-schema":"^1.3.0","@enigmatis/polaris-typeorm":"^2.3.20","apollo-server-express":"^2.16.1","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.7.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.17","ts-node":"^8.10.2","uuid":"^3.4.0"},"devDependencies":{"@types/express":"4.17.4","@types/graphql":"^14.5.0","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","jest":"^26.4.2","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.9.7","ws":"^7.3.1"},"gitHead":"de71bbfd449fd1d7eea447ccfb42db3d12ae6799","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.41","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-6bEQuqmSLhtNseb4MSPhgFrDYNhjiMY726aiUrD7UOH+99psPgmrhQZzjzTmgvo/82DogjausOxujgiyQNBd5A==","shasum":"3ea174245f5bd3586a3bb3db9ed8c5a880b370d5","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.41.tgz","fileCount":73,"unpackedSize":2272729,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWL3iCRA9TVsSAnZWagAAmZMP/jz5e8F5sCzgsg149Nqo\nCjQxLSmXE/ewjLCL8ep6XrIzmuDq4fTbJewC91B8qkrrLW2u3BSyb3hIal38\nP8pX65iX9T5kl6BehgijWKjr8EI9HJj0wJBc1mJJz8fSlOfharBVPSJDOKqn\nTYcN3bKWpjJYcrETarW5szA+/eM9tVk5fyu12dPYMEJMUVe26N2VNv6diCVq\nwp+/bBQZ4bS8/u5JUWTbu+uRR/4GPo9iBGPKLHvUo5ZOXkdl9rVsXkHyqKij\ndj1IGA92WGuQ2K6Gu5XP3B8TVyo8YlA3+CqJ0lVyxN2fTu/KRcxOLcoWeO47\n6aGTbQK4D3ESFh05xeIa1JEWlK2RFGjYynD2uNOp3dBFgtgL9HQD8fkhgJHn\nby6tIsUEyuGbCkI9im1IHX1DAVOXigIPZObhR1/uCHhqnvzbCEZwFSThYF7U\nVigWuk120N6Y2IMzyKV/UkEBbMJ2NlgmrwUMGwPhx/2+mFfgriAO5UYYalxb\nSmnCsOhOol3M1srmEaNp4qEoGny+tg1PAWVvCDt9TXtE14LCj6QAULHlThrY\nFVuCve09ClcRFLafLBEmGt8hup1F7OdxMQ9sooLw0uLiXTn5+uX8ZwqREC2f\nxtb4bF7IQuo6fhQc76W+ndqfZD+8wF6RpT3PALrluiK2Ymt93FQom9egfjrO\n+uaa\r\n=Vax1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGQiBXVRMZhYAzu8VVCuDIpsuncSFvQEGXbPTFEt1NFBAiARoqQpzhfvY3Up1Jb+6BpTw//XEg8T4NMs6W5GXsFVZA=="}]},"maintainers":[{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.41_1599651298479_0.6588714338190798"},"_hasShrinkwrap":false},"2.0.0-beta.42":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.42","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.6.0","@enigmatis/polaris-graphql-logger":"^2.0.3","@enigmatis/polaris-logs":"^4.1.1","@enigmatis/polaris-middlewares":"^1.4.22","@enigmatis/polaris-schema":"^1.3.1","@enigmatis/polaris-typeorm":"^2.3.20","apollo-server-express":"^2.16.1","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.7.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.17","ts-node":"^8.10.2","uuid":"^3.4.0"},"devDependencies":{"@types/express":"4.17.4","@types/graphql":"^14.5.0","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","jest":"^26.4.2","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.9.7","ws":"^7.3.1"},"gitHead":"85700c7794c729f2d3ea6e924e7f53f55e6d1137","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.42","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-2vNpNk6HGLI439sff65fvy4fggDWmZF2sIqwthOM6syRMpB/osoWkjh7o1MqSFi3vwPsCNiP5xhhwl0V6weMbw==","shasum":"de83e11f13801008a96b401f346e5de9edd73d29","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.42.tgz","fileCount":73,"unpackedSize":2273115,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWiWfCRA9TVsSAnZWagAAOzcP/18pKyAVTumjaVwrrf0L\nROveFCEmSv7b6qHofOMx1sjLveu8ruNvD7IH5AVkmcRe9VDAIARQca2waOZo\nngmM9EYeubi4p5oqqbz8QJ1LrokHb6UrXC9JkS0vWCr7VUb2drA2tB8EgLEV\nRpj6Mv1De2yvtuBV4qMAEn2kPUyLLC8mbLOFPygK5xKk8AhQXWv8z3mJPEVP\ngOeBmuLdt5s3CSyv3Mi1jMT8E5BXYRtpVM/8vYs2Woq/1SJHxdeQmFmuX3tL\nZA45+xos3AkgT8QqXoCOe4MgVHgNmf/J7W5And1pLqoTzxirrjG0yvLod5qC\nQB4btTbAmAbdFY8eBux3AZX37UTBGOvk0yDSCtDyO/V0R7P/hPLuFfWYDTW/\nQiA2PXTA1+1uCHcILDzQDxKorAXTc6JMO/YSSWtctKqxNHUQi7o9TgSt0vy8\nN3CJXcjRhRZl9g5LnLEsihP+4tv44pPwJW0bCVzz75tkV4JNiMj0rBYGs6j1\nF3bad6bMyC2Kq/CbE+fiQ0zfyFabK/eT2Xb3L0MtxRzpFlBu6acmU4yVrjAz\nGLpGtLtB9vXnOMvXJjfLM+NoA2qmfcdpzQhQOQ6cHiPMneLQOfR/mHo5y9Jz\noQtnRqYDZJe5QAge0RnjQu0tU6VT/J9FNVKkT/lW5K02ArD+Pn/58ariT38D\nBqpA\r\n=Eowr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCE8aphLkAZBIxjjHbXF8sWQS3EfnXF+mL828+KcCsuNgIhAJ3CfmhbqdLteu+BbkyJ9MkJ8wky9872dq/Kr8XncbLe"}]},"maintainers":[{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.42_1599743391352_0.24589772370322893"},"_hasShrinkwrap":false},"2.0.0-beta.43":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.43","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.6.0","@enigmatis/polaris-graphql-logger":"^2.0.3","@enigmatis/polaris-logs":"^4.1.1","@enigmatis/polaris-middlewares":"^1.4.23","@enigmatis/polaris-schema":"^1.3.1","@enigmatis/polaris-typeorm":"^2.3.20","apollo-server-express":"^2.16.1","apollo-server-plugin-base":"^0.6.10","express":"^4.17.1","graphql":"^14.7.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.17","ts-node":"^8.10.2","uuid":"^3.4.0"},"devDependencies":{"@types/express":"4.17.4","@types/graphql":"^14.5.0","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^3.4.9","axios":"^0.19.2","graphql-request":"^1.8.2","jest":"^26.4.2","pg":"^7.18.2","prettier":"^1.19.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^3.9.7","ws":"^7.3.1"},"gitHead":"a405b2ba8094d4409ac5832a15eed92aeadb502d","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.43","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-Mbs7Js7wfyeEUUG9uSJqDWP5AxNGGBLP3jBNF7XKCwAmppmLUdMMG2KB+aDubNBLIlpHV2+hqM1BGHyYS6qSlQ==","shasum":"5c5e2a3fd31ba48aa63550194cf24638236fd1a9","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.43.tgz","fileCount":73,"unpackedSize":2273345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYJjjCRA9TVsSAnZWagAAGV0QAIThPUEw9YP88Z2U+chn\nHZo12OIPvGdSG1q3K93XlajBK65IQqhISpcTeKhA44Yxwz2QOmQ9sdtaSLPX\nvot+K2L6HEMMn24K+k66QYPICmgtrxzsZNZQdT5tT0ZEQ4/FrTWmEIAh2UAs\nQhgW+6jybsR76bdVZKzmL6mwHdKy8AGbG0BuPiD8shA1j/9Jhe+eN2eRtnXg\n4MfJK4lTWlyi5MV26mraqBS45afJUFSsA5us5hXt2REbXH+UDZvO+dxilGc2\nBi3gYtxlStaRfFpP/+vIvwZVJsadxiO5oVXRyhaMXz9DMq1qMT/g9wWLkpuT\nhnzOtQxUXBfy3nlZ1HBG2EVM5ztC1rqe40MDho6LCit+UfXKWkBH1qR5Z7i1\nC0yDwm8oW4LQIC/ulOp0W8QBJBDGtjs1Qa9+SkHs8LL3DvrDqH9N0udfx73c\nN5K4WOvS3FLAF8D+5h2EmiTH3iVfXMUHk+3MP3hO+xl3uwfgzV7PKyaExaEP\nyWLtU508wOEcTyMCBrHHU1UQuOAj23bh5vmXOaXrw//hy+Yzzfb12ZBFrEUK\nMN6VMzlqj0HuGHyn556ovMbTkCJgs7z4IWwBIz5n+86QqjAjGRisvsGnJT3j\nVovd3qVmUZiUQwk5Y/bB5R3oGEwHMDz5PE4MAantyPzjVvhgS2b/ypx0ObMf\nNPJ6\r\n=ymXg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA8IqUCHvlbhaHr2U3bhVPiCrLGfdMQXOWd/vrSq38tpAiAA8OGAVv21r4ZVI59NHRldD/4onF5/Nts/ti61eGbveA=="}]},"maintainers":[{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.43_1600166114698_0.6986798023549274"},"_hasShrinkwrap":false},"2.0.0-beta.44":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.44","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.6.1","@enigmatis/polaris-graphql-logger":"^2.0.4","@enigmatis/polaris-logs":"^4.2.0","@enigmatis/polaris-middlewares":"^1.4.24","@enigmatis/polaris-schema":"^1.3.2","@enigmatis/polaris-typeorm":"^2.3.21","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^3.4.0"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^3.4.9","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^7.18.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"d5eeba7014fbe3199e04f9d52ba4f3b064741dde","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.44","_nodeVersion":"12.18.4","_npmVersion":"lerna/3.22.1/node@v12.18.4+x64 (linux)","dist":{"integrity":"sha512-yeJVdK+lmwW752/VR4NzXZbuuv+6+0UV9I6bbvX48GZ+Ym8APPmvLV4NgaTdVUj2SXifvxG7rJVq/dmUhcNdbQ==","shasum":"02426d5abc7c0ea115c93170a2b583557ab50ea9","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.44.tgz","fileCount":73,"unpackedSize":2275986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaKAJCRA9TVsSAnZWagAAeqoQAIt3ZzRPgGVu+vJx075n\nspfb+RMRiJ183Dl2+sDlUCg4+RCl8gZeGOsF7BYcdRKXlWIHS5x3awT6iTSW\n+qZSCkjVw7SHv0rrIy79u+xrbpnNHnW18IwjTKdzaMsZ1pKX1/yUOVTEA2/d\nn4jKzOau/GDNA+/QDgB8IuJqQYK3f12AM/YASizxavv1cPI6soZr3Gt9uioq\n2GDdpwKFBmFBcylkHMjJKLvfM3vlpC5l/b8x+gXIIwOUofDWiwdszOigiqEJ\n7zqEkvagWfJjO/03jlvVSN5M/7aOlY3RFGiQAzM6J3dgV+MUkgqbkLTg9CKX\n5iE3GCHlpZqUBKBLfpK/IDs0En0PhZOHzoB24J9mbD5nwipd2Uq8fripl25H\neDJXhDjKkeAEBdJpKolTyc/pmUCMqHaG82rCEorHdA3ZRByNGaf1jSsOl7Dz\nBl4IInXKM9FIpz1pAvg1mdhXIUgjMQA7vOEi1xk6dCYnDJBZfFuaz4zPQkb0\nOY5KQ+3wEjybszVZ2qDvxsPxDQRwSZPzPtKfxllzdEVh9eQhVFLzerZSYPgG\nz7lTjW4B7TZ07p1OiNcYX8sydCNbmkWm3O03Tb9DoysNTpkUiHcVK15DvBfZ\nQ0WAVXVydXoT4gBYUVBbPNDOYL8TrH8FlIKjV9KG/iR495sNJYStuS+W6Do/\nCass\r\n=umsZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHChlVuVbXVi76N8Bi8xbvA4ygQNd6O7uK9/GC+N4L6AAiEA+3EwkpQQoz44sTnIiHvIP8jt3ZVcDfq4dP6YFQ4InbM="}]},"maintainers":[{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"osher-sade","email":"osher.sade@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.44_1600692232648_0.2064578743108374"},"_hasShrinkwrap":false},"2.0.0-beta.45":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.45","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.6.1","@enigmatis/polaris-graphql-logger":"^2.0.4","@enigmatis/polaris-logs":"^4.2.0","@enigmatis/polaris-middlewares":"^1.4.24","@enigmatis/polaris-schema":"^1.3.2","@enigmatis/polaris-typeorm":"^2.3.21","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^3.4.0"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^3.4.9","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^7.18.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"8b99fcfeecdcabc90d5a29e93e5321415103cf35","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.45","_nodeVersion":"12.18.4","_npmVersion":"lerna/3.22.1/node@v12.18.4+x64 (linux)","dist":{"integrity":"sha512-IpxZdYCJKWLwjAL2Z6m9iLDbOkUzRuPkRtIL+5ezO8S4j+dsgA0ryytsjqszjIi+NfLCJ/E0iHSMVfiBqsBbRg==","shasum":"add06c635233f2b7a1532f08fc1775f670919046","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.45.tgz","fileCount":73,"unpackedSize":2277272,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaziuCRA9TVsSAnZWagAA4G0P/R8toyA+2jsHEHXvKVhx\ns/MEidwUCULe0PA4m7djC9CHZ9NwpwwvyoCMTg8mjpJ+0QTXftMdAVoDkiQY\nzPpx/18TmgdjjbSU8YLf08w+CZbA1C/fEUJue+21RQzDgX/a19xRwHNETti9\nMN41sTTc8g1X0DSLbmbPPrvDXIiYV62ht0auS8c7YYOnt8WqwTnGTdQh+yQp\n4yMuI8drZhAqb8uusQuSdiftRLtSi31gXqbwnA8f8axm//ZysKM5jCeMTokt\n9m4aGphU2MtETnRIEpXWhhoHqpouO5j1WGpltvEwUVcDRomm2GybNNAfzpyx\nMHwa3WmvTK3UHARTRBiYWHIvuJmpghDMNQTItZ/22IVpjH7HBgJreBzVRne2\nG42FFVUUPyfE0mymVAYpiKbrBqYmw4IEIu5wLjovnjfn94stlFH+bq1xc9oj\n0LydBkoLlBlRPRw7k9G2Dwn2f5KbqEXso2KomhOMjR+mNz+/gm53BeNfu/bN\nrX4iu1o1vD/9QLXGd6XglMg9csSsIrnql1IduwvrgplgBuwyzjlxLsf/PvXp\nuJWUVERyk3alpbSFsxzcs6dnBWb1ZEnH87+Kz3LyrHluRIooh7IfpghjRa7C\nm+3X0Zz86chGjcU4BveWllckW99LIq4RsC2AdQ47cTFoY5FwSYph5AIgZov8\nRoHe\r\n=UV/N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGJl081ca6o/J+xNtOWrC75cmXszSlPz3qLpZ9UDuqPAAiAZH2IFEtn0C/JLz8b/JVfwKfMQqXR/Vi8BaLNQq4wIxw=="}]},"maintainers":[{"name":"enigmatis324","email":"enigmatis324@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.45_1600862381813_0.0871138490350114"},"_hasShrinkwrap":false},"2.0.0-beta.46":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.46","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.7.0","@enigmatis/polaris-graphql-logger":"^2.1.0","@enigmatis/polaris-logs":"^4.2.0","@enigmatis/polaris-middlewares":"^1.5.0","@enigmatis/polaris-schema":"^1.4.0","@enigmatis/polaris-typeorm":"^2.4.0","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^3.4.0"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^3.4.9","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^7.18.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"938d939971cb6fc4659ba13935581ff9c1e1a5b5","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.46","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-lowX1rygFrrc4yGBMPl7rya/x10HrjRoKVB21MJn1YSu82cereu/C57Gyg8q095IUPT53DraCIRo/K9s9g+v8w==","shasum":"6035d9444af191aff4a4535220a9aeb46b993c5f","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.46.tgz","fileCount":73,"unpackedSize":2279597,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkAAlCRA9TVsSAnZWagAAFdoQAIGyxAitP8mZ3h8sz8pH\nf2FC7D3Nx85iqpBHqZxCIpTSzTwBbz6qzJ1Df8OHZFK+MxVMPrQwnseYAcCw\nvRf2hJmCnpL1fB5hlkl0c3kSNCa7jT6LyLNlAMHmo2ry90dPWzbuHkNcGaMz\nqOeWvJsuXDBDrBFUgIslgZNv69ZpX+r4cUHqZ+Kf60RDBLHLmKjVilW0ebWh\nbkWkDL5A0jvHbzK3te+KkA8TkB9dWogrjubF82hz+rMy3QJ3Maho1aWns6D5\nmHdtWEzs6KVE1TrPe2UOEWB9mjHSU7PcTkWC2wJnR41PKnBDKebWReIDi43H\nGrWgrDPL18HCvoM4RDgphccUh1XGA8NMlpC7zKzhxTq0KTIo3WRcFYIupkQs\nhTpmUQOPHvNNZ77Uf8VDlXgzEbokG8mNiqm+Ke00f3YWOSiFfYm2zXk+ebyS\nsmr8ytx5W1YLMOT1EPoL8RevkIiZhsplHgV9xG40weYE9kNeL6OjqJX0ySt9\nID4r9N8fzW6Esf+Kpi00xxXppW6H/o8WP4Bsx59ixLVy5oEXKfRI8bYMfjHD\nL5UCBn4nvBGFlpGg0o+AKNElRUgprQr1Fz7SXv27HEQwsmVe3acD5LW6+l9q\n1sgLtHck7qN0Z52YnXwY2KANXT4LIn8OVqPZ/YIV8teg6tuKTXVc3DNhHjyS\n0SQP\r\n=d1cq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEzarZTwjusv2whngjglUCe8JCcPUjH4UTouSLYghU4AIhAKb8wwzTaLFKBunFOPtCSoNLLnDF6env37bxbPpfmTq0"}]},"maintainers":[{"name":"enigmatis324","email":"enigmatis324@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.46_1603272741344_0.1463516754021983"},"_hasShrinkwrap":false},"2.0.0-beta.47":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.47","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.8.0","@enigmatis/polaris-graphql-logger":"^2.2.0","@enigmatis/polaris-logs":"^4.2.0","@enigmatis/polaris-middlewares":"^1.6.0","@enigmatis/polaris-schema":"^1.4.1","@enigmatis/polaris-typeorm":"^2.5.0","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^3.4.0"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^3.4.9","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^7.18.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"a96aab378fad6118dac9be8fb5a7125996e8adba","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.47","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-sfO3bKpNd8xiElvbqh2+GDIPJxHIayJfkVsTUHvxx6uKLtZNs6Ryb8OaiAayMTvwt05HhEzh9WTQ6AgFI9Uwmg==","shasum":"3362c966a892ea1bdda85c7d4ca6931a9405778b","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.47.tgz","fileCount":79,"unpackedSize":2290331,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflYadCRA9TVsSAnZWagAAGekP/3J97MiChliX7KrOlxKq\ngG/nT5RD+6JOnQw2t8QVkJoBEj1rtc9IWPGPvQ504VhRK/bux68hXwRvkCMF\neC0Ra5AtQN4rhQRNvRtncIR0tZjTDdySrFAFIHzaKmInU+Z/3pMTIRflFXi1\n+y/ZFdfEuy3jmjypMCaPOV8MXKK9Qb+2DLiYIc77BsSlSRyr36rIIZ+HCQwW\nOWkCrr+a26erqXvcoUaq3N01qv2j/Fy33dIsSVm0BSJtus73kVb7Rfa8Dn37\nVaLLZU5s+uY77qMUFDebiWGD/GZ2WSV+RlYQrZeSWRE+p83oXw6pIvj/3Y3a\nXpa6FD7q7s2JUoBj4b0WH9ypCM3+ANFX/mPWB6SttwvB4z9YY6W9i4Ks39ET\nxcKMbk6GgLVR0p5vZkkcZFJ91A1Ejg5YgCdJv/H/gF/UXXttf/ljadVEevYa\nKnrMfQ1vwK/X+9u/tAaNeEzzLSg/g1aFs5Zvv8ZjQpa54sWm7AAVJoEH6n9l\nvKsuy284kq3Q32fAtij+GqvnWLJJCM+lbGT377P/5UZb176imHYgOx3LaukE\nEoR21RbABypnncKphZh78P0xYqVxakqM+VRn3RP0dgaYXVclh69r6xEPoJd4\nY+dJofEuADz5CkopEk3mX8SnZ8ls8tN54VaXdx78v0etQSUehm1emTlmhbpT\ntknQ\r\n=HwCp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD47mWwyjjrtrWN+SDA/a4ZVOvMNI5B7iQGDMohdswyLwIhAJsSNqLbaimzoIobFvEPXyYuEFK0bHlqLf25RAE2fN0L"}]},"maintainers":[{"name":"enigmatis324","email":"enigmatis324@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.47_1603634844805_0.9409866190970124"},"_hasShrinkwrap":false},"2.0.0-beta.48":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.48","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.8.0","@enigmatis/polaris-graphql-logger":"^2.2.0","@enigmatis/polaris-logs":"^4.2.0","@enigmatis/polaris-middlewares":"^1.6.1","@enigmatis/polaris-schema":"^1.4.1","@enigmatis/polaris-typeorm":"^2.5.1","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^3.4.0"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^3.4.9","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^7.18.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"3089ede2866b99dffe042d48ffab91cd5d258fb7","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all of the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.48","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-7Zrwn4ks9cmGUio8VMt4jARrGn54tvG9rek1lPMiK4G4MHnzWvxS0Elj8KmtyY9Ja4TLixnnmB27PX5qYwFVCA==","shasum":"6d1d82488157bb2e9159b5346f2d37f2ead52dc1","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.48.tgz","fileCount":79,"unpackedSize":2290563,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmTCGCRA9TVsSAnZWagAAtN0P/A0kqS1EdUKz1wUKLvK8\n/9h3LZMmjIjJDok4spAwgVf9Nby39kiWCFBuH1+RDb4MMRcq7UtAftd/auNv\nsEA+fSYQV47+zyl6m8fv4iC6s2rE2pnUAgquR+gRIH3s0fIPRzLQH9OUSdEQ\nWwinV797PKFvQjetO46loPztDXcnKgdfecEazq06FEe4PU3gVTy6ZSQgQjdw\n7qZHSgjyf4GOAeJlNyBNGhuHjKSLEvaz24eANs8a8YRqy2p5pzrAMD+FrU9d\n2ZkGmOPFEEsT6gZpE8XnyHWpjJAI8bETOPnPAptoTAFquFyQc9UOzvNNyfFx\nyeSdOAygkR1LzbY6Ty0FSn8ZeeEYZ1GgRTLiKmRGnbcxY1pr1oFosZZqGFOz\nDt94oLP/B7GAf0WGo0fnP2vAbS8DYdXM1AVRVBFaAJyyZeGP/RPnkMYNSGH6\nTtc/Msa9jcAsW57+Zpj9aWfZgJKiXez6L5yvAHiYEI3mFaayouqWGThkO3l/\ncOq6xaTSaJsw2A/9e793YarUBxNsJcPoUqlpg3hNsPeMVl5cti437XuyPS3x\nSqpfF2ZQz5C3LSWHqTOwif6H9a1IO+RDJYi8AydA2YBeRFBRsAUL5Z7UQ2Tx\nwTCSF3GTRVTyEnM5v7bFBZ7KfBufmkGnxWw/HR+qKTcEMql1k153U7j3civW\nWDhD\r\n=5nzW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHJXBizS8/g6H/6zk4w+rt7kbERHFSg5R8Q5nyGInHp9AiEAs8a2AjdsGo3ZgWlFiyWuVsG6xAt4NK12zzTS+8qvqmo="}]},"maintainers":[{"name":"enigmatis324","email":"enigmatis324@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.48_1603874949811_0.12533648660388197"},"_hasShrinkwrap":false},"2.0.0-beta.49":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.49","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.8.1","@enigmatis/polaris-graphql-logger":"^2.2.1","@enigmatis/polaris-logs":"^4.2.0","@enigmatis/polaris-middlewares":"^1.6.2","@enigmatis/polaris-schema":"^1.4.2","@enigmatis/polaris-typeorm":"^2.5.2","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^3.4.0"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^3.4.9","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^8.4.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"48275eb78cabf62638f10e3ecf7958cd69ec9798","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n-   **permissionsConfig** (_PermissionsConfiguration - optional_) - This is an interface that provide additional functionality to the permission process.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### PermissionsConfiguration\n\nAs mentioned above, this interface provides additional functionality to the permission process.\n\n-   **systemPermissionsFunction** (_(context: PolarisGraphQLContext, entityTypes: string[], actions: string[]) => boolean_) - Custom function that will help you determine the result of the permissions process.\n-   **permissionsHeaders** (_string[]_) - List of request headers names that you would want to transfer to the permissions service.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.49","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-U/CjFoENU+0K9vTEvHHIZLzEUPPYALrBcNhoI0qV1hvB4Twix1ONIS9ascPubbwQcvMqSp4wJ06LOvEQA7OMOA==","shasum":"b215866ab73b88ef43d059bcade2efe68f772868","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.49.tgz","fileCount":79,"unpackedSize":2292076,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfosxjCRA9TVsSAnZWagAA6LAQAI1sHdJ+Qow6+xaL7Gtg\n4Pj4YS5DRLQ+zYoCoStWKG92SamOw3GGlCkhr0WW1PQ7RQs96sYytfkZ1w5G\nxbqWSWxy9hdPLoR+qtSUeeds0BYuQ0MqBSb0G+kAArqfo8pqpsNXP7Y6W8Uj\nYOC5gVotaQTT0bi255r1GgcEJkUa0Gcnm25O54QmvNCFK5kQqfr6OtQ5oCHD\nugaXfW4DZif11D3Zbf0EUe2ZImcDqeLyIIh21B4c4XXfIpjaQUSaO0C7zrA0\nQ56IUQoDn32UgY6bPGoBCRi3hk7cQYILtnBlt9qfI7dXYXDbRL5niu8y74FO\ntfdmwcqXTF2aSFpfTngeZnB4m2X4n9nZRfs956K5xvA7T6j7/tD3vARiJDeQ\nKrOm1OiTXq7h9rrF6H+sBzaRSWVIoThAx7ZTdg00TQNe11YISVXCAD7z/R1l\n7jgu51gCzsp8ypCHNSU+PfIulkQ+FabTdiFUZiBr2eJY/SiUW3sxmf8w9Jwq\nlhQbclUpiya/yO2Xj+y4OES5vHWT2LXlPGCyxl43qCBOs/1jZFCInVrRS7LM\nH7FqNMvHOvqXv0fg1Bk3sGjBITlQ4G8gCk18+0X/CCedNtJIQx/uO9i2vcZR\ntM2LbtTVN6thCy1/u0P1iDXIZ9eWpmdfXFRzpmhH889Uw7n10+TAbS2w3U8e\nSwm5\r\n=bMTT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID13eza5VfNd2Tf2ALUiWV9Mf2bQLliKLr6aQ2fe1AW6AiAnOOErjNks5wZa1lX4i0w8fNWPDnf1Dg/QwSwBkuS0sg=="}]},"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"maintainers":[{"name":"enigmatis324","email":"enigmatis324@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.49_1604504674678_0.9045016243548782"},"_hasShrinkwrap":false},"2.0.0-beta.50":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.50","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.8.2","@enigmatis/polaris-graphql-logger":"^2.2.2","@enigmatis/polaris-logs":"5.0.0-beta.1","@enigmatis/polaris-middlewares":"^1.6.3","@enigmatis/polaris-schema":"^1.4.3","@enigmatis/polaris-typeorm":"^2.5.3","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^3.4.0"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^3.4.9","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^8.4.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"e9dc745877090d188ff70a861a110b94bf093f97","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n-   **permissionsConfig** (_PermissionsConfiguration - optional_) - This is an interface that provide additional functionality to the permission process.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n\n### PermissionsConfiguration\n\nAs mentioned above, this interface provides additional functionality to the permission process.\n\n-   **systemPermissionsFunction** (_(context: PolarisGraphQLContext, entityTypes: string[], actions: string[]) => boolean_) - Custom function that will help you determine the result of the permissions process.\n-   **permissionsHeaders** (_string[]_) - List of request headers names that you would want to transfer to the permissions service.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.50","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-5dj2jnXKnMmXE9scbPhLLwOrHUqbrlbpBXonILLk74F+WMrfkuzJelSQmP7eGjwd5dK5sp+IRDevXQoNrX0zaA==","shasum":"55b28cf834819b1536c25523094376e8d160364e","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.50.tgz","fileCount":79,"unpackedSize":2292205,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqTL3CRA9TVsSAnZWagAAUcsQAJShCP6sxc5oS7dTrX4p\nkVEPDYABvL+q6JoCSHeJ3dXUHf0twg7hFGZoxBHbKEJT3suL6Y3l8PdZahR5\nWdB3pj5Sz5PSE187hO0I3Xl9eHEl4DKg7MZ0KZXLpVeKA/NihH4bE6UTHZz3\npgKDFqw49QyD9eeQW0+ExjIQ7216Uw/KcHoO/ogyHHlGA6bVT/9AGmE/S2wO\nxV3vJc4k0avU+W60CHgJT8JdCiDAWh/bhQc4uEfbRe8tpp0rtb0S9kuy5/9O\nuLDuFtkhCrmB4gY2mAG8/WAJDR5n5N9YmHn4BmEoGRvzh8MWqbq0jD/+/jbT\nCbjyIAYyzkRpUZip14q9iaqoGVrStkGeMhARo6REBN92dzxCYwnz6VYHuokG\nXl6IK5UU6RUkG3i/iGDjcFeIbQoHKMQjvYzohPIS83w1woOV6kHO8w8xBeSs\ntzeKHUkXMfOeas7zc2z86d8KNEtA9dWveLtM5Ln7x/Am1B+ZQ4tIh163qIRg\nLqZikrXcKjtS3bp859/KMiG9TJcnnUhRJ+aonaUXwh3btY/X9h508Q/kQOKq\n+oWYQnrkKXEzuX0kVsE8t8xzWy9ffRV6A92nequlmvtr1k3IHJ3KxCrjL10Q\nyjzH9ASmlMGAiQB7vJlbQGlOWzOlF8YmE4Ff8Ggwokx/Zj8xKu13oyAe+FDr\nbV1O\r\n=uODN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNSW7SZAkpABozu91oq0OwGvLjUrAad0+vnoSkAkGMFQIhAPUgdIS+f8J2sm3mKP9ZNoAJtHa/PBi6AXVlH5V4Mqjn"}]},"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"maintainers":[{"name":"enigmatis324","email":"enigmatis324@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.50_1604924150990_0.9207986452550121"},"_hasShrinkwrap":false},"2.0.0-beta.51":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.51","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.9.0","@enigmatis/polaris-graphql-logger":"^2.3.0","@enigmatis/polaris-logs":"5.0.0-beta.2","@enigmatis/polaris-middlewares":"^1.7.0","@enigmatis/polaris-schema":"^1.5.0","@enigmatis/polaris-typeorm":"^2.6.0","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^3.4.0"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^3.4.9","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^8.4.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"7cc0c7161382fbdfe8f6ff8620320fba54dc35f8","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n-   **permissionsConfig** (_PermissionsConfiguration - optional_) - This is an interface that provide additional functionality to the permission process.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n-   **allowDatesFilterMiddleware** (_boolean_) - Determine if `DatesFilterMiddleware` should be applied to the request.\n\n### PermissionsConfiguration\n\nAs mentioned above, this interface provides additional functionality to the permission process.\n\n-   **systemPermissionsFunction** (_(context: PolarisGraphQLContext, entityTypes: string[], actions: string[]) => boolean_) - Custom function that will help you determine the result of the permissions process.\n-   **permissionsHeaders** (_string[]_) - List of request headers names that you would want to transfer to the permissions service.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n\n### Date filter example\n\nIn order to have the ability to execute queries with the `EntityFilter` filter you don't need to do much work.\nFirst, create the relevant query in your schema and add `EntityFilter` argument to it:\n\n```\nexampleEntities(filter: EntityFilter): [ExampleEntity]!\n```\n\nSo, as you can see we've added new query that contains the `EntityFilter` input type as argument of our query.\n\nNow, w'll show you the structure of the `EntityFilter` input type you need to pass as a variable:\n```\nfilter: {\n    creationTime: {\n        gt: \"2020-08-23\",\n        lt: ...\n    },\n    lastUpdateTime: {\n        lte: \"2022-01-17\",\n        gte: \"2020-06-06\",\n        gt: ...\n    }\n}\n```\n**IMPORTANT NOTE!**\n\nWhen using a nest-based version of the infrastructure and executing a multiple queries request which contains at least 1 `date-filter` query, the returned response may be wrong. \n\nFor more information about the structure of the `EntityFilter` visit [EntityFilterTypeDef section here](https://github.com/Enigmatis/polaris-united/tree/development/packages/polaris-schema)\n\nAfter you followed and implemented the steps above your query will support filter of your entities by their `creationTime` ot `lastUpdateTime`.\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.51","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-fHZL3npxVU11AQDAMKekCWrzr9sFA+ZLkhBMeXB6ehL8sRtg33+g4kmw/RtXSB3iGyHAwNFWzI1zXKzKZWevkw==","shasum":"7f147dcd539b19e246ab414ebf32170ed8cd85ba","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.51.tgz","fileCount":79,"unpackedSize":2294390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxfTsCRA9TVsSAnZWagAA/H4P/0MaIdYkkfcipXkGI6U8\nPAhS7oeRDgNk4CHYhBZhUYvcDFNm3d492vT/lRQldQVN60wk+cXW95S1GW3X\n94EO5KAfcQ0DRItRXB+kA869vONoRzImxkOyG9H9C9YTLtI2jTd1J9h2Qrzp\njAc2fZyUvBjHszalA+i83tO+0y9UAYmCOY1KMSbY2YHQFt/eS6kY0IvS7pXI\nBKbAc5Coxywoa3LgjZAXFOdt37U1ukIQ+EnAOLthkEa9/xiQe6gku/1MLjQB\nlzd7wNInddn+pgmB4VWWyoV3yai2W4FjhxrJZVuhkmAI8MgHUQ0W6A20tLqI\nwDSaM84HGr1w1Dax4SY+4TnkaB8TVxHKqNJ+TH2wkjFAkkxvQ6EvJOjFttIp\nEiEKj8FSDwLLT9/xkeVC+/f5BChUeO2ZUvuDCQLM8TyYHRiEGMGHP+w4JhQ1\nuo5EyP1DgaXzuquKMT5i/AUTSu3k8KFr2wRlD4LFOIKqF2rc9jQ799KCog6O\njDe/OIVP2n3h3eAj8ect1N1xKtF4zG9vf4c8KCOv+j+dJfxIN/eWZknBXrnk\nuV2J94lnARNEi2gXrBEHisRdLP4WJuhXpQG3C+GPCheWkWdPM5acUaXZZppQ\nZpz0RXlg3URQO4KY6nm2B+7xEMQotwi+tbgef08FwOU9D5knsmbhtDKVbPza\nE40q\r\n=O3T/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZYydPafWt7jXC6r9eWRqAv2IJYy61GJLkr1bUEq5fKQIhANLOTUB6LHX3sz0NXzWpvV7R0dHV47clue008bHITgVl"}]},"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"maintainers":[{"name":"enigmatis324","email":"enigmatis324@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.51_1606808811610_0.04677389005747168"},"_hasShrinkwrap":false},"2.0.0-beta.52":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.52","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.9.1","@enigmatis/polaris-graphql-logger":"^2.3.1","@enigmatis/polaris-logs":"5.0.0-beta.2","@enigmatis/polaris-middlewares":"^1.7.1","@enigmatis/polaris-schema":"^1.5.1","@enigmatis/polaris-typeorm":"^2.6.1","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^8.3.1"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^8.3.0","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^8.4.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"da78c1910d25d0eb2b0fe36a3bd7e11d620d2559","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n\n### PolarisServer\n\nThis is the server that you will use in order to create your own standardized GraphQL server.\\\n`PolarisServer` uses `ApolloServer` and starts the server with `Express`.\n\n### PolarisServerOptions\n\nThrough this interface you should set the following configurations which will be supplied to the `PolarisServer`:\n\n-   **typeDefs** (_any_) - The GraphQL schema written in SDL (Schema Definition Language).\n    This will be used in order to create your GraphQL API.\n-   **resolvers** (_any_) - The GraphQL resolvers that will be tied to your GraphQL schema.\n    This object contains functions and logic for the GraphQL engine to invoke when using fields from the schema.\n-   **port** (_number_) - Specify a port the `PolarisServer` should start the server on.\n-   **applicationProperties** (_ApplicationProperties - optional_) - Properties that describe your repository.\n    If you don't provide those properties, the core will put 'v1' in the version.\n-   **allowSubscription** (boolean - optional) - Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **customMiddlewares** (_any[] - optional_) - Custom middlewares that can be provided the `PolarisServer` with.\n-   **customContext** (_(context: any, connection?: Connection) => any - optional_) - You can provide the `PolarisServer` your own custom context.\n    If you do not set your custom context, the core will use a default context.\n-   **loggerConfiguration** (_LoggerConfiguration - optional_) - This is an interface that defines the logger in the `PolarisServer`.\n    If you do not provide this property, the core will use default values for the logger.\n-   **middlewareConfiguration** (_MiddlewareConfiguration - optional_) - This is an interface that defines what core middlewares should be activated/disabled.\n-   **connection** (_Connection - optional_) - This class represents your connection with the database. Used in the core middlewares.\n-   **allowSubscription** (_boolean - optional_) - _Default: false._ Responsible for creating a websocket endpoint for graphql subscriptions.\n-   **shouldAddWarningsToExtensions** (_boolean - optional_) - _Default: true._ Specifies whether to return the warnings in the response extensions or not.\n-   **allowMandatoryHeaders** (_boolean - optional_) - _Default: false._ When set to true, every request must have `reality-id` and `requesting-sys` headers.\n-   **permissionsConfig** (_PermissionsConfiguration - optional_) - This is an interface that provide additional functionality to the permission process.\n\n### MiddlewareConfiguration\n\nAs mentioned above, this interface defines what core middlewares should be activated/disabled.\n\n-   **allowDataVersionAndIrrelevantEntitiesMiddleware** (_boolean_) - Determine if `DataVersionMiddleware` and `IrrelevantEntitiesMiddleware` should be applied to the request.\n-   **allowSoftDeleteMiddleware** (_boolean_) - Determine if `SoftDeleteMiddleware` should be applied to the request.\n-   **allowRealityMiddleware** (_boolean_) - Determine if `RealityMiddleware` should be applied to the request.\n-   **allowDatesFilterMiddleware** (_boolean_) - Determine if `DatesFilterMiddleware` should be applied to the request.\n\n### PermissionsConfiguration\n\nAs mentioned above, this interface provides additional functionality to the permission process.\n\n-   **systemPermissionsFunction** (_(context: PolarisGraphQLContext, entityTypes: string[], actions: string[]) => boolean_) - Custom function that will help you determine the result of the permissions process.\n-   **permissionsHeaders** (_string[]_) - List of request headers names that you would want to transfer to the permissions service.\n\n### Custom context\n\nFirst we will define the new context type, pay attention that we just added a new field in the root of the context,\nand a new header in the request headers object.\n\n```typescript\nimport { PolarisGraphQLContext, PolarisRequestHeaders } from '@enigmatis/polaris-core';\n\ninterface CustomRequestHeaders extends PolarisRequestHeaders {\n    customHeader?: string | string[];\n}\n\nexport interface CustomContext extends PolarisGraphQLContext {\n    customField: number;\n    requestHeaders: CustomRequestHeaders;\n}\n```\n\nThen we will pass the custom context like this:\n\n```typescript\nimport { ExpressContext, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `...`;\nconst resolvers = { ... };\n\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req } = context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: req.headers['custom-header'],\n        },\n    };\n};\n\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8082,\n    customContext,\n});\n```\n\n### Subscriptions\n\nAdd the Subscription object to your schema\n\n```\nexport const typeDefs = `\n    type Query {\n        ...\n    }\n\n    type Mutation {\n        ...\n        updateBook(id: String!, newTitle: String!): [Book]!\n        ...\n    }\n\n    type Subscription {\n        bookUpdated: Book\n    }\n\n    type Book implements RepositoryEntity {\n        ...\n    }\n`;\n\n```\n\nnow let's implement the subscription resolver logic\n\n```\nimport { PubSub } from '@enigmatis/polaris-core';\n\nconst pubsub = new PubSub();\nconst BOOK_UPDATED = 'BOOK_UPDATED';\n\nexport const resolvers = {\n    Query: { ... },\n    Mutation: { ... },\n    Subscription: {\n        bookUpdated: {\n            subscribe: () => pubsub.asyncIterator([BOOK_UPDATED]),\n        },\n    },\n};\n```\n\nand inside the updateBook resolver we will publish the book that got changed:\n\n```\npubsub.publish(BOOK_UPDATED, { bookUpdated: myBook })\n```\n\nWhen you create the server you have to allow subscriptions, so the server could create the endpoint\n\n```\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 8080,\n    allowSubscription: true,\n});\n```\n\nJust pay attention that in case you are using custom context as well, the subscription context will be different,\nyou can handle it like so:\n\n```\nconst customContext = (context: ExpressContext): Partial<CustomContext> => {\n    const { req, connection } = context;\n    const headers = req ? req.headers : connection?.context;\n\n    return {\n        customField: 1000,\n        requestHeaders: {\n            customHeader: headers['custom-header'],\n        },\n    };\n};\n```\n\n### Warnings\n\nIn order to have the ability of warnings, which returned in the extensions of the response, you will need to supply them to\npolaris. you can supply the warnings through the context. let's see an example:\n\n```\nallBooksWithWarnings: async (\n    parent: any,\n    args: any,\n    context: PolarisGraphQLContext,\n): Promise<Book[]> => {\n    const connection = getPolarisConnectionManager().get();\n    context.returnedExtensions.warnings = ['warning 1', 'warning 2'];\n    return connection.getRepository(Book).find(context, { relations: ['author'] });\n}\n```\n\nAnd let's see an example of response with the warnings:\n\n```json\n{\n    \"data\": {\n        \"allBooks\": [\n            {\n                \"id\": \"53afd7e5-bf59-4408-acbc-1c5ebb5ff146\",\n                \"title\": \"Book1\",\n                \"author\": {\n                    \"firstName\": \"Author1\",\n                    \"lastName\": \"First\"\n                }\n            },\n            {\n                \"id\": \"4fab24e4-f584-4077-bb93-09cdfc88b202\",\n                \"title\": \"Book2\",\n                \"author\": {\n                    \"firstName\": \"Author2\",\n                    \"lastName\": \"Two\"\n                }\n            }\n        ]\n    },\n    \"extensions\": {\n        \"globalDataVersion\": 2,\n        \"warnings\": [\"warning 1\", \"warning 2\"]\n    }\n}\n```\n\nYou can see inside the `extensions` that we have the warnings we defined earlier.\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n\n### Date filter example\n\nIn order to have the ability to execute queries with the `EntityFilter` filter you don't need to do much work.\nFirst, create the relevant query in your schema and add `EntityFilter` argument to it:\n\n```\nexampleEntities(filter: EntityFilter): [ExampleEntity]!\n```\n\nSo, as you can see we've added new query that contains the `EntityFilter` input type as argument of our query.\n\nNow, w'll show you the structure of the `EntityFilter` input type you need to pass as a variable:\n```\nfilter: {\n    creationTime: {\n        gt: \"2020-08-23\",\n        lt: ...\n    },\n    lastUpdateTime: {\n        lte: \"2022-01-17\",\n        gte: \"2020-06-06\",\n        gt: ...\n    }\n}\n```\n**IMPORTANT NOTE!**\n\nWhen using a nest-based version of the infrastructure and executing a multiple queries request which contains at least 1 `date-filter` query, the returned response may be wrong. \n\nFor more information about the structure of the `EntityFilter` visit [EntityFilterTypeDef section here](https://github.com/Enigmatis/polaris-united/tree/development/packages/polaris-schema)\n\nAfter you followed and implemented the steps above your query will support filter of your entities by their `creationTime` ot `lastUpdateTime`.\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.52","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-hT7WE2W5G7ROZl17+DiqJ+YDTAB9YbcZEHum3YxgQi5Lc8dIdQ3hdXMMCIwLnCkfW2lPe3bk8TV4GOX/BzSa2g==","shasum":"67b3cced8a42ee22658bc61f70563cfe49cd5602","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.52.tgz","fileCount":79,"unpackedSize":2299220,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzJz+CRA9TVsSAnZWagAA4S8P+wWTzShL7nlOQAgg7Yqm\nESPrdfOBjgtpqJqth1AeDKbqgys3KFVnnjcby/EDl1tkADTIlWrFXB7WVZKl\nqmy/fyFWaOJeVDkagpzITcNBgdj+7A5EJ1fZzZmJZbbcKdDjUjh+TrtAm064\nZiJs6uVD/JpInhz4Z8jg6wNW1dTbY0OkeQW8nuPG5DyTNWW9dpwrltEsfI7x\n3cWvPqEPYghPoVRffPGJ6OiKf5UY4fKuV2oVk7ML7ocQKKmfHjSGWsiRsat9\nCnqRyGBGEWobMHgKeHGGFvO7mYQHiVFHRYxyteYoH+SCSXrPBnWQ69sN41I3\nJ3HPVAGEaynr1UQv/tCW+4h2N2I3JE2BvS/XMK5EZWuFzWYypp8UQ/dYvk27\nq2T+mJTGalCQanXo4CjFjuR9HFlSmJnqUjVq+io4WLXZwkRVLEtyaiytGDnN\nzLf2zIGtZMmlfOYACt4Z7S+dAF/2O6HnP5Zc5MGUd01SnADUfWN8efJ0mjbj\ncCuE2wgntEHUOimcnMtafbypOFyyGq5sisMAOyDnu8YZ7E12Sm7IBC/k67Xd\nPiP4KpRFRFQz37He25oJSBfz80Cvt4iO85c7iDGv4gjlZS/fkrte4GzmD1Ks\nUsuHf44OYo8PV5KOVpQ6KHFlUKg04NeKJY6Jh3pCXtHBbAWL3cUYBkBSOzuY\nGyuF\r\n=IJdn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA3hNyw+8Q58Xix/n5GYr8qwW+mBHXWes6IrpU3+kMrlAiEAyU7CcY4Y3AxF9qI3S5BfN/2ScUBaAlRt3Jr9nwCYmdM="}]},"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"maintainers":[{"name":"enigmatis324","email":"enigmatis324@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"yarinvak","email":"yarinvak@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.52_1607245053637_0.7828172962349436"},"_hasShrinkwrap":false},"2.0.0-beta.53":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.53","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.10.0","@enigmatis/polaris-graphql-logger":"^2.3.2","@enigmatis/polaris-logs":"5.0.0-beta.2","@enigmatis/polaris-middlewares":"^1.8.0","@enigmatis/polaris-schema":"^1.5.2","@enigmatis/polaris-typeorm":"^2.7.0","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^8.3.1"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^8.3.0","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^8.4.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"a69d7da4f14646b4b19464993da8eb5847021eee","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n-   Online paging (with and without relay)\n-   Offline paging\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.53","_nodeVersion":"12.20.0","_npmVersion":"lerna/3.22.1/node@v12.20.0+x64 (linux)","dist":{"integrity":"sha512-++moFRItiZRc4fXXyz+lMj/iZhqWTAZ2eN5MTOVPIDoDC+G6hlRikbAgyhS71kl686k3QHrFvRORMbCRGlwVsQ==","shasum":"f598e1831c357f0e5073a908d7b85c3eab42243e","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.53.tgz","fileCount":103,"unpackedSize":2322225,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9GRaCRA9TVsSAnZWagAAWGMP/jrhT2u/+biX/2Ck2+zG\nBd53549K+oO+bVaiYv7zEHtCtE2jIx2w87rtWtwiZn3s3CQNJNxTCW4DtI3d\nJRevubsbZRMfX0XoNegnPfiazvvoDBoe4NOGaOzmyXSwJvxTs7odHNFC1rrY\n6HusFerA7Ed9OlbmDl+hOlYIPZlvcAS6Bck0iwD59tsWXHwUgR0YjcW2/5LH\nWPdHbPECq/kslC1viQQQkHLuF3jQj5aL0QowMOtAifynZrn5AvxefGTKNGdi\ny04bxJzk4EeYHoD9JW00X1wCJWYM/b5Nreb7j5ShOBZNoehTjA/cT8+mp1HN\ngWZ1cyi89a2lvwvuJaDRfipVkFWw41egV7R5Iw6CfCRVHqEbNCOhDWTOw63w\nRHy69pCSEeuPOSp3c/0PV+Dryrp9SUi73bGw4+ZZC1LN0xipDhK7juaf0rzy\n8GbALsGBvww9snR/eJ5Rh79unmQiASGnawrdoE7TvAq1/ZFMc/QFXwPz6HIE\nejYdv9i3bcGz+kLxkqZmUKArxC2jqzkBgvnGg++huj0CJJpG+RvAAJPncQNd\nirtM+87fo8oB9CySBzCH72t8HAE2fA4NzR3E9KQvUFdCLjfTdRnYsB4W4Oua\nx92Lj5XnD8XV2VPQd2yT4wF1M6CwteIrZnpd93BIF2bVHIcV9cnG9od+BU7O\n6I1U\r\n=xF3i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDULMvu0U3GGFX0fPknS+NL8qiZjYUXDQHSau7nTQ05IAIgBee7kE4MEo44KG9WxTTIUuYKLr87Fn0klvhHR1raVZA="}]},"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"maintainers":[{"name":"yarinvak","email":"yarinvak@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"enigmatis324","email":"enigmatis324@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.53_1609851994040_0.88205384254328"},"_hasShrinkwrap":false},"2.0.0-snapshot.0":{"name":"@enigmatis/polaris-core","version":"2.0.0-snapshot.0","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.10.0-snapshot.0","@enigmatis/polaris-graphql-logger":"^2.3.2-snapshot.0","@enigmatis/polaris-logs":"5.0.0-beta.2","@enigmatis/polaris-middlewares":"^1.8.0-snapshot.0","@enigmatis/polaris-schema":"^1.5.2-snapshot.0","@enigmatis/polaris-typeorm":"^2.7.0-snapshot.0","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^8.3.1"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^8.3.0","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^8.4.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"9300d5b0f602107789c7951aff52cdf79aba76db","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n-   Online paging (with and without relay)\n-   Offline paging\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-snapshot.0","_nodeVersion":"12.20.0","_npmVersion":"lerna/3.22.1/node@v12.20.0+x64 (linux)","dist":{"integrity":"sha512-8mfuBu5TOr0ZolKF9Mmo7YUCkrXWE8XrlwrIgZiG1CjqteCk7w0fca99Gqb+XzKbdieQ8wsB6oljLYLd1Hdl2g==","shasum":"a69c9aabe0b13642e2705beceace2b8598d2cec1","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-snapshot.0.tgz","fileCount":103,"unpackedSize":2322052,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBEwXCRA9TVsSAnZWagAA/X0P/0EvZLn6XR+mnmvdzEh+\nlQ/SgVLZM4tC/jHiA01psqD6Ca0HMNc/URUEmbAf3wafnUwlF44CvIyF7tVw\nwdv8N321XAwYTlYofGiGQceJfKP4ta79nNiphypoR7H/M2bp6/cnqTHRMfUt\n6jB6KpKN1dA+BWmsyMgjr3QZag48RN38Nn+I9PPAcBSzIMYk8e4xFoPBgzCg\n25PaOOFNxSx9fXOUTjCJwVzCoEe+FcigRuMiPWQsu9IBCC8wGxm7xW1Dg63R\nwcH/A0XIh5LvODZEI7pl5eM99J5tpICcA4oLkoApSqawUfL5IhhuoNt96PG2\nR+WJJ8jZwkxrLAsx/P1ZxgbA8uSlvnc3NXlg62Z+UICgoFI6zWSaCh6VSxJG\nuaoeNAcOgsds2MZKNGRVG08r5RI2koK+RPqsP7vTeKEbPeIbhIJn/o+O/FHW\nnlsT4zNHgvecDgOAj0yoJvshj+L2d+jnBYV2+rpiTHcgsRgfhS4sapMwV6Un\nLjQyeojm7Tere4S9Xq1ExbW/gkOkVim84vVff4+PwZTUbpBnF4h+gzIhlq1w\naJoNwNQW0hajwl64G66hodyMyvCvZ80XS9uLuU6/QMuXud6LoqY0z0htutfk\nz+MtLGcI9mjO5kKAEfFJD8/DePMXknS6pgE83MM4d51chLDfN/VWTz8M8kgh\nmGJn\r\n=EUWg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB9DRrBnz1rmsH+afvPbNB1zM1cyzKX5xl5XO1nhOMimAiBgNqQFrdt/aKgwfNOb9Kta59HqL/rtQS6ucVtrdULgTw=="}]},"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"maintainers":[{"name":"yarinvak","email":"yarinvak@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"enigmatis324","email":"enigmatis324@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-snapshot.0_1610894358624_0.24042347653720864"},"_hasShrinkwrap":false},"2.0.1-snapshot.0":{"name":"@enigmatis/polaris-core","version":"2.0.1-snapshot.0","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.10.1-snapshot.0","@enigmatis/polaris-graphql-logger":"^2.3.3-snapshot.0","@enigmatis/polaris-logs":"5.0.0-beta.2","@enigmatis/polaris-middlewares":"^1.8.1-snapshot.0","@enigmatis/polaris-schema":"^1.5.3-snapshot.0","@enigmatis/polaris-typeorm":"^2.7.1-snapshot.0","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^8.3.1"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^8.3.0","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^8.4.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"a0a8403bbe7a0ef3fa0fb571cf7a9f433c26035a","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n-   Online paging (with and without relay)\n-   Offline paging\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.1-snapshot.0","_nodeVersion":"12.20.0","_npmVersion":"lerna/3.22.1/node@v12.20.0+x64 (linux)","dist":{"integrity":"sha512-2dzl+ZAXfiExPRa318+ajbR/5O454rbxF9IoXQK9ZgyjGcEv2Tsv09Lezrt2nYxa02V+NO3c0fj9SU6+fv6o/Q==","shasum":"325c2433c49e4dfa0c5f76b6709ab7a625fc6f6e","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.1-snapshot.0.tgz","fileCount":103,"unpackedSize":2322294,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBFjECRA9TVsSAnZWagAAPSkP/iiTYwoa9tTejghWGOk3\nDlqVgHubHS2669c6Nm/me45v/cTXL7d87O2B7ise0Svm9eopZ0TSPW+UGWif\nF48psxY68RFLL+Gt3yp22B4FXmcjpIqMDjUPG31FWkgntWovttwM0tRRXOsu\nUQ/pdSTkJb8exWl2XnR8gYe+2TLY+q5bPnzYe/thFuAOmDr7ULiDlbK31Ymg\nzaMFAzP9+9pPTpHU2UV+1Ak5f3rUHWh+lrINAHFVoDaGs5Zy6BOu5BT6KtE2\n7kn8oquAkaEUDq7sK83ywwJu8qK34Jg1W+7Q0RC9SzdEKlYcTWFX18RltzNZ\n+PisolHBkVa7wRMJIfwg3b9Nb5ohQLQssQGEzLnJSfxyWe4/+HSzrJwv668U\nfc2i5Klbimtah/4tbD8piUGmpUPjWy7M9x8oI/SNFiwE8vQLFJ951ZDbfJqT\ntkuMruQygcy2JwLObl/9GJtZQxBk/fSag0UEJVi8y6uNxwpxiCGbTDYOAQJI\n+gfONGK8DKkA8CZKIWxpm7VwwI0cIR26VRNtJ+5izAb2YCb/sOvBkLM1WbwP\n+YbYUSRgd+t7wl59EM8J1Pz+bp0SqWpki5r/SLKiAGrEq/bQhagv7tfjkhQh\nlOWqDwj5gvgYnJr8dqqM2KhstHX1u+98/hZ3/0bWitzUQ8sZUf14mzeBueOa\n1nRI\r\n=nTji\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtYf5FnKZ//pbJiVQeoVbfZEKnwsV/0UT8Sr9fKFRpEAIgPKKlfwlPyqb/FmGccYG8529CILiOD+ChcjhAGzuE0RE="}]},"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"maintainers":[{"name":"yarinvak","email":"yarinvak@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"enigmatis324","email":"enigmatis324@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.1-snapshot.0_1610897604106_0.03219232549383344"},"_hasShrinkwrap":false},"2.0.0-beta.54":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.54","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.10.1","@enigmatis/polaris-graphql-logger":"^2.3.3","@enigmatis/polaris-logs":"5.0.0-beta.2","@enigmatis/polaris-middlewares":"^1.8.1","@enigmatis/polaris-schema":"^1.5.3","@enigmatis/polaris-typeorm":"^2.7.1","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^8.3.1"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^8.3.0","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^8.4.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"003f8b55c0dd43a617b54f618354536b5dd7c455","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n-   Online paging (with and without relay)\n-   Offline paging\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.54","_nodeVersion":"12.20.0","_npmVersion":"lerna/3.22.1/node@v12.20.0+x64 (linux)","dist":{"integrity":"sha512-A5gv3igPGrm+IAMqzDHGAJv3eS5XZ4m8IXqiTuRCfs4FPSm/jleSCDJNzCsPpZCoeBMhoqzJ6IlczeEyA0mPwQ==","shasum":"0e87c7b9fd4930c3e31704e0ec415db1062baa06","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.54.tgz","fileCount":103,"unpackedSize":2322457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgErQDCRA9TVsSAnZWagAAK6gP/2G+EPPjwh3w/dBmB+L2\nxHf68dwlaK8Yi8k51l2ZMaLaZtDgvNx4q9j16SXcwWkfl3GxklK7cIs5yqJL\nhhApk+/chl+sS4y6TpR9rjwjTEfrIruf7u22whW/SaiYNecfB0RkVkeHueUS\n+FCf2WyrXmWHOo4c4wHUg9M8sewNGAMdB6tWHWBrjJd3rqNNOKbvhYX1ljQ3\no53M4sNZaHJsJcGZZdxStX+X03ybrH3mtGiAGrAVYyTYufHlnD2rFtFGewr8\nVr0zSuE/hpBSkIUDgjYuU6hClR3BYAoLIMwMa2NlfgDdwZ4V8djA8bFaVnPJ\nJBWcFYuyusc5JwrvbCvX7nVvdnZZKG7iUN8mI/a2/+rIVjKm695WNLKYoUO9\nAIsHbrixdnIZU13NNT4gS1xnOuttNVmJ35/VIocWcmF28nS7GBoFo4zBrkwf\nN2zJVN0z7TbWiKkvHmX+L3uRwX+gh17XHfxIOXbvVi01vT1RoZTs8G+Ppe2/\nQNfuBrxbVinF6/jic+c0YlTz5m5T2DYGZ0fGuoSw2VjH/EUa5PsG+Jm3Qa72\nlONjFDjPXwvB4/p2P8nTjWR126GcbIY2h+4xi9GSZiZi7xja0fxlfrV8y5Wl\ne4TDpeWy5+0GFyyff8WLWESzmBPekjlTg+aSpGIjQhNfsEpRnKWtXnwZ0xB4\nCx/I\r\n=Au3F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6ErVCiTuymJaViN5pIYdgtTMnf85LeIcZwilosNSMRgIgEaAK306kOAfvQQ+9O3AIdL0OVagaO/2mj7cFkhHB3SQ="}]},"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"maintainers":[{"name":"yarinvak","email":"yarinvak@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"enigmatis324","email":"enigmatis324@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.54_1611838467308_0.9222462046346596"},"_hasShrinkwrap":false},"2.0.0-beta.55":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.55","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.12.0","@enigmatis/polaris-graphql-logger":"^2.3.4","@enigmatis/polaris-logs":"5.0.0-beta.2","@enigmatis/polaris-middlewares":"^1.8.2","@enigmatis/polaris-schema":"^1.6.0","@enigmatis/polaris-typeorm":"^2.7.2","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^8.3.1"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^8.3.0","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^8.4.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"26c83dc5b9fc1a12476ed920447fee87afa52c31","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n-   Online paging (with and without relay)\n-   Offline paging\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.55","_nodeVersion":"12.20.0","_npmVersion":"lerna/3.22.1/node@v12.20.0+x64 (linux)","dist":{"integrity":"sha512-AUPVjXJ08LcU4l5hWKIhKuVMRptAOADmE5QviMVtIxR+Dsdg+AFeH6755VM38jBPAD7ij46n8XsInTWfWAAyqg==","shasum":"64f7f63bfaed2ebe65b4d0bdd05a8acb4363cbf3","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.55.tgz","fileCount":104,"unpackedSize":2326684,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFtGsCRA9TVsSAnZWagAAbDIP/R84yfObkIcHGQ9MRq+p\nsLRVjfgWRIi3Tf2s5YWzGDzPw29CeK6Va95gExzAkBZeHjSqHbt/xBQC3t2/\nRgucdcIsB7skhSGJirBaSE0+QMprnxdMUtPt/s/xEjs2jFmI+MkweAoPSkNo\nBdozuKPBD4eUfWDCuDOmxGdPXCn6O7+n1w0+FpQWjFd7Xf1sKCmEe8wQpPEc\ngIz2NBfA9BDgBUCH3nURZbIdO/VNJAUZKc1nJnk4yxued46dovutRIdpwmc8\nuN/LJTKRPxujUL6pOQiaBwrUX5LMKmmKTURLIKlIUr1gaR6zbXz76HP0IRD+\nRO6OXLoYMxN4tHSKWJc4eBnpnhkokenBTUje+DYZVXB9iGDWOxl8aFlKWcqu\nG0HU++mScbgX3fohw7RRB8lkmg0MNYQ5xlKmuW9U3bNN1qmpiHMm/SkVdbke\nqsRnvj8zx9SWqm1cdjcCIForh3hyl2hYJSF1JKzQpUkr6RoiMIiiQS0Uc7aH\njC3yqbwFDobUjDbz6ziqcOGBZsd0b9nAFXWmfHUdEWQTZbKFf8kuMzGsAhTt\nXwEVphwrntO5a/TVCDXeQmFZ2HFQV8T2gsmkJGzNyYsnIuDlrBfbpQjzdT/O\ngKo9Kq3ZhgvCcnNMhdIoNEIwtoHrD5ni65xwxKItoizTKrUGI1bAkVMxHoSH\nGS/B\r\n=m+0M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICh22GEa6ww/AfM/zXe2SbgubZXlL6bhgAQj4MmmEspXAiA4Y7CQoMxx+Ekbnq0exI1JqKf5A2ESLidHvMKXGqjEEQ=="}]},"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"maintainers":[{"name":"yarinvak","email":"yarinvak@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"enigmatis324","email":"enigmatis324@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.55_1612108203674_0.43774631241058115"},"_hasShrinkwrap":false},"2.0.0-beta.56":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.56","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.12.0","@enigmatis/polaris-graphql-logger":"^2.3.4","@enigmatis/polaris-logs":"5.0.0-beta.2","@enigmatis/polaris-middlewares":"^1.8.3","@enigmatis/polaris-schema":"^1.6.0","@enigmatis/polaris-typeorm":"^2.7.3","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^8.3.1"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^8.3.0","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^8.4.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"da45ba17d3088b60f3f7f6a884f1c46af06d1df6","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n-   Online paging (with and without relay)\n-   Offline paging\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.56","_nodeVersion":"12.20.0","_npmVersion":"lerna/3.22.1/node@v12.20.0+x64 (linux)","dist":{"integrity":"sha512-fYGtTjwnx8dNN/5d508Ig77v6a/xkFHDNrJnUf1PGaU/QXEh1DfA8xBYACrME652K/uYm+YH+6TFclZy7Wylpw==","shasum":"8e76195f0186bb9494f5b0007a31c2d3f9e81aff","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.56.tgz","fileCount":104,"unpackedSize":2326916,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGSJMCRA9TVsSAnZWagAAUY8QAIstryPnC8qSGV4VCEQ2\nWySdrrdtqFA+g/fa0HtduCRNIvuSwux0Rl1oQkC6dxpvUJYgXshzo7qfIg7r\nae7NzjS7uLQ+aGW0Y3NllDpK79ZhhqiXEFifMlJgHXhsjyw3HiMDtTyHwDTC\n/8k7ud7gz3Gpe5nkUf5frDwM4ktsXvnHPJjMYmIiJf4pgxKXzl8aY7SU7n0J\nASJOP/CjtzJp3M7VcxC1O1MvGYA99axsVyqGCMzddFujX2eroxPwyidGzcBb\n0QF1PcDfZsS46Afrzlpn2/MA8IafNAgTl1SicxM8vtv+pUKgEl6aPgKvMbIS\nskEF6tup6aSbddL+9lkAUfZ3af8soH/27+vDGlwLKq/u/dwEBEKhcx19g8Sr\nUxHjf50FqJ+eGw9vSGZJD8VoGd/+WeZsRiqyXClGV3/yp3JutSOdMuC9p5vZ\nRKHoVb+n9feVdH6PIaE2/jbtfnpf8cxiPjWpE8hBvyAyK0SAHXkYbdfje427\n1ogkqBXfWBwHkaCTtmFpzX4tBMPfmm+9usU6QfyAvyXqMJIOYZ4ZsaWmC1cG\nkEmd/XR0lCfPc6gGQkuKq0uzA1fCpmsuMupVTBPQVhJOHyDFIBranA0553Bg\naFvzM5+yOjTBV+HUle/FXmvj840R8HDqGf5gNvbj2+ybU4h/aDKCnjpGWM7I\nsZwR\r\n=o7Kj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjKfhvOUmjTZFCEOPArcy3P0Q/sRY0xZ4xJPrNayS0kQIgX3jZWPhy3UzkfYQqNgmNb8kaNhHcFCwLOuFEPfWdPAI="}]},"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"maintainers":[{"name":"yarinvak","email":"yarinvak@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"enigmatis324","email":"enigmatis324@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.56_1612259915577_0.10660824498453358"},"_hasShrinkwrap":false},"2.0.0-beta.57":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.57","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.13.0","@enigmatis/polaris-graphql-logger":"^2.4.0","@enigmatis/polaris-logs":"5.0.0-beta.2","@enigmatis/polaris-middlewares":"^1.9.0","@enigmatis/polaris-schema":"^1.7.0","@enigmatis/polaris-typeorm":"^2.8.0","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","dataloader":"2.0.0","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^8.3.1"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^8.3.0","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^8.4.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"8439dca4918441e3ef73c319db9fee4d44e9ccb0","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n-   Online paging (with and without relay)\n-   Offline paging\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.57","_nodeVersion":"12.20.0","_npmVersion":"lerna/3.22.1/node@v12.20.0+x64 (linux)","dist":{"integrity":"sha512-SV4IT6Ua6g0A8ssE+a68v9c6djuYpVpCeHTjPFnXnnfLQyHqZec4vhOZNe3lHsOqfKxK76hb2JJYEle9uJdVVw==","shasum":"cf7bdec723ef2ee3b18c41ab9ee13a4e8cc860f9","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.57.tgz","fileCount":111,"unpackedSize":2336812,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgH+/MCRA9TVsSAnZWagAAD88QAIktYvhjKeqczOVteu5R\nYgUwRMwPjNjeu2hyBFvKE877RqvnNDZ6KF29NRdBovSgK0j6LZuAsreufUrP\nTldCeF4yh5kTmYp6FskIpA63NVd45Lpee0Z90DG/rgCG9EGpC+BEnB7Q9moy\nF4gZ9vGdmUI4GIgoK5NX8icpJklNABk24u4nhKJ+lEcz4E4JVSyoxG2PT3iX\nO07CgNpZL3woS2KytlbRwrEHcHDlKuqBDrw05KtA1h0EWLtM/0T/QvhESWPX\nYG4Fzm1anShuNGrbkfNCpBIoBSEpnRZjz8ZDdciblSkQu1K7WpyUlk937xRw\nG433eA7M0df50bjPyT2AQS91lgYVFZ47l/Ec2YTdswobgmFuzfpWOIGdaobt\nbaosfd7iR8RU5tG0FWWdyxDh3Ks4uQi+P/pbG965Wjq1ILOViecFaLE0Zu9i\n+N65YNT5FIpLvHbLYabV3ohSVSrtHQr81WscwYclNgrti5ckTY1fbFIfgsnm\nPntfsTBMa2I7w72PSGpy7yMQXt6GjuVCIHmdOfJstI6ZxtHgfaoyoBdPcLd6\nNHZ+tBvBOgf8Zc9BuxRMywjgbRr/HAbMBU8D/5ccr+l0iw9lAv0CkxFd8qZM\nB5Nk4ZZQVewKIl48EyMTpnWn7WAH3XuBXfDaWoDF8JWgAApPPRoxHbzWplrV\nMXM8\r\n=W/uE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/KbXvA0oI8C+kNjhdTh4FXrotDQpSOnbeh/PE0PjlqAIhAJwb3rmQrbZ2XsUyauaYIXj7MhutoWkA0piVF3AJQH/R"}]},"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"maintainers":[{"name":"yarinvak","email":"yarinvak@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"enigmatis324","email":"enigmatis324@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.57_1612705740167_0.4785233443228136"},"_hasShrinkwrap":false},"2.0.0-beta.58":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.58","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.13.0","@enigmatis/polaris-graphql-logger":"^2.4.0","@enigmatis/polaris-logs":"5.0.0-beta.2","@enigmatis/polaris-middlewares":"^1.9.0","@enigmatis/polaris-schema":"^1.7.0","@enigmatis/polaris-typeorm":"^2.8.0","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","dataloader":"2.0.0","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^8.3.1"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^8.3.0","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^8.4.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"1038fceee049283143dbbdc5365f29099f1d4174","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n-   Online paging (with and without relay)\n-   Offline paging\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.58","_nodeVersion":"12.20.0","_npmVersion":"lerna/3.22.1/node@v12.20.0+x64 (linux)","dist":{"integrity":"sha512-fV+kj3Fl1TiUbVUUPr4a9Mmv0BN6RGogsR0dvsLoH+Zf0N6C2OzVeIBkzXNyJe2Q6l3qDCXlVsSUDCs3dylfKQ==","shasum":"233aa2f84c1a122b5be6bb2593cbb33b6873671e","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.58.tgz","fileCount":111,"unpackedSize":2337756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIQqDCRA9TVsSAnZWagAAKTEP/R+QedEmRfgJMncIUtcy\nddD/luG8lpcytONtZFNPeu1UWGMfaY54tzUblk8EFm2gg+3SQiz9bLBGqE02\neXSCPkb2CFAwY7dbg9m2TO2YUQkA34HPGXkks0s6TAL4ZdWzMdZ53z842Eot\nGPDuNLlssrdJij3BptmndJwZxpaHKqSbki/X3Vmpl+Ezgyy1AvKRqa0vcffk\nBK+Ipu3kkTR4YO8Zwb32xkzpWx53kWRykJrJWAxxHw0BP3KLdTkBH6nK9x0S\nnN0lNtowuxZ6yYSuF2rmlmV1IyOKAcFlmEReRWQnQe0Ph677ijYz/qtlfoMX\nDPROdzVMbLbeHlQgFIJeDNwbkH2m+Ky5p1U+wT71+AwOXmmvI+/RMa9q+Sxo\nU4LD2Qwd+7yNkdKFfhxP/Rahmt6q9Z2PVUPNE+wLBp/zIyPTu+28IEMOr9jZ\n9BWiHA4nevloK8PrZ7VgFnW84ys8sXB00/TaPPN4LX9mZEafDEcSkRiuyJkj\nJZ2PUg4xH4Zez+CYUsmwy78hDD+x1B4WRWlwEeJJC17L4ertOKGh2Zozfn4z\nLlTJMrL/za94zSK1WKXPBATNhaTq/bIRRUyWsr5trt6dzaPYxwD09BV8mgYa\nglN9kGzoApVjdtJrBmNuWoIL38MWW+aMAn5zi4CfHTaoaqsSrnx2cJ+pgi/7\nXfVK\r\n=/zfu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICGosce9dLncXLAjaoemNiD08fRnqcGkEmI7dEZ0pzvDAiEA+g8iImMe1nEoKfglQN/NLWIzreHi/hrwkI6+u0lVEOE="}]},"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"maintainers":[{"name":"yarinvak","email":"yarinvak@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"enigmatis324","email":"enigmatis324@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.58_1612778114830_0.21273721586775163"},"_hasShrinkwrap":false},"2.0.0-beta.59":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.59","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.14.0","@enigmatis/polaris-graphql-logger":"^2.5.0","@enigmatis/polaris-logs":"5.0.0-beta.2","@enigmatis/polaris-middlewares":"^1.9.1","@enigmatis/polaris-schema":"^1.7.1","@enigmatis/polaris-typeorm":"^2.9.0","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","dataloader":"2.0.0","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^8.3.1"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^8.3.0","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^8.4.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"6d031371869bca85249f06fabe557db1fec75837","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n-   Online paging (with and without relay)\n-   Offline paging\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.59","_nodeVersion":"12.20.0","_npmVersion":"lerna/3.22.1/node@v12.20.0+x64 (linux)","dist":{"integrity":"sha512-2fAUqJsbAz6vL2pVn61T5c5GEMgqAN+Tf+sBI2vglsetaQrOQCGRNYCwGX1m1VheFk47gt0CGoJqnqU6dj5/WA==","shasum":"59be63c695b77b12a936f7b6a48ed28799151b13","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.59.tgz","fileCount":111,"unpackedSize":2340669,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMhzzCRA9TVsSAnZWagAAjXQP/3WVEUiOhsdePuPDzh7E\n162S/1daiz0A+9WQ4zjIp4NYubUjhEdWZFqjklkPSYLWuyP6t7fjTApo3qQh\n9z/alDVJlAK45sL2Fn2xLxxX0ff8UjC/zyXstwGus+F7RJQlLgtdxsgNsC6g\nDqbSwXhqFDTd1OYT+9YqAD8pE3yUNsjJT8P+CYNrQ05Njoqbvdt/bT1+c5Hz\n5lyfWDK+i6CT77DBoWGGDPfOYtzV42GAHnR/NUxd3UFhwk/cIeQufMfu+eBl\nzBkJdxUqHJ0UQSpE24WRUb1sesGyOM3xahHhwzh3KxCCIjX7VnIk50BdtZtl\n4aAUeEx6GQSsqLuwYqhfh7tMTY6/7mjy8HQvrHdAbzubRF/vCsMAjxxNaW/u\nsncMasCH4m+EyloZXXNtLyHpcvh9TzIjQUbdkerVKe5NNJ+300AHv3wXYXQg\nR0+7LjRB3LCh8X6KbffnsGd8TfgvF4CdWigwcD6iLisVw7Rkgsl+Lnl5eK6A\nH4Nw2Njb/nMm5B736E5Dd/hrdtHQWoSR/XKHMVRWNHeJOxrjjOguIEOTWvcA\nByPId2dEzw+IjtcGPx59baZ4L80Eb7e2peJxWbmgY5BR75N1q5yRJmbZyRlO\nCcdb+M+OLU3R3d/RLMtY8REEm43TjCRY/52fXTr+BxKPfqTROpMphXzbCNvD\n0VCm\r\n=/B8N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFMGjXHhExxG0R3/f1Cn0Ox6cE8IGZnPlK0O8gT8B3tEAiEAoWQ3M1/iB3mLvbs9hrPo5thTLxiQeePuD2qx9tCValM="}]},"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"maintainers":[{"name":"yarinvak","email":"yarinvak@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"enigmatis324","email":"enigmatis324@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.59_1613896946639_0.680564780633506"},"_hasShrinkwrap":false},"2.0.0-beta.60":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.60","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.14.0","@enigmatis/polaris-graphql-logger":"^2.5.0","@enigmatis/polaris-logs":"5.0.0-beta.2","@enigmatis/polaris-middlewares":"^1.9.1","@enigmatis/polaris-schema":"^1.7.1","@enigmatis/polaris-typeorm":"^2.9.0","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","dataloader":"2.0.0","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^8.3.1"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^8.3.0","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^8.4.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"b3299b1538908d52f9ad5f6dfdb17e3fd41249ac","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n-   Online paging (with and without relay)\n-   Offline paging\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.60","_nodeVersion":"12.20.0","_npmVersion":"lerna/3.22.1/node@v12.20.0+x64 (linux)","dist":{"integrity":"sha512-Ks8Jy6rXvUfkCsupi6qYH/K+OQqQ06B6L6krh1wTGgEawBO71cQeM6vP5odb+1eYOpybogonrSrUObfYMZdvOg==","shasum":"a8f8b0abd809157e0a9e6f75e5fd4c8b91f879dc","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.60.tgz","fileCount":111,"unpackedSize":2341068,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM7wQCRA9TVsSAnZWagAAJiAP/RR2DzhRcWhfyUiVGfj5\nb/EdY00WMzcE9bKBVfAp5hYPD4W7GZCnT1SI2sIwDqlpE6mtwLTZW7vpl0Cr\n4VpscVcwCKBLuGdZ+yFdlyG+oobtfTrNfQa2FgnZ1cdpeMZCw2d7GA+MxWQR\nt792z/lOfmecxEs3jPnvjiiiANaL4GNWiZYk+nxRn3AoVU1Y0HznQzCSpegV\nkPzIkcMdWOwtcxgnerrP3U1gJLwly+j5amWtRs/ecNuu0ORFqj2YGTV+yf9z\nJZNcBLUQ3dayGFIOOmnTJLiZrRbKHpPKXdbkI11rUQjU5vypKf8pktf7R1+D\ngLZTr/39+/1tVNvO7eLsla5PzwIkU3OlINo1wNVe1m8diQaQe3lLA3NboaJ6\nIHgpFgRbCTyeYtFV6ezsbUoY8rNoacdvmISr+szKb/uSgb8sgtCDMRI3rCR/\n9luTg1+bxIE42ZdTlDE/4Y+cwZ8F18CsDtq9+itYNusznCbQnG9dPG3Qmn/x\nfzFZ9FOVSSMKRmXswqxA+aiZ708G4pe5dO45ix2b1i8VkCCeo2SCSszJENbq\naCJMe3hjz/Ik4q1kvOvIrA4KJ82xj0uNGD4iBFctEfelyuzepPHVObRQ8sG8\nktAsLDt03OC1TaWRU358VqNIuL3RsK51xympyiDyR83PbfCGAyYcWT7jqFh0\n8npo\r\n=ZDD+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDY1XkmZxCLccF5EGPHUk3EGOlx4NuypcS/iifEiQJnQwIgVTb5TSr/IVKvd6uPoN+vNevjrlWxCDE8wsTJPxspAlI="}]},"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"maintainers":[{"name":"yarinvak","email":"yarinvak@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"enigmatis324","email":"enigmatis324@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.60_1614003215449_0.4571641426547244"},"_hasShrinkwrap":false},"2.0.0-beta.61":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.61","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.14.0","@enigmatis/polaris-graphql-logger":"^2.5.0","@enigmatis/polaris-logs":"5.0.0-beta.2","@enigmatis/polaris-middlewares":"^1.9.1","@enigmatis/polaris-schema":"^1.7.1","@enigmatis/polaris-typeorm":"^2.9.0","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","dataloader":"2.0.0","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^8.3.1"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^8.3.0","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^8.4.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"791a59c74188cb38c6856ddbc49b23d31c31460d","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n-   Online paging (with and without relay)\n-   Offline paging\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.61","_nodeVersion":"12.20.0","_npmVersion":"lerna/3.22.1/node@v12.20.0+x64 (linux)","dist":{"integrity":"sha512-gosvsEIU79LOdgU0BnzFkktbBs4Grfd34AOzf4D2NF77HzQaSwlNroOzl8m2O51a+A5s2EozzyOEbmjyMHO/EQ==","shasum":"4597a8f91a119e3f1ce02141624711205c2d4771","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.61.tgz","fileCount":111,"unpackedSize":2341452,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNLN8CRA9TVsSAnZWagAA+JoP/iusqLQhG+aiF9UBogvX\nM1C5cvhMZujxc3SYx0qig6Sn31kwoxwXd8cdJt8lzy4BBkl7znVxWVoFG5e/\neu57J1CHlRS59sYQn1lq8pgrjZTVv/rEpl+MpDrHVQTxQtsQmpI7MvxkME+Y\nVXPp8PfMaGWjl4Yx91eN0ceh1rocodUQOzrmWjg2+iXQsMOPMpDXc7/0V1O0\nQKLBklrodPgX7MUZMix1HND9DJfm8jMjZgyDUO6RP9i9XMdNMpOUuvbh/D3p\nlzJQMs0d2HFaZ8fhPBlCXZ5n76XLSPDBfGoTRrflVFMK/ZV4icTWJP4/FDzd\n3AW7thJF2Y4SQQiof/zuDyuqAUCtCoCL2z5m9rY69kumLbaWbfmsvfPlheHB\n4bMvFyvwzLBQXLn6YM/lahUFuHfqerlPO9cjZ9xwuUikzdmWxAUzMv1LVJVP\nG4nBhAHE84mCFKmb1PiclTg0fnlKcZsFeaNds65zGyJt5meXsnDzJEMMbkzY\n+GrzxeagM8ShQ5VAso7mPlWI1txSi+a1e0EZopEMKYQAPtPYxol/LKsdWmI1\nb+eyURMYyGiZ7RSeixawvZfKp8OuQGSOpIdoe2tZip4YLVIMnhizCuktjSza\njrddqDg5wQ2lS0cy4rR/1w2ubjNm75ePJQPlsUsdCtiWkj6c0zgZBUog6Pxw\nxUHl\r\n=2luU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICUPa5ua/hK0hfpiB4Vs/rr/TfdvUKatKH+6t5ESvJJIAiEAjGnaJBUQDsdzghK0JidKjDZS+l851bXLSNkR1AMvZ9Y="}]},"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"maintainers":[{"name":"yarinvak","email":"yarinvak@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"enigmatis324","email":"enigmatis324@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.61_1614066555927_0.11428314856751909"},"_hasShrinkwrap":false},"2.0.0-beta.62":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.62","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.14.0","@enigmatis/polaris-graphql-logger":"^2.5.0","@enigmatis/polaris-logs":"5.0.0-beta.2","@enigmatis/polaris-middlewares":"^1.9.1","@enigmatis/polaris-schema":"^1.7.1","@enigmatis/polaris-typeorm":"^2.9.0","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","dataloader":"2.0.0","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^8.3.1"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^8.3.0","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^8.4.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"3bc849f14a14978880c4683a9a36a1256a1670ac","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n-   Online paging (with and without relay)\n-   Offline paging\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.62","_nodeVersion":"12.20.0","_npmVersion":"lerna/3.22.1/node@v12.20.0+x64 (linux)","dist":{"integrity":"sha512-fTihvi7iEADYvi4lE1gAxx5JGX93FsGwFoS3vB3CQqK+5Usr1tkoyqxCTnBH5/Dvq4O6Zf6J/G+FypaUPVxtqg==","shasum":"5d9713c45ec859d71be821f679e162d1e8c7972f","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.62.tgz","fileCount":111,"unpackedSize":2342126,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQONsCRA9TVsSAnZWagAAqYUP/j387VpgsSy2liuXCfDc\n1B0MwMYRkP5UI6jnJVlgzyLKhTboNyRN8pYx5iJ7ivEjbR03ys3mqyyOavTx\nUYEOQ/kdI98r/0+IpF0HJI8VFb7aLOlOzXUvdLmnftktmO+qs54jQz2eu5qN\nx0xsvmrEeukjhQ/vpDxviJY09RV3HIFzVxzHvII2guK5ZJYwF4RnOi4eqE0N\nzHAu0G7bgkm+6BtlA5XZ3aOljgR17ru8uAfGgrze7ZVvyZfApYxwq5Dl0HKn\np/Uv2a3JyEip7DD2ISM6dE0hJX9nZnSuhqY7/DIPL9PVK3+El+CdKpo77Drv\nO6s3U9IKa71GZQZXBmqSrqpKHm999CcdgX38NpcZL7O34zzfppN0Iudxfsqe\n7m0CUmg6N12awe0U8jqQH/TO3Thj7mgD9SALeofvhT0Kx81uEWDCv6cGyrQ/\nsi/SZfAOKKp+kZbz2reklagmAi2rioKSZFSmiWei8RkYVz719UnIqAenF+Ho\nzyvWn24UjdmpKRV1OCd5bGgtTAicvwGXddIGV9JaImbuRZUGuupdASYoY0X0\nJ6wxCqiHhCiVTxQcMH0fSfORBU+NTInstkKYA6dpdPGaRfJ6hrGbANWlhQ3M\nsLZW1+W5qBDA9AjoPQrVjBpnb12TqZ6vc1AZiNXKsRL4NzHQAXFp8uECSVFo\np5YM\r\n=8G7o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/zEvYO+ejk2m5Zmmbsfmz3gpCPFSyTQVf5W9AzIstLQIgWV0dizDiL7yuDf3J/F3dez8LxCI4rsR59extwbog2KI="}]},"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"maintainers":[{"name":"yarinvak","email":"yarinvak@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"enigmatis324","email":"enigmatis324@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.62_1614865259669_0.02158641330870803"},"_hasShrinkwrap":false},"2.0.0-beta.63":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.63","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.15.0","@enigmatis/polaris-graphql-logger":"^2.6.0","@enigmatis/polaris-logs":"5.0.0-beta.2","@enigmatis/polaris-middlewares":"^1.10.0","@enigmatis/polaris-schema":"^1.8.0","@enigmatis/polaris-typeorm":"^2.10.0","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","dataloader":"2.0.0","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^8.3.1"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^8.3.0","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^8.4.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"a27d2f0e0c7c7bec4dc28827040b4c0693e97150","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n-   Online paging (with and without relay)\n-   Offline paging\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.63","_nodeVersion":"12.20.0","_npmVersion":"lerna/3.22.1/node@v12.20.0+x64 (linux)","dist":{"integrity":"sha512-SmE7+z3uJE4vicQpbFWl6PDv1Ak9Myj9sFPpRFalkSHuuRFvHxf1KMp3Uh3nu8Om64N05fXz3sFcdAWfMuxrGQ==","shasum":"1b380226ffd5226ca5d057c311dd3a705dc5971b","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.63.tgz","fileCount":111,"unpackedSize":2344500,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRLWqCRA9TVsSAnZWagAAPq8P/AtyOl4JMkfAFCFoxVmK\npTmgadFVedzSpoghbYNv8ChcH79f75hxw3z4KfXa83XkkUVgcfk5UoGllCKX\nyGmb3C8IU+IlCg06UJOi0+JARdTuqy0wxo6KAnG3eYKJo+pPPpaH0AEvjx4p\nJZW9IFt/5FNA6xmu2jm3Ggp566flUYc1OyBdAw2nEn1l8KEkCe4+Vk8/igca\n/T5D374mBy5bkytk+GV3HU+kBCovaZgpFqILv7ocrYcrg0jmkv245mY+WiBC\nCIV7SjSACaBjz9rQ56YrBQ9QWJrsvs5PcGkl4dpo3ihqSdOgOiU83grST07y\nPqKFECAjfRS46w6Ij6AtfPftNVRBO3X3ci2Jmq9ZiiWu3WgXCdIKfDGoQXbV\nwVxKMC4oNnxK7JmQF/oqxMv+5rKFPGplrhqGf+S5kTtrjOVXgL4xNTvXPRzU\n+Ta3vUBNn/L/tPMInc0TSyVU9Wk7BosBEB9T9zZwTXXJg0XBTAb77SQR7quU\nEKA8g3lVw8mTeZdKmRsd861mOOr0KQIJHtFtC56cU0IqnOW0u8YRXZPPpaLK\nftH3mLiJTQyExNiy1MAjmzWKB3h8UOIzvXWAlG2nWcYzXI11Eguh6WFM5hIM\n9Q91pGqxTFW9f67q++I0m25ZYar+uvNWdyMbtlp385JNI99yLfAW90toAjl8\noRpw\r\n=+EH2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+erQcY/zkQX4JNxw79Wd4Baq9qqGblGnJ4QOCEVL91AIhAIYj5bppLNqUOTvMBSVKeBeoswE1o3KiKOb/pVchv+Oh"}]},"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"maintainers":[{"name":"yarinvak","email":"yarinvak@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"enigmatis324","email":"enigmatis324@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.63_1615115689858_0.3271615852654779"},"_hasShrinkwrap":false},"2.0.0-beta.64":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.64","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.15.0","@enigmatis/polaris-graphql-logger":"^2.6.0","@enigmatis/polaris-logs":"5.0.0-beta.2","@enigmatis/polaris-middlewares":"^1.10.1","@enigmatis/polaris-schema":"^1.8.1","@enigmatis/polaris-typeorm":"^2.10.1","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","dataloader":"2.0.0","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^8.3.1"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^8.3.0","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^8.4.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"c15d32fd48afc5a846bd352dabea7c1968569cc8","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n-   Online paging (with and without relay)\n-   Offline paging\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.64","_nodeVersion":"12.20.0","_npmVersion":"lerna/3.22.1/node@v12.20.0+x64 (linux)","dist":{"integrity":"sha512-DMSbwDq3GKN1g8jHBYma8It+XEFYC3js6ch+SL+rFf2xlbxz9Yxva7j/Fmoq1lHsdKY55DVnOQQbcAek3SFZiw==","shasum":"15594ace9d618bf33bfe50127f314c84180d8258","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.64.tgz","fileCount":111,"unpackedSize":2344739,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSHO2CRA9TVsSAnZWagAAT+8P/27isDF67HOSTExmhY4I\nnzIetUEPa+ZpXrZLuZp1CrfqvkgPDo2m2LLHJ8viue5AL2qI+Wz2Bq/9Di4T\npUXi+EoXLI+TlLf9JqJYqIg0nV+1+zpFyi4f6XvB307uCGNWFcrYnig3LAm3\nhC8jOJgSGFN9O97sk+jC6ZZ6gn476TsAiFaB61GyLgMuheECxfkBp5K7bQUX\nH829yBMQx9TxKRzXt0G7Zc038F9zvRyQadwqUwkPHZOyEAsQWVDvNokgU8Rb\nRIZ24PjnFKB3d3wBTmtHsb6lH/4GrIRgeNOoXx3PzRZXJvulgpjG5O35WFxf\n4nCFD4Rf3RBQScdo8ml6LyFkMBRZVBK6Obu63Te04QQY6938ghGhVfS6w89B\nitSwyMtL03agE6q4fWExkAd8f0PmviUmZBye5mjALDZZoSHoksg/ICj7QoK4\n2NrxStut1U+mkfSdKJm6ymhm7CDLN5PP2Sz/6HgcbRTOJznlKP3AeTnHmgaC\nyDpw2r1iPdRK6yh67Pozw63ThHviaG89v8YD6LrknquYbsNKSfPhlU6LmR+m\nsJfL92ozrtBaESz3jbOfiyVKQoExvaLkJJJWffP3CAHw5LQLFzWkDADoU7OH\nK9bJ/ATTn0ttqctRh/IeViLMMjDC3DmSqA8IFnrG8vY+EX3vKWMNoEZVC8Pk\nC7X6\r\n=LKIO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCrd8+SBFWrY+tbdKnlz+Fj/kK4qMeSd64QZDxiJz6MYgIgCFTvjbk0Wm5X4g0ekQkJDrjUbXT9l/S0uWdN4JOoQuQ="}]},"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"maintainers":[{"name":"yarinvak","email":"yarinvak@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"enigmatis324","email":"enigmatis324@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.64_1615360950208_0.6786956872031356"},"_hasShrinkwrap":false},"2.0.0-beta.65":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.65","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.15.0","@enigmatis/polaris-graphql-logger":"^2.6.0","@enigmatis/polaris-logs":"5.0.0-beta.2","@enigmatis/polaris-middlewares":"^1.10.2","@enigmatis/polaris-schema":"^1.8.1","@enigmatis/polaris-typeorm":"^2.11.0","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","dataloader":"2.0.0","express":"^4.17.1","graphql":"^15.3.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^8.3.1"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^8.3.0","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^8.4.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"01f09f9a50127acd6dec2c3be91788533152377a","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n-   Online paging (with and without relay)\n-   Offline paging\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.65","_nodeVersion":"12.20.0","_npmVersion":"lerna/3.22.1/node@v12.20.0+x64 (linux)","dist":{"integrity":"sha512-3yQg+jUT0LhkgxAcWY++5oWaYxSXdeQr2Q4hxP2Rl0DsEBJfQYsY/kAauJhBTGQWOCGpKyM4TCJCSjTUk80HXw==","shasum":"0698d103f667a9c1f4aa668f299ffbae953ba28e","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.65.tgz","fileCount":111,"unpackedSize":2347200,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTiXBCRA9TVsSAnZWagAAMcoP/3OQ+hXTWGdBsl3+s6GS\n/Omg6TayGhsmBoXE3HWR6vK49NPhZ4FH5WBQ7m2xxyJ/SzQ1J6srAYKLJzAG\nLIJZxjSQFbRfP8aQ3GtJBT3ow/fEkM1LcC64bVXJkhTGeJYMXzGOFvQbc1AB\n+yEQrsGeM5tKRy83G8zQXxJKfH0NeKWG13yWovvaln7ouVCaBXJus8lHQEU1\nD2fqVitkJeI2s/4AZbZy6kxnl1Ysp+iSf27MWjGQmQvzzJLq5cYRdTtRoFpY\nfP3amR08obsKK1G9AH8gR9yyTHnoNoIWsvo9/DsZ0hwSS77Q0OrQJhfEcwd8\nVzMNRgE5EKBuhOB112M4S61yc1zChYrgDeVjNxXmw1uGghYFarNdmkNHNdJT\nT36EgkTRcOLn8lY0pWG02eIm3IW4c05gAyIyZuS2iR3ydAKTjGybc7YWA0pb\n2BG6TkAN0r0bvTzyc1kRvytHb/TWuZFci9cCQrbifNZOTeCRn0UvDIvnhpZ0\nYhKZzL9FWor5qWy2zvOkP/XvsXKZDQlX8H8xd64SIe9bPRVKVnI3pPmOicgI\nkiSm6EZ/KrcSRjMltif8b81rzbNnR/X8VeZvQh4RchgVIefQGBqcYrtKLWJa\nOrXFy9pwKJdu5X1IMQ/7SOk3b3Yco/iYgiFivh2XxFK/6S9cP79dCIuUMrAN\nX7mR\r\n=6Ne/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClOWnpFLdrRIJXxUW8eeC5ukzASfuGyoni+4LwbUvqxwIhALo6rQAak/D405xW7rqTJBdx6dtYq2J3O7cdqokX56ej"}]},"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"maintainers":[{"name":"yarinvak","email":"yarinvak@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"enigmatis324","email":"enigmatis324@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.65_1615734208905_0.07674962749688996"},"_hasShrinkwrap":false},"2.0.0-beta.66":{"name":"@enigmatis/polaris-core","version":"2.0.0-beta.66","description":"Create a node js graphql service easily","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","rebuild":"npm run clean && npm run build","test":"jest --runInBand --detectOpenHandles","coverage":"jest --runInBand --detectOpenHandles --coverage","prepare":"npm run lint:fix && npm run build","lint":"npm run tslint-check && tslint -p .","tslint-check":"tslint-config-prettier-check ./tslint.json","lint:fix":"npm run tslint-check && tslint -p . --fix"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-united.git"},"keywords":[],"author":{"name":"enigmatis"},"license":"ISC","bugs":{"url":"https://github.com/Enigmatis/polaris-united/issues"},"homepage":"https://github.com/Enigmatis/polaris-united/tree/master/packages/polaris-core#readme","dependencies":{"@enigmatis/polaris-common":"^1.16.0","@enigmatis/polaris-graphql-logger":"^2.7.0","@enigmatis/polaris-logs":"5.0.0-beta.2","@enigmatis/polaris-middlewares":"^1.11.0","@enigmatis/polaris-schema":"^1.9.0","@enigmatis/polaris-typeorm":"^2.11.1","apollo-server-express":"^2.17.0","apollo-server-plugin-base":"0.6.10","dataloader":"2.0.0","express":"^4.17.1","graphql":"^15.5.0","graphql-middleware":"^4.0.2","http-status":"^1.4.2","lodash":"^4.17.20","subscriptions-transport-ws":"^0.9.18","ts-node":"^9.0.0","uuid":"^8.3.1"},"devDependencies":{"@types/express":"^4.17.8","@types/jest":"^26.0.13","@types/lodash":"^4.14.158","@types/uuid":"^8.3.0","axios":"^0.20.0","graphql-request":"3.0.0","jest":"^26.4.2","pg":"^8.4.2","prettier":"^2.1.1","rimraf":"^3.0.2","ts-jest":"^26.3.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-consistent-codestyle":"^1.16.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.3.0","typescript":"^4.0.2","ws":"^7.3.1"},"gitHead":"0477652088e0faae8b5524b87ef16609c4493bfd","readme":"<p align=\"center\">\n    <img height=\"190\" src=\"https://github.com/Enigmatis/polaris-nest-logger/raw/master/polarisen.png\" alt=\"polaris logo\" /><br><br>\n    Create a graphql service easily, integrated with typeorm, middlewares, standard logs, and more!<br><br>\n    <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core\">\n    <img alt=\"npm (scoped with tag)\" src=\"https://img.shields.io/npm/v/@enigmatis/polaris-core/beta\">\n    <img alt=\"Travis (.org) branch\" src=\"https://travis-ci.com/Enigmatis/polaris-united.svg?branch=master\">\n    <a href=\"https://www.codacy.com/gh/Enigmatis/polaris-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Enigmatis/polaris-core&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/6a403edb43684b2382728837f58bbfbb\"/></a>\n</p>\n\n# polaris-core\n\nPolaris is a set of libraries that help you create the perfect graphql service, integrated with type orm and the hottest API standards.\npolaris-core organizes all the libraries for you, and let you create your graphql service as easily as it can be.\n\n## Features\n\n-   GraphQL service creation (integrated with apollo-server & express)\n-   Auto soft deletion of entities\n-   Fetching Deltas of entities (including irrelevant entities)\n-   Support realities\n-   Standard errors\n-   Standard logs\n-   Standard GraphQL scalars\n-   Online paging (with and without relay)\n-   Offline paging\n\n### Example\n\n```typescript\nimport { ApplicationProperties, PolarisServer } from '@enigmatis/polaris-core';\n\nconst typeDefs = `\n    type Query {\n        allPersons: [Person]\n    }\n\n    type Person implements RepositoryEntity {\n        id: String!\n        deleted: Boolean!\n        createdBy: String!\n        creationTime: DateTime!\n        lastUpdatedBy: String\n        lastUpdateTime: DateTime\n        realityId: Int!\n        name: String\n    }\n`;\nconst resolvers = {\n    Query: {\n        allPersons: () => [\n            { name: 'foo bar', realityId: 0, deleted: false, dataVersion: 2 },\n            { name: 'superman', realityId: 0, deleted: true, dataVersion: 3 },\n            { name: 'hello world', realityId: 1, deleted: true, dataVersion: 3 },\n            { name: 'something', realityId: 1, deleted: false, dataVersion: 4 },\n        ],\n    },\n};\nconst applicationProperties: ApplicationProperties = {\n    id: 'p0laris-c0re',\n    name: 'polaris-core',\n    version: 'v1',\n    environment: 'environment',\n    component: 'component',\n};\nconst server = new PolarisServer({\n    typeDefs,\n    resolvers,\n    port: 4000,\n    applicationProperties,\n});\nserver.start();\n```\n\nFor any additional help and requests, feel free to contact us :smile:\n","readmeFilename":"README.md","_id":"@enigmatis/polaris-core@2.0.0-beta.66","_nodeVersion":"12.20.0","_npmVersion":"lerna/3.22.1/node@v12.20.0+x64 (linux)","dist":{"integrity":"sha512-Q4bofBz6T8cOJR8B20JIX1t5F/MwZkJICVI/eNmkd30fK5YVAxAPK9sZ31msPoVXKZhWEVzg07t/idcVt+VlhQ==","shasum":"43151d3054a8d9fb0fec1acadea6316aa301026e","tarball":"https://registry.npmjs.org/@enigmatis/polaris-core/-/polaris-core-2.0.0-beta.66.tgz","fileCount":111,"unpackedSize":2350765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTyjRCRA9TVsSAnZWagAAhSUP/jeJZA8XC9jjmR0xJtJJ\no8vQZ/sajctNsclO6RmTRuWE/ZAcx/2JTmb6/UOxFjxkqnAmzYeb+sLOOcD1\nQTyfzmNeG+kf6wpK3z5h/x1Emg58u6dXN8Q/v6l2Py63E0IE8j4zlW3Ok8Nx\n/nM/Xe9PlOTiH1cwTGG7xFJdzKvNNHaslYftJ49WM7M5w0+xTGPl+SPY7FnZ\nXAdEbXuRZnmdbm0867iArfkZjrvnWTvi9bxK81c8iWSjeKdIlxhFvhsI2j0T\no1PguDaLQwLMW/+XjUX2IjDVNCqjvuSz8VnNMw1aYslkMOZeu20etSybovQm\nakJffyK1rCAvf23hAElAy2cNIy9rdSn/s3jdHbpq3ixg89djXMn5shczFkPq\nKopLvOfu3PmqvybbLX3UKKCLaCpLEuMOJzmf2Z76isXbYqDftkafgdYvRBaY\n4BV+wC7wiupHdJPWIgMYPB4nD/RmOxAMW4Vpu847ANXP8fw62ksDbwr9/4Hy\nCBIu43OBkixe9B/e0dwPlavyBn9OCQXdDcKX/qSIfTOf9RRrVMKs0pu4BLS3\nPpjvHJMoczVb+WQz66EHEjuJmmbQ5mSrYgJVZD2mFfgYc5TT9Mwty3hscOVj\nPney8qablNvZ+kj1nDVOfa6CwLL5tzGzJ6HDSzr4uQiCyVkSYL9Wzi+krxGo\neMqC\r\n=3w3y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhVKVRbhS3L4qLXAdj0mXs1gbvQc/AgsXFaasgEnZSGwIgBQ9XXfjZQyEv9CPbtGCZVperBdKFad9C6233s19pDWo="}]},"_npmUser":{"name":"enigmatis324","email":"enigmatis324@gmail.com"},"directories":{},"maintainers":[{"name":"yarinvak","email":"yarinvak@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"enigmatis324","email":"enigmatis324@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-core_2.0.0-beta.66_1615800528492_0.8104578433568621"},"_hasShrinkwrap":false}},"time":{"created":"2019-11-21T07:14:53.232Z","1.0.0":"2019-11-21T07:14:53.576Z","modified":"2022-04-05T07:48:29.110Z","1.0.1":"2019-11-21T08:43:24.105Z","1.0.2":"2019-11-25T09:21:59.022Z","1.0.3":"2019-12-01T09:15:15.557Z","1.0.4":"2019-12-01T15:21:54.925Z","1.0.5":"2020-01-07T07:32:22.750Z","1.0.6":"2020-01-09T09:14:59.668Z","1.0.7":"2020-01-09T12:45:10.718Z","1.0.8":"2020-01-09T13:39:03.424Z","1.0.9":"2020-01-28T13:23:31.383Z","1.1.0":"2020-02-04T08:14:44.544Z","1.1.1":"2020-02-05T14:20:56.785Z","1.2.0":"2020-02-10T08:28:05.952Z","1.3.0":"2020-02-10T15:32:33.125Z","1.4.0":"2020-02-11T11:55:20.141Z","1.4.1":"2020-02-11T12:36:29.181Z","2.0.0-development.1":"2020-03-03T14:36:22.918Z","2.0.0-development.2":"2020-03-04T09:15:47.388Z","2.0.0-beta.1":"2020-03-04T09:26:26.360Z","2.0.0-beta.2":"2020-03-08T10:57:56.778Z","2.0.0-beta.3":"2020-03-09T10:38:29.237Z","2.0.0-beta.4":"2020-03-17T08:13:24.775Z","2.0.0-beta.5":"2020-03-19T10:26:09.431Z","2.0.0-beta.6":"2020-03-19T12:53:23.568Z","2.0.0-beta.7":"2020-03-19T15:58:33.221Z","2.0.0-beta.8":"2020-03-22T08:02:04.328Z","2.0.0-beta.9":"2020-03-22T14:40:18.785Z","2.0.0-beta.10":"2020-04-02T13:47:31.585Z","2.0.0-beta.11":"2020-04-20T07:38:35.450Z","2.0.0-beta.12":"2020-04-21T09:00:14.066Z","2.0.0-beta.13":"2020-04-23T10:16:12.404Z","2.0.0-beta.14":"2020-04-30T06:23:30.537Z","2.0.0-beta.15":"2020-04-30T07:49:48.368Z","2.0.0-beta.16":"2020-05-03T09:21:58.123Z","2.0.0-beta.17":"2020-05-05T09:35:29.174Z","2.0.0-beta.18":"2020-05-13T13:31:43.056Z","2.0.0-beta.19":"2020-05-26T07:51:21.410Z","2.0.0-beta.20":"2020-06-08T16:01:31.247Z","2.0.0-beta.21":"2020-06-14T08:14:30.684Z","2.0.0-beta.22":"2020-07-09T12:11:00.472Z","2.0.0-beta.23":"2020-07-09T12:52:48.507Z","2.0.0-beta.24":"2020-07-12T13:47:56.677Z","2.0.0-beta.25":"2020-07-22T08:42:07.157Z","2.0.0-beta.26":"2020-07-28T13:44:27.306Z","2.0.0-beta.27":"2020-08-02T14:33:54.021Z","2.0.0-beta.29":"2020-08-09T11:57:28.671Z","2.0.0-beta.33":"2020-08-12T09:24:41.376Z","2.0.0-beta.34":"2020-08-17T14:30:56.315Z","2.0.0-beta.35":"2020-08-19T08:31:43.252Z","2.0.0-beta.36":"2020-08-27T06:18:57.518Z","2.0.0-beta.37":"2020-08-31T09:17:45.187Z","2.0.0-beta.38":"2020-09-02T13:39:38.826Z","2.0.0-beta.39":"2020-09-06T12:59:54.119Z","2.0.0-beta.40":"2020-09-07T06:59:21.150Z","2.0.0-beta.41":"2020-09-09T11:34:58.639Z","2.0.0-beta.42":"2020-09-10T13:09:51.582Z","2.0.0-beta.43":"2020-09-15T10:35:14.889Z","2.0.0-beta.44":"2020-09-21T12:43:52.775Z","2.0.0-beta.45":"2020-09-23T11:59:42.003Z","2.0.0-beta.46":"2020-10-21T09:32:21.588Z","2.0.0-beta.47":"2020-10-25T14:07:25.066Z","2.0.0-beta.48":"2020-10-28T08:49:10.092Z","2.0.0-beta.49":"2020-11-04T15:44:34.932Z","2.0.0-beta.50":"2020-11-09T12:15:51.247Z","2.0.0-beta.51":"2020-12-01T07:46:51.977Z","2.0.0-beta.52":"2020-12-06T08:57:33.836Z","2.0.0-beta.53":"2021-01-05T13:06:34.196Z","2.0.0-snapshot.0":"2021-01-17T14:39:18.827Z","2.0.1-snapshot.0":"2021-01-17T15:33:24.269Z","2.0.0-beta.54":"2021-01-28T12:54:27.452Z","2.0.0-beta.55":"2021-01-31T15:50:03.827Z","2.0.0-beta.56":"2021-02-02T09:58:35.783Z","2.0.0-beta.57":"2021-02-07T13:49:00.426Z","2.0.0-beta.58":"2021-02-08T09:55:15.024Z","2.0.0-beta.59":"2021-02-21T08:42:26.852Z","2.0.0-beta.60":"2021-02-22T14:13:35.677Z","2.0.0-beta.61":"2021-02-23T07:49:16.114Z","2.0.0-beta.62":"2021-03-04T13:40:59.892Z","2.0.0-beta.63":"2021-03-07T11:14:50.058Z","2.0.0-beta.64":"2021-03-10T07:22:30.414Z","2.0.0-beta.65":"2021-03-14T15:03:29.092Z","2.0.0-beta.66":"2021-03-15T09:28:48.704Z"},"maintainers":[{"name":"yarinvak","email":"yarinvak@gmail.com"},{"name":"osher-sade","email":"osher.sade@gmail.com"},{"name":"drvoid","email":"furmanmail@gmail.com"},{"name":"ron-katz","email":"ron.katzzz@gmail.com"},{"name":"enigmatis324","email":"enigmatis324@gmail.com"}],"description":"Create a node js graphql service easily","homepage":"https://github.com/Enigmatis/polaris-core#readme","keywords":[],"repository":{"type":"git","url":"git+https://github.com/Enigmatis/polaris-core.git"},"bugs":{"url":"https://github.com/Enigmatis/polaris-core/issues"},"license":"ISC","readme":"","readmeFilename":""}