{"_id":"apollo-server-cloud-functions","_rev":"293-2fef29a57d6b095ee7c5c5d2fb319fbc","name":"apollo-server-cloud-functions","dist-tags":{"next-v3":"3.0.0-alpha.3","unified":"2.23.1-unified2.3","alphalambda":"3.0.0-lambda.0","html":"3.0.0-html.2","preview":"3.0.0-preview.4","rc":"3.0.0-rc.1","next":"3.2.0","alpha":"3.6.0-alpha.1","v2":"2.26.2","latest":"3.13.0"},"versions":{"2.0.1":{"name":"apollo-server-cloud-functions","version":"2.0.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.0.1","maintainers":[{"name":"mdg","email":"npm@meteor.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"82f5e56aa7fb6f9ccee0b8b23659f041b125a287","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.0.1.tgz","fileCount":19,"integrity":"sha512-KmVjhgCK/Q729uEt6v6szwm+wQxBz2MLKkIKNivAOkyq5Y6OFI+gfZTuIrL4+BO+r2+u1D4cDYEbPQn4w/1YVg==","signatures":[{"sig":"MEUCIQDnvfIG+mXk0CnxVmt+mmcmCF0tOCegbv/Y5aPKFI1vkwIgCF6slKhiTwpa0JUlQWKe4+6QDG1EMODzxNUHSguFbr0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29181,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbezAcCRA9TVsSAnZWagAAKxQP/043fgxzOsXthkLTXSgw\ndmU7zdUcTkRlKbKhuVOK1fWVeQKpj2ZHpWJY7zohMbZrxFsUYnzLXe/M+CyM\nbdHfyqU1YJnRNj0cTYc62OUbtW4F6cneKp7QDxtT6O3Cich4eeq7POutyE0l\niZbzjywGJ8/MSG+hD0w9Y3vcykJOD2mpCnOAoL+qleG1R/tRXw5G+OkqdxlM\n4PYP0suK8rQq5Ma4kTkKSUyfQq+sp1giWtOIsKFBKIRs40oP7ZWNCP+1T9u2\nh/AjLCF2FdGiFmXOuntCrHFpmfMKFy2aqrsK7XE9b8g08hKNbGiaKXpLDfo8\npE9vauPmrkOiOcTTFDr5lVLII0QLrqQUaKdv+TQoN98jsbdFP+qoQ1nSVD3J\n95mBAlxfeH8T4z92GMzEBx/imbDrqfpPYAd8FyeR4kLUY6520xdOlfQL7Rox\noYOGI96bryJw2PGaS3OXfjzTYPAtuAiCpg1upzIf/Xn7R61rDSN3z1lJfPCN\nYrlLSWlYrjZzdFbflruyJ89TDR5rDS2pqDHkR2n9eWImjtd7gdc0I+Oxje1p\nsP/jiS0gEtt0Umi4riJcYDPIJA+d4HZMrsYNCt0JTMtQadOzK1A7z6jGo0+J\nO2y3vxjIslYDJ2KIcYNW9AAvuNAxeQRBCYexNOogsAudgYELiD5vYnsV+xVf\n/8u7\r\n=E2sO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.0.1.tgz","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"2657e9b25bc0d22336ce2b3b06784325830da6df","scripts":{"clean":"rm -rf dist","compile":"tsc","prepublish":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.1.0","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.5.0","dependencies":{"graphql-tools":"^3.0.4","apollo-server-env":"2.0.0","apollo-server-core":"2.0.0","@apollographql/graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/express":"4.16.0","apollo-server-integration-testsuite":"2.0.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.0.1_1534799900197_0.08419120059868201","host":"s3://npm-registry-packages"}},"2.0.2":{"name":"apollo-server-cloud-functions","version":"2.0.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.0.2","maintainers":[{"name":"mdg","email":"npm@meteor.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"88d2f6cb975b4e84e8c18fb71fa91cadfb1f620e","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.0.2.tgz","fileCount":19,"integrity":"sha512-1HoNvIOhG/LNcEwofER+Sm0oUP3aeP+Ztp+tBP8GzswhObmNlS5am0MkevN8DTMxDUWGXe0UuHPT2WnBVdJitw==","signatures":[{"sig":"MEYCIQD4SEilXfDet8LUw/wDSd/dWyv/OutZfmhf/lWvsdEj0wIhAO6n/sBC2mJC9gkS6EnbXj3ggD+t+YXz8kV9y8ZxWWxV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29179,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjTH3CRA9TVsSAnZWagAAKYQP/iFEW1lfKk2cO4iZXVaa\n0exg3R2LErjkCTRAPUgoCYhLa4puihJyPc1j5Ku4Yb18EJsK8Gu4VLNdliow\nKUvRCdNSYq9THybvVJ2cbISH6qx2C+FrKUKbhQq285zsujp+0gUGO6b2nl99\nJLiMAeRXFKJLfUGubWzVyWS5c0bdb2IQ2WuKM3DXT8tTmRMtD2PPKEQwv2zW\nPvNIO5QxCUQZkSpri0X8rdw4UMJOTFFQYnG+RiACvQ2IFNAy0UDiB5LQfWGF\nqFXhTKgi1eTxTiPTCXGmg6GTfpH0w3PeaeP60kNlRMna1Y+ESf/w5h59AtPg\ny3TshFzPjYQLv07OqhPhvWZBWL2svBBwZEQLfXiplt38eA2PtQFe38IJ6dsK\n0JECjo1Kh6SVVNOaN1UNsUnn9JcFe83c3sH0wAs134wc7AGJtFgeyDhNNNc5\nM/lmuXo1fve4pcseUcyHDnwGvOS8VOo9yyezz1QIUWdrf6kukaXBnYbkZnNS\n4g3SiuwWLwGdlA9JA0tuo4zUp8Pavu/rNXwE8KEiXdozvAfHl/MnHyEWYp4a\n8K4ndPGm6vYSGABDxnQnBkGmXXWwp0hsNL1ycL/x/tA9PH5T0vm/GFqKxxCn\nrsp+q76bcW2mDT30/lvwWy6qyPKWFupx8HxfELUZ1GxS04nBk+oT3m3c0+LK\njiDN\r\n=ORpc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.0.2.tgz","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"b80a8f050c8d473ae6804cd3be6430308a66eb43","scripts":{"clean":"rm -rf dist","compile":"tsc","prepublish":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.11.4","dependencies":{"graphql-tools":"^3.0.4","apollo-server-env":"2.0.0","apollo-server-core":"2.0.0","@apollographql/graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.0.5"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.0.2_1535980022398_0.20492131179351736","host":"s3://npm-registry-packages"}},"2.0.3":{"name":"apollo-server-cloud-functions","version":"2.0.3","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.0.3","maintainers":[{"name":"mdg","email":"npm@meteor.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"744e7f2764f82f3358a625d0a5838e4ba55a6c70","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.0.3.tgz","fileCount":19,"integrity":"sha512-Xh9HZJXnfw1+QIN8ozFdpXNbzbxHeCgqqix7BlaMiK0WSXHGY6j9R1y0pvTqn2ZkJ66U39Nwq+ZKFn3s2MeZIg==","signatures":[{"sig":"MEYCIQCGrAWt19N4unKq3bDBhZ1kEyQ4ykhuGaaivr0WmjfTBQIhAKFfAV+IqvQ1odZHimNi/FlWgtuUdJRvX/roOYfgFoO3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29458,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbj/d1CRA9TVsSAnZWagAAeuUQAJZN7xdExsNAZY8DiutM\nlrq7rUMPlDqGjzC5d2XCazZT8mWA9monERo30e1G2Na4U5p1T4vkHLsw/zqT\nGGruHDfCRYqe4A8n+425nRBWUYimjj0mgR/Sg0OD+/dgd+san/UAPSjbKFZx\nFPJakbfS/xU5079XsQ9ohVsrZYMFH9SPrKUXHb1VfCbIAOEUpmYtKrif9gcO\n1TX+tgRXju5ffNJJyLCywKyT0yLzy2lUVPD+n+Gt4SwtMwNipJMADshE3wSV\n3hzpq7UeIZIXjN9G5AwLADPv8BjVDC6Ffk+fRe33tc4ZPA8Ztz74Yn6AP/d6\nmS0Fz2EgYFdbIlJ/w+iNvrmSFG+418GMzFotNsG3V+LkU2gvsH7UfIgrV7aX\nObu5AuyUa1OevRQqWZ2Xg96/FUFaceP7sQqy79tbStNuQkmF5Q0gv53S652u\nYBUIKKjYPEjIwXCdQ5NdnEJxyLCF/kfyQFTAfrt2rOPGqlthbibF5K5fd9Tp\nhQnMo+Tklhcwpi+6E2ftBjqb2tEYiXQfNPvAR2d+4N5TzshxabpUr3LKP4f1\nA1h7MDPCILC6959SDt62mBhcfpawnRDPkQJ6poF8oFem32zoBJy/Ey/3I6Qm\naEpdG13wGLS/7be2tlDZrXfSOQWlUmXUlOMQnsoOG2WvPzCagZN3dit+oCDi\nqGuM\r\n=xm9U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.0.3.tgz","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"996c73063af8aa361ecd6bb78e43b9d0c0df78a2","scripts":{"clean":"rm -rf dist","compile":"tsc","prepublish":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.11.4","dependencies":{"graphql-tools":"^3.0.4","apollo-server-env":"2.0.3","apollo-server-core":"2.0.6","@apollographql/graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.0.6"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.0.3_1536161652544_0.6329401850887726","host":"s3://npm-registry-packages"}},"2.0.4":{"name":"apollo-server-cloud-functions","version":"2.0.4","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.0.4","maintainers":[{"name":"mdg","email":"npm@meteor.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"6dcff5ef9d9626f75fcad271823342318653bd4b","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.0.4.tgz","fileCount":19,"integrity":"sha512-k1XeRIM9CDVumVAsqO2PC/9d7ChXf/1WeP61ORi6fvPfmt36ZpYjWeM4XlWz6TV0QJo07iMlHZIyfpRK5CuTGw==","signatures":[{"sig":"MEUCIQCCzWdgyN7r+VO8vB7xvGSv1Mb/EmS2HzVvpDt7BPqvgQIgTHsxMpWTogN/+UyCLGlJXRks+oStTISeb/xGOqtu97k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29458,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbm/G9CRA9TVsSAnZWagAAPVQP/AhiMsbtj4A47z3nxITK\n54cu2UuvglBZThOTJY67woefXdzEm7VsQ9EgYXo6HLplxZ+6LgQTh3aHAB0l\nGDvshGGZcE7Uc39qLa+Jx7pA2chLgNL5m6OmEHK5T/LNl/eKGLlkrkg3wQIX\nUez7Li+vwzjI2ccw3O4tb2eWY6AJi7GrtYxVQkQe/o+LUUCV2Xc6uSQpLNfv\nWMtjxBNyPeUaT+dUNR6lpzUqoasJdGDqpww0GbpEwW+T46gaeLeVIL0N46uB\nMWhFtxju1mWH5WAlClMrJcTvB9j6+qIdtL9eum7tsZFmU0BpxWtftyzMklCl\ndTAMu59CrnPpKqaLB5IGsAQrm66l67o4p6u4LNm+f9x8dUD6o7YYol64O/IK\n9MeLvEQQUX920eRwS7O6Ba1sdHjq2biOQ9p0wYjg308oCeUaU/0qiYXmCW/F\nEER0+UeGQ1I+GdJXJB59B/yPDPd4X/ZlXxt11i5wTQLTJd7ATvsaFJLljcPq\nuc14uItJucjdKe1wTCZkhVavodT2UoQ79ITtlzREWZhDefTiHQjhh2Rx7ecd\nIbmDhPkfG0AsSXvFggWC728NKOMyObb3bmbtYT3c8InGDK0jZorIT0R/ulZc\nsDxFDCT8Xe5vpSYEQCAAJTyGXqRfkLX8IUzEPK+6PFqWBKEWPltkDTkqXlm8\nqEYi\r\n=ZGVp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.0.4.tgz","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"5adae649e3e9018b061fdf35d8fe646b98d38fdd","scripts":{"clean":"rm -rf dist","compile":"tsc","prepublish":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.2.0","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.9.0","dependencies":{"graphql-tools":"^3.0.4","apollo-server-env":"2.0.3","apollo-server-core":"2.0.7","@apollographql/graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.0.7"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.0.4_1536946620290_0.1333142066500299","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"apollo-server-cloud-functions","version":"2.1.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.1.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"a95283cbcbfc7f1ff448da0f9c11234742f1eaba","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.1.0.tgz","fileCount":19,"integrity":"sha512-pTncCPUjqSERKOTHFfBn/PiiyPbSEsl69qEeKKpvKVlSB8xCIR+sBT844vmwh+r8k7arTnEnxivo/GFlIqKpnw==","signatures":[{"sig":"MEUCIEChrFEjGtzbx20v6nZGlTl8ch9I241SZigrp50Pp6FEAiEAnS12BVl/1KiS7rjEGVcdOycRF3yLpqEy8RAWMI6VCQE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30270,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJboYcxCRA9TVsSAnZWagAAffMQAIOsikLNQshrNK3OVLe2\nQZQGgA8UIUBdpHAmc4fViUsd3as0VrChlArqy6muLsq+6c6MCT6/VbqiD/c5\nvyBCr1bOtH15Vud/T0xGXYcaFmx1t/OWHHAsjMERQmK6m1SwbB4/qGF4Gxnd\n518VYGXZczg44020ibFUa++flc4YnVc0cFQ+LxHdMf711Kx4947iOCeqIPo+\nV0Wtleh1lRkBiLJ+mE2iW8E+uRTOTUnOAZnbxJkb5Bjz5r7hCfluYrXFAUTA\nAVwTMM59oC9IHvYnhJbrpPs8DC+yGT/idHH/6yBMCc3HIl6xTxbFVde2yBox\nkTqjsBkw9EkGk3ykIMEGqZSFX1xmC7JxZRlyQ9dkPfgr2OR0TRGd/+MIZ8f1\nI75YiZVV4m3GG0Z4kMVv3FXAI5j5BQbNSBGUpYLzoGRFVHLnkwXhtXVRP/92\nZVz0vaxRJ5fgPj8Ll3/uC4UZbERyiytGmC1TZC+nV1y6d2f4J5OAfjoHSpUH\n5oeRAe2RnyjjEcqMpyIT5HjY0UnFGP6rexP4wmt2epe0a4b3h5wFvjvhVDgD\nAXLLTuwqY9K7PwZdoJZmd8BuZqtgUAXLcoP3nr5jPxEi6ssYfJTIX8PmUE08\nyoPDPnq0yL5+oASqhorEI1Lo8NnR5IXIU1PzWhxf8e/e9Lfd0FyxGhxjTd+i\nfL1w\r\n=hlps\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.1.0.tgz","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"86dd95e223460f8e1768141a8cefa58bcd409b03","scripts":{"clean":"rm -rf dist","compile":"tsc","prepublish":"npm run clean && npm run compile"},"_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.2.0","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.9.0","dependencies":{"graphql-tools":"^3.0.4","apollo-server-env":"^2.0.3","apollo-server-core":"^2.1.0","@apollographql/graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.1.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.1.0_1537312561296_0.0336568003414035","host":"s3://npm-registry-packages"}},"2.2.0-register.2195":{"name":"apollo-server-cloud-functions","version":"2.2.0-register.2195","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.2.0-register.2195","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"26a771debec0a8a799492cf7f586cec60b78d0f9","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.2.0-register.2195.tgz","fileCount":7,"integrity":"sha512-dCeRqLZKW8XIWPd99WVeQsdnrfDwhegmmkcQXLbu93X++Pet0QT4rEZK/DzsYCX2ILBVA+hPGI+Gb2dIGZMqtA==","signatures":[{"sig":"MEYCIQDsclLpQacyoZekUoND5KCtLBkt7qE9sytujILu5SKL+wIhAOGqFN7x0aIDVIh3BBuu4R6d/10OGB1qndkiloSaJ7gY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15763,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbvAlbCRA9TVsSAnZWagAAhBoP/Ah8LT7zPmLN5IhMtAbv\nrbdFetO0JTNuaifmxagGeyyNgCNfGqsrE/agT7N2cy2hHudY+OMY8Cbgxe1t\nFCwtPaAuJVzUe8VCJTGhQdDNhJ5ApYZZsqyITkOKGTHKvGbvu5Tm/zBvcm03\n/apD580DkSMZ9XSrKLrXOysvKxAtwuzwWguFe/SU/+WaeV7hmlD5mAbqfzNN\nidCy3ZInvIVoi13ucHV3cO/65v8uyGMtTa4CtsA+hWFIt3dxKkcvajiM8Tgf\n26weKWHr72nHCtVUgLtfZEo31yT/EpBX7JRDzAYA8rXbmuyajzGDWZQD9+fD\nZ7D90S3ffm9KmjigqA1sbex3fbbxW8jhgo7XPtwg3TwJlAWwxfC9BipUtzSH\nLELlDVqCsfGNITXDIf4mHedgUWNuxPE+BpF9PKhWG6S9duT+PkwQI3lv1nXq\nNj+QsePxDzWj+QcUDgl/iPDuR32Y6KfLs6CSGxGfOTVvnZEysjP8tib6gWiC\nTSl/knFjXr7WVutv6Yhk1SytMwUkubSNaL0EzPYgHbPZ4G36TVWDIEMVM9LD\nXmIYxAlS0MYz3Dxu/JiNSTsF5bu1C9KwneQE2MOP/Xxu/rSlRZurfRWiPxdR\nS9qDEuWEjFZo47J8M1sdj+CkBBXrlCHjnV5z+eZriylFMVgVS7xM7R8V01ou\nvWfx\r\n=PC2J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.2.0-register.2195.tgz","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-function.svg)](https://badge.fury.io/js/apollo-server-cloud-function) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Coverage Status](https://coveralls.io/repos/github/apollographql/apollo-server/badge.svg?branch=master)](https://coveralls.io/github/apollographql/apollo-server?branch=master) [![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://www.apollographql.com/#slack)\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-function@rc graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-function` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"e44b5bd3c8b602f549ae52c4cb9d9c7e2488a5c1","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.5.0","dependencies":{"graphql-tools":"^3.0.4","apollo-server-env":"2.1.0-register.2195+e44b5bd","apollo-server-core":"2.2.0-register.2195+e44b5bd","@apollographql/graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.2.0-register.2195+e44b5bd"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.2.0-register.2195_1539049818435_0.9066183881463881","host":"s3://npm-registry-packages"}},"2.2.0-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.2.0-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.2.0-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"48b3d77613881627ea950a19f522e65777b110c1","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.2.0-alpha.0.tgz","fileCount":7,"integrity":"sha512-VFgi0KcO4oM5gLImr/I9zgR7BVf+U05DW+S0wPQjelmxBWYH3NuGFSnRKHJL7nSuRfdVP6CZcmoz8MdAAFINtg==","signatures":[{"sig":"MEUCIAXbE4SH3Vti4IFCZ9xr7fSInHI08oNVEOjegpl2TRUmAiEAvsshDmhjf4VKrGm5Bg9jXBNXxUi70TEf+VztVnXNzUs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15707,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbvlOoCRA9TVsSAnZWagAAU1wQAJYz60UIunQJeYmj1ACd\n9igMkjd1/ePXJuvhBNSEdjaBGXycACDyQVpuqBISlKeFsuEv7gqkH1CdtASu\ngw1Iye8jYx/wkMT2O+NXq9LKGWmeH3v2OeAo9hD66nmsbwxVXt17wRfxU/i2\nn0WX+skisCWnP0UUuyMOjQkcX8yZdCXbGm+Slqos67eliRhtmEMMICDBpJnP\ngE80zQl4J+QDHKPZqdCrUMIo9QvbGIPsDwNyKel4FucJ2JH9xxqnFZc4Zr1R\n15YsVaewxbu62lA7JTbhr3P/9EqvI62EjH1E1B+KI/rA0HzWyqbWfCLJctVB\nKbUbwKyb4hx1p1/48SsJ3Hknii2btWALbNY7wrzSwDuHi6Ktn5rdcRI3cRjV\n+2IuR+GR67Xib89j7wa/CZH2EPQ//yZsM9695uNKEqxY3006AeHQ8GqRTy/3\nUqeACIpzLhSkba9n7knV4z/VOgtYVYUuvhBbhgsWcn6RQ1oMgqciZmzJdAss\n4OlA0SIwxMyvCuougGmicRaTfLLjHpkm/PEZDXWsHQdFrn+sLNflGIdc1chR\nqU3Z9ZvneDSek3qWVS7bVT0R90e8MahLWRvimUx2RhMYaXKgNngIHVBnmzmO\naFkmRBDvm12xoR+b7KxEidY/wAYuMd9puRf0TbXcpQm7UE9fh8hCn+eSYVkQ\nj2vL\r\n=60k/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.2.0-alpha.0.tgz","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-function.svg)](https://badge.fury.io/js/apollo-server-cloud-function) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Coverage Status](https://coveralls.io/repos/github/apollographql/apollo-server/badge.svg?branch=master)](https://coveralls.io/github/apollographql/apollo-server?branch=master) [![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://www.apollographql.com/#slack)\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-function@rc graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-function` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"dec2b94a0e309c1c75b3e9f3d7b4011e36a7e48a","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.12.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.1.0-alpha.0","apollo-server-core":"2.2.0-alpha.0","@apollographql/graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.2.0-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.2.0-alpha.0_1539199911510_0.39870941405544347","host":"s3://npm-registry-packages"}},"2.2.0-alpha.1":{"name":"apollo-server-cloud-functions","version":"2.2.0-alpha.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.2.0-alpha.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"b738903af7ab5888394295c10943e882763ba19e","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.2.0-alpha.1.tgz","fileCount":8,"integrity":"sha512-b98UmlO+ywKLFaQgahx7doGAdXnNGxb/bRhkUAnAZcPR1iQXZltkzJCaHpyf0I2Uwp6QHBePj4OObdP1oJN0xQ==","signatures":[{"sig":"MEUCIQCRYESu60OOrxiWbFGekYQyGdC18PHVg5GBnaod+HdHnQIgXugMO04G4ptVzPuEaCqe9GCUYrvGQgDCH7pds4baLUQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb01z/CRA9TVsSAnZWagAAM3gP/3lod7DBtFpHQa4jFIMa\nE52IHptpybJVEMYVCkkj5F7zZnE08pY3SbgSbZ8kN3Ir3ARniCr9+GwJrhEs\nxnPIdKzk1Q8jehFepSP8PvPo1OH0KcpR+TI1/iZ6Cu6I58Qi0ULwyud+o02d\ngO7tXuHugIyBATJB9yj0FJCUT6s2r2xZKhfXE0dBho7THwyao0YdPLecF+Rg\nEvFr/+h0CnLUn6aA/dMg6bW871gDs/b/+LrpnimrfADGCR8+Hlfn3GlurqPh\nRcu9zcDLSaOhgBHSeHd57KR4z4RNt8gMq4HUL6MY4/RVzmE9eazICFOGQgoa\nKEjdayxc2kZOG2yFLkUbdhuuWILSx3aCRtjjxXN2nAwT9n/8OcuYF41D4fzk\nsrwf0jn+ilSVGQzSiBWB+SVElm8lOUVZ139w2L32A2eIhmK/uqvB9+uwTdVF\nZLxL1QAqte32gLDFyLJ59b1chVXI0lK65TDh5Okn3Z0iQJD+9Xn3qdeaRzqY\nlQhOYO2q0nPdHnWFhMVX9wXCB4F/AmRHhXJapfljb4Djd+662oOXprTvqFNZ\nG6FRTdRJ1fYzbLNroIICEZe5XRamZt+gKvZ0k3zYr9YGztBuVjVHhKZB0rbm\ndpTB0jcMU9Di9cDS3E0K/s4xCnlCaTW+DXX0mTrcwnJHf5T0PjgS5CMy2SCN\nW+V6\r\n=s3E7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.2.0-alpha.1.tgz","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-function.svg)](https://badge.fury.io/js/apollo-server-cloud-function) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Coverage Status](https://coveralls.io/repos/github/apollographql/apollo-server/badge.svg?branch=master)](https://coveralls.io/github/apollographql/apollo-server?branch=master) [![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://www.apollographql.com/#slack)\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-function@rc graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-function` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"5b8388323325c14970601310d7864b86010cbebe","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.12.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.1.0-alpha.1","apollo-server-core":"2.2.0-alpha.1","@apollographql/graphql-playground-html":"^1.6.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.2.0-alpha.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.2.0-alpha.1_1540578558711_0.45479851298888385","host":"s3://npm-registry-packages"}},"2.2.0-alpha.2":{"name":"apollo-server-cloud-functions","version":"2.2.0-alpha.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.2.0-alpha.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"4806e2cbcaee4d2c5efdecb251993dfcbf4dc72f","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.2.0-alpha.2.tgz","fileCount":8,"integrity":"sha512-p/7kH+PX+7zloFoVgk0gZhAwDftz74no7ti8nWOvU6NtXM02bZvp/mv0WNw2p6hgw+XhVazafDGvCy28O5MtlQ==","signatures":[{"sig":"MEUCIQDUqQyw+YAg30xQfZVBpEv7bzc2rGBMpz2xUIzGE4twBQIgVKQ5LaalQqRieY2i8YxYpJRUXhAQ7bbl2OlTk6cbYDU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4J4kCRA9TVsSAnZWagAAm+sP/3oA6b+jtjroSjKP9cpR\n5N5l42+1L60D/nJ53lX63A1cHgdSGbokjLwTaJ8ZCGgkyMDH/3AQykalb7ZS\nwIgzlqWNEgjeMz0AF/kKVdWXDJWGBiUzDD0CWXtHzQXPa3trI90FD8h6feQl\nwewIIbOw3wSdTfVrVaT2TwKyJ0C3PkmRCk5bnvHoGsMfkZsMBAnYsA+AzdpY\nnpJkJdjC51QTMYwzxAW0urYHx/p3xdrvGWJJQya5Uc4k1ZgezxaWa8TJHojX\nAoVamxuJ1sOTumi5c6cHXsYkqkIMZZKnP9C4qcGBkaw5bZp/01g9YupzwitV\nC28FHkXqEfBBcBvbiLwfmCIu/a8AQH3rK0ViQffn7IpxMpelNVMNcwJ+krcy\n8CtoDVX3NwYslj+eQwLZhSPmureH5PCrlvPfC+53OBMi9HvBmLWX+rZnit5M\n+aGF6TwuxbR+6POOJTna4hVRm66+31HSdmKEGK+dmfCeQxB9QmdI9DU9ZydK\n00QWl4w4/IHZhETWwXduaarHox3ZGWdVmhN2eNyKPylir7AZX6xAU7V9psSa\nXrRId/sZRKAyN3CdQ7htOwLiUt+NwKmsyMbd8sOGW0hE92c802GVrneJwyR3\nrvXIOWEH6sXq18UzgZ848/2QaoKg6c8dOrwURsNOlYWG+Q6CwE9tpDsrVFmq\ni6MD\r\n=FeWa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.2.0-alpha.2.tgz","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-function.svg)](https://badge.fury.io/js/apollo-server-cloud-function) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Coverage Status](https://coveralls.io/repos/github/apollographql/apollo-server/badge.svg?branch=master)](https://coveralls.io/github/apollographql/apollo-server?branch=master) [![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://www.apollographql.com/#slack)\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-function@rc graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-function` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"a6872c2f6ca2db03e9f237510b3fc6802d390785","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.12.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.1.0-alpha.1","apollo-server-core":"2.2.0-alpha.2","@apollographql/graphql-playground-html":"^1.6.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.2.0-alpha.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.2.0-alpha.2_1541447203387_0.493953612075162","host":"s3://npm-registry-packages"}},"2.2.0-alpha.3":{"name":"apollo-server-cloud-functions","version":"2.2.0-alpha.3","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.2.0-alpha.3","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"f08c14c4461ec0a7fabe9691b954d332dd6709b0","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.2.0-alpha.3.tgz","fileCount":8,"integrity":"sha512-Rce2LWFVUMxsow8kP9MGU+GUgxcqa1ZzOZvvCIBfb4x4ZDcSqQ8pQZPQYBftweNT4/uAd1Lg37ICevPC1BTytQ==","signatures":[{"sig":"MEQCIHHCrneeWW1wkEVoBHOTgLjOi3MGnJ/qrIeTRTnoJe4NAiAOe5hplMFZVqVTcw1P51qugVOfIb0i4fntnp2WIXSeDQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4Si2CRA9TVsSAnZWagAAnewP/0yctetiIktwG/aMn96B\nOcShm8sJIg6iAyYrGLinHdaiSItwmN/WYllxLa9utWc1MX3lU2iIZ9L3bO1X\nzkBZ2KYuT/KZZxQ7d/sX0FwPWA7sLd4NK+MxZUb4FDyY97NTrKCtiAzhMz92\n/VDM4Xe6pqTZcJi1KA+dNxsiIMh7ufB2hByVK4v6zwTrVWHeQ3WScCEhv4SZ\natbcRRNKBxrMf7XZma05PhRnQYuD4Gue4g8phOeO4FmuYFyxAmajnf05+u9y\nFfzD3+9j+nOaGKTerAbPWOedxGrSbKthjP3zXlD82pHEbe7BxYdqWvBTih8s\nihHvyeI+5F44mHphUFxPoa6RUupgxs/qgMjGx9dHWxpvr8xvpc5evpwTs6MQ\n21AUPpKmPj/sFTujTtJkkPjUhA+gGgVynp/QbyvsVIxloXJ48UJtdlhtRic4\nAaqFJCYVZvscRDzMSxlY5Kb+Ying3lvWrNoTF8VkcM9z1EoHsoGuhU1lsMil\nvbwFQHAOjhvkt4cTHj98e5R2gpr+FNAeNj/9yGpSOZTp8pMq2VI6Z5WCsbVU\nD+XqFXpX4Hm1Jy3/FnEqNGw9JFc6Ybs9/JCDJaH9UXhvMPN5zrjgogSjy1kx\nCZBZWCyI0qyKs2Bk9H9dZm324PmspiZbeei4Tfb9Ra0aPQVof10rmg5VGp2W\naHLU\r\n=ux25\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.2.0-alpha.3.tgz","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-function.svg)](https://badge.fury.io/js/apollo-server-cloud-function) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Coverage Status](https://coveralls.io/repos/github/apollographql/apollo-server/badge.svg?branch=master)](https://coveralls.io/github/apollographql/apollo-server?branch=master) [![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://www.apollographql.com/#slack)\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-function@rc graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-function` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"5ca4c07bd5d07e7e753204726983dd7064d18967","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.12.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.1.0-alpha.1","apollo-server-core":"2.2.0-alpha.3","@apollographql/graphql-playground-html":"^1.6.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.2.0-alpha.3"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.2.0-alpha.3_1541482678036_0.4693744602497294","host":"s3://npm-registry-packages"}},"2.2.0-alpha.4":{"name":"apollo-server-cloud-functions","version":"2.2.0-alpha.4","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.2.0-alpha.4","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"583b4724f51f712a9ad5a48ee7ab18ee369084c5","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.2.0-alpha.4.tgz","fileCount":8,"integrity":"sha512-r8fAqOO7igjA+F75zhQLrzFMuShd0LOFx4bflJGeOd19Mm9GhqgW4E9yNVbrHSjuGQ4TLmnLrzUFLpYNanZsIg==","signatures":[{"sig":"MEUCIGbpsq0595fNJoj0hi0ICwZ5jL9UC+pxRAUT5NEK4VM/AiEAr57Ckey2E7VvA+EVz9+1L1sw6nfS7LEP8ZPDJqAu6Dg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4eynCRA9TVsSAnZWagAA5osP/13H7BNFHhLHe2vR50f5\nYxNt840TTDGMX7r59g8OhbTo6Df3D/twkYOnt8Wm5msrUqX0BLn4ljGcIh1j\nrpKsy5W4hqMxQi63EZuljfTnlpuVQOe2xTrLQk8/jzDmAQ4qUpkFei7C3LK4\nUAuPtn/2x9lVcATBCkI3DWMpcBkNAQykfg7s7AapVL8gD7PrpFFRJ8dlJV5U\noLBKUzRWdeqe1nDGZPO+FPoejap4/ojPUCPCx15jjfFI/jexiG9S0DPZWuAl\nM72e68y3NCqrhMVPPQ6eV0l9D1vVQ7IhYb0Xy+eQ6Is4O/x/LzzoOuUadinG\nLdBiUAyjuGwUlFQr+L9YQNUvHn2T9k06tpWJA/zfHyYFxn9YKKKCaldMLhNq\nzArNLbvA7m4Jnc0M8kb5ZJBG6k5sUD1aJQEusxoAXzNiP65tX/bRWZleYi9q\n78xIypRd6p2ZvOtZi/JnIT/jP5CT1811OICOFgwitz2+4icvr7ybnv6Jc+QZ\n3MOJvgftq4CfARC3t4m+1tEgTIHxZ288O9QtIfbLrC3f4n3ETfTr1ATTu6Yx\nUuT/vXhxYGxTjXi0d8XumQem2nrZ7Wu5sHUPFEraYkOicNANVpvgCi2567Gg\nv4xCYRTKrmt2p7n2dNXnsWeROoHkGIepISz99fk0dfrlnAwy6L97WdYXdPvA\nw09P\r\n=QBX2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.2.0-alpha.4.tgz","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-function.svg)](https://badge.fury.io/js/apollo-server-cloud-function) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Coverage Status](https://coveralls.io/repos/github/apollographql/apollo-server/badge.svg?branch=master)](https://coveralls.io/github/apollographql/apollo-server?branch=master) [![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://www.apollographql.com/#slack)\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-function@rc graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-function` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-function');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"79fe6bf0bf0187c2a754bbb9d165c612bf0912b4","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.12.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.1.0-alpha.1","apollo-server-core":"2.2.0-alpha.4","@apollographql/graphql-playground-html":"^1.6.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.2.0-alpha.4"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.2.0-alpha.4_1541532839153_0.2976772807135242","host":"s3://npm-registry-packages"}},"2.2.0":{"name":"apollo-server-cloud-functions","version":"2.2.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.2.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"0811068b059213da7f02709a52ee5b2dadf64879","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.2.0.tgz","fileCount":8,"integrity":"sha512-U0YqgWV6XsueUKxTWiuGx68Tc96ey5jb5TEVDA2Cpo3ji4PxCldUfT1o4P6nFYtgLsoxPxrKFQ7gpN3o64kYDQ==","signatures":[{"sig":"MEQCIEGYuxjDSFmgelQQWeut+Ka8yTy5k7tcl+SmiNmyaAjLAiBQm7q9LVvAfo3miviChY7LUke6XSOsmmqONel6EgSbWQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16878,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4xBECRA9TVsSAnZWagAAVtcP/0xtJ0VgkfSusZjoMczG\noxo5CN2delkErHe5LC9naE1OpuUpESmwEgMCYjHdJ3H3fNz7gwI6qne8nMbt\npjsEIcuPTcuzZCRGCgSRizOCMZm4glgrNg7XdvhCctIKZhOK+ok5RcUMGjjE\n7YTIYqWt4hUjE/uJCcHmXYU/oDy8NOTvF+2aTY5RLIrwlIyXJWB6MS0m6w6O\nKsPSoWl2sMnFGkf76xzD+6pW8WCjc4zJlNf/rULVs/grPOO2PdSaC/uZyPbK\nMreBtc1WjzmGcujSBJVon7W2ZM7puq0R9Kx3Cz/6f88H1gMjkIOCk2M78S0N\nwrftDFuoy9QHjxYR2SDgmjTezb/APcM+8j5g40nc1N6uN/THMiyGcgEAafWN\npgqNnG2xQ+MzsUeP6/eNHLwQ4LYEVHz+EKHIyQYo2nvd0hXFYG+XbUbY/p5B\nioCp+IGR0SssovtdS4fFfJY+uqVNAgTwHeGfa3uepKuZ4PZgQaOf/1wul7dV\naTcmXoKRofeVloB7tMGsdqxuC8sCmoA16FrjwVzwPoTHNC2t/zeSG0PDg7dj\nSVuK9+r5gvLVI2c2VvzFZBIs+BvbyS7lDKJ/UzrXVEFh8MKb33JXWGWXKL3c\nIOxkLOiT0PLqVmvUknUi0MnMuVd6z7YsFZB9e6yTPgLwGIarfJrLyoHh25QM\nVt+H\r\n=zLG9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.2.0.tgz","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"6bd73b175ff628a5e9858e2a5da1aa9dab5ed348","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.12.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.2.0","@apollographql/graphql-playground-html":"^1.6.4"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.2.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.2.0_1541607491993_0.7570829100532641","host":"s3://npm-registry-packages"}},"2.2.1":{"name":"apollo-server-cloud-functions","version":"2.2.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.2.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"059ce6f11bd9580f373003f1262a9ecfd0ad0c2e","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.2.1.tgz","fileCount":20,"integrity":"sha512-VK4xMir7rCsuXSuCHL7jo4vJQK374DbVeLIZ1M2/d62ZbwACVeNO5667XgWxz+LZRsccv1Dh+3R6SosBYv3fyg==","signatures":[{"sig":"MEUCIH4T/kYzASPIzFCuXriKBvF1hc5BCToMhD6pshY7HERjAiEAvbUOT/6Oo2BWNS7vlp3CbL8B5pwLyofJMRFPbXuyRQg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb6X+gCRA9TVsSAnZWagAABGkP/2RoKvA1e/g7a3PKC+W4\nuB96wiBNKDsp0gQqIgxtHwBCeKdZrrin58ywILC3kstCtG2Tv9V4cTLz8xx/\n0+Y8uSnyuA6ZtNPv4qsZNOc2yFtdk08W7ve9qvMjBf+fTWSQtAmqjDGyefu6\n+U1zNj9bE2yd4iNyNzT32WNgVsNJkLKJQkEW+mU2hq6S6OHwKY1QWkK2aUF/\n6U23u23kD1xTSB+iVDKjPco+KdcD6RL2c5wWT4U9Xc2V0OVdb3s89w1ljw7N\nPGL7LufpySI01bvwtI5TZvjnfA5LAXZ59kWBgHUSztWz1b4B64l7I1H3ykFP\n4ZtNA9Skbc7UhmqVeNSbJ7ZOJOrkY1Ck1B2rrfB5vffImxpaViGd1OTQqYg2\nsfHkk+MdUExJ273oZK9gYLhcjzQAkfRb51Zd7ZJeyPK4/MXzKNPb12Rm/YuC\nf522uO9AlBkjOow5r+L0PziQWakwtHNJzkIgc45RcOThj89ZoqSgM8CH5zER\nLGIBYb6leGkLyKSB6iVrrHElzPg4/AOQ9sR1WyP4sA97k2Y2X35ZRPxpJzRc\nsZFzBdBcG83idKjxZpknzEDrlAWAnSW55S5OlcxX4dN2anPTAs+TRp90K3kP\nBVp25mWefkQDAByE9JBeKR5ZkR6ddIValDG+rCL926mUvJ4w87UF/4wRjMwv\nZVMZ\r\n=Ju+z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.2.1.tgz","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"20eb2e9e0353b58c0e445cc8e9b56f3a93d64db2","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.12.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.2.1","@apollographql/graphql-playground-html":"^1.6.4"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.2.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.2.1_1542029215847_0.29728061084976276","host":"s3://npm-registry-packages"}},"2.2.2":{"name":"apollo-server-cloud-functions","version":"2.2.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.2.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"cad53679c1b6594b9dd1f62adfa2b6e1cac51ab1","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.2.2.tgz","fileCount":20,"integrity":"sha512-7vUOJ6ddKA+sP0DElhTe67xPUUkwhRkyWB/07VJacKydFcQ8nwHNrqWp7fqUzVIPiZH0QeX66xkBlypWEmSqnA==","signatures":[{"sig":"MEUCIDA5+pgKzvKB7vEZez+QxtSqCEwrsxB3HSbbFhbMfcNeAiEAmAmlEgehJqMM92+Y82qsHU83847H8yt9UMQOoScKwsQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb6ti/CRA9TVsSAnZWagAASwwP/iKFfBV4UqPhFSuF7bdz\nVqf16NIRYYk+S1UhQojTuvTBOJU44rYETxShqJvR66QOrguyy/VvvlqA3EVO\nFzLBfzj09HD7v3pqwYt2f6shKearr16glyM8M+ElPU/QM2zw/chGsd4stY9C\nAf+Nl4oKLO7ziTgPPIacgHRHQHZllXBYw2sdY/de2cnPqliUWvHVbgV1Erq0\nJSp6tOc4xBPXZkCN0Tp0mS3rv+w7rbFMq0Exk0OS8P0qhVHY/BVgBjqvwUKU\ntgt1eTwX19DE/SK15hIHSi+R8cZa+uYzhO9jH205JK+BXETHZOsy3geYAJNa\nAJVQ2Y7IcsOWfjAaPcu3kM0Bg5GQnOBYWbA/NEGSA5uc6ezH6/graTE9CX6J\nssBt240HkSM3wxBtGuac2se49zXuSrxafD8ANwvjpS9NXYNKkBdt03lBcc9h\nc8Ab5G/oteLJqJ19gO+OWXlLmzWkiGiQEDY1L0AEPoXcl4NGwkdN+hu+KjUj\n7Dw2Fs9e6bvI9R38KkoLGFeRDRVwTtlvh0b/HjrpHZZx8KgZfMuQkFJk2yBI\nbCWrSXSpxqB/HDaUZaZb0sR4Dt+J07yrlZSEIEacJBCfVVekqOjMUX6qJhvz\nMfLiAemTdfIBIgYDFZIXeuhcmWSyfBLK3MPnXTPFrsRrJGOci2Liq48Arrmn\ny7l4\r\n=pGj0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.2.2.tgz","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"47676e0cd965515554e171ea7d2a99573125ae58","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.12.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.2.2","@apollographql/graphql-playground-html":"^1.6.4"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.2.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.2.2_1542117566300_0.4916063324102693","host":"s3://npm-registry-packages"}},"2.2.3":{"name":"apollo-server-cloud-functions","version":"2.2.3","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.2.3","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"1bfd590cebfe48ae863e4a0bae5ae2a0f07e54a8","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.2.3.tgz","fileCount":20,"integrity":"sha512-U95JVgG5fz85xm1MSydNkrIs+oiQC9u3yTg97I+53jpA7ua0T3UiJmfqkn4HpGbUY2a3y2L9vx/oomGxCFd+nw==","signatures":[{"sig":"MEUCIQD9oHaVccqEixqel6dsO+PAEiWlzEz3JSweuJxtz3t+9gIgDyMHxe7eMo0G2+7YCrKuBsiU82lvysVoyVpoVzHI7CM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/EJ1CRA9TVsSAnZWagAAxJIP+gMBpo7GbgtR+duix4QE\nxc/PIX+QMbdtQHHDqclhixdXjcZROlGcbOrMg+rlHOtC5o9d2+C+zyhj3oKy\ng2WpKDO64qPIGkAfyHR0URW+0qjsPhmfHMN9uk1rdiBVIJiRNJ92+qTXCAL6\n9XPHuu2YsWpFCydepnPpRb6kPpggzhuXdIoi9jvdTtpWjqTGn82nWJzZB+iY\nPM++Rj4RMo6KGT0gxwi3kVsiysXQbHUjMTN9t0o+IgoXNLSCKVzf8eyFrrZl\npJmgbO/cFcaH1ZYY9oPar2OT+HyBmE16m5jaPgu4VeA05b4v5caxkrX5RFzZ\nHJwtO0Fs6tINHc5L/YgJJC3FWj29x24EpkqoabzuR7dV0x8Jf4zYAdWVcpzi\nIqwPhFwQGNnphmVyzOsVY6nYf+kuz7o7Ux5wlTB1PkG7ggnizNBfG+Rt5pCB\n6E3SvP2XDlKZMgEfj+FBTQcyyI4/jh0pukXy1sPtieJ2mvTLTkYsytrGfVKI\nYlbZK7XG5eKrNUmDUKUSwUXsbIM8o88oeCkUZgeAktikviCkkVMoVmU/Assd\nN5J6ZcXYuAh5wX1mfsfiAWPlbXSJDwCDnAjHhp7OZd61LpFAprFnrJW2hQiC\nM+uqXiOQTHqII0wfvuZ6BzTeJLA2mOAPNqWeK19+CrbjUrpJjlyvAT0nGkaz\nPx3F\r\n=jw/U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.2.3.tgz","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"1f3801c94967941f539e4bf925c92134b56478e7","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.12.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.2.3","@apollographql/graphql-playground-html":"^1.6.4"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.2.3"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.2.3_1543258740345_0.9681786631505489","host":"s3://npm-registry-packages"}},"2.2.4":{"name":"apollo-server-cloud-functions","version":"2.2.4","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.2.4","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"d07d0eb8f002c090e279087601a22e1fdb16753d","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.2.4.tgz","fileCount":20,"integrity":"sha512-3rBDjbXhtHJGFvw1ZB6j4HX7cTSCq2yWX5chvfNpmWTkoegJ3+7dkls/FaDkco4YTx33qLcNnaIYi+qafg0Fbw==","signatures":[{"sig":"MEQCIC+ySMSpDg0wBnonEYqrkvg49SOsagUb9ep0Ori8YI13AiAT1X/afelIYqtbjocZt5fZG9A6UjZ24rels1pi1d2dxw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/p1xCRA9TVsSAnZWagAAq5IP/jIRhvYu+JgaPC/dmGSJ\n9e9ENK1HZAmy0t0e+3ovD/t0ZdbylwwnDSaxroA5sppdNiQkvddJkWBQDf+1\nBKtmkWdSrfsc6N6PmFvxtnBVMGzX6SWIBf87rlZ6NIC1eYoSqibF02bmJgd2\nlU+PqbLmeNZbG9KLsY8z6xk3q8d7oB6rF5f4eMaA2uw4A+0uRQDB7jZNytBI\nkQFU+G88+O7opFJ43LXrRgEbSYtMqBCSVlNp28o+XqvviyIZCI7fxc2gT1Sk\nK4V5jzcIcu40vjkpbHa3wMJZpvk2zVnj2KUxFb+kpa882oERTUBcIlvDfi+w\niLYsrcoecqt/gRXlV1R2tIb2QQ+Y7jRc/+Fdl/40NQbPByFYPwGCbGQf/p4i\nOaL4AphWoSZvuq9+72x+yALLbuwb+p+0cbq+YsftWZOQ8U15xp1lkDoo5hHQ\nbTB8UYEFTr4FTExQlrT36PyFGCPoN0hRqCcC0jz34YbX/DoI77H25TUL0f7I\n3CiH5k9+mVlIz5SGXhmNnPeZcxYP23EAWMa7xtVPUzmx6wAz4iNOzAB2PDJU\n849z2OgCspqvhZC0sN333L3MLhaAxN/6cd2oFdNhb+uOF1uhK716fwBGSIOO\nBnR/29Sh4quCOoTh+8CqedDMAO3eYPAzOMVD6KilylHzmn0AbYoZGP/Ng1rl\ncUpZ\r\n=ThDR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.2.4.tgz","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"ee44bdb71642f3b07b6816a51b3256074209f354","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.12.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.2.4","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.2.4"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.2.4_1543413103776_0.4545997059714755","host":"s3://npm-registry-packages"}},"2.2.5":{"name":"apollo-server-cloud-functions","version":"2.2.5","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.2.5","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"ce2e861ded64ccb09975357b756d7c7d4130a74a","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.2.5.tgz","fileCount":20,"integrity":"sha512-N73RHBAGupC4O3upcSzFcgh/rx+kBULXIGHd1QrUlM7k/5PC3w7FeSbMNtGTY9WNv0VX346sDGG53Ebk8wtxjA==","signatures":[{"sig":"MEUCIQDnsGe7a3G++UYnplrDb3SKBqbVkZI0cvNTg12w6zgSkwIgeaEDh4aDlbDYBsoUoz9EeA5v5d6pyaqvLjzMuUYxVR8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/9F4CRA9TVsSAnZWagAAsYMP/1xcv/zt0VW3Cv+EkA35\nuWuPv4mTFKR7cEJnW33EdudCnVdkmFNlNA3JhV00wNS51BgODKz93gp9Ujr+\nUvdcnsU6U22O7mYMOeGZB2PMIRdvLtn3bwyzPTDvxYKEEZgropQHk4NfHAaJ\n2+ZlJQilPUp0JMKFJJEX1HGZYyrWNy882iNcdD0FNlYAGNEs+kuwT4hR7r/T\nhx4ecJ60fCwVPBAC99cZv/HGDy/wxk5Sj4pAUDtjUlTcQScdyjY9CDfupl1h\n8s0susADdnwr+oCUZdWVUk+hUqRlGJhgkRjB027RktV7opAJ9T5Zu3hR96ky\nA+Lw0RwY3t9AN+bMK346h4rjToOI1FM3nIuVM7lmmU9nCdU9G7S31UYIpxQ4\nGyPwTj9WyUXBpFHEg/seGdz4o7ZdK7dky5ZO/6b4taTwzOPY5ZTqz20xhs2t\nZIPYbMwKgsPoQ0HsEH8N24+3+5P6N/6PnmQcifiTxpwkhswBTb5hCdqr7QBq\n3KL1csC2fku3N5OhMmOxYl1iSdJhlTZyLb0QIzcchcuOnWfH+2yEwhezN3Co\nSAIBzILkk5m48Yxnt8Lyx+sdCJFQJ++5DCgh+41YXTcTGg81vZvTEJTjuFXW\n6eM3VzwFBn1nDJ3M6vXT5B/3MKEhMx75AqL/m8PjwKR/bSdD8u03XPJ9WO1d\ner0p\r\n=8izy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.2.5.tgz","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"85e9094f6ce531aa25a42dad93c98ab37ef6e9f8","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.12.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.2.5","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.2.5"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.2.5_1543491959974_0.4976959830277998","host":"s3://npm-registry-packages"}},"2.2.6":{"name":"apollo-server-cloud-functions","version":"2.2.6","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.2.6","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"7d0fc76291167e3b3a06e6b0ee7ac99e148099a3","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.2.6.tgz","fileCount":20,"integrity":"sha512-zQu947b7jAT9n5q2jFnZ4Q3fUfl/fESD2Gw36e2F4X0+vw5WigxRPNPJK6Y4+f4MSph946yAh9Owj2UkAMLABg==","signatures":[{"sig":"MEQCIBKBZPjtfOi/2t46METtx2yttpUrzFjI2Zbz21c+LibXAiBLDtHylom1q+Gnsuc0uwRrjdtCM5npE1jBtrwKSc8UQQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcBmaQCRA9TVsSAnZWagAAdEwP/id24p1wBvBW44oxNoVY\nZzuLdrPmCmqpTY4BSO5iQiyuHG9U1E6J0r77dDpG/ko3SM3pTlqMXcO64B2w\nah2xxI9AJz/PjKfhCYlLikgtubyjKNg1tdcEApSMXyROAmUXRd2S42gpu8VD\nmwmL00Apz+POUUGsNrBv4dJgC8ygDcRf2cR9lvAFTzmvHCIB9Vyn/mDAh0jJ\nyQVgGiMelNUjH1D8q/g+qz0lJBWCu0TbOCR0h32tdDM5P9BdVVc8UE+uXtgW\n0VZB6M6nZenON+YOGAVP9NEPw5ViXffqudY/czc4FCbZ5N+xOoL8YqOhOoTG\nU/ltdqTwibN9I2+nbteCNXTZCqFKt0EPSbeVqg/5tFRVKOq7ElX5gfvcoL5L\ndMJKRjq5yZVghy5BFWbWqyOw6i+2RghNU26Tup7zj06b1NLpJv5cxmNtqQ5d\nXGpjqk7ITqbIz6xlC/xtHqb/b9OxJ8e7pX1lb+G+6iHranCGqvrgRn4mYcxc\nK+Syl034B7TKlXDI7VDcGGLT3XXpe39wnElPiDdq58JWU9S4GbkqhnRSOVWb\nslLF2goAihAskt5eY8EvwxYO60oJpo6rHiOnrIxsoG0KjZ9is9gs+k2u3rUw\nI9LfePIkVNWCAxVHRBS+MkcHBbTsyUOR1XA6PTmTa+ZU1BZjZUrJbVkPKVPq\nxk57\r\n=k3A1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.2.6.tgz","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"1e5cdc63975132004390a2138fd01e85b6f8ae32","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.12.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.2.6","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.2.6"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.2.6_1543923343771_0.25281373113672223","host":"s3://npm-registry-packages"}},"2.2.7-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.2.7-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.2.7-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"b17fdc278cc37c8d7188de569eda8fcb464d124a","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.2.7-alpha.0.tgz","fileCount":20,"integrity":"sha512-P8b+Yd333D7GUI0uivCBDAkDfC+8WDjSo4cvy3VAPtguN+VKy9jUZrTxR1TUZt08oTE3l8ZLZhTttQisr8bG/Q==","signatures":[{"sig":"MEUCIEpBP7zvAxn2uP87KMeZe1nD0PLGWUpWcs4yN1VWJSZuAiEAtxpeg+0uWPu9oEep4tm9L1rKlalpkeASQVhn+totRtI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32689,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcBminCRA9TVsSAnZWagAARZ4P+wQLocdRbqDe85AvcxjH\nSff/lx433mGr6Veq8fTu4pT5NZ30vFsAAqCSyb7mOdCmoJKDXpTzluBRdhlG\nPbETVmJoCAWXRZgJgGHdzi3SOMUVAkNra/0IvD2s1qFgzP8IYnW9Nt7aCG+f\n9EH5D5TvGRr0LfvBF7AXq/VAXv18YXkmtfT6e7nTH4FxPDWSFP2GCN9CAYks\n7/RsAr5C8GWYtlRe78x5Z21d8fTPV+q4mN/jF8o5E4BHX7VGqFs3mppvg3sZ\nEcdXbEc7uYXGyu0oKK3WIhMuXkFNxSz+mugTcbiAttPcZ7mi4suCKkKS16r6\no+7y1WNJ7p9LfL/sf81O/bgzFcJJ59s5Nu9ySNWeHWd2+J5TOymmcZTSaSV+\nnZij7Gff+zBryuHqY/cCUEzQSiC0EY7DCBBHxfvz/9zMQhcviOfXdmxV8cEG\nWSqAaPRasts+zBUf/336h8Q9k52KZ/xkBgDHpSfFYOZZ4m5IfP5tc1EOa8Ej\nHr+2tuWkOo64XVDQWa1mrNbPHLIxMzG47iRSJ1pT4xAH6Ee0JGO0FZT5q6Vq\nvplq0rx8ijzgabfQVO3ykcIQZc4yJ+0ml9OITwEDehMaJW3mdC60cVBZgaja\nFS1XxduDcKpo+fy2zYC4eoQgW5g5MA7eJxvl8ZpYhzVhE4ZTLr9rs8OodQqy\n7QrJ\r\n=CwPo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.2.7-alpha.0.tgz","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Coverage Status](https://coveralls.io/repos/github/apollographql/apollo-server/badge.svg?branch=master)](https://coveralls.io/github/apollographql/apollo-server?branch=master) [![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://www.apollographql.com/#slack)\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"ccf0aa54769d368399fe643efc2f529e20fda4a5","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.12.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.2.7-alpha.0","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.2.7-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.2.7-alpha.0_1543923878780_0.5770351777740366","host":"s3://npm-registry-packages"}},"2.3.0-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.3.0-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.3.0-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"0ca16393358706e3dc53cae185c6bf9df3e6cf2a","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.3.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-GjWhTO8k6EuVGOojQwjmJdzyHzS0T9WqKk43xBWhg679OcpfEwhmifM472tfdvSdpEjSwTnxCar8wCEBhHznSA==","signatures":[{"sig":"MEUCIC47jEgsvI2MIZPETPeSU6A0VslwzRgeJV5XOpyFxZwIAiEA6lFFMI+a+YLYW7LOBrXfG8gbxBZfLnJaH5Fh2SQJopk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32689,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcBtHHCRA9TVsSAnZWagAAgCcQAIeeIIyHTw64+WbSNvC4\nqsEqsQbd/dZR5s0lFiiWZJbpJSaxzf8TUDLRgJ3bqdp9BiKRpSNcjcg3v5AG\nECY3fLgsnSx63mwYFGgrDLQ7LMBzKg8fc1ww6KGJ7qxaabRxmDa+uTMZPrA2\nqDAdAsu41hfucrUKv0VXX4D8MeGZmfG3BkiHqgmcfQiY1Mw1cyAAUXgKEKyh\ntdVkQlMqvHkhapVgS44gDgT04/I0NlDGipQbqL5U4T+HX5WoZeELYBkBn3lm\nUhx9bszGukHMYRaiayUYQjrKVBEKt8LDwA2Iy58Gz8ZiNbzUzN0vWQGJbkgb\nTzLgmM9e7EElnwMJh62x+pHN2oZQO1giiilVfkIkItPJ+nsRR22oafd5oo4n\nbhju6FwH8k1+SUGE+IfTTFL6hlE64zdywy87araNKMhPqYqflu5u+lVpsIQd\n3qB7rw9tjvID2o2Y8WCHGx+Y+HTXil18MjhlcLbbenq2jWAn7z+lFABK4o1j\neDyIRs4d6rBwh4b/nBm9vJI2qsYjy/4o/lPNe9DTRGuNV7QYAdhiydfzA/Fh\nx1Cd/PIAldvGTwnhpABshru7ndXI2MOTHi/CwYv42bO2yADMNOtiXXvswvmh\n4GCRdmmgr4l47yU6hkgk/xebEEodo6MfFOdoAerQyqH599aDnZsjoq+Tyicz\nI9Mi\r\n=Umyz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.3.0-alpha.0.tgz","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Coverage Status](https://coveralls.io/repos/github/apollographql/apollo-server/badge.svg?branch=master)](https://coveralls.io/github/apollographql/apollo-server?branch=master) [![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://www.apollographql.com/#slack)\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"ef31818629b673e3e68563f773a1113e9e9ca750","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.12.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.3.0-alpha.0","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.3.0-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.3.0-alpha.0_1543950790599_0.49923129616180417","host":"s3://npm-registry-packages"}},"2.2.7":{"name":"apollo-server-cloud-functions","version":"2.2.7","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.2.7","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"2a06c6c62cc9710c897890445b6d277af24a21f6","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.2.7.tgz","fileCount":20,"integrity":"sha512-w4nBYYirT+G97tz9qrk8hJf8ewnU7myRpWtA//scZMj0JTlwnIc7oExLBPskVXLyyzJHAwhd3L9vwZnUgeJJEQ==","signatures":[{"sig":"MEUCIQCGAUI4cbODRHseQchv5F+3i8oW6PqCvKKkT0YHKnv58gIgNgCYbX6CrjWTkGrrm4nsa1mh1waGRTP3RkfzfYZHrQY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcElh/CRA9TVsSAnZWagAAbUUP/3uB+FiJViPIjYNnzwCI\nVvqriCJZfs9dpsnl0kockFG9ETX5m7PZI4hKlJcm4g7hsgjzgYmZMW2LacJp\nkv4nPoHUjPJ07fsUxH/iCi2VWsmbbSKHlZQZ2ZC6UgBH3yLcDU0x5U0YmkAz\nRBRKQwEFcewMW9ZBUj0AkDOttyMjIje9H03iaJhRg7JrftQ8hw18ZBCqcJqP\nQWp0oKgxC61yGbvM40UQi8/jcUQrhmqa3aI2spLZK7VgqS20ZR9qTih6rfrv\nNt5jOSuWoAxmtNRBiBc8UYE28nLkBbO6NxZXO4t19q3h+laZ+js249eTGTKT\nKbGsTCtN2vj/D/H3DB4Th6Cc9vWyVLQpK4Q13WlwSywShSJTpK4T4vfAFkr1\n3zK+NIjlH8kE+GwoyjAxCdo+ZlkVp8BeJT7IWk5Cfj9LQU+fwTE2xil+J0Qh\nUXqHsou3437cOIUaGzzWax2MK31rewY7u7bIPJTMXuRrHfuJSy3d3lnWbURO\nxATt38u9G2y0715Qeix2G2J/iPRFCm0dxB4h09QDE7JxXkjau+Y9fX3GIbJT\nditHA6aGF8cimUST5MX3ypS/rEPJ3QibBJitCSZ7ZdhCL1/ZVBJXNKQEW+qr\nb3zUN5hG7MP+KlrdafW8gy+u0yd6SqFcatRyBiCz7Sk19ubpT5dnNe0vAdDj\nWHfW\r\n=1dJE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.2.7.tgz","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"d7e7834633ea9f703473aa432247a3523c86c597","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.12.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.2.7","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.2.7"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.2.7_1544706175082_0.9732355105622235","host":"s3://npm-registry-packages"}},"2.3.0":{"name":"apollo-server-cloud-functions","version":"2.3.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.3.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"4ab7d8ee4869e8d953b771e8e82b31ed2ef5681f","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.3.0.tgz","fileCount":20,"integrity":"sha512-7LEtB9OkCHQZ/rVWn8IRKq+B1HsE7Yw2q28M1lovgQrTZmpCXIjfPVIRMgFH9oNfYBj5uHXqW80Rt88ggvdgYg==","signatures":[{"sig":"MEYCIQDek/Fmgh04qWX0VpJPcN0mUx3ahp8dZKXqXSEisO76TQIhAOggc08KKWFqTseY9stXNTCinBAMplLNxKwaXMUhrcgB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEl7zCRA9TVsSAnZWagAAyh0P/ikpY4fkHAv1+eNyN3Rj\nIEC3YefXtDC40RixOrNyHDKN8NzT/Yk7u9Fit8eTJDa0YW/N6jrZqXDXFoOH\nSjD1zMIgqB5Y8rZgAXIZ4sLgTopNaozYKwU4wPZ3q+TQgem3axmH2oriDHv+\n/TRxZuvSKZGf5iR5fCeKYQi2A7sSDLImqBMKDE63I7nlDQx51XYOk8KTYGql\nshSYzlBTI5+ME1CZwZg8b5m8UzZg7q+tnY1OBj2X1AikpLOHhowN4OsTjaca\n4sHNAg9pNRlFJepGqI/+KdUdNTG/Zvfl0uWF5N1nuKwlJTLDu5GYqSbmQXV/\nBmADrnPf0ktMPTO5vRc5WV8Ro2bilaYbNAzXR+T3onW+fy4RSN4DlYEGfasO\nOnfP8c7Wk9kDIgyC7876JeoMvZRzDUdViEHuxlCcd43lB7pQlF46CKXAxw32\na0OcmvqLhhDUrJY/ihd/ONDc8jgPXutsTXlw0F4SK8Mlmcty5cJAIcFosFvL\nvCQt8WXgLMGvccTVtQQ8MDD7JGCQLwcThvnaSxPZRqe/JOz3Uy8mPpYxdr+a\nDpc3TcfJuVc50Hd68KbV/oqtPp+BxPzIttG+BeeS+bVuZ6cHxGJC9cb8zBhs\nMG+piC3RDHPouTIJi/uhwe70MQtG9nSHV5te1hp7yzFwHCBJikBqzRpwvtJP\n2gYZ\r\n=d4zd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.3.0.tgz","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"3545c32e2a93ba3de03cbf2751db8e055835a392","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.12.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.3.0","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.3.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.3.0_1544707826325_0.8833951528728765","host":"s3://npm-registry-packages"}},"2.3.1":{"name":"apollo-server-cloud-functions","version":"2.3.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.3.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"8828b33bd09cae703a1da8a501721b2b8770f254","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.3.1.tgz","fileCount":20,"integrity":"sha512-y+GzMMJovu19sGgk4LNU0ciW38QVQqQQs4QiQ3gg+UsUIR/+BO7F3rcOhNvHFNQQZuYpbIeJRg1rGvC7NNBfKw==","signatures":[{"sig":"MEQCICiTwp19Qgwl0AO+UZQ1EeX9glpi4dXSqHJPRFNwgh+EAiBEreI/wPzeSBqT4K+jVQEGfzHJ3IKa865VoGl+uANMJA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEq4LCRA9TVsSAnZWagAAORUP/iu+mE0z5g5rIJNCLYDw\nqdR2xayrZ+73ml1zYCWpaDGAtoqEorNrlPDu+3bfmv5LGdprwSe3QZnps1b0\npv/v7fhsfq4Qi7UKA4vQjx7G6YdK2ZrdtiqPxAzKE2xztklmb3/6kd13iGFM\nFt6zQDT1SnCgFRJKO3ZP811lVfThMkruLSeyXj6gUZzLYt2wlvbQksQYmczA\ncRIJYiuKiesi1Hd3kMbKh0exefa6p7YkQyalNl1h7fIt3y4OnoHGYvXSgfkR\nd5zKfDOeECdkgS1dRTIG26tHXtZyxVfa5LumaK8SkL/rsw4mZOY2oqpmbm54\n8iIh9Wb+RgXXyfhquKvH/NffsIMfJ/5yZ5BCTrCTuXIBUnprA5Px59Xecw+O\n1SPVbfluFKWQ2+dVgrf7G5kbrCWA1JCrtklKy/4p0JPXqTU95d3l4Kvgjhlq\nf0HaO82RN8VZLygyxZEkaaMARESdat54K1Ln3FBdBob5zS1RUax9JbdXS8qA\n7/2YvLW/OThsZ8lAL87dp/9UEp1ZsJhKyV5dEbsYam/qwrEVIbTSsaKlZpVQ\nTbsJJ16UoCu5UIXyhMWkX2w6wVVyUJfZYWtfJEf1QyNnuWve+ztGrdv5COrm\nCSGIdyNTMwu1+5l0VVgrXQ6OSHDQJ39hyzVvFQbW+0XT1Ugh/TJfUorCR8wz\n1tFf\r\n=v8ig\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.3.1.tgz","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"cf95cf7881c12b150c632a5e020a1ff81127da59","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.12.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.3.1","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.3.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.3.1_1544728074676_0.8816214457706155","host":"s3://npm-registry-packages"}},"2.4.0-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.4.0-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.4.0-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"edafaa8a2cdc0d1b40af573a419ab320c929ff02","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.4.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-JVuw2KFFCpA5cPFiJLgONP+k69KMMHEoiaUelOJ6tB2fwoEgmJBHiEmZXKXF+9wrYaOx83EDKBQNV54Nb0mKcQ==","signatures":[{"sig":"MEQCIA8hJDlOP7a1JP00ej2os57il8YEdrLTtPbnj1mu42MkAiBasEoZDg4GV3XUbZf8RFTbXLtDRWDzUPih8iwvm/xjTA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32689,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGQ7cCRA9TVsSAnZWagAA0iAP/06KZzxpZTKfDfNG5o4/\n9daflcSLfuwMB7gXmXQnyI+0yVeevp71vgpBg1bJ4mbBPo+x29/M7r6h3BiV\nb4iMQ0TtShGBXzMwO0UtDUfMAeV2gc8DqOuNqtdYvuwf1/OX6JUIYVIUKQY/\ngGBe8JiVhrZRESzRdoATMkoF6D6/+k3iG/aQWOVHUFhKoYAMDL5BLituJxpa\nbpZkgbzh7FQZTAwuVRb58CqY9B+VaFyaoZAQhrBMtKCVwkZpIHg0w4RGHa08\nsjwiCPFLOvShWoCML/5FEslAMKAElYbrZfmee98zuLHQmRumenZbmqZz9w8h\n9X0CWGKo321MzgHaUpOngkU8av1Pwh1AoJ4bhw4NlkVzHC09baNnMh3GgUkF\nDh+cBqWZ8hZ1y74XSG9D2+BorITk1otCAftkWhN2j8Y5lRjaicKy5bpUIOHS\noMz6H330uwfkLs3A1TNJ5SHcDqZSdnKRf1bEqZuFfmGn4AUTHwu+6mG5crm7\nm1cYLwGxSOge1UHX/Dm5O+u5SOyP7EuXHxlsU/tCMkiBq0DBa1Jnq8R+Ojnt\nafsyxNGbzyMxT9K80ATcBLNQrXhmIOrcFpG7OIpPbFWNe7hLyUbp8yciipw9\nGjG5uqh4E0ObaOhmQkruaLP4H8SGUX+3NVmlAOIZR6xnSw/QH0BO0IzdD0Z/\n/HEi\r\n=bhKC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.4.0-alpha.0.tgz","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Coverage Status](https://coveralls.io/repos/github/apollographql/apollo-server/badge.svg?branch=master)](https://coveralls.io/github/apollographql/apollo-server?branch=master) [![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://www.apollographql.com/#slack)\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"7697623789a0c07cc65b496657d3e85bd96e1408","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.12.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.4.0-alpha.0","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.4.0-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.4.0-alpha.0_1545146075764_0.6185357366405735","host":"s3://npm-registry-packages"}},"2.4.0-alpha.1":{"name":"apollo-server-cloud-functions","version":"2.4.0-alpha.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.4.0-alpha.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"c092bd7a0a1f8b57aa74b42a1bc8724fc9a55876","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.4.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-OcNt4C+BnEPvoTyYDyhVwUC1VowRf9hSA16AhpdvjzzbxibIXy3PwNf+YgW9Gc7pqhlIlE0+iUaBE/AMQkTjtQ==","signatures":[{"sig":"MEUCIQDxFgwBSEYW7ivwqAiSuhE8rogiBiPSCw4JsadPQVUt4AIgL4+9jS0mJ5LC0Ztqr+K94Rsfopo9Lr9LKw42E7/q8eI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32689,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcPxF7CRA9TVsSAnZWagAALTsQAI3d9yfj9TG3XQNpYQYH\niMocPhYymCjSMnQUsKw8vH4ei95Cqsu9OEZYk9kVf/hKlRXr5f9U4ps0SwOh\neagO0W2x10kAKuBu+haBwvkVRIwGqWsdh9hQYDi4D21xVnQLDV7lSKNvwwII\n2g6HatiMO7Sel5m5av4fn9XXZzygbWOYHNt74VC01/icwmV2fdb390M8CjRp\n8ZUFSOxEUWBYCKpVCzvCLwR4ijSMT+sdEjSCi+6UERyCj4IbjNUHzPk/Xo7V\njK84z/TsVXycwcUGsRFi2/ObfSVfkQKdN+pGnn1NDz1QMKquz1J+0+9hVkMZ\nl79Z4gVeHuH+LZ3lSDXT9U3Ixaf4LLfsiiZOrmETa1d8QjMP0aabOVmIXPQ/\nn4vdtoFOvJHJPUnF5DHLWok0aXKcngmp6ciWnCtIVneOAiiKT7aMByaMtswA\nOB8zqdLfqpEt07GyCrYKOJl6mwAgli24l8rJY9cDTzwXia7HYO9qOSMfgOr7\nzb6pwKmgEL/opHiiN7vpdHFFKGdOvKjq9gVIXK/+K9mXZjpojQUEEF8pdvoO\n88lHGWREk1Rrm7qTIB6pqy19YhCgd5n1DMs+M0lyg32Br4uAMgJ5krcx2g2X\nmhaf112g7bstw1I1SVh5I+VhM4DIBdmxMXzddj2SwE92hZ8fjUabirZP/dz/\n1qv9\r\n=t8Bb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Coverage Status](https://coveralls.io/repos/github/apollographql/apollo-server/badge.svg?branch=master)](https://coveralls.io/github/apollographql/apollo-server?branch=master) [![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://www.apollographql.com/#slack)\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"33d1f828141826f4d874aa783fa302e381101ab5","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.10.5/node@v8.12.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.12.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.4.0-alpha.1","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.4.0-alpha.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.4.0-alpha.1_1547637114760_0.055109342614217294","host":"s3://npm-registry-packages"}},"2.4.0-alpha.2":{"name":"apollo-server-cloud-functions","version":"2.4.0-alpha.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.4.0-alpha.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"4c90ef3107cb303941c3e5e2e91a3633772c4f78","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.4.0-alpha.2.tgz","fileCount":20,"integrity":"sha512-XzYa5UVLQvAXhbYfZVK4yuZP38aSscH7SRee7VxkrhjirtJeaKxfZFZrPtBeR8CAm17JY3yvFmn+yKGMajGT6Q==","signatures":[{"sig":"MEQCIBf2Q+cQuyIk/6sAphETZOIsKl+uUvhqFXe0U8ew5Zo0AiBCvZPlFY9ZqjPZp3r8YoRWA2atIc/Pra95RkFn22YuRQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32689,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcSGZpCRA9TVsSAnZWagAAuWgP+wXl/b5wv/WcQLR9/7Cf\nlndAJIq4JkgxoFrmVo8TBBBI/HOoZO69qIQ6zdfmpbzq1mvDvlrncDYAmyO2\nJ4IXmqPcZeyoqVihwz0e4H3emuJAVKtRZkhjZqgmaB74VH0pKUwHe9AvVm5O\nDSAQdJ8lE6yBiOBTQ3ZDm5QNZ179BUNm9SyIJZTeCUyLgLh0timFEZtBk8kD\nLwoXSFOc8YiGZIDyDI8gIIDmDrW9LvW5G8Vu4RgyWidcRXjqXiKgZQ4vgCAU\n8dvW6KS2ux/SLKrdu2ON8x6f/M9eZAr5NGfpME8MJAnaHVS17pr56kR9rbu6\nVyVTcHaJB017n71T//v5S//0KcY4XsmZa0sfzE8Arb3fPpM0U4vqP+iaojDZ\nAeZTlcb5rm6tCgz8uY3dmNjG/BURrMnDQwpsvpgNO6OMWUtQxGREjIf2O7AO\npb87JH0o8UKlL2cHnpPx8i7YC1M0e8Ene/DSzKaaOBvXEtdmV8psznMgK/6q\n0G+E4v2eaigVd5Jck0hjTLdmz3ARuQtRjw6//+H6qjgCUMv9E4iJcpqA1G45\n4l3+ntWw5EOxOz5DE7+rvoLZQsvEhI/M9p8rm3lN6JcHg4WLWvEm2p3654p6\nm5VXn40WkYyiqIW8MQJB87QomzJnqUvGYOuq2MJMxeHU6iD80PdzhV1Ucn/p\nJDDo\r\n=nUD4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Coverage Status](https://coveralls.io/repos/github/apollographql/apollo-server/badge.svg?branch=master)](https://coveralls.io/github/apollographql/apollo-server?branch=master) [![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://www.apollographql.com/#slack)\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"1d0021933ecfc992c506ae7528fd9e4fde6c2944","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.10.5/node@v8.15.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.15.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.4.0-alpha.2","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.4.0-alpha.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.4.0-alpha.2_1548248680767_0.14499088896384804","host":"s3://npm-registry-packages"}},"2.4.0-alpha.3":{"name":"apollo-server-cloud-functions","version":"2.4.0-alpha.3","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.4.0-alpha.3","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"1d2fc76ceb74795d625debbd29dc186bf1e5e68f","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.4.0-alpha.3.tgz","fileCount":20,"integrity":"sha512-5rb3RQ1NwxsKAni3U62gsr+5SNJjUPcrvuHgdUJTpUCUMCTkGR6H0CikJ7haONoMF8VsERAcA0DL+0urHF2EHw==","signatures":[{"sig":"MEYCIQDk+DV0yIJo4XlNfQyi11BruEDgPlictt+4bG3B0bpz/QIhAPbLfXqswfNicHSy6Z88bs13PBb7tD+thSMDHvCfqaTr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32689,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcSHM3CRA9TVsSAnZWagAAdbcP/25wdA5CBV9lGwfDJkDX\n5zEPc0n92jlJzB69JpsWd/qQ6taV0PLB9aZ45vILePRb4PS5zAdRsSz9b5+x\nCMJcmciGnTQCSKotjkAuwpDRWIuPpKy1MteLTRTvjnpvXPsszTEgAkCUO2b3\ntfVUjQlBbGJMGQDJ2MXyyPtjqLeiMwSbY1CohG9ExISntzohyBSJlJPhbEUz\nNRfcuu5H7W6MAbRuCs3fl+BQFs9VBhrefc6sQdt01h8Y78jCsJrpDalDFilN\nnWqjzt/X2ER174V5vczMRLRxe2EhVYqHoK1rvSdDX1DhqjiJ85Bmi216zolg\nJvR7AhDMRDCR/qCey6CScjWEHq4LswxSkhLuuGeyxP4arI+LAXE4mVYvFa9c\nDPO7LotpTz6rBedpdB5hWoXm2StDYKgUL4qbvNfw9RvtWH7YkH9b9JWHESYc\n8+GfHivSAy1sLogqF3IkO8A4xe530n18w/MZHAmF/o+pXufkAPJfrpHdXabS\nEIZ4wlElpqmRlArzNne37AxdVazNgi4d3QrikqsH9w2lw7m73Bs51zY+8Cgo\nqHRWrqJ7k5CvskBrjKIJ5IjA1mTiK+AS5PeGDysNaPFbIN0ZDdb/7XXiRHY9\nQ6wEuK+PiLuqVkNFH7fJRq3SutvMWu6M1J0IbpFG656jLmyuqrn5vCcgfqlY\nai+w\r\n=aGzK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Coverage Status](https://coveralls.io/repos/github/apollographql/apollo-server/badge.svg?branch=master)](https://coveralls.io/github/apollographql/apollo-server?branch=master) [![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://www.apollographql.com/#slack)\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"f045a4d0c94faa61433a933edd34e274319f8f32","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.10.6/node@v8.15.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.15.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.4.0-alpha.3","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.4.0-alpha.3"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.4.0-alpha.3_1548251959226_0.11408979701359545","host":"s3://npm-registry-packages"}},"2.3.2":{"name":"apollo-server-cloud-functions","version":"2.3.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.3.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"d91a8ac79739c42fe1f7418dc5fa8b839bd5dd80","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.3.2.tgz","fileCount":20,"integrity":"sha512-+OM4omfVdbUQm/Gj2BNDx2gOK3RBYwf6wr4ZNo/9N8fjOHPPs6D8y/xs+XJcgxU7e9lV+xt9QtPJtvDSe/czgA==","signatures":[{"sig":"MEUCIQClrv0UfaE1upbEMny8sqZjeN5NqHsbuxWe9oeWZBRIuwIgP6dkn3j0ZVviGwsFGtizBBpk7EIv+AMmSI/K5Xco/5M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcSz30CRA9TVsSAnZWagAAAZoP/34sH547CBcnYARw06aP\nDMxCglTINlKIaMKxnH/FikgsKMpaSB7NxhG45QXMQANy3uaDyTX/ir0Nlb3S\n5FghcTn7mtfFzxXKE2GTwsyeeQi5PZo20wPxAC4MDh90nVPSUJwCqmhTuwXk\nY584LFENF0rNctT6hO3O7xPfl/o0OLs9TOdIIc0TPHmffUX3kaEZwSWjPKNI\ntYNBPFbuB31LDUb8c5c5usg+x4IbG/rk6VBPwWPcjNoHinvzpvh6VkZGPwUr\nEPEYX/oxiYA5vB0nA85eLmWlDduYKw+RXZI0UFvApBkFhM2ssaLVv+Q8iAFW\nAVJ/2P44FJbMETsuI5ItYEaumdRaNm1Sw/ccYLnm3RFwPJEAfreVVnL0kwr1\nSN+8WRbqeXF7YptJQCduzmDfa0y7Y2UNZhzBoZ5Au8fa5HPkwft1f+hj4RaP\nphsamZATYaIvunDSoeaqs5f1dOs5Ue/nV99q76BWfCjfo89KtFb/A6n1Fdut\nJJGfgg29bFCWIZ0jrGltWqpPJgx65pTvJCsf1YRET0N5geFBnqK3tY/EiUVV\nJy37FPEMZfAC8MSHlJK3axaV+FIO+uq0Dtm7+hlOpJGw+Ymx96SHyJUFHu4/\nBhcPWyxDmqcm1BXCbHOkgwOkyEKV9xEQIKqCFduPxAuPaHO6Cib0q/4EHiYa\nOMeU\r\n=tbeQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"d48d0972c5730ea63969daa892f58a34aa1db543","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.15.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.15.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.3.2","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.3.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.3.2_1548434931462_0.17499290824073155","host":"s3://npm-registry-packages"}},"2.3.3":{"name":"apollo-server-cloud-functions","version":"2.3.3","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.3.3","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"5c778f6ba812b39ed4a40ee737d75e8162098faf","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.3.3.tgz","fileCount":20,"integrity":"sha512-Fico09sK1Uqmpac4XZFf8XYmuyJoILYIfEoYPWzAyXy0Gj0EtmqFbzCjmmmQaxQ5JGVCeFjYlP04xkJLMsMENg==","signatures":[{"sig":"MEYCIQCxmVo1DzeqeichlYgqeD92fTwgVg9Ak+u+TgSi7Ut33wIhAO1FLO5IQ2rUV/CvjXBOuHMP3wCqiqyuE25/MolP9dkI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUCI1CRA9TVsSAnZWagAA+24P/jwjwd0Ezhhfq1zAnJJc\nDeLeTIDBe/bPiCkwlf+KstoyDK8b5v87tTdA22uxxtJF0wrtvjHA2PDHpd4W\npH49ZRbkJqh2+MFw71VCLVSfSU+IwK/NvZGBFOvzS6k9m1qXHWFmZiqU1CWG\nayuxyoAENOoBsLBCuej9IJIN8lH1CK3GjTVua276SYQQK9JLH+itlv3JQRt2\ngvwbOuDrQ6j7lrBQo8hPs5SVwnyvmdV10mkwAO2NcYxEkSPT53uCi14fpybq\nh0KxobdtJSTr1zK8VbbBhrmL99Rkp2Q0wct1WMBK6bXTOSMuIbAIGZFLsqVH\n6x8LdHXV3lM3m58o62EtcrQ/LUh2Ie6bt6Ek8HxS3naqkzh+GBHFGprKr6QY\n084qv4/aaWWoPunDEE5t+y8rIF4PQPc51D/StH+pRX9Pww4iUd5g5C7KFCtl\nIxwUVBs4DX4RDVzkrJg4+/Th0AXu9r6dKieU7lyGL64bDBZCguvKMquSRADb\nLKf44waSfSQcKPNGxNQw2wiZjaW+/a3+vV3stFyMyW7JAmYxC10tYbxepEwI\nCj9RdEakAiBf2ymL/2c7kboyJiq8hilOcG/mJxytnvbTlDwGXaDzg71ts3s2\neTiG4A34PWQKzVnUA6WrVL/CyUv1Du6ru+rZLPB+9C5RiyL6jPlbqPkXGeC1\nT81S\r\n=4olL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"5939327edd7f455cf1d621f761c01c55161639fb","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.15.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.15.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.3.3","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.3.3"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.3.3_1548755508322_0.32301589571453015","host":"s3://npm-registry-packages"}},"2.4.0-alpha.4":{"name":"apollo-server-cloud-functions","version":"2.4.0-alpha.4","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.4.0-alpha.4","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"8c79bbcf19cb6fc58700a0f39db73aab77d2c00d","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.4.0-alpha.4.tgz","fileCount":20,"integrity":"sha512-WKwEz/G2psTkJwLWQsejmxiC7IHzv10xdSMuGsiBaSZbePzzXTKhycjxrMhHCFnmR4TljxWhpzkyQH0ccUH8+Q==","signatures":[{"sig":"MEUCIHZ/0UrLfmp+6z3SBjj8GA7Az6bixiJ5GuO/3GOQFvvpAiEAoxXMH6WWRzg2AzdevcVH/PitKuGySI+EiBt5g2xBYYc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32689,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXBAXCRA9TVsSAnZWagAA6/kP/R/i015xGAlANGp1nnOf\n8cwp7+nkAYDr7wR/V5BKyYAIbGZxs9/4/qRXafM1izFGpx+d8I+zny0XJGmx\nihN4/6xII+c7UxhltSlM9YD+tZ7D6jOwU4ms6amRpOwI1cdrPdrvKn+6p5Gt\nGUa+8+t7L16dMy8ZHVG5q8nUYo7EGObB680nGcvH+MgnM27IJCroDwoKWXlY\n/762MziPuf24AYXVqAZY64QTvoWfYhVeZEfBdrZQdgCDdFcN3xPYxCLmjBuE\nxl2j4F0hVyL8OG2O1a30GGjbs4hUfMeTcdEvG3pc7d7CiG1jPfCMLV/RMiZC\nRc49mzBoVxgIAR4wErmd4GeWXbqbBF6lPRJL0jMZ1i1tYGadG6ppgxcR5Jbc\nC22s6644iqn7QcxHnHehU1l1Dgmd/SLu2fmu0oS8myuNYKhlWxmO7Md3eRp7\nc45E5l+sxtXd5f163ycthrNO02zohK4hXK3As9cN7kKI0NH0mkoRs19z2Otj\nNxBM9OEXXl6MLw0592KtoJb7naQ7iqkHX59ui06A3M6Cx7BnNy/TXyFglOU1\nTsBOTRCmmb8YEtd1lCnxO6Mvpsv7BXTt/m9Ay+DA9vmnT5Azk7UyBdxmvBe3\nKlT3HdHFs1Y9n0rw+0ymBEQjNgTRCLzFEC4/6jgUHNw2sjR7a+lnuEfQV7oZ\nhgKW\r\n=r/dJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Coverage Status](https://coveralls.io/repos/github/apollographql/apollo-server/badge.svg?branch=master)](https://coveralls.io/github/apollographql/apollo-server?branch=master) [![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://www.apollographql.com/#slack)\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"f74610b290106f31308e36e507386ed2f352f3bf","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.10.8/node@v8.15.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.15.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.4.0-alpha.4","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.4.0-alpha.4"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.4.0-alpha.4_1549537303090_0.7869466047810989","host":"s3://npm-registry-packages"}},"2.4.0":{"name":"apollo-server-cloud-functions","version":"2.4.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.4.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"7c2f5ff03f7e64ae039942ee98022b3e2bf95fb9","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.4.0.tgz","fileCount":20,"integrity":"sha512-cKw8QQWsVq3CcGM80nrFSmqPTSbwnG/V5FXEYJg4TF/rKv8oZgrjCOng51NBISSlhxbhWoEvEc6aGwy6QkkLBA==","signatures":[{"sig":"MEUCIQCOiwzRmIHGKQ8cDEQMyP6nrhYW5TZhBxWagz8liu/GsQIgQ1HxNQKs8jUToVY0HmW7PKRolp4fVI6zZzLfgle4wbM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXB/hCRA9TVsSAnZWagAAgeEP/0ARAbqunsyDLmBycCjT\nkAARbA+KFlj1MTJLGJOxkiFFwN+M60oNHhWv735Qiru9wWiVdQYERrgAuWR6\nvuful/gJz2BufgxUsrxE2un3gJ0v1bbKql0QP/gv1JF9nKoPuB/x6NoSYLP8\nKTARZJOtuoPiuXz+LrvTfXpMvbaQnqPC2jhDLkAo3YAIcrx56vo4MXL73d+8\nQRU0zZetJ8W0+aMw/3qhjt0qEd1Uob0dpIjoA2cvrsdc52KhK1AP5KFu5W6L\nkhYllBhFQ3+a5AUQB2W2gLhCmNVwsoWAnc+XrdPuEgSfKTfdKDd3sxuYA1ZI\nSH29iKmFmoLQAWpftGBJwynrjd1rwFSbfWn/CZNOWhAtCZWB/SF0htimqzl3\nVgZusJUBjDvKMsTFdHt7H0TFZio0OaiZzDoNgoY6x+6rTPB7bp26a0SivwRv\nsdRbqH0Gk8PBMha1GapGf0ejx7rRvpFssJ+zaoIIzAWqW65M9x4xyt5yiArR\nxVJQMWpscJMlQWFesYFVC3ApI+9XtpuHwdohm+53nitTyafuq5mCElHt7Ax/\n/LNm2MqRuS9cIT5m3NP877chSC32w2GAGywmKI5Ij/7hW7LBq8gTvdElBBkE\nDkmKibmbu81AptVkPTFNFrmlHkMMgAeg6U4pdYXQX8GnsnXG5S0PoMR1+AzB\nzi5Z\r\n=PCUt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"a3222ece11f04ada75ce9c592efcf337396951ec","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.10.8/node@v8.15.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.15.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.4.0","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.4.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.4.0_1549541344675_0.07237053861859821","host":"s3://npm-registry-packages"}},"2.4.1":{"name":"apollo-server-cloud-functions","version":"2.4.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.4.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"c762667655ae673a1accb0e47bcc2275ce127c82","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.4.1.tgz","fileCount":20,"integrity":"sha512-gr+n/+ecse2P+/R0wC9v3iRspGaTc79iPDm9wtRwCctXQP16Qfbt/aQHft4zHP8NjoeLHBAVStEAkd8KPATE7Q==","signatures":[{"sig":"MEQCIAST3zbHbrYmLmPAx3N2V/JMjpY14bvZsv+8S6YCDCDdAiAxt0ufUiy0gxlRiL6xtvw/o/v2itMmH0/sMbHm7kKJTg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYzwICRA9TVsSAnZWagAAINcP/2u6x2/swo1FeuwnxrnJ\nCnKBeCNkkmk+uhSak0StbOEdbaq1MejHG9Y7kG+xkqwqPIfeemML3wCwMTTS\nzKzDlWLdcbvu1o4zsI37iyJlpHjj8G+bo7vhZdLNtXiiSiaB4om0PB5nYUyY\nLH+h9Em+lNQc/eLMmF5VOV0jUB0sKgm2vaTBetNRlwm/ESTq3QRyrZQ+9BsV\nnfkjkhmT5T7TGptuhRt5yvHQpc9bIIkhtgZ2HbzrMZVpjvIm8l1WVFf+xav9\n4ltqHzZHsZlkvypUe8A5BAe88s3Npo7gqVblNTTCYWU5u6D/rH1OqM7tV+lu\nUxnjAVgzxIc8LPxyVvG5euZ1WI+ja4HTksXxKtdZYbojTsfpU7cBjGwUbO7h\nstrPDy+LLo5I3EvPODVzpC/3AoDdwQLMDLgIw1LrOh+lOLdvEKWvL+VJE/Q1\nmQVG7jULB63tigcM67SbsncdDmnZpFYtqNvalVd1WpFMfD18P4L2qnLy9mRg\ne9vU5lDbkQIIneuTU8g83vM3JMtgpcn0Kn77SNcUb96HF+D1NsqbJiKAl9EH\nNStCOuyR7yFQkk614v0xUDf/1rGRfJRW2YrMXvrao4P4ijnCL1v26JUQwTtA\nS9CoeZslonFPkItBTHagspn//8AMc4L7qpMvUiry/g2LfbQDKhKmpBOD1V+4\nMhw6\r\n=tr/W\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Coverage Status](https://coveralls.io/repos/github/apollographql/apollo-server/badge.svg?branch=master)](https://coveralls.io/github/apollographql/apollo-server?branch=master) [![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://www.apollographql.com/#slack)\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"4116b2ff4a410049e1fd39eb2203ff691cb1077f","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.11.1/node@v8.9.2+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.9.2","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.4.1","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.4.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.4.1_1550007303423_0.9176107061856447","host":"s3://npm-registry-packages"}},"2.4.2-rc.0":{"name":"apollo-server-cloud-functions","version":"2.4.2-rc.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.4.2-rc.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"1662b8c2d024881b163ecfae09c089ed5219a8ce","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.4.2-rc.0.tgz","fileCount":20,"integrity":"sha512-aSx/1Itevm/6B3F8/dhSywL/l1gFiMBesm1/WUAd9PDf7gqCCoazP0PNPz3FTmDpNsaZTZ71/7w4yNzlbgM2iQ==","signatures":[{"sig":"MEUCIEM6zfYxMdr78b4AjZZCsjusNjGp3i9DeLkCAwD9f1V4AiEA9B5jWc99MB+JzXii3+IfUu6Eg+KN7sAdf1PeBb9RXc8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32680,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcZWpXCRA9TVsSAnZWagAAg6YP+QHvljnxuWM7v3bNg8z+\nc5Ox8HAnRFouuAU1bOU3a0dJx4Rkn5rG9FlQbFvg0TD5Q3Fy3JCbJIQf2mfz\ngDu/dSLxvlRPB19kEJ6FQPK3ZT/L0FqGHPzJCoKArVmiaegZrhCc6NlYm7EO\nWfai2tJmbLL7DynhDiFld2c4KKj37Hbq6aWZu2b29hHBsYZ2Sy1sdeFimgFW\nIVfQJXoLZAAp6Y0LCLRUxQ6xmI35IMvmGfsn77cnVcXPF2yJTgUbmbaPIXNo\n/KCXdW5Hme5BecdFaOeymz0sAqiYdu+t3XWeaYQqkdf5jboFRdRs4d1PdY0o\nc3mnCZW3UliuvgSqkgfUwAmQasHYTsZqVp1CvCfkHpmFiud0arbdklBkOYQA\nzZhy5fDeRSBntrvOj86vH6hWMNFdyRrDT8iGudKcNVG8NoPhBd7vuIs5+w6Y\nPmpuV+6c2uUmKZlq7YcvCXVAnIheCLbzLT5tzxvBHlf/oV1xfALSbHI7pWFH\n8PaDixFBDd3A2svDmArP9TpsiPHcqKtrWdVFVuh5CPTpIsOGnThhMCsKk/vA\nLN9cHI/j5QyRHUszW6zB5QumK2NDo04kOClNUtbOi+yfaDWfVAQNr56e/ZVs\nZWY0j9RA+EHuW2dngKn8MUegNzLqZAELk0S8EBGWAtPUo+mprs7of6NujFv6\ngZc7\r\n=txg8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Coverage Status](https://coveralls.io/repos/github/apollographql/apollo-server/badge.svg?branch=master)](https://coveralls.io/github/apollographql/apollo-server?branch=master) [![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://www.apollographql.com/#slack)\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"f988a30e8c655a10d33cde26bdae1e4c265cdb60","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.11.1/node@v8.15.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.15.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.4.2-rc.0","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.4.2-rc.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.4.2-rc.0_1550150230712_0.4148776038847213","host":"s3://npm-registry-packages"}},"2.4.2":{"name":"apollo-server-cloud-functions","version":"2.4.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.4.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"63eddfb8e212fdecc056d5ea6917a7b76f9bf27e","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.4.2.tgz","fileCount":20,"integrity":"sha512-NyOvYYR5CK23Te0Qxg7HGGeXQGHwuMsE0gtD3uMQYt3jUDxlvVttDi3orN4r3f78dL4+jhBUDFMlc2pG6Owl0w==","signatures":[{"sig":"MEQCIARhL2iyzCKYgpox59atIb74dmrv5STyowvmQbb+Yu2vAiAj7Xbch7UfBCkpGzNguQTXJ8F5spq4yb/3DNbOCGKtGA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcZWx5CRA9TVsSAnZWagAA/q8P/1OhcpP0UVKDOdxJztdT\nBaphZS6z6XVwtmUWG4GFSElrN8G6VJlLnBQ522v+crRg3d7n6E7YyY1O0Rsy\nUsVSPUC+dTKmTi5i/SVd05aLm0v/R+d1rrUH8UULC5L8bvsRQUoz+sD050/N\nmhBTMpzZqlUfFYyzK+lbx+WC2RKg1Rj6kWu1VMD/3FPNB0hXuu07YYFnMalC\nwFCktSVlRIYqYwIsfhS7h5HpWqcmpCQeQEMIWQ6SPI4bvbh6prJMHMG3VEfw\nWDDkDqjr/FMgc5B+ZQUlmUO53Pj5wC9taETsTWONABRirSyMtuklG6Hekm1Y\nIXtxAc55awHCaG1chCXivAowpLxYYiBVzNULzBrpplivNvCH+BQ5A76Fx1gO\nyw2a/2v0IyHRhKBYsDLaZiBeuPZQBjDJA5GyFOkGFtgvvYZCNzn+TSaGBruI\noytpZT8ZCKNtPSjc141OC3GEelrs9I1Pi2oI6+6uCQUNHCXOB7R5T/DgZQ4w\nLFh+2+YLJpICqhbk4Kl+ZtnC31gxYtiIBqvYywioJ+kNg/Jf7DdDYtQmB/Zh\nQLS4EsOOpjN8WxZxLlmp9DY9fCX4RMZQiUpfYCEbBMiAe5mb4WPovnwCVE10\nnYiN6TVUyVaWVhTdWMIN+jAuN/GENylzoLLXRoKw358jdwSylNdoBzs86wUH\nqp9g\r\n=4UIg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"c1669c3d74ae44088bf3bb23cdd9132270b26ee6","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.11.1/node@v8.15.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.15.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.4.2","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.4.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.4.2_1550150776445_0.6811991051515942","host":"s3://npm-registry-packages"}},"2.4.3":{"name":"apollo-server-cloud-functions","version":"2.4.3","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.4.3","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"f4bf8d26b7c5de00345aec94c15cce7eb8044265","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.4.3.tgz","fileCount":20,"integrity":"sha512-8dMDrFPCAD2Wti5JoRxE/t/3jra051Jotvxa01cbRifBdeHOl2oUplMblCSyxrajerewaWrMH7AoXtG6EyBbog==","signatures":[{"sig":"MEUCIQCKJLXdGsObxlJxDdRoTlITu6IMg1aRGmmORnKAFZXi0AIgESNSWUeW4pai7ZJVt61wkknw3mXAX5AJlfQmlujeUwQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32672,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcbYezCRA9TVsSAnZWagAAPU8P/0JWVWwrucM2jL9cgBzz\nEOsRUx4l8kap+DhizUkPbD3BvuQfNeu3JwobOvcal481bzM0W/v/1c4Ratxo\nTlTYbNkN14qZxQEzGEf3ddwigJbYayuCLt8LC8C9l6irdSlyPWXNX3Orbbqw\n2Cbuvg/oLSoudLCmx41+7nGX8EVMIjTfRjC4Z/EAOjEUt9HEibTkO97VabVx\nXrxQeAj68BuVzFf5H0NkIktQ6dkUUPP9vuwxexyn/Uv7AP9vvCi2ggUTBGYp\nPqONthYDfJDyPcc0yzuM8kI00OioPc5IPhUXxEUlpq0sVki4j1KYoK1blY+O\nqTBbgV8315y3G4WkcwuDN4dXjwWkabzVp9LEfmip2/14e0oUF3FNLlxAqFuS\nDWQG7EWZ32z2F3OaWlu7JNI5SOqXqNhEDb8LJMtd/cGgoa0R3nbW9mNcPq9Y\n5D8r+kxcsb62hGuwR1rpmTJ777AHCn48fj079BjNvdf7fxJKWWFz41MjA5rv\nIToYJG9lLQY3Lx/RwP7S4oCqlGWF+zXVsRFGWhoOa+9ti5dKmnBkBIZpAJQI\nI4WNJEltnWohzkFF5EylVVaWnsgmsKbI9Ndn0uzPkAwyxW6LCY2BYTXbQKnK\nYdeEnOPHPYG81ob0HJso2fMwM8ZyBBIv7tONJlg6O6RC+IIYoQMyxE+2Y2E3\nYUz4\r\n=Oi0Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Coverage Status](https://coveralls.io/repos/github/apollographql/apollo-server/badge.svg?branch=master)](https://coveralls.io/github/apollographql/apollo-server?branch=master) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"e1d7078817222f125d4e96269e22f66ef0a8ea0f","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.0/node@v8.15.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.15.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.4.3","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.4.3"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.4.3_1550682035170_0.004459589623539317","host":"s3://npm-registry-packages"}},"2.4.4":{"name":"apollo-server-cloud-functions","version":"2.4.4","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.4.4","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"1b35fe4fec91c263c16836be7848f3425975cb5c","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.4.4.tgz","fileCount":20,"integrity":"sha512-oqG5/izk9+fs5rfhB1o/VRuGly8Hmlo0OLEZA3mm6ZFPjDLdvzuPMq1/LRu8RZ2yaBI7ZBWRGWJkjCmWpxqIRg==","signatures":[{"sig":"MEUCIQDQZglXU0gnN3vEDC6OxyjyQcalRA7YhHMFmzCY8AYztQIgNF8nJi2UOVU3gLdiVLPD8a6CwGiO7q1plw/avOjYpWU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32672,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcbux/CRA9TVsSAnZWagAAciAQAIU/tyZbuoZx23MeuNvs\nw+QET5iXi8C1fS4Ghfh0cK23bjzKO4sPH1K1xQe13LS6q6vClCI7o1NpgkwT\nA5JRZr8P32J2pVSVjFFd87RW3Aa2q66qXUIhXIJ0L50HWLy8aOlOEuKJXHiV\n0qNgCSjC4qGiGVTGmXV5joPQ+XWrnJDlITUpQTyYUzYtjn8Xdlg9LFphEuTf\nLbYWjYisvEynbH5sk/FLf0FD4aUpdrWNTym0dhVPRYS7V6sPI8rZ/822Bzp3\n1PspNx6a4M/hJlyDjFYFfFF4bRC7QKEnR4+BsHMjanw3LJq9rt2h58qAWY44\nEoCOBx90lQ7WQ2jo3XxyOIs5cz1CKq2vD9S9/zffKluXOqdvENlFEjMKeEdg\ngzBGjrulxudTvSqjZKo3KJJ5x/fHDUc/oiEsixdobIr5tB8jGwOAY97YsJpQ\nbEvoOBBIihNyMdbwKwuQH3z2IB/kCfDOMxV1VULG2or8POVq1CxxgsD7QEN1\n/6zR86/Uw49GVMK5k/oF+FTS6I32cQrFixc/g+mbaxmUXkS4aEs9CPT9J5Wa\njvoTpBKdx6gSjJzwN+dAwLg5V/VVp+e6z9EZ6FG76YG8sXwZwYp+RymhNyqy\n+bxAUoegScqxs5PZFKfgYxEfWC1FTWeqsv37png2DfuwesOGUVvYwvYaZ5O7\noiD3\r\n=gbJ8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"879ed190349eded2221e5b9827281a4f6ae86660","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.0/node@v10.14.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.14.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.4.4","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.4.4"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.4.4_1550773374919_0.6053742131882764","host":"s3://npm-registry-packages"}},"2.4.6":{"name":"apollo-server-cloud-functions","version":"2.4.6","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.4.6","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"81cb95085a9704d5bba81101988286d4b1714604","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.4.6.tgz","fileCount":20,"integrity":"sha512-K2rEo0JbOtblGojAcSNK13LPpUA+6+5JyNWOhq9IkXXx20q5Q9fcYlh/VxHdzYjjnuV64V7WlFlLWiAmKrk3cg==","signatures":[{"sig":"MEQCICMHaCAlk7c6umreFR4Pmac5oe5Q98/giN6ujJu+nvMLAiAbxDXTs9wQSiX0dO4xbDm7Gw6SmPHaRVsKXmw9PJSGFQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32672,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcb6MlCRA9TVsSAnZWagAAPg4P/0gPP6pzRnadJWtpBIqb\n1bYK9hx3ofSz/zo5gRZ8k7hThVjN45Te4Rurtqeo6YiJZcBVCvnYile7bQ/G\nNu1GEDHu8OQaIAzhSvxZt/dpFsNIN19LVZyctrfgKS8Ey4bH69LKq5oUbyx6\ngU8N98wm8sOHzvkhdPDmhk2Vp/2BeGL6agPLZkdj/Y8iL2v/nfE1IeqxkWkS\nfYlDO/0ivsCRArWRlBQVboc8IDuusQhRV06GfhgKg3LqMOc5ya+fYEgEKwYj\n2xaaL20kPC3GipvmDPS3TZFU8mlHgFi8Xv3+34duP2qKmS5XXA4Xw3y9hW7D\nHroz2ayYCkq31yaSioMKBVUAViHaxL1OAQ1Kc12sC8AtM2jB1eiARV7QDnVc\nv709BPwW8dp3DKekPWHLMvkFLIAMGSV3IpiHkqG+OKoHUer1BsCP3d+AkM0s\nD7iPYmmElafRsAIgNfnohORUcQV/0A8JrlMSPLXBL8WqAEu5Zp7rYu+FvEHo\nhVWgfDeb6E8smttH8u8SYaEhVtHnY9wp/vJwuPisx0yrA1b2nwif0fJHGQ3b\neQhSr0fqJSiRUnFfLq80kmhkBrdAFqTOhZ6/vRTRmmCK4niR+phG6fGhrKUg\n5P2JeWPqIJB4ri75/lqTXOBMZ1CV+mS9+Grv3TAanAFSXV9NZ+RVHNlyhVu7\nLzmG\r\n=Bpyv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"62587e037bc60778432093eb69bfe9b662105a83","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.0/node@v8.15.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.15.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.4.6","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.4.6"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.4.6_1550820133077_0.9565838929510653","host":"s3://npm-registry-packages"}},"2.4.7":{"name":"apollo-server-cloud-functions","version":"2.4.7","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.4.7","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"dfa1e2d307dedce646d2180ecc47b3c7a466c353","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.4.7.tgz","fileCount":20,"integrity":"sha512-1Q77fq3Ul5+a8Yw5JvRZuEm+AdaN7FADHviy9BDOCO+ZR0/B5JQGNp3zuSIbFu9FC1P/cyCMwyR2Q684v8IWdQ==","signatures":[{"sig":"MEUCIQCEIKyxeUxPJkfuY9BlqB4mMqx09FQtRWEWVVJ7Ge8pAQIgXfGzVE/S5F2OcR+7Rag/mOnR5T6h/1hidn0KEtNOUr8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32493,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdSFNCRA9TVsSAnZWagAATyAP/AyOwCNeXlYIlOMfI/5H\nu/m8a5niLfOYZ+6P3UIZlh9szS0QuaVieiKARnL8ircRLcIOTC103kowpLmI\nYyH5RlDrw9gZ58yeLQtkBF9/6JXZxbwZnm/euC8KmqUZiwofygrcb1OsNVfk\nycsTMf8If+3JS4suKOeT6agc+F20IKlewaScxwD8B9SHCSzscS+pZn9JQg0Q\nnvtqHS6be8tkWIHCD8oapLVhRKjcDEHCxp3ReESaLta66AggzHkt10eQ1fQs\nUDIACvRDHQazC2hnUwEFXl7MnTuLqR1go6wz85hHUTEHapckMCg2FzkjGtVB\n48IVqZtuJe7qfbNr/0XURMmWin9TBHkwRuc8wOT80zQUttleCczMWDZrzGIq\nhJJEj1aJlYjrsGXkhA+/1ca5uWbqdXUgnFrSsanJJK/a5+9U2UbZEsgjWyyZ\nHNrSrGOdTvd0o7+BhZslq0NdWuwEfG5o2YUQCXBJlxRJH19OkCUY5hLpFHwF\nK2DQeqT20Xlbqma7iUWrOX0TqZtGpgcSUv4jS2rthsvKRWWjn1ybcOcdqfUV\n1l1X4pwrZxnWnbhMo2AoxLXM1u6bdxpj6CdtvCur/K0oZFagd/nRgc6QTmln\ngGO732akfkcrKj1DwUOAm+XmXtyx9mUSEb+rVAkO9jlORW+bnnG0d2SfP3d3\nLHY0\r\n=o4Hw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"a95421f19bbb6c3e1d92b0a02dcdf64069a2ab76","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.0/node@v8.15.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.15.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.4.7","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.4.7"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.4.7_1551180109094_0.3752806211393538","host":"s3://npm-registry-packages"}},"2.4.8":{"name":"apollo-server-cloud-functions","version":"2.4.8","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.4.8","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"55646e45a1f49d8dcfd107c6e374c2c8aaec7782","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.4.8.tgz","fileCount":20,"integrity":"sha512-QKRTFPnVe9hDGvL7VkNpR+9Xq/u7LlZLzdDlkc3P4Q92SrL8F/2dUwCSYMsj1tUr5RCg7fQZdYQ3UoMUVbu+rA==","signatures":[{"sig":"MEUCIQD0bWQZLCeK5AaX61yvI4t9pywkDjF+uE6lUnDsYy9WqgIgR5PhNgtBkRTKSNWbZfBtT5nR+H2xjGg0DNDWB6e8fd0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32493,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdUx/CRA9TVsSAnZWagAArk8P/2YJR9dnCwCkBMWwGjIJ\nNhLmVjMux62XKZURkoxUW94BCsb1G09cXyJd0W3UzkiJVkt/1m6zVx/XRUjC\nk4FhEHqcTE9hDTmecbYWUsiwX8Wc3trSY3wPYJPMTsHNeC6sPy+sXxVCrGdn\nlW9UYomWKJ2dephNQewYG0M+kqtJxq+yjG//DyzB7sK16o5qj1ONsOkUZIb7\nqyf95TvKZbxG2IaOa2kiXcrdogWKNXdnz/dzk0fxd1mDX5xNC4E3SjOKh02g\n9qfiEeW3GGmdMLoIDTAiheVbIA43yyzu+teUOE6rUfoEQVxd11l0DRbIP/AZ\nSYWFWotRkj7HghHnqAu7lggcISJwuT/Xl3ljjrHaQym+a2e8pzF4etPkDxdr\n3O2CSJHFsF6AJMD5miq/VgCNSclgnCtER6FqH4V60xf1j8U0pkL8y1e1CJ+x\nGgP/jpX5PRAzwM4PlPWvAc4X8zxjpiARHSDHWkls3rD/i0D2sA0LIKELBHmb\nlJcDVIeLpQ7O2zONw/vDWh8BZ+IgoMrQge9gU5SVyIhXfsR8uVgALEL/8UWT\nEHiOwM/XsH7fVfg+5pWImJQKMDl1ALScxbNndEHNVzQo77uYc7vNvVPq5m1a\nver6GfJC5EJP4u0S2w3eOTbNme7LPS3BPuQe5yUTVy47FPQi/bY0Hmz/OQ4h\n2HZc\r\n=7DsG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"046327068b5cbb2d80c3865cdb2566654ea988c9","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.0/node@v8.15.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.15.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.2.0","apollo-server-core":"2.4.8","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.4.8"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.4.8_1551191166330_0.10582508134220636","host":"s3://npm-registry-packages"}},"2.5.0-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.5.0-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.5.0-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"39c7a9e2318c24e0deb5b9b83746a320e52950cd","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.5.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-r4gEVq7+RfNMqV5aVeIzf6KJMtZSj9KsPnGrYXZsfhFqA1bDKHxL8n9kAMIpv4UgdOWHqUlk1s0JtrGVK16wyg==","signatures":[{"sig":"MEYCIQC2jMUfHSHU7MuXKQv/qPr/FPiEC7kOtTpF9ctqCeW9+QIhAJfRO6GqKRPVYiF/yQzjyJgxmiP7uPVmn1OhRcFYa7tL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclSpECRA9TVsSAnZWagAAn2oP/1XC6xWGiy3hyPsK301D\nxmYTBqtkDc39ODOaeEhsVpSxV2gtCdgIfcXN1IE31MnPUj6GrSfw3E6Pz0p+\nFA3RNkcONoR/6G0Y4ZyJf9LQ3O7miMCGMgca/0VFyQOslp3uTPSdb9p0kyeQ\nAkdMcVIld7Qs9+RJDPwBauAloV/OKUGK93LImPgElHHNuGL3wBcm3wd8LTBn\nnq8/UEXNSZic0z+oK0QwWdK85mhOwwG7VSEU8UYOWX5ZZcuOkrWghYkxYOsa\neo4yiArxY/k8a0aVoNqUary2CNIAt0gl7uoKb4qiNg6fESRb+YTACOGs98aZ\nV+AZFowbG70G+95Kw3yk6TiGgTv8WonP2akUs1Laf3urGelJlCktbx4FOKuB\nwuZ1DPr98vkqQg0NzbXb4jaJglcu4znW1z5aIzxmuSAV61N3Jsu7vIdUcDPK\neB+LdAupoI6S0ZsPxrXaMuAA3gGedo1BTMPCBj+Pr9oHHY2dynFGLaNq0iUr\nqQ5qeVdnhS7ujOsmshSN8KScuuoPy0XmgzkacSHB4DlSd3TdtMmbEpySvP2s\nLHXXV0WvDhP8KWRedRkeNru/DtS2yhfxOx3OcARSvkqREa0bx7hczxxdWVa/\n3v1eyoBWBMGLVJAXCZ0SAu9IosIIXu6V0VK3xg+66DyGtvIwKKeOXN/ncc87\nu1J4\r\n=PNj0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"77192d647901443df54762544d2528eb8aab24ed","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.1/node@v11.11.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"11.11.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.0-alpha.0","apollo-server-core":"2.5.0-alpha.0","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.5.0-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.5.0-alpha.0_1553279555496_0.8676357366417387","host":"s3://npm-registry-packages"}},"2.5.0-alpha.1":{"name":"apollo-server-cloud-functions","version":"2.5.0-alpha.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.5.0-alpha.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"354281c6d3bf7af101614009f1855b48cc23994a","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.5.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-AR7Joj/FK9Cwo0JjMDIG+R3c0LfDTwmS/Me0wAfIuiT9ofXdYa75SP3599U+V4sOgHzBbIHlhfksUI9Xgh9jmQ==","signatures":[{"sig":"MEUCIH0v8ddEN0+3G7BH7cBESnYtPvScjDv4RD62xoj1AQQEAiEAlNbnJgxBSgH7CxL2ctXVtdbwQMZs5G7m0PkD//49UQE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmm5jCRA9TVsSAnZWagAAdUgP/jkbmvX4hu1zGC1zTm+W\npZDKmEJ1upz2JKSFaVvwhwCyVIM1fUshT0vQ0nZdenKE9UWMpx4eZzMx0Wow\nUV6Hl/D8FyAUnVWWrzyTGZ8IsULNPO9DP8GNYexFmLlk46QZHXAj8ndr/RPV\nrPg0L8m4uCm1qKMr3p8MpIZXrCDUqiyoXfXvj2FZWd2uS03vNVgGGsFjIYeW\nNwY8hJRltCmMnrBq+xCjQ/a/CHC9Xd+RAf47YQigCn7mcIEunmsg74hpIoNa\n995PdJJIAljCyT5vGVo9DseYjTzxhPKdvq3Xsxtevxlml4CY5v74KfDt/m56\nF+3ItEYOqVaqkUetSvX9b8zMN2UhUjhUX49UMsvhdl/Q4ykffer72QkMVBl/\nHVGFR3RqXYlOqiJD9Se5NWgSK8+NC4ifnndpgdKyFrZg2dFbvR5AceRcK8Tv\nRf3BMgghnCTUmBYDy8FNoHNsmcfrcB0rvHb32kGoX+4oKcSqNoC36TCT3bps\n/aGKD4c30rayvo/RVcYiA0tyFmbCwOdzGULHUG7SSlrKK0Zo2tQEVMU0UtmO\nP0TbGvbptMZNSry8E23ZvYwFna2m6h7MOZWs6nqsx+eYDNYW8KxwyOZzSQ37\nUlIknHni+8ni0n9D2ir5PSXjGDywiMiXAgJY3J5x0R0itCv9O+fqguQciGNS\nsLpD\r\n=pf5o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"6bfd459d4530cb32cd9d468bd87f61a612b93764","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.1/node@v11.11.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"11.11.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.0-alpha.0","apollo-server-core":"2.5.0-alpha.1","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.5.0-alpha.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.5.0-alpha.1_1553624674714_0.0097122481027061","host":"s3://npm-registry-packages"}},"2.5.0-alpha.2":{"name":"apollo-server-cloud-functions","version":"2.5.0-alpha.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.5.0-alpha.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"6e3c4e09c00e65a9d7ca4c95139b483e9f0d106e","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.5.0-alpha.2.tgz","fileCount":20,"integrity":"sha512-JriRgMYyLS2QnUvkFYu3IL5ES3X8bbM3SeFYpfX7dYXVq/lH4Lx8ishslhR1Vc/xnrspewUVUBgme2Hp+vICUQ==","signatures":[{"sig":"MEUCIB+2k+JpJUIErOc1CAb0EQdNANPwbbRPSdnv5FYtxfEoAiEAzKl5s1FAH2awnScftcJK5cCNXQCZhksp+ilyqhBX8c4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcp2ySCRA9TVsSAnZWagAA40wP/03QKZ3Z5ekDSJSz1ZtB\n7fmkGB7IVYSvfBQ4MNt6nDEzP4ccsYEFS8v3FLhsWo04/91skjYwxH52wl3Y\nherjYoBnNfNos+1m/JlKm1Cc1wIUEgsPOy5pnM0PAV6v0FNkFXG7L5D9ETQo\nlZ5BRT0jvd8pgC/VY/1WvqFrelTruOQcesKaEXBl893nbeGNiLbVdvLmz9AW\ne/pXLWDs5gTxBjw60JrXbEN0yAGXr1f4SJmBeeJxdOL7MYHz/JokBeHYUVkn\ngfportbXL5K+zir6nw3SeCnxvxtuPBKH+U/Mol0nsr0ndtSi93eQffLy5Axk\n8AgOZndotIFSHmPAV/pDyyPt0vXINNJb9B69y4TdI+bTcDV09F6xu8XQl/qh\nmFwgoBjoOIqqgmUh75wlQRvM6T7M3d1Rxg9Mag+xObsl+916hKICPDe5uqZC\nwVpMH4YS2QV9LXvz4XF8SqoXQY0p+mnfzGLXRhSatoMDbW/+pF/1gP7p//wj\n8mUudhneKWQ55DRvzUvaN1WGPhx5GAPlTzeIkN4mJUNFAimTgFykINjGmy/j\nZRKTnT1753s0Y3AAXrP/YJpoWHKLoXovxn9VdXMKfwMGgyo2fh1E5ghkQi6S\nflDun30TOswrJnzEPcuaNGJ1OXnFdGc0NWfU0+3BbWG6yCNbEo0KAifIS0D2\ndTqk\r\n=MYjx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"4279d56188e56f03b8a2c0e8c9e1ea05cc2ea2a4","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.1/node@v8.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.0-alpha.0","apollo-server-core":"2.5.0-alpha.2","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.5.0-alpha.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.5.0-alpha.2_1554476177484_0.1603275870686922","host":"s3://npm-registry-packages"}},"2.5.0-alpha.3":{"name":"apollo-server-cloud-functions","version":"2.5.0-alpha.3","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.5.0-alpha.3","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"e1868cf6a0ef62080df28d4c9ea0d5a9436b2275","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.5.0-alpha.3.tgz","fileCount":20,"integrity":"sha512-T9X4HiJha34YQgwo5m0dMHkbDeRo/2Pkt2p3OW7nEG5NJ8PbJV/YI3t+RHvW+ZS/T7snXv1LmPWHxBkWwwLRkQ==","signatures":[{"sig":"MEUCIBZ+cGySMnPQMx62v5ufI9ogo1W8jlFrqeq64n0c2PA/AiEAtzD1zmUPXBUIddSQVkK+cZ2aSDmO9hrGx+xxkwR8ypk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcp4fgCRA9TVsSAnZWagAAKpAP/3u1C3Y2N2XnAOvTgaTL\nEM4a0Fj8ip76dMhzE5moyQBDU6VRwz98j6ilY4+AJUDwfEMfgkq5BrYDW3q9\nrjY5KMoYkiX9Op99/aCCjyi1CQhfnYCXczW3DfNjBnJvY06WfIjjUctrzz9w\nuZX55/fv1uPr/opAdHmzHzC9lCuVBnDeUNaXkfmnkXobYaskKCtRmajfKyS+\nPzQ10coQc+MjxRgHViAaJe5Jb1CZeXbxzrlg6Ij4K8biUskI++sZazH9vhNa\n5f/ZsCMeZAn1At0km0VS1cT0RRIbh+bOglaFHRFoJjpmlJVWf1P54Xx5SHyQ\nKpp4KP1SnpDHXJuUQa4LU10B0Q1kL7VSfhRI7nNCFgxnPwzn+z+J1w6pWJ9t\nHt/yD82c4GGHVkqfMRTqsj5synNcnPPnVW3RqEGPG4g36NSekvBpXRWpSzcl\nZAgeGFyrnS82MJU4oqa8eS+nm0EKdswbZAju1Xp/mwi/t4uI8sbkFivbxOy6\n6nEX/KZGwXUGos+UbqjbfEQuw7KNPAPfdhBBfqK1Rp+RgM+i0mcY6AN7WVyU\ngSHfbYAG5zazoD8avXlU4KzWnc8mtw7qWynMvBrO807uDvKa6q4bPQqnaITK\nPDpJqArpzAT/0w7qcBtIRYlg8SqBcsIaAvrBECU4rVw4LLO2mjqRGMbAuOq6\nicjM\r\n=+pbV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"9e9543f6b7f7ce0b6ce6d59f06f10f4ec18d8a26","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.1/node@v8.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.0-alpha.0","apollo-server-core":"2.5.0-alpha.3","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.5.0-alpha.3"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.5.0-alpha.3_1554483167455_0.9031055449388001","host":"s3://npm-registry-packages"}},"2.5.0-alpha.4":{"name":"apollo-server-cloud-functions","version":"2.5.0-alpha.4","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.5.0-alpha.4","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"294c588df9270951e38f383a3842599022b10415","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.5.0-alpha.4.tgz","fileCount":20,"integrity":"sha512-izvhleqx5BOfwtNZpnFF05SDS1x/2gR8H9n5PJzWZi7mPBKVrgvAMLCNoRd1SuYUaux0oJN8x/ufELrn1mcmPw==","signatures":[{"sig":"MEUCIQCUj7VdynmA1bSSQ10UB/LnIE0mSjhtvE8BotELXwJi5AIgEZzCRk/UFq04ROYo7Ote9+NAy4bjeTKdzY14VbtpKWs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcp4z/CRA9TVsSAnZWagAAf0IQAIu8fcgr3LE/vuqr+2eP\nRruFVWx9wMAxTJXICvXKO7GHJfbjXFIKaWrCWZKI2BqqeS6kcJsGmZQWNfsY\nq96SHr9nDQMsLIHR+DrOSlMgp8QBhHbpXlj+p9U1h10wEVzatkU0eAW5K+Om\nBbJsAgxPsHVxEbCbAQ7BWAHqXP99bTIcCE2DKC2209Eqc29Ut26oNIrh2IG0\nzgXlWWY6dfCCfKdYsDTF8kHT/Pb8RvjBSypHStmpjRLlaaSuhsHKLtdjpTnn\njEb0kaYFAbh/oGSE4wKjr2KlYpdWTFsAJj88qa9YTP5GsNOkga84R8ipJYiC\nmOgmU+/0DfD96ygc8UzOJdwWBC1sgyj7EQkU2g8cQ4xXFXhhg0NDj9keTjVe\n55gAeVGkgrt3ZwhqaDaoNKbtCqXTrSWeqTMQvStPqr8aeqcwKSdRkR71ztlw\nk8L5vz9/NGHOTr37VAIxWHK15BMnioZWVQunMJ8sdfrriK5nnOHEobezlbLA\nlT6bN8XFVuUDRAOkA5akTpCjsx1DB4D9CBh/tnzXiKrP6ovRhgH5VwDi22SJ\nlcloqMBRzRPvpEpveC+1x2cc//lMIGQIpvwsIgrswRrhETekmGUAvAq6c8xN\nQ1djb+CptUI3zmoAU1h6jptZML3dZtNZorUBvQRUbmqfzFafrG/YAqbobdp+\nmGto\r\n=yFjX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"3c34c03c5af692b32189b650dcaf95f4d73f09a0","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.1/node@v8.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.0-alpha.0","apollo-server-core":"2.5.0-alpha.4","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.5.0-alpha.4"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.5.0-alpha.4_1554484478524_0.640815727193158","host":"s3://npm-registry-packages"}},"2.5.0-alpha.5":{"name":"apollo-server-cloud-functions","version":"2.5.0-alpha.5","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.5.0-alpha.5","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"5dbc5680a572ca53d400b9c6fa272e869051bc9a","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.5.0-alpha.5.tgz","fileCount":20,"integrity":"sha512-jqmvgyuNBDvXWcDH4Nz+NCbVLUCmHyFjBSpvP2OfJwfUVVc4aK2iKjLjj/JWjxPgtaFjcYU6G294schWB71FMA==","signatures":[{"sig":"MEQCIEl1pbVDV7qf4mj1B+xopogNWKHGahp7t1yGueQXrmH/AiA5w9MdkN9YWDXXMQRxH0R8i1B3XV3bUB4MNWZ3Yqny/g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcsFu8CRA9TVsSAnZWagAAypoQAJOuZDurqNqG6uq1ig71\nQz3Ek0+1f2Ww/2l/Bn5FPYhEJnmHcroRF9wJd+eoTqjqNbrBH80bjq4S9gLK\nnceyqFzKgblvhGgcUkhkD+E/urQz7D78OAAVRz4CJNkL37aD3agkOhG3o1ld\nBUKtaxo/nIofbCcbYM2jk6do18JWxNONsKBc8dn1CuzdQUq0e+8fdPituPBZ\nmpikZpklloXm8szCiDBQngPk1PWcgHvtuhFetS1USShpyUuoLcIqi16dCD7u\nb+Id/5ektm4BbQhFmJY+1LNK/2TtWHsQCi6sTMxeePgxG2BxvTbM+EIV4Koi\n0018cPTZ9SY4pdPen3xHnGG3w3FW5p2EUWqTIdZoi0bSedysrBJuI+HJr579\nAseZAjMIXwlMRF8OP7WFN8jeBgq3dYyXqSbbAYfCzbV5FKfanfM9dYlxZdg/\nvawv+8b0/ogoqN9TT/8NTMxf9pomScb3qj9/lH3aw0/SfOLFQTynTcx6ovhs\nCoSLRb+IXYyIRi+wrDj18jcl/FFqHBaRfjI9iBoco5+YPJGtyql/e1ovGkT/\n1NmeQ9HyLXTylLX4r785KFr+DjvwMQ4K9eUNsa4BcWxZfuJrnhbkHWrx/qaD\nqL7CVSI+Og3XkJ+ZEzNVN7Dbvz0PPXL0j20q6fL5laKzJA6J+NgdyMRgYIPe\nsZtR\r\n=+Rb4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"be2c7ac98e7f279de067f6914ebb699662426b4d","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.1/node@v8.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.0-alpha.0","apollo-server-core":"2.5.0-alpha.5","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.5.0-alpha.5"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.5.0-alpha.5_1555061691609_0.9906515459514884","host":"s3://npm-registry-packages"}},"2.5.0-alpha.6":{"name":"apollo-server-cloud-functions","version":"2.5.0-alpha.6","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.5.0-alpha.6","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"97149cd9125898dc33f207f314ee42255a5bf2e1","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.5.0-alpha.6.tgz","fileCount":20,"integrity":"sha512-xUh35ON0J6xit6MMEYwaO9hhKXZTQlO7HsNKKwXyJUCvxeQ/1hO84gs4VqUrKf2qaiOhUVP654wIsPrLAUAdeQ==","signatures":[{"sig":"MEYCIQC2CZA/M+52YHMsNlBT/Pp32x2wiRQG/FBFmGBYoeFYygIhAJyxdehidcQkNluznnq+1vD+J98mMoCruE+o+in76/Vm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcsq7ZCRA9TVsSAnZWagAAkyQP/3Y8nwX/Mjp+6PDVfsaT\niU8cFHep81D5K1djg/zVCniwi9BCwuZ6IguZcKzbIC0LP2Eco5sFBrIwLVfy\nSkM2gK1ph3YBUVwJu8XtDCPCmpvnz7hN8q8hQTe4pjv4ohVTE0ckgwgM5KCN\nswswSblcDzGvOtZR29ao0nqTX59Fd6Mg9aTsDJbUohtlP6UgEW42NAd122OE\nZXr1yFDsE+gaA473txsCe4tgGejlQg7l1jU8Tp3NAU5h2ciXCToIfx5SW+B2\nNaMgNlT/8/kmuBcCaL+cflxV7f6Hfs5c1q6zK4gVzQajo55himLsCmO0RbBx\nM1wnR0RfF8U47tvIfP/XrX9/K5RadqcRL4DJz5eOCKNDGb4IfM3ycE9hzhT/\n8mI1gawSML9Qn5z7ATJor7JjZ/acAALmtNVPN7TkN2w4weRwpX76xlbsX7Mz\nval3VzZ9K05pHa8MunFOFUTF3hgcNMZBJDZK5eMb7E4BP1UUAUGRl9oRe9Gm\nTNF9GTYQu34HNsI6ms8fynMDjQXrphwYceicmFY9QquxmMRvW5Xl5ug6okue\nVGk3qMWvr/3qO4+du+uas/2OIgInb2gDr7lAiWUR1MK/qvpy3l4ERMJysBJu\n96bK+4qtWU6p/iew+1/t7ViQbKetgX8Q7mxuZF3xMJz0Tp4Dd9h+KZbTJ8Fy\nWB6N\r\n=APyC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"551c7580cdc3082f590ce2c52161e51496d45cf7","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.1/node@v11.2.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"11.2.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.0-alpha.0","apollo-server-core":"2.5.0-alpha.6","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.5.0-alpha.6"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.5.0-alpha.6_1555214040629_0.2753203356126903","host":"s3://npm-registry-packages"}},"2.5.0-alpha.7":{"name":"apollo-server-cloud-functions","version":"2.5.0-alpha.7","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.5.0-alpha.7","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"af6eca68701805e2aca35167aaefd97b27539ba8","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.5.0-alpha.7.tgz","fileCount":20,"integrity":"sha512-plpTXFnqvc0U4zK9k5CiQi7otCaPpE8zN/ciEZ/krIP5nhsZP1cWIKvMZqJ6k+OIhUdbhc06J8FqLWd/ODbj0Q==","signatures":[{"sig":"MEUCIEzuAw4nAYxKhGLFcAF4jF6FrSmZOFdoQYcH9kc4Y9kiAiEAzX0oUIfjluKq6vu/GtqRyeQ+JGsR06ffWfB0odPzPXc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwfOpCRA9TVsSAnZWagAA4AIP+QEESex1uTHm0gGnaw6U\npeTxM/V++8YHUofF9/0VnQdllpq+6jYMgRR+7lA4drliEF+FMwyUpjXZsHMb\nKfWWXxr30jMWrEPLzTQQNicQK5EfQBPGdPc4tFUag3TEzMDoNFLws9AHla4S\nrwnUCdmi6N4DXnLp98YhsFOiol2HtsoM1/HAwds3rzwaz/V1GCwsbZTvkKZs\n10FvSM1MQRhWG1Gxsgkk3xEwzQc3HSAyogsQMNLILGcGz1b/lTW14eX+IQbv\nUg58sFjDh1/EGngiysuXfFb8tH6oIA9nKBjpSjXF6lB9e7VaiHg6BMta9ROE\n6LKORN7ZK52y8n3hV621Oa4TubTsVZVxZjxzHiYuE99wr//s/2Y5wIaCsg2e\nxqCJanIjkB12acFvaNASVrZQ2AmM6RaT0HnVsOwVTghIhVZ9aaZzD46cGzVf\nlatbDk8CsZrokbNyNW8fgAUaMTmhEVlqqV5ltyElR3wKwvXAu81zeYleGasf\nQG7Ajq3Vk6gm9tW6U77GPrscIjLj4NuNtuNTo8f9aXuYoZlggU45ovWMos4r\navBeeoqCzMYXKP0MH/7xaLIbVPlbA3+IbJ/elFm182DERf1xyL/TrVy9rBoE\nhwbrydWE3br3UvQfxus+O/65z7Lfx+2UzNpZInsv/3Is4UbTC6BH87KdZ7iL\n5uRg\r\n=Vr8T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"7b8ff7a9c14eadff9ba95ad12669197c1803cbe0","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.1/node@v8.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.0-alpha.0","apollo-server-core":"2.5.0-alpha.7","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.5.0-alpha.7"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.5.0-alpha.7_1556214697136_0.21014193549775784","host":"s3://npm-registry-packages"}},"2.5.0-rc.0":{"name":"apollo-server-cloud-functions","version":"2.5.0-rc.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.5.0-rc.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"c31678dd3d5edba7f4bd3437ff77b41e66a9d3d6","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.5.0-rc.0.tgz","fileCount":20,"integrity":"sha512-ZNbo3vQWWUGkQ8H2Dbz8FPVkht94TQc1fn5W1RMDCFB+ZQteEdcIXf6RFaV86+Bht2OALSE8KWN35OYD3At00w==","signatures":[{"sig":"MEQCIC1OBWAS5cfdycdR6Wvk770QnIK+Nd48xJ+V16IwF3u5AiBYSHkEmxTAk3Twez0adOFhUJVitYy8RZuAX8KoyewWHA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32597,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyDnmCRA9TVsSAnZWagAAGPsP/1Q5YLGyyDQ9jNtRYGWW\nFJfT8G/9I09x5TYa1LSiwZ8tXwhOUuCwp+S1M0sMUzbYoQBkv4H8qc5AMaiU\nOvEr+loYEBlGbkeFThXYJpp8SR9JkMCNzyAI5yQt9vgrAOH8WqOToQTFxocc\n0HdCqIkXUyLmq/9NwRS6PLE8nX0zFqVQAuDxLmf4u1rPZyc/KaVeYO2g8K9F\ni+9FBBd0MM0TolxrpoDuf3E3JEdIxcvXYY+GKF4lXFuY1YFsq15w0mhAQj37\nXs8Ce8ibqRh580KKJI65EtD5Ako1DMzpgBiy20Jh3qLSjpVQXtpQZKog8nxK\n0ljQ3i/LpLc8dDC6fR5ZcqlqdHbeRETrO9F2nfBJWWYVh2bpcgKEFXTiXyCF\niLWg2b4rwzkR1EzYCn67DDRWwSCF6aDzHex7RAXOXRA3JP8day9QAtYA71rN\nVsz8wvyaFPYHbEo73SB8pF8XWYSQTTHjnHE3IDv1IczmjwpVwk0P/imHo5vi\nks8jPtqyzvNcjJRP74O/z5qHn5xqi3WXQWmbnFgntNFnqDTiQM1u8p95GC+x\nWG3eymOBwyaBex5bnR1mJaxm8l5gl2UTs0u2Pd+ai3DP8o3e/l8GRlLyij+J\nwjsPzZXu6Ie7AM2DbsXFUAXX6h48QjhbWzaTRhUC8wS+bU8QFLFA6jFXoIAT\nzIDa\r\n=VWjY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"5aef85b143900bf64f9eb3dfaa5093718ad364c9","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v8.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.0-alpha.0","apollo-server-core":"2.5.0-rc.0","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.5.0-rc.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.5.0-rc.0_1556625894144_0.9572077900497196","host":"s3://npm-registry-packages"}},"2.5.0":{"name":"apollo-server-cloud-functions","version":"2.5.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.5.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"f4006f6adbd11dc5a571e3c9d31eef4f3393ef58","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.5.0.tgz","fileCount":20,"integrity":"sha512-e1yg7KOm5Ik0L+VhyzImnPoWvUSlLxcdBr3IGF8HwAYttldvykZ6uSq1HlVBUL2Z/3PaXBNjhdgV3WRH+fDi2w==","signatures":[{"sig":"MEUCIQD7brHviPw7mBcVaWc09oiscNiF/xc5rTh60B9EfOR25AIgdLhGjr6kaiD1ZcKWKEfynkjcKpq2B4hPR+bBU1UkMH8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32574,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0X2YCRA9TVsSAnZWagAAZsMP/2CA/uPfd7PRzAQxIepB\ngSfd4zjF15xx1F2qMqAQ1Yg/WIHAs7PrEaUrqPrjV59GRDbwKvJOPeNdaZhc\n1dAQdKd9GF/ukaKUS/Re0zoj08w0d7m1ZTp53pacnofFsTgR7liT1/Fe39Ap\nn3/YVXAR+huCDZzM/P05ayp66g9GeZrLdFVxyr2e/gg1+O0iCKKiupDkeNZY\njqa7jfYX9y1cCOvnIaHi+aOWFB/k2bXK8kTvuuuZPYSWGV3exroAPBKlSQBu\nBLZgKQaL9s4exAt2nAtzJgktNTo0qhx1dD90bNlPUyQMe5S5TtAz8+SLJNC5\nPFJJMEC3gkgRwXz6TC9EMQZKcEJUs/teuhxpclld8PTXJ0sXVDsUm0RQNZ1G\nppkVNSA92UOg39eMZtB97U3EuRa2A77fNO5gdW5i1/o5KKOp7/PbbGc9GMaa\nMiQ8PlexLce5YScHp7+a7l3XUWUIt0CT6Gs1mnFinf9sHBr4yxkuIKYmr+tb\nv12vN/WvCiMEeErTFsygB8bUpn4W5tfgSww6VCZc3H1OUjKxhF4PrsB01Vvf\npltgAOZjeh/TGUeU/7LRxF74+2jpPchhH2j9yzib7/n8nXLnUhXzX47+dFwE\npS+7zSYVTIT8rUxXxdZJJMvFhtfA0JxZsFiESHBG33CgcsNmGAMjfcDOkgbX\nblWU\r\n=xEGt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"f7e8ea067d6421fbc8ef41f91d1e673cd20f08d8","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v8.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.0","apollo-server-core":"2.5.0","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.5.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.5.0_1557233047948_0.8095535520534252","host":"s3://npm-registry-packages"}},"2.5.1-alpha.14":{"name":"apollo-server-cloud-functions","version":"2.5.1-alpha.14","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.5.1-alpha.14","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"0385fe18191eaf19de91410ed3ce3e932136031b","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.5.1-alpha.14.tgz","fileCount":20,"integrity":"sha512-hr/PLmU8m1u+v6IA9n/yZRVAHAcHV/PsuuXCxi8kdCv7SUR2qEs+6NbC2jismlDSFj2XaD++hKxK9yovMdqA7Q==","signatures":[{"sig":"MEUCIGcs1iMoBBfyvUCwtqqWzScyvuGHiiMx0RdqbnsToiR0AiEAvqOlx5s9/ybILcOKtt3a3TZ/bLfXO8Vhp2EGLdu038Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32628,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1NwcCRA9TVsSAnZWagAAT30P/2Rw+oZpzD2m4WQrgCpM\nu454sit8uFIf27T6DwGNA7X1ZFqULgk0FumbDsPXm2Ug369kNoDPRSiBErAg\nDbmHnmjMndRwUEcSBWBnhquB9l8nUKe60EYkIL5578kLOkthoO6ofDzuhVrc\nyU7CZ5ibi8km1bGKWbSaH3bVWrlEkILNWkYNnySwjbjtwYr3gyHoX5O2Oh8c\n/a/hB98SlyrgNn1YYsfPoxSXs+7F/4Cbb8nH4mDIjMVKZktGA/OqQpt9PQgA\n02PwVPIiDTUlZJn5BsuKyuy2WoxhunU5QYKARrjdTGuFjdkyp8fX1vrZO8VO\ngi6s/NVZBzfelDWtHuQyYjK8mQqJ94ZV/mwV8qFNA6Ywa9aX3U0DKKQr7/ol\nA0ZnPXsU50cm8NKUgnijoNSvvl6iVIjqudxfXJKlW9twKKY8nFKh1MRloE6w\n14ZQ9WU+goVR7EGQC79sbbkdELxSQ/JjaoJVY4AHsHwCmCLAGlYaXEG6yelL\nYe6xDMaELHpfMk8KdDiDk43y11QIlR2Buti/Wg54UDwFm8X94WTiqIoRZ3qY\nKf/g5CrxYFF9vnZUiqO4bhTcGWhgOi0D99HPvPHmV7KVuSHeFcn8lYGxcpnf\nn9xLuGRBYJwBi+RVD0j4CXS9XD9u9xwAm/uz9ayXziAt3ezyVLqrzpmyzFX0\nhr64\r\n=bAux\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"bd51b22fcbccb6284e465f26681c5b359f13c05f","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.14.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.14.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.0","apollo-server-core":"2.5.1-alpha.14+bd51b22f","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.5.1-alpha.14+bd51b22f"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.5.1-alpha.14_1557453851266_0.8832475926680297","host":"s3://npm-registry-packages"}},"2.5.1-alpha.15":{"name":"apollo-server-cloud-functions","version":"2.5.1-alpha.15","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.5.1-alpha.15","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"3083b54379d10409babe68892d4b46b7489e701f","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.5.1-alpha.15.tgz","fileCount":20,"integrity":"sha512-1k90/5AjcwOQ3F21G079wubHj+HxN4bC/PyF+bFzsijDHPwuFLf7x5w9yW81il3LEAPoIL7cs3YooDXXH0RaUA==","signatures":[{"sig":"MEUCIQCj8D4hC6DrnOXrlSMF/zgCv0Pit2jPHKaT36/kaAETRwIgDx2cqBuMJese8PjR6TG0WUfY86Kgk0ErnJ6sL/fEm5s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32628,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1OOACRA9TVsSAnZWagAAm04P/Aywvx5wgPkqxXOViRnC\ns9PBoe64EN4pmNuVJ3wURgSvElD8AZ2jVZ6oXNBUy3lTAjlmKvZRKesLZd2t\nQYKcZHGqJU1ca8Isb8Dkx+8J1+jxvvDc2kMQttjuz1xC1jnTb0gv85xNZKj2\nkcpleOo3xzk3QZRdLLmko6M/f76FKp9/u5F7p5q2knNI7KQs4huP11ghHfHJ\nPXyCoJru8F3DMRPjIlbzOWav+IMGp9/hqJ9l39v/F+yTQqftR2YILkyCzZ9c\nO5oBDIgA6Vnaz3A9OpORlyCAmC1JQqAz2VDIld0igez3pyqYi2uvNza7C4es\nZDuN2rACWi0AbcEm8g2HuvIKDTTMEQmDZm/F6/B8PIYhO09ZyazZ9lCCJ0Pl\nIHiwxJPyS0CMlm/UAN2fBa9xGEq8eGxxfa+5MRjPcJN7MYNSu/FP5sFT6xMQ\n8Fnqe6imXqFuu0wslEDb9jb9Fl7m49iNVO75AnFlMAKvwZE2LWdEFZTRjdwM\ntceqN0zaQ/J9dSOtzInz0LgaqIGtJgzrAQ8CGis5/yZtrGxBVCO5i083Wb8w\ndXjXa30A8TB2r1uJwLJkYM74op2z3tplO3nDB9I8DMXrZX0nri34+XQlCtYF\nyHMraMJDn1T6bhG4S59o5r7mTbkndXM0bIU7MQaBh1uaZ3iurQr45hbyqBx5\nv4GF\r\n=8l3T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"e2670f66c1d39eb6597f2f524683843f4d95663d","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.14.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.14.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.0","apollo-server-core":"2.5.1-alpha.15+e2670f66","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.5.1-alpha.15+e2670f66"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.5.1-alpha.15_1557455743958_0.6009572439372222","host":"s3://npm-registry-packages"}},"2.6.0-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.6.0-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.0-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"adbfb03c3f39c56db9b1eb5115670739c6398970","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-xhkli7QzHzA+WcqzKkcq4+xqlE6mTmyFbcsCz4og0Eb6LoSWhzGEt9NzKR25BaC5ZoDAquStNMj55zfYKnL+aw==","signatures":[{"sig":"MEYCIQDblMm/I3E725A0rBgZmI2OjRi6c1lCdCyLsvQJh8qsrAIhAItpPMALp18RbTqxPRi64OuYxCGZSnM+vSplvt4MQ13I","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32598,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2cQkCRA9TVsSAnZWagAAHS0P/jGM2TI7JPscByUsGtRF\nSyDdftnhZPW+utaJ2OQ79ZT9x4YtuY2oDg5oRqMvyqo1yTadyWs60cE84bbm\ndJhP140qdnbAsuF9ETZ5wO4BVUbY60NnaXVOw6ikg3MjMhndeHn80tLgHrTv\nsraGvTFhq6g4x/AszRqlKauXPg3CNatla9pnC89no1tUChym3RjpG0XMgQ7H\n0QpSCdRSzglVVvWjlyjD1XOdPD3yb7u4ZELQ3llmecJRvs/RBgh7yhonDaqC\nyyvbh93Bl066zh+3BMWEIS5IGssgBLdy/hCLRbCPsgR0L/O2kovT+TN+Nrvs\npA2G1aTA5tamArpMHrzCIoB8jJkwhz2obWqXdJ8C7Z8q7+Ot4K3Ct5tWtb4A\nv6GCktyTbzRX4y58H9EOejBRILxIaAEe18UoA++lZqUweJo6WRuFpnMW3SDs\nIuOyvmTI82Yv+/H7K5F4/Jwc13jWoDm0kLSjziXXdzb8afaFQvOWCbFfUa69\nhng+OYf7P4U4Ppkq3QIJNuPpT0VX0XcEDwxwsohC8iXVK24pEdDNgeZjFnXg\nSX5InW3198fXFaZJoJZpWIFtjo//zf5j5JgQlPXigpXjqhtaos8Al0WM9f5i\nJW8V1j6bOfQG98C+WesK10naUNzcGnJ40RmVa+qCZSZ1Jx3H97jHWFHvhOB5\nUkDf\r\n=pqHP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"2c2f1b6ed2c79957de1cc11a298249f67f2c59e8","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v8.16.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.16.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.0","apollo-server-core":"2.6.0-alpha.0","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.6.0-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.0-alpha.0_1557775395619_0.20493597656593399","host":"s3://npm-registry-packages"}},"2.6.0-alpha.1":{"name":"apollo-server-cloud-functions","version":"2.6.0-alpha.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.0-alpha.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"8aa5b1f82422f69b6c038dc2f11f609cbf1431b5","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-WF/oa2wNVNmTcD9VZv9P8meO38e/Bld8v/WuGE1dAkIIYBc4APgKQevQAFfowF9klF1Q/2kf8s5qgUy856MB0A==","signatures":[{"sig":"MEYCIQDA3gMi6tMD3XoXUtyahtGu1BJCfDSp+cce5W/r9kA9CwIhAMGYPFAB3hsq+K+DTuxGexamowI8semqM/CEs38HVOV7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32598,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5ZZBCRA9TVsSAnZWagAA96AP/3V17+hopHoSrin2Tc/d\nOyEU3lv9bNvPmdcu0m6QB0g/R8xW7l9wD/482wAuVMnkF5s7MDffYlEGTeaq\n/gdwzSeyu7jwxUVlMiN5BtF1gGRMdYItuKOwnDClG5ueCBmSuHdVnN3epvSy\nnF8OMx5J4SGuQfVEc7oC9wa1T+1L1ARobZ/W4tObE2+j35uXRuZ/SAukmGwJ\n6Kkrn9+Ka1nuNCgTA8beTg8Jji9GOFJdFMo2NYgr0mJJM2BI/BF9dUBYs7Pk\nT30BSiNKd16uluC1NrHgo8dlHPIvq8ZS7yNnnk8C6ijOhBpVCZyyApf0sJwK\nNCgBXEqiYRfD53vPrMGrKLezToOpp29ikDDwORibEAfCo1/mwEuq9/CdSOpd\nasfdyz0f+rl1tacdIU9xC7eohX3/D1yUlSy0n+rp3wBsPKclxeomFIDCgfaD\nPsHxQsSK/OGQWgaaNcsKcHjwzDWgH5EUfO83aPuJrNNEAHXiwvU3qHIVmOgU\n9yoVBuhzbaj6htvWU8+CGoQoLM/yGR/K81KLHeA+/ovKXVmoVNxCdKj+P97P\nIEtpdLWpabhVNumle4ZuMbSP6oNUb+Z1W3Deo62P4wYv1VoF5cudXsnf2xLV\ntt4aDrtoE4Jby43SCbkobx5wAWHV87BUJvRsY+raZtgaNVZ6cgbIGIluVTY2\nkcqA\r\n=2VJC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"81282f920f901994544925ed27f5a2c77f8a7120","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.0","apollo-server-core":"2.6.0-alpha.1","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.6.0-alpha.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.0-alpha.1_1558550080352_0.776709014987752","host":"s3://npm-registry-packages"}},"2.6.0-alpha.2":{"name":"apollo-server-cloud-functions","version":"2.6.0-alpha.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.0-alpha.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"a1513a2ce13620b54bb79f9b5ea1ac38dbeba335","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.0-alpha.2.tgz","fileCount":20,"integrity":"sha512-uPtgC81hPA8VIOUfRnCMdG3Q5TYycWT47Ti+IQn3cYsyzB2EQRxClzDn8xEYMksLrwCsvWRCCwrrft2YvsnbRQ==","signatures":[{"sig":"MEUCIQDxRFVshr5T69hdchg9KVn3zOyFppNlTiKNOxwtwf/47QIgRc0Z0t9wGgBLtQcY1qHd0P8yU08LX1erMzaNqV93fIk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32598,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5axhCRA9TVsSAnZWagAAnn4QAJXalWQin5UDK/BOQD/4\nTY1KLYnWY2ta93AXNx4imGYc6ba8gA64nReY+UWMJI4U9EAi8y1c/TkfmIXt\nSsP3BOfQmz8WIUcREBzmSkMGziDmOTulMifAUNrpvgzOXMLqvIMLYBQswmdI\n0pt/mluR0r3Xn/OZWZAQBvZz8VbBQGut3dw83hh79cZZbFsPkifd9Qw4UPBi\nwfBBJnOtXjzpgNPhFl+/fH6UBdZelPYLHliCcaDyRHdcdfHvYxOINJb2pL9T\nrwO3tWFQnVVwAR3iYqfGjdU426Si1sPPH0syZcYKlf3B9k+4ZRq0SXIlG/nB\nvlOQrB2d5M/ZWFQz97wuYSDuoSrR+A7Qax0FGREnAPxsCPsTtTR6GInUOAWq\nbDBJ65UBulHWTDDd1yhfupPH7by2jyBuByG+Xn9cSJnHSqRNM7m4D6AIm2B0\nGxGKDEsjdM3EYkH6AC7MaEbaUx1RzxbEWwyVx5YFvD0Q/hMgNRGfUjMwliJ0\nR7r4f5RCORJJv5MKZrvTD0Nxo4ThfLu7PTyTCaKf9WBGXVE0oYW+z7CPPDTk\nhpXHtgpPW8Acb4VVVHtndNvqh0opLCb9DGl0q/0fZog23d9Ze73sCxs9x3Vp\nVzkyypL0afdzgHv/9yz7dm6WKnxtEBOKIuAPFNBFPNYBxwXmOsmC36CNUq0C\nIMjH\r\n=zgO+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"ecc9880ce99428eb6a62c0e6bff242beb1799f27","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.0","apollo-server-core":"2.6.0-alpha.2","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.6.0-alpha.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.0-alpha.2_1558555744487_0.798254909158141","host":"s3://npm-registry-packages"}},"2.6.0-alpha.3":{"name":"apollo-server-cloud-functions","version":"2.6.0-alpha.3","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.0-alpha.3","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"44e95e64ca53a481417a004301b2b32207b62882","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.0-alpha.3.tgz","fileCount":20,"integrity":"sha512-RJVxvFDqkVyltRj0SblKmhxOTmcpcrWNfdGcG8b/lks3E5D6f+IL1/w45TGyybDXkwdJ+h40A41cPYhRH9QUDw==","signatures":[{"sig":"MEUCIDkZFmTrZf5OP98VbdXsGhy8dkDZZGHl4zZkmrfDCgAOAiEAx0GicNZilppNWBVshcfA1AIx6Q/6yoJ86CHInMVoNFE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32598,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5a1tCRA9TVsSAnZWagAAWisP/iodxSvdWldzDhvhF0dQ\nfLHPbbXu6EPh1uRAAweXc4/NTvuCfyFkxi3ipUnT/T3d53tIYOaqIwnxsp/M\n2zRRTU/GHOw1clze2SmpS1b0f/Z7kirCXtbQpS6ju3kirAOauQdvD6W1+piM\niUHYB66Xm0vSOQNtVm85+AvjVE/HvoG69ib/wlzfBVxFUdm3Xc0g0YKH8AYT\nn/oO5qhKPFqwYV0BAXhtRaxH1dBkFb5sRVqpebe35h4gdHZ4RWTFyB1V1OW7\nLZ8kgw8tBZFzhbs8NCL0V5U7U0ZBQYQKcTnbuixTRVnqybji2oYTIdx97+pI\nC3SpCrCX4yzlSZssDYrZlsznDO+fUJw9BhNT8n8Es3vUtUM7e4iPiJ/erICV\nxnL8d2ZCEEBMyiyNKpbD23GJEEV6L+Gjs7qSiQ9mOsyFfb0EykjL6S/7P0pM\nXL+EMbgFPEBsOw5ygqAV4A149NtzJSRlxPfzwIw24csh86V1KmnTBmzwiF5o\n/PcpL2o3oY7EHg2aA1GD4gjac4V1QIHnQQE2uo/V4uDWFGUwPTLkUTq7cE/v\nVw9sN8tBFnKlUF9V3RonQDFpQ6wcJ7mRAkqZJTnae0XbS1FB976OOA/frJqk\ngkcqZwhW33OkU/lwxU8EbZ1m3FaXtkfEz6D5kK7ZxPMl8GsSvdV73Blpp+gn\nNScT\r\n=LijK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"7becac459840988ad698966196cbe120c7d680ea","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.0","apollo-server-core":"2.6.0-alpha.3","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.6.0-alpha.3"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.0-alpha.3_1558556012892_0.6854743147745874","host":"s3://npm-registry-packages"}},"2.6.0-alpha.4":{"name":"apollo-server-cloud-functions","version":"2.6.0-alpha.4","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.0-alpha.4","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"407f3f04c57a27b616d2e4ad32215f9bee43b944","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.0-alpha.4.tgz","fileCount":20,"integrity":"sha512-I3WPzBm/AwyOgze4AxrgZrDPF3suD98StlFFNqPkuUMt9e2JmpNMhkTJkYQLMhMM1poVTSLdo6LZ6ixbjQQy2w==","signatures":[{"sig":"MEUCIDKId+AIZBq3Zjjqy4S9sqsJ1HKVZLFEC4SsGz2DXV1PAiEAxOFnomcimV9dB0I0/UA4ZrOGZXPDqAjFSZTgRHARPzE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32598,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5taiCRA9TVsSAnZWagAA7w4P/0t4pQWUasIXxVRWoebg\nRv/91vrTMFdqxsnWBle0S0vNCYnm+mwD8/rF9WexTqKlYYjugt+1a3PWhddq\n5J6QFdM//WsXEtJf8dbrPX4/hc10tXDZb1+370pVH6FlHGMxWwMgQNSIafWg\nOh/R5L8RuSyrBgEB8Q5i1Z8AoEtTtie1iRNoP99XJ+krsiZxHM1zpR8gNyTa\nTS3736WpjaSwMPRPgQLmfZXT79AI4yr3vnnre323dVDwenfcSlDCz5720dx7\nhS5RPV5sBCQuNMlR1wx5TXyqPwnZ4IzW5RJF28KrZo/kC6vpNhbwAcgMv0xv\njI8snWQg609H+//ArYrV5QmXnAyNQ+LSBTslU/o1p8HGi4BeutZLL9hzpMAk\nAU8BkorEyPtggCuBaxKN9BBiYPzawKYgTG0epX9rdRcpTuASfBaR9IhOAFpj\nMV1VoGTaksFB967lfLmb/zuLbYe61CDIczNjcw2xodh5uSEclu4p/p8RKyFE\n1F42NO1HKMrlvL9MOVT3nozwgkn4PAFptsJmfV+Duhn06ogCnLanlhjwA/YW\nnnjL4Aedcmwg5Lin7rwPBQzvuxiyCYaOkCksh34U3mby+z0PtGXLLbICqdI9\na/0h09cQrZ5imd5fwH5JTOAkDdcPKYfoQYK7nKgkvEyGeC8JDahvM0bX4iiB\n7N7V\r\n=HkS7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"bae1f5c4b748c9935daaaf899f5508af18fc2c41","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.0","apollo-server-core":"2.6.0-alpha.4","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.6.0-alpha.4"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.0-alpha.4_1558632094763_0.39876325801285906","host":"s3://npm-registry-packages"}},"2.6.0-alpha.5":{"name":"apollo-server-cloud-functions","version":"2.6.0-alpha.5","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.0-alpha.5","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"6fe3b2a09709568ffdf99dab171bc0f1b8b9bf43","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.0-alpha.5.tgz","fileCount":20,"integrity":"sha512-NePDOQKlEBWH4DxIZNnd/a6lS4dgn4RcHk8qzVvr02eNkbDO00zEyEwTvMiZlLxSaBIRwTL4CaS98XynaFbEOg==","signatures":[{"sig":"MEYCIQD0oqg5I/aQGDgvOX9Hcsr2r4b+5LKHM8Z9zEH1XCPZswIhAJ2NE2atc+pqI8LtdqQ62PTowOJprn3JXp0Id+COh117","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32598,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5vcHCRA9TVsSAnZWagAAA0oP/R+CkSVOu5SwA0+E+WDq\nnDcCrudUc1kShIFOmhBJzNRIUEWRLkrlAlw2PjxLWxBW+dfD2lHuH3F9xjh/\nIJBLwJtk6bmmBIVFIuJL64mUqhK/7bUoP7mXBjcN16qKWXqJOQdwcXf1Invh\n/m6B5aAzjMvkQhVDR+FZl+PUeBacLw6s2LuBUOzT0haXDg/SRTBR41Joflq6\najM6KLx5YSxAvxFJSYhU+Yl02QT8fZzDQTZPcFROydqINN48KFN2exAQUaYA\nuMmqdww37XSdtROBP8xnj7HWnExPDmFM51JEY51csbGXcDRM0X66+VjaoXKn\nuMCdlHU7W7NyOsr3d28t6CvhkdLgAssqHWfdFKixZfyu5l75MsRgmcOoJshy\nvuTfOUulLJ8ImmKpInQYkeVv+oX4ptWRzo3JeHVcCGCZtPlEkglSyE4tV5Ek\n7mox2jbeEuhgqdKudfi9pf3cuTJUWh+EQXKHKJcfIXA2xft6kwd99pUQTllB\n0YQ29IGl6c6Sj6mkIY2tjyixR90m0mgSENqTvX3G4j4ncltA77cAqhaMvXe+\nJUqzyDymaD+EW0mRtfeoAQvJdnpbs5j2+jrrcribyP06ce30xa51ug6CWWpI\niPxBet4G4bRPwd8ceqJ9CvnwNghgIciJToMUGD5qUn8I2vqP8kbV+xaoZuxQ\nVbee\r\n=RcgD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"2654dde239e1b91980bc58c21bc576cfa40e3966","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.0","apollo-server-core":"2.6.0-alpha.5","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.6.0-alpha.5"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.0-alpha.5_1558640391059_0.9066505813246022","host":"s3://npm-registry-packages"}},"2.6.0-alpha.6":{"name":"apollo-server-cloud-functions","version":"2.6.0-alpha.6","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.0-alpha.6","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"7b79814457495e0398f1d3381bb93c0ae4c63b5d","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.0-alpha.6.tgz","fileCount":20,"integrity":"sha512-3B1Lpf90daBrm+03AoWFsf4I9pRP7m2QWkudqOro7i1KHNjHubn2sGUzx9tz9eKc3S3WnA/lsjetrMZxq6XSvA==","signatures":[{"sig":"MEQCIAaob+ugfHrTDMo1WCyk4LvK/23IGycn9itlIS4JjeMkAiAN9vaMFszdVs9slPiN/QfFh/ZcSz2hYJbmNNH/MzORgA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32598,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc6GCTCRA9TVsSAnZWagAAqRoP/22d8KQgVCs+MHhcz8QU\nxP9LfpcpGr5S5QSzvnvuPmkM6iFTSNhunx5svh1kKiU2u7X+xzO3DREae5lt\nHh8VxaCZP+WvPL0WVyfkOfRthm97hDlLASgsu7XB8uQJENas1VY/Xz8YHMUl\numoFFAqLlrvOcs46AGxa15AQllkUyghqL5DrzGZIsqxGYA0A+pHEpcgeU7ml\n3rWSygtYEFYIe1C77879bUStdBl0ueWWLE5pBM1G9GyiYcBSkozD22jReEa6\nm3JX62g1jDBu4ZDj/6K9ZaJAsE1Z5cP5pPGOvQreFUf1U/VD4zqHRmHWVu2D\nRY+Of1+3XW2XjMx4jQ/LR7sGpCkwL5rngNoo6uH5FuCJdTjp12CNS7Ab5izl\n7ruyInLvHtKNB1QYnKz286UGNwiEI28130mDVHiK5JUBohVjs7nqkd5pqxvr\nraemhvo5KZ4Oa3hxL8urTcuBNPJV+RMOQrJN/eoFvTsAADat72NM1y463dls\nWHtcTJjTk6SJO821+Rvsyz3GuNqC4AymJEzQktuMdmVGUkHt30IUTj6Igl6/\njw+UzuKNSfw8J30e+5IBaERFCgKqLx7W4ekRQMDVuyGA3t/x40YW0pJOxQ+F\nLj24AmSVNf/S91DSWHDb2wztHjoYfAIs0GQM8AHs3fSQAexKoOsuHUWaebL/\nwiMO\r\n=YqFr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"590c1baf5cc5aebe58a9532c717453cc9d344a31","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.0","apollo-server-core":"2.6.0-alpha.6","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.6.0-alpha.6"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.0-alpha.6_1558732946938_0.8589451418963538","host":"s3://npm-registry-packages"}},"2.6.0-alpha.7":{"name":"apollo-server-cloud-functions","version":"2.6.0-alpha.7","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.0-alpha.7","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"f069c6a67135e02302604012bb683f83a6bce4c6","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.0-alpha.7.tgz","fileCount":20,"integrity":"sha512-Vng/HxIt/bQ/oXUofRLXcFvztqFKvDawe58fC8iFuclO4IdTXPJyFXxxQ9VVbXYiPn0bvDvAbDqPXo5fLRxH/g==","signatures":[{"sig":"MEQCIFyHn47PLH1enaU0AQdlJYR7HbIAIh8CsaHAyppRY+NZAiAiYyTrd6hlcg7+/hop/z0G67YVm5xJJzodsqe48dWxxw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7CwrCRA9TVsSAnZWagAA7sAP/1GAoVVHMUzXZjk+wm19\n+iIOoE2l+tLPUz+EvSNOuX2zvuvZpdouOOyhFwP3gP5UkSkomYDpbAzWSf+w\nrPG07keYJpNUHrzfWMV9vnAuTo+pxXyLYMcCjF/o5kSMFglbtjFAwqxrp1yF\nsEyF2IAPwohXG7t1Aq0O7VqtM6SljQeJVrzIK6tbHUuJMBh7teBVmDMtzd17\nr+ux3IzJEYTWQEUn+7tykUgtjRV5DM5Z9QfhDWAzA/LZcsLwoeR+t/VMN/86\nWF6O4vWBpY0N5jkkktqTSIco0Qkzs3d4K7Yy0XXjhJsPivkm4xd4XXRubdqe\nX4ORR9/xDjZ8f1wyqMVpYtjqzeuUPRlj7SpR3AJKUihNM/B8f1cxj3/n4uin\nSe6x4zxSuJ7+CVj5tkrN4YfxjMSzSPBNo2VQo+T1zMaoI/rhsXJduenjbex5\nRg72XH09SaV8qGURblL7r3c6++/O5AonnmG3dak+9n5P3j1xTeSnnplQ/HHr\n1ji+8IPRDvwxHsoWlo9YgRR5JJxL9MBLDyKMcGIbMvwiNHRzC0/ykkFKZaUv\nTqHbIWZdu9GaS/AJQroCgcmdlezCxY2/JGHWSUSv96nQ4uKR3cj2kF+pMg7I\n+8SxxO3t/bPc5KBciQtM5WFvwb1Gao0159oxfKNqK4gpd9bZvJOuW+CVhapi\nKbnr\r\n=DARl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"b544a25db9d3c6372f96210f901c5c9076610391","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.1-alpha.0","apollo-server-core":"2.6.0-alpha.7","@apollographql/graphql-playground-html":"^1.6.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.6.0-alpha.7"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.0-alpha.7_1558981673479_0.6588264505166106","host":"s3://npm-registry-packages"}},"2.6.0-alpha.8":{"name":"apollo-server-cloud-functions","version":"2.6.0-alpha.8","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.0-alpha.8","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"ed183547e8b1783cccb75a98daca197ef7ccefe2","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.0-alpha.8.tgz","fileCount":20,"integrity":"sha512-RjBSjRaPsxrrK05dknCM2oRqrYL5AeIJlcXb7400FSf/S2PijuPwhaZWz4U5U28L/fUkkJI5MBc8kORSzcS5Sw==","signatures":[{"sig":"MEQCIFi59enbl75IFBH3QR4Zs/jdyHuWaAATwU1yiBQMtf+6AiBAmzx7eYBFm6JH93x7DbDz6z4QAZ0KvXFNgMb+3/yAbQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7VMcCRA9TVsSAnZWagAAnKQP/1KozBoFsut9h28lGZx2\ntVsJJ/bvo5MkrXHeifvXDk+nb6fNr6QZ5wB3UanpUSOdMaGUDwCBztwlWCRt\nSadpX4eOdLx7R7BdSsfmm3RUbhf5rVyfcB67X9/iU8e6+ePX6jdMpA1MajWR\nnf6/ny6PSuROEmv3qnEf41bDxsIEwi2brKrVBH+OKU0uvNNgVo8DgOMD1w3d\nIlKSMN+U88xbvxv1KiJYirCO4504WqL0n23JyxTycFe3aeAWdRmO/T14yBnx\nszyWkJ+XIrL0LOTxCDNiufuONwwHgkLgjRBnKD9iQSfQSt+pYaPBI5X8QrK5\n8BPl/K2A9XPEiL+3bfN8wk4h1EkH4wvPkc5+axEh/fd+osXRFTzKz7sgTt36\nWWKFkhqyiF/BanHOj/ty9CFX6vXIZ0wfDmC1YQoD3JQQ3hStTHS/FIfawsfv\nLgnmMKq2fNXXSPaVDIGXvZU2IB/dkv2CGB2hGjgcLLQLhTUbDOmtCu5DYLrF\n3koV//xEZF5pyVR4SS9URFSy3SHsg1frFyJ2i9Q6S4QNHxGAg2ERqQuRjhzO\nSnts0Gwek8Grd1lNhCEvTBYgXaOnPTnTSuOpkQfQYVYxHyHBniBbbo1MPMyx\nDSzBWB2O/PyvAKGlPYZPd9uZ2zwvCETukLKxk/r17UmTb95PdozcYgw2p1Kx\nDatg\r\n=QPj4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"85c1caf6c52932493f6f811faf59af516e8f7dc5","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.1-alpha.0","apollo-server-core":"2.6.0-alpha.8","@apollographql/graphql-playground-html":"1.6.19"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.6.0-alpha.8"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.0-alpha.8_1559057180063_0.7052940378596257","host":"s3://npm-registry-packages"}},"2.5.1-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.5.1-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.5.1-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"100584288ff74598848766da67e7067dcaa0f9aa","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.5.1-alpha.0.tgz","fileCount":20,"integrity":"sha512-bvhEB6Hgi8r18PBnfANUWnJuQK/Ppd/R9YjtYLtPP+l6LF35J8WONODiQB5kQDre4udDExPp0lDJWI9cMGLXXA==","signatures":[{"sig":"MEYCIQDLo5x6OzITxxOy14ezTJoBhv83OPQIvdVx3W6YUjgo/wIhAIqXQqnq3yfvKa2EbEAS8UjpfeJX9A0QfZY0PmpWZJUg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32598,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc75xACRA9TVsSAnZWagAA8dEP+wXm/EnQL+byi3SXYOYr\nZ6EbdZobtJDNASbJ9+9tQ7HZ9X2egWR7NM0diXIDVvZWPAizk3Yj7WqJNf7r\nd+3xdqi2i+aYAyp5k8z+eyvnQqohV9FdaZwuhwzfh8LV4jSfy3xsQQN9P0VC\nklrjvxagI6wVVNtsU2zqvz60VY7GpHavV2hHjbk694to9dv0/BQnCkIkYiW4\nQjSgPqSW8E++OJu/3vEp+PIT60jbiQrAmjRJt6Z+iXVSE1lnA/dDvxwobqhP\nlUIHcn3N+4kexeOYygGCpY+PH0F6OYRLX2YViKYU5zLjWQLuXmiv4DxCweMh\nPSPIaqrMjss7VAuXI8vST0aPkc8RXMIOlUUN0EuOUSs4yL9PJhtj4qslvp6b\nRJbD8a6j07SH/U69VPBf2H0xjKuvsn/Kr0DdTrBBznSCbdB2bihNDeb1YivR\nHH1+fV3VLtFlLfLABkSV4IpwnfsbSLzo2w1Ujm/S94imhMI8Xy1luw/rZ0Pw\nIcjvQQ0IUEIEGJYmZmsFTg4uaEDZnmFOHXv1jXI69cJFpbzyuZquPZe8ticK\nUAguH5tWGMj+G7IrX1SFduq7mSz0JdENPnjknGiw1Ac3vfaiWjeFhCscyaIo\ntXwl4ol0Azd68HBQ2RWA0VfBuIZqQ6n1uTGzj/tWd5FhtUiZqPg4KwRNlWfG\nwN/b\r\n=LhCG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"ffc00543701cb66dd0d83798caf295e4052473a8","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.0","apollo-server-core":"2.5.1-alpha.0","@apollographql/graphql-playground-html":"1.6.19"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.5.1-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.5.1-alpha.0_1559206975164_0.09112193272213176","host":"s3://npm-registry-packages"}},"2.5.1-alpha.1":{"name":"apollo-server-cloud-functions","version":"2.5.1-alpha.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.5.1-alpha.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"f204d3a1ddc02ac5d37d9030644ce5e5371736e7","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.5.1-alpha.1.tgz","fileCount":20,"integrity":"sha512-epP+9VVucsSSrz93TPwzE7UnqUxox+jEO+XLbQyR5foq5E2LhbnSVL5tMDaZ0DwCYUY1hPRzxOnz8Lb50Q9O/w==","signatures":[{"sig":"MEYCIQDe4yXJWj9zMzTuus369tCG64bWo4G/EZqHLUZ9B9yRJAIhAMNbAKigwOuoxmrVLBL6o0ACfbJH/GT3T19vVC7hp2IM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32598,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc77cTCRA9TVsSAnZWagAAvh4P/0I++v/9PIbYxO3WydqN\nDpnjdQKb81aDB891fqu2VcYjoO5pUA2TJ0o8u8dUSyuHzqazydWKG2EQR8Vd\nfvIsk4RcqL967VfRxQEt84PmRguLsifdMyCASKjMOhC6pI4EXemUkHVouK//\ntva/Ra5YU5KYpe2RqD1CbU5kxbQlr2lhRz2WfJBdv7XzDlnzJF38Uv3ScJ4+\nEs2ypw97kDRunEWby3Whxd4MP9H0V62LOYI5cRT2gVmTkfPsVsw3hHXKhnVd\n6BzSTeju3Xu3aP46Sqfv2NeC++TfkH4PZN+g8IG3ELG47LmwUrVJ26IQ2AYM\noDRnuFtT9wqOpDkKFUFt6ZUEaBmBo+jhMEuZuQa9jYbHOscyIXiGAvEGhrBp\nhImZm0CLHnDmqmKMIeyYZnibeG/KPJbWgfLFCYRQmYadWq7o8QsXKCVt72nj\nli0wjmKY5JFuhes7DTZoliWq07vzO4vaZb73wruo6yDKeaQ8sJMIHSExFfgz\nSaFsFYfm0vR2Fs+4b9Xq/BuWkLrjfOzkzJMBuMT7BVJ4gaG856eUppqgsQcn\nMFdxxKIfUhQqTRmdQjISOn34hdQDBRwRtlFF/6f+qDG9/KyVyTG8yb7oBWNa\nIAIzYn0MS57bAPP7Ik6TGXgBL0BVpjK96l4c+IEZ8J+nUxedU55id9/Sd6NK\nCWg+\r\n=zBbK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"240e8973a67f6404f46ab1fb8cddf6a0d824b242","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.0","apollo-server-core":"2.5.1-alpha.1","@apollographql/graphql-playground-html":"1.6.20"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.5.1-alpha.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.5.1-alpha.1_1559213842846_0.5774231031358865","host":"s3://npm-registry-packages"}},"2.5.1":{"name":"apollo-server-cloud-functions","version":"2.5.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.5.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"d414e073ca66b4b8ffe2e46643dfe2ff0919a245","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.5.1.tgz","fileCount":20,"integrity":"sha512-zuTExGdCqa7y2qYUu7eveY61xG8vYMyQI7nAz+EBpIuzJkYw9ll8m+/nwV20SOPyVBsx2mWvYbx8l0QCdOsPdg==","signatures":[{"sig":"MEQCIHhSB9gYxScgm7MRuYgJUDv7NBjnXlFMAOwDAoRruUZIAiB9rILG3By8LwWLzOejo/d8HqgAzUJCXw+ZO6lXAps+yg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32574,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc79goCRA9TVsSAnZWagAAKecP/0/qyZVOI/s4caR+Dl4g\n1gfa5WSpF7WQrWSmdtugR+FoU0M3p0CeryZvoj5PxY8VgXBnmcscfT1i5NJS\nhMJiDI5KcDdm0khU571vrRg10w/ULQVPy+8P+yuEsBvalqzhTplLKDEArWfK\n0/V0Pqcd3zfE4Q+OO6G0kSHnuU9aUAA+3zV4m4mAvSAWjZI2FWchn4CEL8iE\nF96a/0jGxvEx9ae8oeC2+j5ytr9gB+QLIlq9Ak4ipN/Nnv8WN5wxNHXJ6BQY\nv0Xfa/N6jXX9rolPDaBpau3UHgTIWE4upJQRiY9dIuN10xRIS8zDLAE56GZw\nY+/4+8dxBNkq2ABoycdJF0RszPOAF6deYv3vfZ0gRBeFrDX2ffJnhPNWrwF4\n7aTZM09Fwy5sdxWCUSW0NCjJ0GLWQw9wvGgdY9cetTfsjnJVpJxY09ZzM7jV\neSpI6B0ERP5wpBb3jnTUFxVAC+E3oE0eufgs6vy772eirkMfIgOxGoK8JtwR\nghotRMaNbjuaUj9LonjVWHDzXj2L0UjBrFuPkTPUx6huAZYzoh5bD9Jii0xw\nrCyzlAHimT/JIZuX+sN75N7lqyxIhjxUFjQ+8kvb6MzLbC3sRIgs8aTiTUHW\nCub6VANGaJnLPp716Vz6FYz3Ixj9uteu6bi/DyJ1CFTiv+64JwVBas2Ffgmk\nBDpI\r\n=XHeA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"5814f0a9f53cfff131f0b127301866f9242ce196","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.0","apollo-server-core":"2.5.1","@apollographql/graphql-playground-html":"1.6.20"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.5.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.5.1_1559222311481_0.9017741775261343","host":"s3://npm-registry-packages"}},"2.6.0-alpha.9":{"name":"apollo-server-cloud-functions","version":"2.6.0-alpha.9","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.0-alpha.9","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"928dbc705fb4ea45d87048e4cd1e6604a63aaac1","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.0-alpha.9.tgz","fileCount":20,"integrity":"sha512-u1Ab0HJGasdIic/x++JHCGVVa0agZoPXE1ectn0tUwic6S3FCPAn7yMzc1GFGJUMzDsqSg0MEutMEd7d91cVrg==","signatures":[{"sig":"MEUCIQCYxeDdd0//dDodn2oINUlvLq/Y4Kenq4ULEM374bv2DQIgTE4UElGamcrNX5XuhyFYUGYc1MSiRbup+t1YitrtbTk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8DUoCRA9TVsSAnZWagAAzfAP/08OGBpc+MPyuAEI0wI0\n8hfniD7UvZp1Dm1kFFdCsDMo2nrBWTQd8lk/wDdbfSJ0bacFRftg8nC8zsw2\nW3uDZHVX3uwraRFfYm2XC13/rvQ94tJyTyEpmpjrRZzfeLgjBjv1vn7/I0NC\n/OPpnG9l6XTYt1eZuAgr/BxXrNq0Nt6F1yzPcKzfunOuAW/sJCdkNpsRU61r\ny/wquG3i5K8Tx/R8ADuY+b2vjQGTBWYBxluRC1isHzKlWnW2OH/z4JQ6XDf6\nYibYZXmuJaR+MwmQLLiZNm0HiR6MlYOFWGkqQO/SOMf6p18CxVhieswAObam\nzyJjZEBkkqF1CK0ayxDgxTvTaDVsPjOr76gvwAEGZv5SOPKYqM5NzCQ0MQQw\ntRLjgJ4PC5xYP7k9nhv6gcXNDF9/TcHacrhZKBzwWA7/Hu1HiOBB1SKuFjD7\nlqXsiwyPc59ysi9ha/hSCV1u3G+utszJN61hfwCepUC1Xo0+HaTxZcuiad8/\ncOBbRhu1BDhPH/EkHwqoW3vlotiZsJdzPRh02pJKFPJQsnzx8tl7NpIEVIIe\ngL1vQ2KsVEmrXVFSFiPZMmBQoUFVoUp2pYoG4GrSvcIJQbBHQqvC3VViLNGm\nuz6rzokrvZwIf3fwTTXjVYY+W8u9WaHPg6T5QuaNX3NuTNHLHW/Qu5kPqj3h\nNy8X\r\n=bSy5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"fdcd0d29c14a76bd70931c7bb5961b49a4f84d0e","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.1-alpha.0","apollo-server-core":"2.6.0-alpha.9","@apollographql/graphql-playground-html":"1.6.20"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.6.0-alpha.9"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.0-alpha.9_1559246120230_0.805511950017511","host":"s3://npm-registry-packages"}},"2.6.0-rc.0":{"name":"apollo-server-cloud-functions","version":"2.6.0-rc.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.0-rc.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"5525c9c0efe4d369d4122aab75dce8fe53bd17f9","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.0-rc.0.tgz","fileCount":20,"integrity":"sha512-q1VKn7mNxiQnYU7/uVEM9vq9bxIn2PwRx+C69Xg8cGfnYl1xyECWGZekf/juUDwnZ3LiVMSWKxKtOGXiyx6VyA==","signatures":[{"sig":"MEYCIQDiiKJeN0vdzT3iLPmJHzHz/h1KWflxHP64u+caw1NAkAIhAKoP0YzHMq6xKZGJ6EVek0LTExAgOg1viKSr8jw2DQPH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8D1LCRA9TVsSAnZWagAAl6gQAIfcRRXYFawws1R9PpZo\nzwSZeKmbQjzgCjluSTbFZZJrytoKcEYD/MIpCwGFoWgVZ2QYj/p05X10j+0T\nEDxlwvMEb4qAftHWQ+Gt5CTzaP9F7bqs4N5g62cM0fkCs/G1nQcz5BTVkA1D\nlFhzfp+oJcKy/ZMZ6sbF+zno/QH+jWSHPIIEMhI9x2ZJhcx9pOPERWwEJXb2\nV8boFLkA/ozbh5KO/nioSBcnomonzIPUDevWi3owHWD8GsC2h6FuT9eA9e9/\njVU0ELZDFGpDrcz4jXbrGVVHj2B9d9MiTc7PADatj0JBvwluc/WuCCJzZFrq\n5gZ89VGj39amRoWPgLg17eRzffnATVYm5SBASE+9fRTaOKjUx078GqDV9vPg\nA/K8JkGZ5wawkb090xk8e29JdKC1p8HmfQcyMu1bmUMatSqQj3lmxUPpnN/K\nt8kXPCAlf9nCxtZwak+rhoYNBSm4TByDyWwMxSGSpUsOlL8K/HspHEc+5goH\nDKoO+pH8E+JsLParJUx241KWGkMi2/Xuucm/tAx+XkwUZeZsasHa3TdRZNs5\nxcvOHjkKWiR9jQUNSzlF5d1tYr+nCBvjc/cYEriJ9NZ33ewjG34aqhX4v+LX\n+fcDG4bZhTpaHfmLZgILQxxbaUuOPz+SWTnPfjqUvUkO2WixtgESBxURtkla\noa3P\r\n=9P8q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"cfdac5365781a2459b3daea5dcc6769990cbd666","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.3.1-alpha.0","apollo-server-core":"2.6.0-rc.0","@apollographql/graphql-playground-html":"1.6.20"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.6.0-rc.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.0-rc.0_1559248202920_0.061444510419533804","host":"s3://npm-registry-packages"}},"2.6.0":{"name":"apollo-server-cloud-functions","version":"2.6.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"9bde9c0213cf7124fa0cec0c342452237e189884","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.0.tgz","fileCount":20,"integrity":"sha512-Kx9s7NyCQ6loGcgeAHl1WSC23CND1nzTawoilQzZ84kAl0/hNvnl1XEFSr+kNBJMKxmFgxWVyL/YmptyLkiqVQ==","signatures":[{"sig":"MEQCIAXKR9KCvUTmlW8sPgLDKEgF4lH+tQdsWyUq2GOD2O1bAiBmgNr8GSQejEYKAqnksE2N4Xr82TiROJm4B4TuO+J4rQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32577,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8WtqCRA9TVsSAnZWagAAIWsQAKNTgsmjPW981CprjU+2\nPaj5nrrUSBbuW643FI/yk9+0r3xW2PHTKXXhENWdNsyy38WgorA0sHW7NAav\nv+gdpCapN0OPvDs8X2/U/cvykZiz7QSPrdod9Y9So531RiEf+EA4IJyT4FOS\nWQJ48ysNKkz3sKfIkJTS9hqeBfy8eR80KYAtXs1DJcQIXKIf0JEnZjis0VHt\nAleakWHc3ezl4Dua9glDSzesU3zfp7nZiGk3TfoTty3AVaJQtpZlhTjMLdWm\nANGDWdZcNtCqTWloNPpZDwmssc+BNRmFJ3WO6VlSHiY4G0p6tZzhIohKj9uy\nutjnm+siy7KwELI67VgK2UUWZFktLGDm7cwpjkUjXoauQn81Ruf8/g8RcgA3\ncS6mfSs2DFYwtfIAznyGvhJJqsaSaO+tMhVSY64HR6vbn7YsjiGKN3KwKQhv\noDJW1zEsgiNjAavZIhtG/rh30L4B4YSdBJrGZC7qwhisV0Q+k2ru8p0q0T3X\nUr6SRrvLSod5qoPsF8aHLR9GmnUC0FcPHPdWrY4RQwuJ6SSYQe/DckXLELOM\nRPoWBm2eXc1IXt7zEerSPRbzZvmNtgqtnh4InBEv49Q4cCvVE8MVUw7fATKi\n8QXrZ+ZcaaLrplMtDujtdLuDQhAAVI3LNoU8sPqBN0novOMCOmg36Ca/lu3O\nKbFJ\r\n=yFpP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"dcab64689dec2d00a9c6d302c7c05c5ab847e855","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.6.0","@apollographql/graphql-playground-html":"1.6.20"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.6.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.0_1559325545642_0.9947742226497625","host":"s3://npm-registry-packages"}},"2.6.1-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.6.1-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.1-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"f47417bbd936a3364fd0bf18411b3e4b53d96a0e","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.1-alpha.0.tgz","fileCount":20,"integrity":"sha512-iyJtjrVQDBvWZzQswCPvcBvssoHdE8k6FbaVs/2V1hgM/lHwpjD9fBlsnpDAYtlOr4EBk+fOXIP1Qxf1nvLDDg==","signatures":[{"sig":"MEYCIQDWLOqtk0jvQi+AyaALIUhCDEgQhUgaDmQ6vo/foKUl/wIhANpQcE3wBVaaxCaCZgtGjM57YnznRGjfRtvH6CnUO0zm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8Z+nCRA9TVsSAnZWagAAuhQQAISFxuh0+l1hkUUNfozv\nT3AvuJQucnSUsGqzZIhuiYcVbQa5qSXHLTzLjsfvXXKBkyeMU4/bIzNHluCv\nyjh317jvAvWbsB/AUTxGHmEQAGkPjYOrif8Y0GZl1Foo/FiuXlo4MnHqh0zh\nyUp4M3eT6iVwhBK90qdC6lGBeufloxuTO0/TaBEjh90D2IlmXslhfdGqdkK6\nTZ3P6ZV7GpOvXK9U4sHwm+yRa/tOkVA8B3EiMVJ/n1A8KaK5r222FYGSqDmm\nsZjT4Uh7PU9cDrL+k6MSIymEo74cv1R0/rhSX3F3B5uowHHBV+QB6wDpQeWV\nsSxefItVmM5wFwsbXUufeDYcikMKhSHKTpEZ5ki975qufg5GeClgtpPLeUUM\nWajDY2NukH4tV90vMoEiuks9kQu0lWgRWRAchL4AJsr4BicyvzelSsBgBJaA\nP5Ne9CkFMe+OzHuC2onoUviYOjfgLdnbAA7cHXW/Gcm3szszDsPGh0mKDmy1\niJcjHOgHLdoPQQ9cBI1FAVHdoBWUb5yenfC1ti4Yj8UOJiiL0RQ9EL4jQ+lD\nT7L6xr5OP06VE8N0OY4WiCIha9i8Na1J3COygjaiEMAQYSC1Nxd8YXj/yx0t\n0ru5e3qvA8MrEojNWVK76GTL+djIHeZel+2hK3bCMZpjZ71+OQtqrp7i4sE+\nH07b\r\n=trPl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"acaac3c64a050eac02848cffc32feb514825b672","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.6.1-alpha.0","@apollographql/graphql-playground-html":"1.6.20"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.6.1-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.1-alpha.0_1559338918972_0.007635156781772956","host":"s3://npm-registry-packages"}},"2.6.1":{"name":"apollo-server-cloud-functions","version":"2.6.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"87013049a974ea3f00695e5dd4d1eeb83f00a5b7","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.1.tgz","fileCount":20,"integrity":"sha512-Xj3MzMTZX+OM5tImhySUbp18CXk4SYslgKMonWL05Nyfn+CvoD9rVb/iE52vCF/QYBLwzoU/EsH+EAdPNrT8zQ==","signatures":[{"sig":"MEUCICxkaGRer2dmBrzl9ob8BnfTwoGK6HRk21SRlnP0NcogAiEApXybtSYfstroZjOme29lJ6hIDB/vwKLoRi9Anwj06y8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32577,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8aSOCRA9TVsSAnZWagAAymMQAIejv6smovNiqUmqv9+0\nd4oJlwUwKdObynzOdz7peWVDgZuMDLKhG4w/RG3XgkOhYbF3yie00LYoHEGK\novUMea84OOKeIlTF7JskB8yee8g2SEFJmUsPJ9zVvGMP5ccsn3GWjbZRB20n\nBL4CEuu4U4K/XizjV4IChuJ4QqpHFCQRTjIYcWksH/qogM78JG4OKIAh2Aj7\n01vz+udpb4bKvOoxY9ushzF1bfVTfQ2OLSbKfFLo5tS1pYRoH1PK4MReBKus\nTG9luZ68sNBlKVIm17MOs6Y3xYciIL1cfODZZuaCXyoneSxkBZrQewbFvOGN\n+LmmMJKbg0TkRMj9oHVD612VGAEZVeBIDYLTiE5Uhf/ycBZsA8Xm0PiRYZjK\nG6oecvLq8dI9bjegdi5vTyKQQ4YpwdIqIMKeBKumC3lW2k/aPkYb55Q1Svzb\nb/X7NnbXT6lLHzP740BSaIggrUrFtQzyK3JuIHolwDV4cRlayx62+daPul6d\nBNCMdHOlP0n/An3GRWJDxIX1K3983sAhi3npXc14QEush3BuNjdp2hE8pM+M\nSHaFi28LNBnPc4skDIOQ50qzlyHh0vGq3aDI9oeD6TJLB4lCHxd/MTmzRL1j\ntlXvyFWeMrPZDZNoY6ou1dhsuQ9UwjaSV0X/A3EixjQreUr1m5Pk4o5iKP+o\nFrLr\r\n=2CTb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"77b044169d61dd50f8426a1ba87710cf38fefd36","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.6.1","@apollographql/graphql-playground-html":"1.6.20"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.6.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.1_1559340173479_0.5914156517753133","host":"s3://npm-registry-packages"}},"2.6.2-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.6.2-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.2-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"106d50c339a2d14d3d81bcf6cae5e122e2162a48","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.2-alpha.0.tgz","fileCount":20,"integrity":"sha512-PGFJmqd0E6T7hWE/zX1LvD+/EaJtDwiP5V4HlXJFNbCffK3/ExWFvdQzkTspRut+obe+qkwUK6yBgLfii4WU3w==","signatures":[{"sig":"MEQCIHPyPA/IbyOmXYujpKud2GMcpw4L68vmaW012PIqNyTuAiBxU75zhG7oxesQFMzQPwVK3OWTrCrKajk2SfumbMe0VQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+TDeCRA9TVsSAnZWagAA7tsQAIabEMf4werL3jUdWddb\nVtcpI0/yuvV7KM4Mr9A+QbYDaXykmDK0PtxSrQ2arxbnqHJ2i8TpkDTIVO6u\nwkqPD5ttkswE4iURJE0XqBo6pJsToy6aaNXRgEzAgCmKNPibgWkZzjLPhyDW\nLnoiAu+ps8ZOnYLOxxDRTEMQrOQoxtmO9fQUu/gL+mxtJZAjbUBY+4CzP7A1\ngobh32XqLlY2pk7uaBB+liMx9aoENYMGOAqSGXKNf3TU+BRenggnak1jtA9n\nuHCUt0eKC2mcXJ6Khy4ymQ8AATupFBok8E53U07j99hBuFsuZg12pB0Z7rxQ\n5/3/JzLeESTBChMh3gJCWacFgOD+2Oe5qCSowV3GUtF72dPkR+ABnxGANtSR\n75AL9mziVuw6xDspOhLSor6fAXirXVyZtQvF2YHJvRXBuDc8XQRIyGFt7wEv\nzmquMQxfhuchs8NMKQtPRSZ+3jE+l3vhcuOJW7JRmVXV+ssRKNvvlFT0yJqF\nOCuwGWlHRkU8c3lFvK1mm2Es9aHgVn4OX8pALQuCMc+xapLTDW/y7Z3u7g6x\ntDx9jM6bdtpKT3wh0EUnPE84+d6sg0QVYHVNM8IgJBcowMsQv7mFPd0r/bxq\n+Lz+OWkbz/mIfvZxk24IbAqHMGQg7KUie1LtxPdvQFrn9PmNob2eGv7XmtUu\ndKr3\r\n=r7rr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"d7d9180a88f22b7259742fa4f14cadcf34c557cd","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.14.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.14.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.6.2-alpha.0","@apollographql/graphql-playground-html":"1.6.20"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.6.2-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.2-alpha.0_1559834845810_0.5971498685175132","host":"s3://npm-registry-packages"}},"2.6.2":{"name":"apollo-server-cloud-functions","version":"2.6.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"6a965187882e56f2cdbb7e78bbe9b7ef3adb2fdf","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.2.tgz","fileCount":20,"integrity":"sha512-0MGtwaJUVsrXOj+k7ZyZG6mXV3HNT0PeLYWtLZkme8DkxfhaR1h6f36y0TEl04Djnp6qJ98Z46FRt54Dnx5suQ==","signatures":[{"sig":"MEUCIQC7NFpQYcJU7VDhMsRPOspEFfKsHIIGPJA0cMzW7pmEywIgPRBrhmR/NWsY1RifiLj9pZpD36/Tz4kGFVgHcBLBdgQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32577,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+W4lCRA9TVsSAnZWagAAQj0QAIko3IXvocXponb5JpYk\nfm42M9ODhPyR0vh0CdnL2ALj79hDxrPDdfPxrMr9mHyHDcvCqP5yuwv7c2va\nODIqKgzrPk+DuONEUtTHpraCgfGYhjvCfL++/MELekdIZ8Ol8GVfwvyhixVX\nQRAXX9/47jvzKRb3StMY6EfVU5jGqQrI5L/pKcOtnfOoLoDMvIOEAPzyidqU\nLy0Vv6DJ3ba0iiCg0sgdXnC9L1CHuiAm0IB4kq+u7+Psfl+bcvdfs5FQkqbx\nzClcoGeaEkWpdaBe3CAo1itfyKcDkuAYKPBAYTM14REq/vGlXZkmdv3MGSzc\noX5DiLLznYYKv/yIWs98sfOVQHksyQNPvoQB0bsIeCW4+naRimpT6soRRQH4\nqpz7l7qhjklyNQW1SxyKAHfcN2PvsHiLIxK5YhPprLUK3pZ/oxOFX6WIWTkR\nF5jnXzVJ0Xob0ROs2NkbDVSooucHBiHdvAs3eSNn1R1O+VQuDuWi4LZvgI6b\nY2IOE0ukNZHaswlEwRevevnLtHn+P9LvVq/gFo0YXZsxYqixmYiRe29HHhKB\nB+fGoGR+5Mpa5xidUkSBQ7GO6bM070k3RL4y9IsfevkJ5H8kKrUZksctG4KO\n4vrHJwKXiNKZpOZyeAbKCT12eAxaCQ/lPPZT3ZRRpiu4kHijabYtWh0RsbQQ\nL1c+\r\n=ol0V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"4fdf6f2aa2f14854b54b0d6de7d477afc7702916","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.14.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.14.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.6.2","@apollographql/graphql-playground-html":"1.6.20"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.6.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.2_1559850532655_0.19611795595795178","host":"s3://npm-registry-packages"}},"2.6.3":{"name":"apollo-server-cloud-functions","version":"2.6.3","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.3","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"0265f0ab14f0fe3ffe87405a24a14e10db9cd30e","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.3.tgz","fileCount":19,"integrity":"sha512-mW05pjviZoeiKlF69VYKMPfXqglkuu+nmz4lF3e9sle2INo/ZujwOjsnc1DyWrmZxGxktJqB/CWtseBEefKaMQ==","signatures":[{"sig":"MEUCIBbUQKA5J4fEJoqPhEnJjK0XIWaiDxjrVIfZNAqg+EyaAiEApoHjSUOuD3/rDUJiskmqd4ldJ66XoIxoJxCsTAGvhpc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31480,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAJchCRA9TVsSAnZWagAAlbMP/AhG1ZFid/2n3tekYnlb\n8kVqiBI/68cRp3SO1ritClI0hlKwb8V22Payd4UAZAr/mLUn+8l+z9Pif/Uo\nY/S071YPGrm9nB1f4U0qtEYOVL+Tb7I/xCi9s/fvZHsEZaZUdPfQLJN6Ns7p\nkE7ESIyK3elKebvnwHJLYIjl+otgkJBQS45dHn3optu60zlvv6fW6SEZq2xo\nqMUYU2e8OHzEt5LStYD86LvG+Lykdc/dsE8v5O5H8XIZVJikGePTOOVfvP9u\nq/N7bWv9yf+E8u7+6sTil6dDu929iAjaZ6chFt9ZtmsX2Sy982n6pdgWKfUs\nhWousOF0CNhDqhkRCTYvGcr5DNFZnTTnEfwHoj4WqdQqruHOqS2ZzgLBSp5j\nBOxFabuWkoFZJy9ZgolJ4w/T+XRwOILght+t9PxHrruPdN9dVU32zJfCLRG2\nJVwifqxuEzakkMr5UTqkcg2lOxlQm5O+Qiv4Dxj5rR6CxhFQU9Ikasxu6S0E\nMDGFlMFpXR3WFRzoHpjtwr9nnxwFd0cJquPDspTlm2/+9EA2YYKcjhs8fYsJ\nbuduq6YHp9qkJLOKAqODIwaCgsxw1vfLJqVg7EpBhatMjhOE7VaM4u6tRNr+\nC9gKZ9+q7QRLpI1kBX7lpOYMwm5niDFnobstustLE3U0seS0gA/bA+l2RIhj\nFVUo\r\n=VktN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-cloud-functions-2.6.3.tgz","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"9af8063d7c2fdd56dad5144604aef78781ed5727","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.14.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.6.3","@apollographql/graphql-playground-html":"1.6.20"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.6.3"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.3_1560319776394_0.9575850203568244","host":"s3://npm-registry-packages"}},"2.6.4":{"name":"apollo-server-cloud-functions","version":"2.6.4","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.4","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"d6720b1f4f32ce725c40c9f8e8871159aeaedf8d","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.4.tgz","fileCount":20,"integrity":"sha512-BT3yoiycmXEzQ+ThuUUMLInh64qmrWSvP3ndUmdXLK0bju2jrRvokbDX65KASKf5CHFGLZD802SaTyhOTLn0mA==","signatures":[{"sig":"MEUCIQC7jbfsUZmV4J0A7YFQBOPQMXHqaMiu5mr001NCOjzpgQIgBrdguhX2OAvnhplAw3aXFdtUhng0DEOLK8W21pVuFw0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32577,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdC/GYCRA9TVsSAnZWagAAwIAP/2yDjDeYghs/UCtupII4\n6voFQdgzpJBTsRHFhLVmnaDS31p3Zwnsg4QT3dZuTG+FyWl5R/3PKsDjGvLf\nEdtfEvjyg484yS9y6HSV94NyVrfESnLCFHwO4b/a1JyqWARaVS6FvurwOXPI\nEDPNVoztTHTrxgt+CLA9Q2eK2/lmd4pH6M9kePkChtcVhqTQXxy4YkVB56/0\nVo1vxEvZRxVh69vvYG/T3xBAGD+51GH+UJPKpYJ5BW94E19BUB942GgrBuUB\n/HQPugZKyElrxoYWNsGQUgM6uDTcIA2PaorT1H5IoUjRNNKY9odLzmJr9Ot9\nf85LR6hqN19072bOkP1THcRENuNKcpmk5eNQZyFV9itVUzuhFEjWGmM6qBuH\n1VbDp8XLSbu85vMREfGuPCuz8y0WrCqZi6TNuYtocsfl86CZYZeX+4mZO1ig\n97Vf5JC8NVRl5uWHgYBEOZbbCVIgtHntLr/Cz4013WkX8bUtS0BfGkQF+stv\n1IawO/cDMJGG8GG05rv7LpnksTD9Lifi/o4y86SpVsLJxlKQfPPQldW70vZG\nVwb818MNTjpgu47IrPHgISbug5aPrqH87amj9voe5pZBjkL5u6YPkniANVQk\nnCVg6v+3Vr/dmAv2tXg69Fcxdy6jfoEpYHPfrlZQ7Ec775wFgL7Z89lDS8ny\nNHn2\r\n=03d6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"e6929134939c653fc817ed2b8172b4ee42406bcc","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.14.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.14.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.6.4","@apollographql/graphql-playground-html":"1.6.20"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.6.4"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.4_1561063832011_0.7270575163328843","host":"s3://npm-registry-packages"}},"2.6.5-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.6.5-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.5-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"46ed589e8b8e90cb9dbba3845163b5c4a7285f4d","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.5-alpha.0.tgz","fileCount":20,"integrity":"sha512-eSNH9KOIcJZWjlH+/gpOmMZ0pXFJqODKvRd7MOCMhIRouvg95c8qofXlo+XyGd4RW0tnjdhrju7ZNogcYFR1iQ==","signatures":[{"sig":"MEYCIQDrpjU968ef99BIi1NIXlHlIzmEFJnVKntO6qf5XXOcmwIhANJYsGSD0OLcyEHAdNapPE/C2b4zItZM3fYOSFFbqu1o","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDQsICRA9TVsSAnZWagAAamcP/0XeQ4vVofY0hM1DJ3yK\no/H9KK8yvWicpvBR/PDjb2Hf4X0OgBMH4RAQESAM38DR5hTjgvvcm4zLvBI2\nBx0pAo7VhJCdhOJK8s3NOxYtATdmLGRYVhDOOKIWJF+NELR7/RNynyC7mqvA\n90cWRF+DYbEik4Timt8+wjPv10nc5CEodqv7Yq5cWBpv9WvRAAIPGv3NW9r6\nyIO6ybIGaN8vR5SU5+s9UJV9VXjHKG9NCBMzZqSlv2ja/ObOzUclrWGQLYBK\nL1PLyA6TDzQ5z9wSw/wazK5wesTlO2ty/sl2MpG4j6b6pkh7vnzQggBTtiBb\nM8FWT5yjixKiUS7SrTku9COLo4bSspDCDauI9fsCnEmZ1e8wJTlEsk3m8BWo\n2zxW3fWL0PIldt9ISLYuz0XJOgfWjlhra0uG247h6XoAh62ZZrArXqg3NZ1D\nSIsVIY0eTmmXXEPuKn/cU1jh1XZLCK6hELAUSrgAEK8mzVGaoMBKoT4NvbO/\n4ekqKwPA8tHm4dDQDllWStppQ4tFDNU7PxohR0RjYq180mfeyUysBI4sDNnJ\nobXXp8EXfNTIG4Ye2ZRwaNt5iNd2+iFA8Vv0qzgZatdB9djVkNEIi3XcteNP\nkpJ5851NOW2neT2Hzi05qGwYEHCgDXXJMu8jdfK3XDgO90Cund/g3b6PPVG4\nOpyn\r\n=HSGf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"ec329472a9c779331132a0ec4ebec9ab9709ff8d","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v11.14.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"11.14.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.6.5-alpha.0","@apollographql/graphql-playground-html":"1.6.20"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.6.5-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.5-alpha.0_1561135880332_0.8435638470744289","host":"s3://npm-registry-packages"}},"2.6.5":{"name":"apollo-server-cloud-functions","version":"2.6.5","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.5","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"f6be1b389d5d7e306768362c6e47d67800d83322","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.5.tgz","fileCount":20,"integrity":"sha512-m274dzvpuwhweA4sqVsBZ7URH50CDLCQMhk63jSoUrGaxVxXhN0E80rbEWc1Lkxv+8CiyqQmvpFH6H3jDhb0Iw==","signatures":[{"sig":"MEQCIHl8uKinIjlXsqV1APYlDhpnAYtDepQxvYfnc7G40NHgAiBiAh4qWiS1BOel6mFATfODXNMO/R2NT512NOfV/1D5cQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32577,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEkneCRA9TVsSAnZWagAAGs4P/2nMCEJkDoDVLv6AQEXV\njrkrmSepmFXzRHmbNVTCR3X7fGfSeVoodji+LrtjMX10O2LgMuL7LcikYsPg\nOuHV5u3o+0iKIhCAiACNqJ/5pbq2xQy7Dc5zX5KeifTm5jiYmbdaQVvdGs6H\nZrheHTIhT3W5IMGw4OQq69EUyLDZqknDSHfIn84ZvkUWo1+CB4FL6urH3cNf\n0jw4RdRi2zVwTYdfuge2/E+bh84dHr5F+qhHITy6VUrDNB+77IIQ4+I3xgA9\nVxB+fgJgem2o6eCSPqLZVMMU061hhbRdT/sHT0TXW5gjLVZSQs3UyonXVs92\nr4p29UovoJlxrdK5m5v0KuYYdUiBEEiGaUUXCYXbeGfINXRBsPwlaGtKoFIF\nUecqf2sZapVPtHesbc66eEgegpixRxPDuB8nun8oMxVrlGRvxGfbfaF1aYKr\nVA7LPI8nmoqIqf5ylShXG8p0L1FoFFosCCPuM4u/wZxPQRCPU/PnMQdkumQY\nh0AK3myHWqBpmdD5Hny9gAmXejFZvP4IaX+zHeaMryAVpSX1zlrcgnl6RDuA\nBi0BnRKfeWAip9qVbRPTTdy8/k2dMUIExCmn0KIXGUVVdlft8bEcs9bS3tT5\nrG46d2WVsZnl4SDqocxa0hYiSSgq3/iEUeEJ/FazuGDYZLcSgbS8CXV4sWVw\nPqEb\r\n=wIUI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"a2b2a0d8f013826d08433129a69834035e04f1d5","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.6.5","@apollographql/graphql-playground-html":"1.6.20"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.6.5"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.5_1561479645696_0.26051164654783654","host":"s3://npm-registry-packages"}},"2.6.6":{"name":"apollo-server-cloud-functions","version":"2.6.6","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.6","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"574089e3df5283315be4f9076dd3ededa441bd42","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.6.tgz","fileCount":20,"integrity":"sha512-J5mbaWjUAMIu2N5gZFeszQ9nbCbut214mHsuYlU0IUpFai8JBi4K8JQ+qi87S7p4UfIC2RdYcoMTocnGIdOyjg==","signatures":[{"sig":"MEUCIFZh6dssiFsRybYamP6ZTY1k6XrNK3rgdFy9h2+moXjWAiEA8/M13+yYO7MqvTcprq1XNEZbDnKY6vj1rIVT95WzBpM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32577,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEmOzCRA9TVsSAnZWagAAcgUP/3j+YYalNviiQrgtW7uS\njT6yxnysagtcTYTFn+eiqjNTKPGPfuUaWSPPEciam0INpbUHCnWgAGvh38wz\nQVr8tf3L6BlFebBwc+Q3bPpabiJrc4wvJ9nLsLCKsXTm7LqAJ0jSPs9G/5MI\nR7vhZCZ00jUwI13Y6V94b7r81G0/00Y5ToBDSBET8FOaRfQscCxlLiL0BYVi\nx6JLZFmaWQLYVUbjJqwriMuf1VgvYe51y+skze9jWxmbJ8NfU4s7wT8tbQJq\nv0fqRGVGX8b8NefxKbUJXZmI437S0zdPkwSgPrcPpKkC11agKKlH1NUjI+5T\nZV9AzX7CCvTYaYnxCr5GHbRptG05qTYaHT7RsKxR2rTEwC/ykroV/qX69/dw\nTNMqhpYyFDP+Xkk9kaAzWVxGxOFjdLQM02npznfW2utcD9JIJlxzO6ibA4SZ\ndXjhtqtMx/jvgFbqlqISTopi86NJrKAiqvGIz0kcItfeiciz5Gw2zXK/NPUO\npwWtZcmD0gwb0qZeMVBGd2rcHI644UemYeH9FmsEOERM5Iu/BgDWi887kvRq\ninbzr8msW2McaqC9fitLj3v0Cqr+UQH4ZDDHkxbVjsvxxRPtjFXqkpFSCI1h\nWCwQ+SRrJA/ZrlXI2hwwsaChxHhvMEwh8aB0oc62rBOQfbW9JLHHJHtWzSCw\n0UCD\r\n=Oesq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"26db63cbd5adf54b07a5b67c0e0fbff8e61c79aa","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.6.6","@apollographql/graphql-playground-html":"1.6.20"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.6.6"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.6_1561486258349_0.9430213190746632","host":"s3://npm-registry-packages"}},"2.6.7-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.6.7-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.7-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"a6fbb5875999722e62ca480a8cc92c88286b9f30","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.7-alpha.0.tgz","fileCount":20,"integrity":"sha512-Qc+2B2tp+joTFVAe3DSZoEugfuU4Xv5i8FTI5NL4A50RxiVT7AUg8hcQpAsMBSKkielXA0dNAew9rO7IxzY5mw==","signatures":[{"sig":"MEYCIQCCnZGPl05Dljea0d/ujDp997NFrkyII1MdaA7gRfQ3DAIhAMYL7IzGsyoq3zrggagXW0MCNuV6na/L9EEavGf84wKb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEptsCRA9TVsSAnZWagAAz5kP/ivk5CAziKjkkkXsLcmq\nq9KUN99Id4rxdAw1FHJemcq7xP+u/hkBJdS4J7mufL6/oBzs0y8uogAiAbR9\nXEHlKvRvsKXaaDE6Sppn/etvvbQS05JmqliX/rXQHNqrP49NBQtfcoW9WOQg\npPUUiCsffjSuqFiA+wc9/CFPzEWMhE2MQ36R86v44wjYAM/mRpCN9+65DGhr\n1N+y2187P66UnU1+A4Gr47vxraGb1eHP2ouqMjawXZRcRvBcl33uNDAVqWO5\naeKJsIINzDfTe941VMNi/FwPABx4Mx8ok1mNlHRVP9U6+dLfHWgX6Z4Lvxt7\ncjUoB5GGXs4LuHTijCWS2U4y/VFAGlrRpOamkACSSYUfHQt0eHOdXx/iz++r\ntR9D76LNdgB2yUWtEu+QBFgz8E2apWpj4I9VqwdF+O4zLgoPOdWcbRhPYDQw\n6CSEugOsrNxIZ8/JgjqyC3gK7eBJ8CBoW9aNL+AafZfxUJV3S2SDz+5OCeuE\n/p+Fquae+Y43MSLcff5SamduE9Oi/LbdCUm2uhr3KMhHT56BgVXrscYwkcB2\nxoJqniKicWHvzgeNIYG8SMf7vyAqhbkgPhmuK5I8dZHtaYVGmew37kHP8kAK\nOWfmvI1yDKATeaCuPMVQGQf8D7EvPtefw0sZPfVvxhdCucpbrwAqTeN5vdM+\nnmOJ\r\n=0LaC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"ec185a874c2f07b3724db62a3ec8560cfe3850af","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v11.14.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"11.14.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.1-alpha.0","apollo-server-core":"2.6.7-alpha.1","@apollographql/graphql-playground-html":"1.6.20"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.6.7-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.7-alpha.0_1561500523800_0.2666808774656757","host":"s3://npm-registry-packages"}},"2.6.7":{"name":"apollo-server-cloud-functions","version":"2.6.7","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.7","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"a826fd39d98a3d940720298e7a8e6e989c3ec842","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.7.tgz","fileCount":20,"integrity":"sha512-QuQcm8ZDn28wIwXCHYh9GbiLBTQD7ET09wcDNbr36BPlOVdN6luyt364pLTE1LZwA5bx7lF0Qxe+XsBSaFg38A==","signatures":[{"sig":"MEUCIGDNC3hy8p87/SysV1hSZVT5jvXE5Py8s5Y3ywvLO2UgAiEA699qd2SuCUaUzRGoFcWtgRhGhwx7l+Lh6H6vaJ17A2M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32577,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdE1w+CRA9TVsSAnZWagAAK4kP/3fhoWSLC9j0iQ9sVTD3\nXXamOTGcJSQrofRbwfxpZj5/nl3WIv2Gm9kBxEkrsUy17r4NKteOeEwvHpDR\n4AxgMwhu9m/hhEE/wUg9rZkCqp/KAQxIitNIrbnajQxHuO5bQwQXJ1VoHPXv\nENw5HfULevehd42Q7/nlx6tphwJ55VdNjdB+TgALzn6TNBcEvn1zWz4nE0AF\nUg69c5wYN6opPbv5ormOson9Py1l+Czw/zNxDUdJncKkL37S+ZQDlNn5Hslx\ny5q8cn/RhvXX2B+Bpfcm5TeK+2MYtDcS7JTGP6c2ujtpdQvFNfHy9rgTiOcy\n4rQvMzVx8F9KOFocYf4ka0fmqHR4OlIPDYNg+qkjc/4Mv6VlHVxYAs4ay/XK\ngO4G3JBya00XGuU2ylJJQA/h1483lZKqeRit5NGVEqsCMzhZnKxSp7GYLf24\nURQPQ0rfHja58Ocbezpdxmc54I9PWdkLk9+3YyucoZNE+7OuZlPPZvsixNm8\n31kseexOnY6bVbRo71AIIkg9B6SBqcNe5lr2bCx4YXMbV4VPOIc/mGRvTvvV\nPM/ctvT1cJRgj9tyGjyWDutIGc9DL9oQIyURRsc5vnyybginAUGN7Kw980uy\nlSASWiN9cTYWxNxqpfm1/ibVtVb2c9rOHxe9CFklloghHuJPjTgakbmY6hvK\nf6Ei\r\n=WtNh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"183de5f112324def375a45c239955e1bf1608fae","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.6.7","@apollographql/graphql-playground-html":"1.6.20"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.6.7"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.7_1561549885760_0.5739149121637572","host":"s3://npm-registry-packages"}},"2.7.0-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.7.0-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.7.0-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"e0623c22abf7bd0e8c90853044cd6864c8b2f298","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.7.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-YRTvH/wb3OP1EC0bpzOZAot3drIJCO1t4yUmdZqodTGeuqawn64fQ5ZmFZeaL97iawZQ2kU0DBXJ37cM5+lnDQ==","signatures":[{"sig":"MEQCIBHpgw8WH8rSJxDWGhqZVkCZq02+qcCpC+OrK+TjOXn/AiAy3y/vOHmrdxn1FBHnYv+SfcAHXeRE2YxBrqdh2g95Nw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFSC2CRA9TVsSAnZWagAADpUP/RrRxK9lQeajQzuW7R2N\nCCA1uhfUqUNHpURRad1h/jzgVB1XTFWtWlhkOl29zxO4CUyMlAnLkv6g4h3I\n9hQJaeCXlHIlExvLLPE870TxFTXIruxp2xtqlWouWfd1SdgYGUwVjRx5doze\nQ09Xz0zrj4fswx1ZgOOD8dxAiSjwRmk/kDa6HsSMpKV1QUgnLl02FdQrMNTp\nmwjiJAVif7Q8E7hsUbtpAGdM82CZH/ljZQLm/3SE49JYZYWMv+YoXMO88Hpe\nJHBIzE/lISjI9vJoDi7wB9x43OKxR/m9SafSBhDklH5STP2NLSyA7cZGMrsA\n1tSeMdjknJSSh+d3pWh5FI85RMKKLWPBeLmle0swzKugbxpzrZObMGFS1axO\nzKnLa5QkapoQCOLoIZRbEhriMkgAkU7ES2lGhUt1g92uyRnSzat3zARaxUx9\n/T5x8UzfSW27RFj2T+LhdgmLW5zW46dgYSmcOTaIjDO5DQMIDSRIXPaveqkb\nenCf6vEpe7kWCmWDYMbWwzvwIlxyl97Ui1SViIsMurt//GvvVIinOPz65eLJ\nLEMGiQAdISS3EQsCFVIjAsulb+D83AyBB+we47PxAegPlowIejnt8/lchAGd\nuwrvCqfKj+h6K7nOKua6tmvvKc4e2ogvVgR575BYmP268OppHCRex+IwIFMv\nirvZ\r\n=F+Na\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"5ec74e31d5a6ca6ab4c3e1df6fa0f178f8610293","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.7.0-alpha.0","@apollographql/graphql-playground-html":"1.6.20"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.7.0-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.7.0-alpha.0_1561665718157_0.4958787642036522","host":"s3://npm-registry-packages"}},"2.7.0-alpha.1":{"name":"apollo-server-cloud-functions","version":"2.7.0-alpha.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.7.0-alpha.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"64982054890c46599d3d0f85d42c8953bcff17ff","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.7.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-z5Is7OUzbqRf+OCn7N7Ur1HdtkWQyZ3z0ERl0b1sMvVkBdRigqzsTx4+X2deLZxVWhyBmOY2C/NQ95qVvUFPXg==","signatures":[{"sig":"MEUCIEHQ8LtwmJor8R2XlupxtFZrQVrjVtcHEftnNVFUP59xAiEA+4V5fuyPYOyRPuPpPjFhGX/85jhU5FBwptfEuZBedxo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFS6TCRA9TVsSAnZWagAAfKEP/0AIUn7LJ/ylf/DVfvDd\nan1Z01JAr8c8YT9RyxHv1aSTcARAVTs7EilRl49R+TNDSTY6N2e/DMfqn1AY\n3UcdZiJSqY9UjoheJ8yu8Syf5ZDO5M9nIug/IYabOgoWU2TcJPAljM9hToxt\nBcuEBUYdZFDQYe9S9vKDuThKUBZFr7hXOPT4bEsfyWdKBFlKkjM70GroyEHV\nP4XPNXD03vTo4QjC7wxH9E3PxbOg/nE8zcQWgdnmuq0mYbQMcn9bacoaiqSS\na3Ww9WCm/Da95lFqGUAn1yiFuHBJHeZqYhOoAaOGNh4QoQHYAgSaC9SZ+Ala\n6eheNbJTB6C5fiBQcGIhpBsmcjUUhG7kzKcldD96qsGWisPxOay1RXMDIO76\nL73waFTjSStISnFm06aOZfDEonqaxUWSgd2+IM5ghXAnvThSqUBV0xReVzTc\nHNkBYnPFjA1zwu8aPC7vNokFNtgTUJmhiSDR6EC/okKI3ivu42S1qIpDXDVK\nYPlqMNBKNpppMP2mSie3EnBvQ2rR6dx5Si+L/2ni435taN5TCVFff+oIZ2K4\nDUn1ZHF4DE35JQFyBxVCeBIpGC7APhdk015dSQFD9dNF8bo4HKL0CUpTHhwI\nlBIxmZYLpiZcCux0SEsg6VAF8ugJcyVpSM2CB7hmn6Bl1p2ahPyAbPxWpvHM\nw5XV\r\n=NmKQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"c1749d75c3737accdfcb69f58bc0f1a51f59e02e","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.7.0-alpha.1","@apollographql/graphql-playground-html":"1.6.20"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.7.0-alpha.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.7.0-alpha.1_1561669266381_0.9844283771591311","host":"s3://npm-registry-packages"}},"2.7.0-alpha.2":{"name":"apollo-server-cloud-functions","version":"2.7.0-alpha.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.7.0-alpha.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"986b01f2c21378d35a78e8b858c1a48845553256","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.7.0-alpha.2.tgz","fileCount":20,"integrity":"sha512-a2HaCfm3MfM9o1l/thgPXC8HCdKhBcknWoiBjXBeP5PvuC244UjbB33vW9IY4f5Pnq2q0EZ+pQOEnzJYqPZGXQ==","signatures":[{"sig":"MEQCIA8eDP2zE115JLjum+v1V5t7EK5qdsQZmFOmanNqLoo5AiAnjBfVj8gw5W4CYV6pPQy3pArupyrqC53QTglM9k7e6Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGTL9CRA9TVsSAnZWagAA3kIP/0MLimLIHFmbx9S/T+8+\nccdEbcRpy+2MRAvmEjvPGlHJjYA8kL5vZcfPKpx3KIzfJhno0CS9IA6X447p\ndEEeswalL1jaHn9Qe7pjsV1cVvZ63yCeXhEp435JBUzNenfHInVc04M7KuhN\nB24SUCueYJQzcoSHVb0c5p4Vmut2m+ZDAPZKvS2BjQjkLpspH8gx6hhS3XKr\nvAMb35kzj/FFMUuDsY9kg2luK/EKh7iHbrm3d+FTeIOl5suJV4dan+SycOAz\nG13fDD3/IPRjrN0bNuWpKLEUakqlRZ9C/kzWMvoXspGq9qnf/6jTcGeF3fNu\ndJJqZG+SiMZ1QzFwizwEdnn818H7DqBLYSA+XmE142R/CDrX9Q7n7+d9Ypki\ne7VkCbU6vBGKktb8Csw3ZfUpDG3Iq1Q5Ke6n8ubsmGILYIfu8lHvNw2bjg4+\nrSY0ehvUEpBDvzwV3POtsWvPVTOaQjTXLnlA3q8V/ZoL3XHidvDZ5OEmbZGz\nil2JIpa2/sypFTlLz/eTyqLl7ul38PtfdaoweP4GjfLLNUHw3CchSb7FqMvz\nTE7BuPChmiJAAedjA4HXpm3scFV3SdI4FrS8rDwF9IX1rEfVRcD/iP7PteUG\nuJSD4h1D6kMiMzfkoVZPbX4rP2WNOr/iE5Em2XfJPPlw1F/bBpj/h3ADl6Xf\n+t1Z\r\n=LVEs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"c42d817836c10e3b59cc1afd0163eec59d7bec90","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.7.0-alpha.2","@apollographql/graphql-playground-html":"1.6.20"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.7.0-alpha.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.7.0-alpha.2_1561932540957_0.22702862501718712","host":"s3://npm-registry-packages"}},"2.7.0-alpha.3":{"name":"apollo-server-cloud-functions","version":"2.7.0-alpha.3","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.7.0-alpha.3","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"85ed9ae420be5728233a701e8df012e6fce04ee0","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.7.0-alpha.3.tgz","fileCount":20,"integrity":"sha512-HPKmvWydqnvupl1acJXSpZwkn+yPP7dJvMHzeIr4lkZY3GrV7ZOMdCfLp+nP/l9YcdA0tq8T1nikqONbaSGoFQ==","signatures":[{"sig":"MEUCIHFMYjJI5P5kWQ6cpb+zCdy9Nu/3kZbXw7cop+oKY2PuAiEA9aeTDDhTUkXrjvVQKCxuTpABRYJAwGyBFaPvyDOe34E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGmZWCRA9TVsSAnZWagAAjZAP/i9w989OgbY3wkMIrtAJ\nsECN9vRJkPcIjrXwQ0AFadi6e0kY2A6KQEcEO8frf75hYkK3nhbnFPHlaUEn\nYuuOnJ40ZvRaMXxIT+VhcfNpDg9iiipMUKXOAS8qj00UyD2xOAlc1ycQHuGy\njm59YTv/rSmPDkEQ257BkVo68LffTfNSpV+8fqsBtbjZks1C46IP1w7m71BG\nRiftTVVnNHbo/OOTfi+LAgLQKXCPhATWm58SxR4aPLwJvduwrgVz5T6cySEo\nwcrn54fACLLLhhHEgf4JBbJXBZicm5Xuy/RVIDmIdSteS/Re5l4EYhIOm1mL\nD7t29vbgNK2PdT4hudrdXPJsp53zHcxrH+pAN8mqLlLf3NCW8PhYYPZWc2ki\nk7GC2jnK8tvMASt61p2UJbxCHwOCHRUTzHeU9W6i4TG//CH8ZBG+JlrwPQQN\nqyRAK6ct69oPgjABMcLfckYmtGCPTWzNka5A3Zxpmhxw8idNoVY7oNS3e8k3\nURRU3r5AASkLOWozamXH61sffRd/B/bVd6SDj9v1+ihvtZFOqsG9mSt0x6Gy\nMbQqZNq0114VoKN37hY1homq99dq41CM53UKo5VtXTRGKGz/Ps6nob6/PbLb\nCDAj/OYnuJLYkGkVW3k5H6fnPL1G3pYzlKehzYAFrjoVWvSrJG2E5tEcCgSM\nEEI/\r\n=/Qs2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"5f2063d6b315980d1ecf6573dfa29ad56b05208d","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.7.0-alpha.3","@apollographql/graphql-playground-html":"1.6.20"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.7.0-alpha.3"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.7.0-alpha.3_1562011221479_0.5620852589883869","host":"s3://npm-registry-packages"}},"2.7.0-alpha.4":{"name":"apollo-server-cloud-functions","version":"2.7.0-alpha.4","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.7.0-alpha.4","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"f8336492dbb5fdccd30608b2ecc9aeceb5d735f8","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.7.0-alpha.4.tgz","fileCount":20,"integrity":"sha512-f+4ZfkSbXVKIkrzLOSI4rmHHwjrf/NQosYbdMAMMNz7irrvtzF4KeR5liSEmIuiFE2QMMgN52BtGgegDudDjPw==","signatures":[{"sig":"MEQCIAOey1HUA8FgNC355kcGSvnu1o/4zZBIx+pfjTZp/Ut+AiA16VwKkH6/IvD7pUfZVICR4nl7Jv3fHyGEF6HvrOjk6Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHS6eCRA9TVsSAnZWagAADpEP/1deD2RvdMSIBZKNPWG6\nC6hCz6f6fE5/lb/tIXVpsAqkNU9Nz84XBo1fMgKztojnROxe3CKXmmWxnx2h\nFt749HlZ2h/A4UnReGc9vltdTqVHnF2SYNKnQUtHLvXj4mctK5VhvAax5hAn\n9lFzJAPRCNu+d5vafTcHGNu/JarZRqctZicynzMtxyEn99lMNFp6XveaHC4X\ngdLDCE+OHnp/rYgka+a2jgnVQA1tX1NtcDTsf8M7IpQzHHr4kh91nJK2a4ep\n391RHq/KYibMjccq+gTeYynSnjAG/uQDDlMM0+L6HONAazTT/4fNEdWwG+Kq\nEAHbYodbkyQo6iyqrJt7Mg2CoW1U9p75hi3uL6YyG7V2wNhiaMxqNR2xGc4k\nKX1VeX76H+W1gBxhfMZtM2aL3KVMgerjBUNzJpyxSBjZMdWTx76UnNBnbeYV\nxKqVg8RGdF9THcxtiSBhQ97DDjXCZsEPOj+JzvSvEbJyUHg5ll1riPRBkPRp\nzZZdxURSbNFoXYApZs3XQYyMKUFKRqPM2ySkLtzrD0tjHD0TZKqGbWdkA0KI\ng86V386PAfWMHxD0S6bWi7QR3u8fcRfv/kaLZTOfYFsK5TdHsutOCz8qz8ZH\nCWDgZ/UBBWcnZyI0qSdCU5Pd9s33qTRP7SYQbsDW2IY1KtrHMsbcQJsSLIb+\nYXLc\r\n=FgdS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"fe353084b7cb1a97baceb83ffd1b31b5598b5b60","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v11.14.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"11.14.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.7.0-alpha.4","@apollographql/graphql-playground-html":"1.6.20"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.7.0-alpha.4"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.7.0-alpha.4_1562193565683_0.3915711363905614","host":"s3://npm-registry-packages"}},"2.7.0-alpha.5":{"name":"apollo-server-cloud-functions","version":"2.7.0-alpha.5","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.7.0-alpha.5","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"995400afb987af1680c4c629005b88a8240c47f6","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.7.0-alpha.5.tgz","fileCount":20,"integrity":"sha512-myj5uM1ciGP4D1pnQglGkoACJvwWBlIW7EJuG+gYAOVQfRBMYh4NfcCv6K/JDktChsn1ljuk9wbnNjsjb5kU2w==","signatures":[{"sig":"MEYCIQDoLWlekJlzvl8u0y+kCrr+10ZSCnTkDvDrWGUguVGbHwIhAPNujTCNWe4RDe0WP8BOsH+geMp/qAUEgEzImYSkp1SD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHkI7CRA9TVsSAnZWagAAR/YP+gIgAeZ9MkwTuNZ0g1c/\nMadkPRTwcRtIALxpXt7kddXbPxjRgyY/Y1Vdem3QAbJ0j50c1BlHSS8qfZh9\n+jIrRVlZuqCzCWGUbACZ5CDE5/XaGZ8nWLeePa7or3axH+WgkN37wxfX2yMK\nHGkbOeaXSY37JtRbHA8yUSBc6GAmUCB7i+1llBFL88vmlF9IMpAfnNX1Ey2L\neeTAH/NjUaXRSycT0Y/4aFUwfB2l6f0Z4A5AwtYLH8OFY9knhFbOSM7aBW6A\n7wHUSFBx+0bFW+MtOCpWj5SuwmaooBSiRHMWBwfD7diUU3zdwY0DTsa46WOY\nnuLwQ4ShEi9KbebpZxqYi7gDVQXVuC+RxqPQSNfF0aTUx7TJFEnM24HGt+Kq\nJ+RvoQdRgPDNBYcHGaG54eslEpwwNDY0GZGHVhabfsXYc1uRsVSUMmXRLb4v\nLpQ1O+ledOtGj1hB44wmCHuEeZ9S2uDnfsSTcMFVsXaLWllZmyek90wEuOPq\nH0K6qWXDTfeMxwI9FryM4x47LSefs/pOzC+NV6aBp5N37EegUuqE8hO2Tb0k\nsJ9i8HeJntKWseblNArwS1xAgeqRm5HJd4uW9qQYaojWQKwSmiehxMHzOqbx\nOUiu3uQb+jSV92yCchAokcV5jIqIg4vA1zGU6Vv2MlCfU/x+89qgrVGM++sR\nK+BV\r\n=sUlw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"93a846f171783ee4099147f08c05fdf28a5f50e0","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.7.0-alpha.5","@apollographql/graphql-playground-html":"1.6.23"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.7.0-alpha.5"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.7.0-alpha.5_1562264123365_0.68501823525452","host":"s3://npm-registry-packages"}},"2.7.0-alpha.6":{"name":"apollo-server-cloud-functions","version":"2.7.0-alpha.6","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.7.0-alpha.6","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"8433548669f2d969db9a812514b47ddf44a37b1c","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.7.0-alpha.6.tgz","fileCount":20,"integrity":"sha512-//AeF6hLVTlkbNAnwjZFWQMYqB7F6GBFEKrA1ZWAxvjGiqTxwpXtC8rNi3OP23jItRaqwrZIbSjpn2c+FHLrlg==","signatures":[{"sig":"MEYCIQCHbPA9bsWLPfMf/qUz3iahV8OtlUKESen+PXImAnSU+gIhAOH4TSwgRB5NE0caBOZoFGqYmFJ9r38gHrCpZiXn15Q9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHk4DCRA9TVsSAnZWagAAnegQAIndih8AemLR/l8j26Yn\nACKUyC8X4Q8ex+JWoblXEnBK9pGq740W/NS5s+bK9RH7PFsWuhjkljoQhFxG\n8EXfSoNAbdw0qZNMY7ZBMhWlHJrpRjCHZvxQg6AK6FP03A3QD64oG07kPKUY\nPAR2W/+DhRIGLt6huPIc26wHGdZ8cH/MXTSf8LCEbu/2A6rqsrZsI6xZ+EgB\nft2SS9d/PxB2LU0Fo06dvLnhn4/D1OT+xULzAH6/04NEFgVzpD4F7/4kcyjy\nSBTkHSWbTsf+wp/gt7zY7i/g8ad/xIazZgG2lYgCJC+Vb262s6+ficxY0T46\nWFkVEN+LLSKws7WCywA0gUCmY8//xuuA1LciJd0/8h14GI1sH0m93EXrlcAj\nsLh1iD8uPduKvQoxbJO2BeIvmrTOcSgP+bi8Kd6a3YkE1kSIBLJq5sCnyDXt\nGAwdEjanVkWBoyx424Kqb4gsdFlOyg8m5Kri17tfjJYBsVgpolZAuzaZTuTH\n0dZ8N7dKjDmUvndfXTOQ/qqqqwqqXo+XrWT2EqAoLCAJn8ssk2SBoujTQGIL\nC0Cz+VMqv/UR7NdOohj+n6sKEZMVXIWXf3vm6XXIEModkwtYR+fn5M7O8bRU\nZ3iu2gQwYC6IGvs9f+Jruut5Mzc/Qaublj2ufCjNzr5OsOAfPlgqzSKknTgL\nnjpC\r\n=+x5t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"3d4c8311f677bee4e61d002d2b144afa965cf92c","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v8.16.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.16.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.7.0-alpha.5","@apollographql/graphql-playground-html":"1.6.23"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.7.0-alpha.6"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.7.0-alpha.6_1562267138639_0.2810101775074343","host":"s3://npm-registry-packages"}},"2.7.0-alpha.7":{"name":"apollo-server-cloud-functions","version":"2.7.0-alpha.7","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.7.0-alpha.7","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"54cdb05514c1d1cf52f98fddbf7115aff3fe3e38","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.7.0-alpha.7.tgz","fileCount":20,"integrity":"sha512-VB342bFTG2kL2R0GKYAGEQynh4HZOgxguqJfWKU8XFyMWm6XGj7Ku1pzy2MAtdBSO7UtTVSxuG7JNLIHLA4QAg==","signatures":[{"sig":"MEUCIBCMwivVpomEGck9LiOoMjMl/IFQ6hlvqMK0ELNPpoI3AiEAiu1cQJxLfC+eHbA95Php+IrSM+Iqvg2VLoDXaEHpEKw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdH1IhCRA9TVsSAnZWagAA2o0P/01UeoK5dYFAxmawh0ax\nbJnwlqoiYdvw2Xr988Mq3CMeAM3hSB3qisqIzfxl8TGhOvjaRlLCLNr8B4vG\nymGZScoN+J1ZbgTyLkYMUKsvrHpM61ZTCHLYe8On0xq9MuBmhGYi6MQCuWYZ\nUmDqcw+6QUGBKX/yaywnJZpHYnZc1ezIiNTum05uMtwHBWbw5xk46Kfud8+5\nCt05N+G+LNt4nYn7YaHc4jlfrKf91D7/FmZupby+dLvQ+7e4dgoj5SEQRjRk\nd2Zjw7989Op1qudUGTb5EXNnOhztvh/mwA1VwVAn0IMoE4KzlZcQSzBHefzJ\nBpiVmtgryuZ8Bu3LdpQpip4q5L0kAdY2mIXiuc1i0LMo6IB2sh0oWrUgKhcF\nKKUgiiq398dJXbEIuSRKlHVcQ7wowhsqn5ioKPmPT98H9Cc3VjfbQR0wHBWM\n7fgXfuD74vUB+9rHCGJwT2fX2otKn5N0PECXsvqFK9MOhJf/xaGr8gX1Yu5Q\nkptY5bfmjI7b2AWgKqgcKmGMBUPNjAEcLmXv2tOXoCK462UbCrGULVw0NUYq\n1nDA6GGRg9mvWW5wHHrbxhZh1DtY+9yxeCTgN3m18rx3brVGkynU+BYW5Mby\nly9gFOTvUTS6WbnxnoL5jTjNiwHWAJlIqQDzm/G70zeBVV/dVjXE5hQdDALs\ngeoi\r\n=y26g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"85eb8ee0c2880aa9e7526a9567b82850dcfa9f16","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.7.0-alpha.6","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.7.0-alpha.7"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.7.0-alpha.7_1562333728949_0.17961046196159014","host":"s3://npm-registry-packages"}},"2.7.0-alpha.8":{"name":"apollo-server-cloud-functions","version":"2.7.0-alpha.8","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.7.0-alpha.8","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"f810316add993e1eba457c4faa95ad8f261e95eb","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.7.0-alpha.8.tgz","fileCount":20,"integrity":"sha512-t8DDkqmOU9KX/3syg/JwMJKJIAz1HHbPPTkfNgiKIzt2jflLhM5rDISFoB1dX20ijBsGdQaKG6g1GmOAJ/mXgA==","signatures":[{"sig":"MEUCIGWZ+uJ7qbO0REmcu4/ntwevPlHlVehVd3b5UkcB1FS4AiEA00Bc6SZbM+1LvEYWC7WdIdL2Fu+VAJrJyz0SOeF6VJk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdH1UsCRA9TVsSAnZWagAAVlQP/jFZ1hpwHrsi0TZkwlKs\nZtU2BNiKI6efUuWA4/IY//L+UP4XlH8vq1yhE4qp0NhhRLT16Jw6zIOWaLKa\nMe4UbSjd+ZzMjU3+ZrihXbJUI4Y0Ruu3/K75swz7VjRXIQqOeRNHsrp25h5a\nnLbUxdKJGPIGbD1nawqF8UtTaMcgEnDnLU65rrd/2HnhWFXCDB232+erGW7J\nGA8k5HvlYtql+aL3U6/7uS+crUf3bCX/QxYH/II56MizrqDdhMTJjP/AgHFc\nYl9rPUyNuMmBhQ7RGRPuqHgy1WE8PbAW4V6I15jEPGLpGilePLKBuI5REJxT\nutNewT6bBEDKoXgyCvgMlyICYLnK/EiNuKHGgi9eqxfSTuscpzJFQ1aPiJU4\nP2VP7ca7oIbIY+AVv/XiD8OlXXW6F5H8mi+yevCQDjq9K9AWs7kRPGPOvkVR\n6G0M+/CzeIB+uex7LM7AyHUMl4/t5EET8sVDimn7YLczqwCzAHCuOrtEFZ70\nxgc+63aOLW6NGV57pY/WvhlxpGwQgAh1svZeKlfvjK21L8fO5T6aIFAySmCv\ncYbxNOySuGcBSnXAk1JEAH7vk/TOzHvmHhF7QjnkQUp5gmu6U5n2mY4JoI0q\nh476/k12fK3b+B1/kdOjGAVaktdFPzN65uEmhEDDDIHnzDeqqNWNsD+XyOjo\na/S3\r\n=m8EU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Google Cloud Functions\ndescription: Setting up Apollo Server with Google Cloud Functions\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"02feb8a5fed73c529a119e2d24a74ade1e812e69","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.7.0-alpha.8","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.7.0-alpha.8"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.7.0-alpha.8_1562334507710_0.6327130310471263","host":"s3://npm-registry-packages"}},"2.6.8":{"name":"apollo-server-cloud-functions","version":"2.6.8","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.8","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"4fd4fda901e424788da01ad394513d8d9be56eb8","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.8.tgz","fileCount":20,"integrity":"sha512-u21P1KP1aB6JwfaTvuo8Xb5oqq4TgQbr2wMkgH+QkskW/HPLSYSWGSyGfZLfv2xgGjhCiSIzPrJyqbyZueIP2g==","signatures":[{"sig":"MEYCIQD7nSdR99Dg80cHHXjI7/VdK0Qci4fZIMnlXPnPi3bfHAIhAOaA63T5g6ir65qaaT85tnT/Epfq8YXUzQzD2SfvFqxu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32577,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJRQ9CRA9TVsSAnZWagAA74AP/iu66rE8M6gNer6UnjK6\nk4mTvrWVRU17KkFlB3HWZNv9nGoPpdhT1opRn0JW/fShSHKhzVJL9/fz36kt\nFg22mWhlANFNls90sKETTZm6pilfJG+buUBCldhPfrnb/ReAURgQ96xCCiK6\nucwnjrcICyhVIWgKTbV6ovhHV6E20I0AfoY1KBhUvbK6eol5lbZZQSi7UTU1\nWITzZZpFoactQClHROt8qHllG6gTL38l7yGtD7+v2Ls4g+X0pPYxj+7AIAZu\n0uio7ZuNriDouYDoKfg9+QXl5nrFEBpGnF4TV6jLtbMC6jW49IeWauRlnFki\ngkWb8tQfYMoJ8ZF3ziRrcqB/99MMJv9flYFC01pVAiIz8uk0+SotDoA9qprL\npbWrW/Y+w5T600rnyc9OLlrWqQWR6zuEn7tWhhRKXRAEU7lws0JWjgbuxYU0\nNP3ehdpcmyQsgl4fIAq9rHH2YDhdEbFt5sLHmEBY+gDAM7VTpLCVPW+E72KF\nnOMPmc078IUPkaRUbBWvHJcA7WjcwJdAil3gDr6eLzVLIZZdbIHByb2qHt4N\nByZiXpYLfXgTpzTw1m7vTQS9ypZPTCZ6+9snUZ1mDzEw2mKs+vghNvWanYwA\nGbIO6ntHHKZ5bNWLdLOI7+MV+GjLPx4EOMsWThUX+QR93dJo9NnnkgX4wJmq\nwFXw\r\n=aOGB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"a06594117dbbf1e8abdb7b366b69a94ab808b065","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.14.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.14.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.6.8","@apollographql/graphql-playground-html":"1.6.20"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.6.8"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.8_1562711101130_0.3958827473887321","host":"s3://npm-registry-packages"}},"2.6.9":{"name":"apollo-server-cloud-functions","version":"2.6.9","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.6.9","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"db08374f1d9079b1ceaafa6366b2f660c6579c4c","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.6.9.tgz","fileCount":20,"integrity":"sha512-mFWx7NphSPVATJrhPQGyy/u9H2W1x8JMuqvwsVY6CWed7tj4DMhpv+wYbKhFDfsPVirbb8TJCIM0IqkuoNPmSw==","signatures":[{"sig":"MEUCIAZNKsDqP5GJPpg4MJL6hyqKh+7jI7S9mcnTcNw25jHXAiEAxjT9WZ0XHb3KKx8e3CjtvIhdapLenBdc7DwMqLRkxCQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32472,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJ4ACCRA9TVsSAnZWagAAQLIQAJXKR+8MvgILDIWgULEQ\nXHx8NeBcYAyVbhUvcVDkDqgQ/F5eru9qGQuYXQhLkpcMjrqYngc7KSl+83R6\nGnMhHFZ6WEee7CEYVLIZ3w4uW3G/MDVzB1gHN6bUO6XkyG/KyrDYcBlsdRoC\nkal0YeYuWNIQBjxjLf+Hi5uzr3OHAtLLvjEA+outN8HgVv9gCcbLyR2TobGw\nK9ikkLyTPXGAvS1dVPOgpvsPRepSuul9vy/VMTqmlaIOjCPhV8kzGTCfhklh\ncFRsRpZQwchQQrbi6VKCES8mtLtLpmfvEli0hDnkDkQAKrFkIaPXNTb1+iqq\nmutAV6Bp5fmHPhGR1fVyskN0R0/7feHhllMdifwA8qdupgoaNdPEoEkoEeGf\nAF3K3RXSb4CBb6ws9WuFf76ZeDXOafjZctYfWakpjBcL3O/XZI7/oFBu0ysV\nCUpDAswW0qvGPzHiWdoAQj82pXYcxOJ6Aon/+EID64RR7Ue8TWW1h2sRds38\nbHlSh5vIvsnZE+N5sSZA3o7c6YzApwopziXgI68svtSvMncfiA7IeO7gbQFS\nFSgikh3vAocBiQNB8Er2DKVOHcsx8YNaVRQYUp7/fd+6N6otxi3IshaW9Fv2\np/Q18Uvpywob8wQYtDivIIES+16NKXYctQa+b5IpTQOkNe+8o1TekSvq6keV\nepxT\r\n=oeA9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"57210129cda034b095d3f227298021feddda03f7","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.16.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.16.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.6.9","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.6.9"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.6.9_1562869762078_0.7165704339124248","host":"s3://npm-registry-packages"}},"2.7.0-alpha.9":{"name":"apollo-server-cloud-functions","version":"2.7.0-alpha.9","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.7.0-alpha.9","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"536e6835462886c8081fa4076628ba7a9824ef19","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.7.0-alpha.9.tgz","fileCount":20,"integrity":"sha512-1qoz60+5Bc+ifO6YtYApTtNICFjWLhBS5y/77hwj3QafM1RE9MEUFr95N4WQ2SgzdZzOoppR/kGYG1ipAX+vzw==","signatures":[{"sig":"MEUCIA00Kqmzrb1OPVKErsVIi+Cp47gmrO62mtrWDMXw9OknAiEA3sxR8o9OH5IAB11oPTfEtnTj1GBJM/0hKc483QeI96w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdKkPwCRA9TVsSAnZWagAANbgQAIyAcZuKc4Y3QQEvrar3\nfv3icvnjBi2Il/HlHbZGHOMvfUxNR/LzuSUw2pViPzwZS7qkGvYO/oCw0MWZ\n6gV2YkZeIkd8T88ObXVVbaHMUUQarFpDhU0PBS4/LFHVd/KvVWqMd9oGIhWk\nhaNJmKVUC52mpL/YMZQIs+KUSmpWaI4X82MG07KJJVhAniC5zHBLK3/zVQMI\nNQ2I4gUOkGFkhihXCxS+7gEEJb9hEsgiLGEXfOIYSgK2JWDtjKbMGRxu7iww\n9pR7DWIBDkv+uqNWQzu45KBZtf5+ec1m0CHEbLxGwNOjF0sjPUgNY/lP/f85\n/NOFVTBThqOQ8N2TNEno/jetJGuNZhLG6AJKH0j13VIkX93JRimq14v8vULv\nUIvVz1cfDlJvhxhUTqSb+PJrfk8PpzEJa+42pJfboyxzbCQ29YqeBpob/Ng5\nqYuzirelTFXuBKbec6ivOB+I63li55E4LQEpI/OkrMaIKlkvrqYNQfAPdGrH\nCuvsirz7az8EbHWmeGJZdffRhe5vrg+GAUl2QGhZi7ddbBXOwgdRG+0/OcH8\nv3mICER3syYIf4yACl1DMKbiqeA7QfLHCNq4lVM9W4S6/utJ9QyfICOeMJs8\njoLIxRYXS2/7Su8uKmeRlSFEcY7IUab7G1S9ElY+RjqPqEr8A0dCcGAkEO1P\nurZ2\r\n=NRqV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"0b502808ff0151acc5ea0115f60cd080421500e4","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v8.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.7.0-alpha.9","apollo-server-types":"0.1.1-alpha.0","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.7.0-alpha.9"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.7.0-alpha.9_1563050991514_0.35181862102415495","host":"s3://npm-registry-packages"}},"2.7.0-alpha.12":{"name":"apollo-server-cloud-functions","version":"2.7.0-alpha.12","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.7.0-alpha.12","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"6509235f7012dedfbfa13e4794c112f46a4bc5cd","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.7.0-alpha.12.tgz","fileCount":20,"integrity":"sha512-eRmLYtDxWrE1PgbH4q7luQjPw7OJTYy3fQ43dhfkEM7MeuqUtynDcCVUISPzLCt/ksKGPy/NdBOSryGbP/ZFMw==","signatures":[{"sig":"MEYCIQDnCuR6drtP3oRhLE+7L2JjahIk58OPYM9MB4MgFPwfMAIhAMz35VQRf4I803XDIC8t0ccwu2JNGAqbxdS9jg0tCQxD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLC5pCRA9TVsSAnZWagAAqqIP/3NKsuSc1jzqoXMOvLDP\nGg8mO/24gRuCxB5QXNXw2CAcPCZM5VsSUPjcYfeT5cdyjPhYrcQE1nhq6pyf\nMPEAVJZYRXSXWYQhgJNKZBMrhTu4kmBQHDpEBoW+j43f1CBPbbdLkW6MY7jv\nG+d8JZJ1ZUVPkz5RHz5RaSRGOd0XXlm9c59atf3n5Q6bkXCQPmX3h6MjmPTf\nPpeSVXqSCvH9PTnDDnXmbh+9eHCpFEXgVq0Kscx6eOvg8CLilFY4v/KEKkyf\nAGMo33kyKNTwd0Dxj2Su7tRMb6dLlA8Y/lHNQLFVadSmd7Ct/RkaPrWHKspd\neOzBi7BenzLHyyYVGgbjYSPDPnjoQlmK1rV23tkHMy8EHdZc/g5quBepuj2u\nqUrN4FBV7YFl//XUHF9xqpuXIo1pYIbyXTxXBkDbFLxzXeSGVXDfDKLFzc6s\njxvPBGzY2u4p63HBxvGNpOf9G6E4Vw1u+SdhfWFAxzfsOKjH8ohOvc54EQU4\nWX8BeEDMeP1s4EU/s5yYYBo71Hw/4Xlhy+NA4WTDIy9akYWb0klFQLBWg1FM\nzShW8smrPy1ZDR8ZSregNqIktEOwi8fm0K+yIQO8Gicp2cnEoSU7KPMeE1QT\nk09moKTTtGR1Pzm/xS5hAHVGPtIJoEFqKAF8++3gvRRCvGJ4x8O1WeCEm941\nntKD\r\n=ksGy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"6c69ecc7d1604115c99d0b28aed6f824f50e93db","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.9.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.9.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.7.0-alpha.10","apollo-server-types":"0.1.1-alpha.1","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.7.0-alpha.12"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.7.0-alpha.12_1563176552556_0.2626875049015318","host":"s3://npm-registry-packages"}},"2.7.0-alpha.13":{"name":"apollo-server-cloud-functions","version":"2.7.0-alpha.13","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.7.0-alpha.13","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"8817b82cc15b055a251e4c4284628a9793fc7ea0","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.7.0-alpha.13.tgz","fileCount":20,"integrity":"sha512-gpF1HlNQqhRFeMOQRrWHtVkx8QGmrjJ9w2iXEk9KcZUiTjYhraZujQKvDgzXRYu4P1zZaSAqaK4bvqqWpzqjeQ==","signatures":[{"sig":"MEQCIFlJiGvT0PttRnDzDZJK1rDXhMLSloesPxvQQ6hAee8sAiBpxxMOWS/mXZOlWljjyDT32jmpY/ZC5/wrCmltxjnEQw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32585,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLHS4CRA9TVsSAnZWagAAmAUQAJlS6T2WV3Ljl1n/YA4P\nRZKWnLGz4w5fu1A1+jzc8kJ81HM4vupC1poUj+5ksLwBWCvTd5KeXBfTONfx\n6843MPB7RWuqrbNj7gYPg+OrEuCaatJENVsszISsTanxi6296uuqgXpD1+kq\noqtq0Isf2oHfdSmqIOgEHLiIsYlMXVQ8+/q2SjAqA2tc11RqSn8KqBmgHZLD\ntF0MMEoqYTuUE7ekKrd/CQpLSbHRgwx3ylo4+7nAip6Cokuvp+1s3+PPdE4J\nOQLrf1+bEdMDtkxt2FgU4Jl7OhZ0KiuGv4E9kMpb3kE/OPuXq+JX2gjPZC8I\njMbUisPTK+dZOxxlZx1BJsj5hrDP+Z1y8FkpMdNQ9Qi1uZyhSkcZvP9dec5Z\nC89KgfAgg0QF7EnIy/Ir9KAiegNuCe7ZGnNeKijAgmATcwC1ndHoRnqTV16A\n7whC60Xd5pwV6DNw8olzY1QAly84BK3L5VPSK7Kio6MPDZTZIPNn6VFw6UJT\nfnunQW7tbgv0WC6OP10G957kEuGmtqH6QqPyHHE7eZBm70pFpC2S6z0FOrgy\nYHmO/pv6J95R0mGM5boNufPypGOP0X/B4r3CAfSdD5Gsb89w4QNkqShte+eQ\nMXdkEYPTluJeaSbk6NiZHJ2AelUJ01qhCfxkNqjX4tpmqVf4VMcnyA4wLWvb\nxeaF\r\n=7sy/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"b76ca731c7de2ebb4cd1cecff7e4d6c23f1f3b9f","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v8.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"8.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.7.0-alpha.13","apollo-server-types":"0.1.1-alpha.13","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.7.0-alpha.13"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.7.0-alpha.13_1563194551983_0.6466607970234124","host":"s3://npm-registry-packages"}},"2.7.0-alpha.14":{"name":"apollo-server-cloud-functions","version":"2.7.0-alpha.14","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.7.0-alpha.14","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"9b98ad2753113995e712913dcdbdf95e3fb78f10","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.7.0-alpha.14.tgz","fileCount":20,"integrity":"sha512-s9Xyqh/9SrDkaSXkLFe936PZfa2fiHcWjIpDG4obPKvN6xp4jFgbpCQT8bPBqq2eUuFuclruziGJunnbh1+tEw==","signatures":[{"sig":"MEUCIGgJiPBHA3rsu/B+Tse8ZP1Evg4OesCWRhwtI80VhaINAiEA5PTgphGYVuhVzLxHU3wfok6nPOfRbrVCOP6sNiIhIlU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32585,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLYo3CRA9TVsSAnZWagAASEUP/jL7AgaOTpuUujvyBXR1\nPQXhgLMhnx5l9lExHvMCvLejU73QbVWbs07Eoj2OTbccdhCh/AJPvQL5dlia\nHI+9eXq8C8CFmZtKkZp7dsoW2zlIJizizZa1rxijug6b/0SduP3+pq30XXiv\nvMI3wkvbzLt48ECZ4v7IW5VpjeyXuqmPb/hrGOEc+zI0xW6k1o6fyAS0/6Ul\nkSU4L4Zr+KXJCYcQKIaeJaS6Fz0D+FdRtlneJOTujOcAl3NN63qPPsrGwyW+\n95PGFaK/ib2ba5eYuUl6KB8CrjUSg1TfRWmI0FQ38qMy6b8fR8dMWz8icMFJ\n4bFkUjqrPeH7tYnehLSANOzUpud9KezKeqhBRtUEjv4i1FY6PW/usqvZSHQp\nDGlhIQY679OnzXjaFWOgdqhNgEg+XA5osLpEMiWenL82x+KnVl23Msw2TebM\nJ7QMRq7ZLk4GkJICIcqHOMBTYdW9Ij54HKV+Y26mXgI+Dit/HUYwN1Af558u\npaASTpna8u5Ha4rhZx59v4AFyOG8nGUTuJM4/swmkRSHcIxpu3QowSnAAs7L\nz8WU18w0v+KXAQ43R9COOXTYOleKIkoM773ju7r0p0jprLCziFDVXlOh8KrL\nr0VNVgvBvIco8bXjFmN/tPLeg840dXyrfeopv/l32Idl1bKamldrHf7ADkLY\ncUTw\r\n=xfmE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"c2b9071e424e2b32fb68c122a30cb4df75de4dfa","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.7.0-alpha.14","apollo-server-types":"0.1.1-alpha.13","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"2.7.0-alpha.14"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.7.0-alpha.14_1563265591351_0.8852738811211274","host":"s3://npm-registry-packages"}},"2.7.0":{"name":"apollo-server-cloud-functions","version":"2.7.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.7.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"54dcaf1463469795adc4db113b732144982f7698","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.7.0.tgz","fileCount":20,"integrity":"sha512-ebd042QT66lZPdXOpPqxfVf4soIS3IMBd0u+wCOzNgBlip5HGUzWM9wKXUIuDlLjV1ZkPJGWhUxzTSRvrhU30w==","signatures":[{"sig":"MEUCIQCrepB6RhgaDf8nkIRjtQ9mkf4UTvunDF7vIVj7RS/XQwIgOseh4GT44IsRmHeunaV0PVUKepWzXuLaMyTEu4GB/pQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLdUcCRA9TVsSAnZWagAAqucP/1xuGyVgTVM/vnMjjygI\nZhll88uuut1DjXTaaoFN3MpSMqAYxOUwUU9UV1qcCiwhyBfyUPkGd+1Pa4P5\nw+5p3XubNVpLnxcTgBQsGgBFe7STwlBFSD47o1cRZmOHaElUywSp3tdHIcAh\ncMGNjwtdA5K2nyEYn1Woit+DpKMX5bRBWE+JMJebipulhASK5U78rquvNGba\na8dUwkTynxqkjBsxQ7xnI+0qShCGCmBWabZqHaovxjtDBYEsy50vVgtJsRdk\nmdBcxuqYyofU+YFkVoEmnFHHSUV/df+YoJAnILRQqk6jjvvB639MMn1jcA0l\n2f8bU24IAAXMBjPF/bz+8gdupVCddteSyVCwXKAN+tZxhA3s4VGMkUNwfaWU\n2p6oG+mb3Ona/zBOSz3mnMg3KcOQg0TEQONxOSm4D5FpdPQEeklWNVUDouYO\n+wJ1cM6CreVMULBDqsWhQhdKgC5Wfql419IevZZBUVf1yH6XF5fxBqrnkgLz\nK+XbzYmFadYu5oawADA5KJUnd56EpwKXr61rh8O/pNc1Y+Npsnx8TSvaM54X\n1dldsXJF7x0Iryi5qgGMMTtPy2wrPpbCkOFNT6nQs+mkIFrsjKXnW2ScoFsh\nnwU3V1HNU++oSRK8JuCnXguoHcN0gf0jeiY3O5Z47nH5BnfgYg4QgymuYpzy\nVk3A\r\n=chhh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"1d44f3d4756d43123eb01bf293e65f4a3c2e64c8","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.0","apollo-server-core":"2.7.0","apollo-server-types":"0.2.0","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.7.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.7.0_1563284764045_0.63452573584394","host":"s3://npm-registry-packages"}},"2.7.1":{"name":"apollo-server-cloud-functions","version":"2.7.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.7.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"dea88a41807d1026da25c6daa39ee8e38febfc21","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.7.1.tgz","fileCount":20,"integrity":"sha512-FcnmUfv4YiqJNJvTEc1J3N4xtrXLw7zowe9mjSwBeBjt6WH9VS78VnYHSF57IiFj48/OCvPnpuJjOznv7TmdUg==","signatures":[{"sig":"MEUCIQCI+Ft7TmMNjGtxN114eJ3n6y92SaPTXWvU6Xd+P3QzogIgNcNRFBKOjnvadNb986EiVkyQiyZ6PG7dGx6C2vS3BmM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOYi7CRA9TVsSAnZWagAALWYP/AtbdyVBujG2QxLl61lB\nM4RtSz5gXtI8lu3Szld217mRAW7XGs00xGhR/ayZh6jQjJK9eLNxxIV8sDsK\nksVgjON/StC5tfahRrKN3EuZEpsypxWogZvYFMIDZRgz6pUUPA3z80TPUrM8\nKfafFKziKboxWipdTOsLMuiDSljjJMWCunM6MtYouOr7D2WabPW9cKhnIV0k\nk/vgEJCG9r09Hn0Nn9u50xO4Ih3mVi+QPK3J8ndakM4xdIb2RkM77CNKcZTo\n5/UelNGrqHI/k3c7KfsE6gVzGjoexDphjSpzwcJg69Pf5VRcidYKyqnyogXu\nIDgt9gt3HxLNqrdi+EuE4XIY+2c568c9mSG6DHTNM9KcHfyzodgOXcR0aNgA\n0zRNeh6jDdXIGEg/APyZSCRa4Oo3kWUubasDznN626apBSfYsF9u4RZkNRbm\nn6VoMRelvXxf2yyc7i4VhM4ykmk5/SGiKonKbqbo33fA2wphedD+dTs00xiV\nTjUoNU4SQl6jVt1g0KKNggoYlkdLYPE5ZKzXNN9yurv7IEJdGmKG2++hFnDu\nBVX4V4lzS5XJs2lVpDUQ0cCJpsrKClVixeFuJmceSs8v8QsrpRq1hBhb6ITF\nVLo1hJp/+d4mXeXbeuuX8OPF2/IEh8mJ2dyRXnJAd7rwhZ4xqV5+sD2fYfy3\nUM/T\r\n=LhiZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"2f87e4af9a6f1e3c8f4c51b4f77860bd3150c8c6","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.16.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.16.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.1","apollo-server-core":"2.7.1","apollo-server-types":"0.2.1","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.7.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.7.1_1564051642994_0.10807045045735619","host":"s3://npm-registry-packages"}},"2.7.2":{"name":"apollo-server-cloud-functions","version":"2.7.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.7.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"8ee374fadf38a8f948a2e1937281cc6b634589d3","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.7.2.tgz","fileCount":20,"integrity":"sha512-J7Obtj/Okwx5i24arh0QDObtAgSjAu2ulDxZSYouYu6kfjk0kaeUKlCTbPpNA1fiDfQ1e0LY3BYVnBDgUVKHnQ==","signatures":[{"sig":"MEUCIQCRz6rquvli4Hdtg0AjQ1Q8tnqgKaH25WXMGiUzgrbS4wIgUX5MHdGObigXsNQIWEkaXzq1Y9n7O/X9Q5SLAAypm2w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdO4y/CRA9TVsSAnZWagAAmsMP/318QPjaXhPoUG8Teytx\nsubHnWzpoNtdvWU7T9i+FxZMmqKLi2CBI9kT6izsXwczVPJ0Hf4IhC5VukS6\nsJJE9e4FrzMqrrOkN/DvPueW7RZXmHUmSx6Kx8JA1Il/S3jbtTnydBFmekrT\nHr5w8ljoJXnPeeOQ4Ic2Zwea9pK4iI8OWQQYn7a7XcH5bEt6GsSkavYHxL3x\nio3L8Jq4aJUcWxOLnIItO50lpI6c6w25nNUsiThWePg2WBzTi0wEH8Rv+x2Z\nNj4bYmDVLKJHdDhTMbTA8UmsbEUs2869Q9bL2QHr4/vqUR48/6ktskRo3Gkp\npJFMDyRdjEWTDirmEUtE3V406Qad8q768D1mUpJqDRHKEMtCYdq/7+6sO1E1\nUL7RkEYTVS1ZpF9kcReEe/7bYEZbyiIQfciVbwvOrJrD5XNKwXQtYyY23PG4\neWljOXwgoumXKbM+pz29YJvz5vbG9jT7Vem/zpelZwerfCjn1hR1Pk5lac07\nFTj1TRhq1/H7Lgm4gy4h4f51bYMfWLGxlnJ2AHsmOCIqiiHrwGCgUwECCvB9\nrcarD1zieCiV7Q/vRATJ3BGdWxYdm2s1iDD+sz9oqEm/6YcfZXPy80uBIynV\nJFCCA8jMa9f4ymJvrBPd1zhH+X0r3K13FlDEoUXyHeUsmQRTa9ERkFUPAqR+\nHQhE\r\n=dNWB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"d0b33f20ba4731c071d6fd8cfaeca1a1f3d83e4b","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.13.4/node@v12.7.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.7.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.1","apollo-server-core":"2.7.2","apollo-server-types":"0.2.1","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.7.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.7.2_1564183743265_0.46561453056418656","host":"s3://npm-registry-packages"}},"2.8.0":{"name":"apollo-server-cloud-functions","version":"2.8.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.8.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"e2e36d064264c57b769bec41256fc6e04839b4ec","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.8.0.tgz","fileCount":20,"integrity":"sha512-rhTZQPSN1It76bcAvE0nQO8UR6KLqA5/Lhs+9MNRxrW0hvd4ILBg22foNLcG9KIr0uUwUvKFgr19iBEAiEI9xg==","signatures":[{"sig":"MEYCIQD56FxSZHn9wHwgtmW+y/O/fY+qt3hXzyZf9J8+X2nY8wIhAP41kgU2w8NTNVzpMDRzct+WJzlz0hG7MXEy0JFjFbjQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPyl4CRA9TVsSAnZWagAAGx0P/0M+o+AjyZOsA+dpq06B\nC2jCP1KgblPTVz5bpN25yHCeNmOeQtgkBkIuNMSs6YpVf1U32nJu5dc8NJ8o\nAwJ9AighgtAlA5AO1IQCXIxjTEeZeSMDT3VYxFcRHlWGbe+qU53UUHRThqol\nRlicxpnleJNE651Gp9TW1hatLwya3EsRsL4eVmi4palmYSlI1WnQkW5t4Z3k\nzlblbi0rYGBJWyaqPIBR9An5/XhzWYOy9FARcqk+q7Xc7lOTU/V/NVsi4iF/\nry0zALimT6E4NfVCgdqJ5yEYhWDgdES7wmMLbuwoMzC6dE0or1VNJ+XOqBWb\nPGxfxLabOoKagvEzL8zHBFMWXQ2TXBVzEQBboY8mODBkLZf3XApRhZk5O/VG\nJyvkWwi5XIjwC6o9SAVsIZRnAxDwi80XaBm79cidaioB17M2Hl+RtrWnHoCs\nRGSlRHNOSlsV/5r/cSGUqKuT+Sscj5yW5KOgxDb/bigNPfwR0NGahItRWDLI\njAeqzr7uDHxp3e+uOc48M9+1q5BTOLt27SeYc8qFOOZqfgPJy8A3KY8HvTAf\nqAAWLx/xAaE6XDkPqmcrLtCck/zKBYi3QWYKk0wAHpr/X2SJzehFUFBtdS8I\nrtwknhWZZTfi9pBrjJCMXKCDaCt3lwSbqCW0NV/86UE2vTWbzgDfS2vRhgW0\nIS7q\r\n=WsuM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"ddeb71f8d6a0f3c91646aa0c7c99d2003b5bf73f","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.1","apollo-server-core":"2.8.0","apollo-server-types":"0.2.1","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.8.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.8.0_1564420472181_0.6397040959164308","host":"s3://npm-registry-packages"}},"2.8.1":{"name":"apollo-server-cloud-functions","version":"2.8.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.8.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"79bfd9b881e6bc2091085e4cabf5d636362b7008","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.8.1.tgz","fileCount":20,"integrity":"sha512-BXLnKY9vrQYb4iNAwCYB1rmj5V2MT4PUlrilHqEuopVx9vz6jks1RfeDRSLdEmxoGuTEVNl/HCQpyhb1VqMiXw==","signatures":[{"sig":"MEUCIQDFoWH8WWF+Qtw4tQhGIZchl9mvBLFAU6PC092G21lq0QIgSqENrzRKve7MRdxfEhDVmJe8I4epcEK42NkcAN/0sEc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQXitCRA9TVsSAnZWagAAvZEP/iZSXhmXpEDH1gDysfXX\ndn8YD2S2TknLCRA+WedzZFtFys23MExWViHUjFZmZARtIC2cR2K58xkyG4tA\nxGLfrNPit7yZV2YQf+c0rzJn7rSWHT1y68rQVBlcGNREwtvPqhdPMYupmR16\nIF4mQK6LyOnawJ5reO4Cen97v64f9YmzcRqIrNtbYPUznSrh9m5E6PhqcEBv\nAZzq6qKEVwiy0x0ojn9bf/GA5UbmUpZMA2RKB1Hqxr0DyNhMK0I6PuAbkj8u\nTywLmGcNlMB+uIoHu8DfR//pF48Hom/OCCYT7PwOBd7GFzuoKXYm7oozoLzB\nfN2z415LpDOIPzlutswt9Xpmd+2jVBH76ef4w1PReanwGsxsVCr/K2fjET1X\ngXqjnZC8iMKmimN5iFa1W+7axYffs430A2R6nu2uVJybc2sU+bJhSEBmoiz4\n5PKZZ0goEpuN3VXQ6Plj0EkfcShygF/csjfvx0066FPP8RQDwfmiDlSL8fZG\n/9wXHYL/WJvYOg6Dlr/gCGUkoQl6iJ3G7G2w8GKIMp5UQrZfoBYrTmd2w6JO\n3W5zMazBY/m3y4xwjpQPH8+v1r0qxwyv1YrUzl5Jvbd0JV8qMYzTlBxgnKPq\nZw40Iz6AzWZ9LqcN3+wBQOWIUt89+CbEepnzgu/GUft0YfrHxaRgzkhvY1k2\nwWty\r\n=xSQ9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"84d80eba10d87663dab60af4a1cd46bccf30513f","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.15.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.1","apollo-server-core":"2.8.1","apollo-server-types":"0.2.1","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.8.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.8.1_1564571820482_0.16824712014850984","host":"s3://npm-registry-packages"}},"2.8.2":{"name":"apollo-server-cloud-functions","version":"2.8.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.8.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"22011733ea0ec7cc4089472ba9793f1088f2ba00","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.8.2.tgz","fileCount":20,"integrity":"sha512-lCnO6elZLWmPhjuNuPDkPCjWTugOd928C/tcCVu+L24XC/9cuEfGnp0KVGJRtM3XL/HxFnu7sVazdqSmTTwWNw==","signatures":[{"sig":"MEUCIQD4vXwWrWN39wpHujszrdNNGNfc2DPHxvWUkKGIGaRtfgIgLA1SrxQi4N93EGsjXn7vjMVvSm4a/L0jh5RCs4RJoBw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXDXOCRA9TVsSAnZWagAA3/4P/20Rx6HyDuVg2WJan36o\nP+CIdBFEdmjaB4GwqJE264nfpBMyTTF5UPpRsZa8kW3brWzRusUSNaYw/4A6\nD76b4F3VCCt5KvW5NJpU56zdzxSr3ZtK6aft2yqK+cu/cD0tVJ5w1NlYwEjn\nwr62FVfi/KKOCJtGK9xLY38CDHt2Zyx2sdqghwECjxYTRfltCzo4llxKskJw\nmhtw7GOs4rWdTOxrBlywD5Kt+cY/9c8rCCi/NTemNu0CG2Fvf7BoUFo0OqDC\nDyRgL8Gzvt6Zyo6I7ysac/4uWkfAT9NELwXZPaCY1KjLHqwwwDdgPTaNscOc\nyijYYWtZPht8AgeTlE7LlQOB8MnK9MXr3DR+tRDIn0s+38ZWG0kqxA8KG7DD\ny/IgfqD7UqRnQeq7vt4HgVo0LZbJ9j2mYGC/HXDTfC5NdqeaV2InHW23oPQ+\nyAQgU6IyZlXte3wc97sSXe92Zj40AytbxJwLvK5MNrOhAMn2k4MprptJzItk\nDU141ntT78cbX+ONHzKVvfN47wrx8sUHtpoI8klZiBa/xJCyz/LsIpv57m/2\nKoIXeS/28dRj06ezl9ZDqtMsAsZYW0XrkhYskfxoOxVW7riaMknWvVy1wudx\nm3Gbgi/O6Lh1S9EVAwbpdz1oTjISloMuAr30uaShDTqtBN3SSxJBoiGIIbSm\nRUU2\r\n=CjDS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"99f78c6782bce170186ba6ef311182a8c9f281b7","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.16.4/node@v11.14.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"11.14.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.1","apollo-server-core":"2.8.2","apollo-server-types":"0.2.1","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.8.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.8.2_1566324173589_0.07011525982893785","host":"s3://npm-registry-packages"}},"2.9.0":{"name":"apollo-server-cloud-functions","version":"2.9.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.9.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"c5f7ca6c5faa983d113155c517b514aad28f0ee7","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.9.0.tgz","fileCount":20,"integrity":"sha512-iYNVAiASbBZlnCzryTCGxr4K4jaB0fh6T+/+ui6+xfk3g1P+dShF6V7xSuCeMCSnVXgHDqDgUeDZop49+VcvZQ==","signatures":[{"sig":"MEQCIEP4lAoV8RMxIznXN90lncAWTVkxFIZZoPtPKJXubbDkAiAWjTo/OqgjMc8Qp3MK4Dyj1lQlrdDaAchLd4GjpdmUVQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYASvCRA9TVsSAnZWagAAgkQP/jtzPJucNn9PHpSO7IeB\nrT4FQpGOARvIN0yKaTwqlwhgbxye66dzCo0O4jbtTb0GT9lwPhw1Zx0j8+aM\n4LxtruNlgtYzVILxL+/04BL4ojpZHcssJ+p0ZbbiaNWqsx+CW2BRgZjtBDOZ\nN0fKyUaVtK9Mm0qSMRjC8qVgtB9A/7PpmSV6EfnNTeafkMZeaCh/P2+ivzG4\nfFHs4Bs43KTTNDxRqSNQKCke9snTa/ZHyngC76fTgaRRop+ZpjIFVLv/DcL7\nrhxmUDyrA9k3bCI1jI2r6XhnWzFSEJJuqrJ8A9z8sBIMPfwfiK6yKY2rnsJ7\nLmxR0E3f1DgeM/PZXAii5I75Gbp+kLyp1HgauAfiW52w9G8gf1aU6bHWIRa9\nQRV96oJ3UyCl2CEWyQcwPiUZegIrD7Ftz9bgMuPH8DAw33BbZpEwlA7CL/be\ngt+vqdNCHcBf0HD8XiEy0C7ygp50y6LRe/6omRwjWI4JIVtUSSuPra63l6X1\nwGu+kA6aTMtMESnWtKdy89xlzJL/xnsCQF01tuX/dws9KQvCCuNZP1n8BMOQ\nyUIwsr286KMGuKeGdONzeHq99zx4gwXTP2gTQNn07GJaXZKlAGlyqq91x+pR\nqpXz7gpqDwQNIE65HQ/qBJLwj3RYRBUDi7nMn4ir/QjsElI45f+twDApPqrL\n0KYO\r\n=JdgS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"6037f6e80fdaa53b50b99ae94d93c724c382c23c","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.2+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.16.2","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.1","apollo-server-core":"2.9.0","apollo-server-types":"0.2.1","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.9.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.9.0_1566573743216_0.3851783940141278","host":"s3://npm-registry-packages"}},"2.9.1":{"name":"apollo-server-cloud-functions","version":"2.9.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.9.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"888e7056ef28a951f4034bce0e89ad35c9b7875f","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.9.1.tgz","fileCount":20,"integrity":"sha512-kl5DJa+dvF0PG3k3yyfA5MdxRGGJu6zaUoslsL01GpY+HBFYZh06XJyrvrG0ch6gEBwNkRPGCcCFDfL3/GOsWA==","signatures":[{"sig":"MEUCIQDPYS9KeEL8Gg9fUCogQI9i1Hdw0d2cXV9KMBoWwiJmYgIgdNh1KLVjpp3qRBIYuF/fkldtAmA3bQVv2ibCByGCsys=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZuUBCRA9TVsSAnZWagAAK8IP/jTZiK01SO5KPWxDjbCe\nFBjZHwp334+O/UZGkWe5zuW8OwAVWrwruRMm2hW5wDQnQkA7Q2G2KoJm6ZzN\n11wVeKB2WFzmsVpP/C94Q56krKxft2D4caQNWTAGMxf/TeABLfOi4gYSBnan\n8lvlPlet0K4cOHzNRDZaLhLVnDpfJoJNUVNirPuHp17px2B4WFrFlYyM8Iul\nqjxKgXe8KEg4dBjJsqx8emmdS0vr74UjEsi/7/ZGZP4KbUVk6R4AxIWpK7mW\nqGk9BvItLrbJFswgZ1uZdCr80HqC0nLcXOKzkwXo+rZCA8fX2fhSLQrVsINx\naVnu64obC4cZAl12f1Ez5osua5uxrUL7cbShNXZBWxWnGxEKGBDjCM1O0DGC\ns77rRHOIMKqMOvgTdnEAMYxHu+Qrp5PJnfI3sF0M/IgL5gTKlzmtOBCkfPfY\n6l3UJIYhtrnkhu6g+tLejaS+68npXtL9Pt5XnTqN217m60j6rl2D8u/Gq5Jw\nAXXzUwyRjT4DgOqQICVl3SIm5Ai80M1nd8PrD11A9fAZW+2KzBxxMxPgNdFo\nTzcGXUahsN01hJIwv2LUjtO6QKbrJTXVbv4gOX9whyfUDcQRECkIy2VvHX18\nOpYos94lZNCwmfGCXSxUqyfET/A3YlPThmFhKXfT097scghPoMuOVzfbyto1\nVj3S\r\n=WqYD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"029c8dca3af812ee70589cdb6de749df3d2843d8","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.16.4/node@v11.14.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"11.14.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"2.4.2","apollo-server-core":"2.9.1","apollo-server-types":"0.2.2","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"2.9.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.9.1_1567024384855_0.3722878750295937","host":"s3://npm-registry-packages"}},"2.9.2":{"name":"apollo-server-cloud-functions","version":"2.9.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.9.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"66d3e409f24e062db0b19e71569ff20006826f8b","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.9.2.tgz","fileCount":20,"integrity":"sha512-3snemrkdtSuyb7t1RPoMcDBIypAnnTqnbDGK9SDOpwmOlSTIc8ZChAFggnQxP+eKl5V8QkuNkP7yV7PwtyJXQA==","signatures":[{"sig":"MEQCIHqprNeSM0YezIsGWajbtwj3gpv1F4DeKjpWQl590D92AiAtn98kvin45KdlXYVQpz/WF6cqA6p8KUS5JbvmapkPUA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32553,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaPUNCRA9TVsSAnZWagAAhj4P/j6YUpawiNigVzN5W17x\nETscsIQ+E4P1IRkyJslYjNpBYLI3TqAg9CbagPh+uKfhr0umWxfTUYANo0NH\nlAkF6LmqmRPJvCn2DARvlnRv5ahAnE4KfLPgXkXj1k1yv/+ScWumZcou5hde\nxY1SARrAo01d5qk5rNoCT6gWpsiOiI45NwlfR+V7fJ4+liCO8dQnxt7/mpcE\nI8gfAr9n+WusvUJnk9FObkadGxAmIEafPwcqXrYFaGSQtFjNv6lKyegV7gW4\nj0cCo7Hu1nm2IusY2XxSouoHJ8xOlaEKM3w2E1c4nxM9I67yBDgqUxqQe8iD\nq1eDe1/si/G6KiPdyiYkypuQa+ThdxSw147SeH4sbgfDbjbdJA/kyCkTwfS7\nHyysWyA9DkvFfbLUQyHu9dvBmd4tBQABmiiKFhv468WBeKD8dwZjPJt50DMn\nx/YFIBSxNW82Rz2Gzz4wCrQSfUk7MFNtFL+iWhJcxN3gvEVCogjcqJ9LOVY8\nEZsn7sO195ckbfh9Dy3Erf0y0JO6Sip9jj/uE8vRqazMVUI+oK8y/fxt3imp\ny97XIhjeBAFnK3BVR4alUcfBq8Mm4R4mveTK6ltX1Lb9GDsLxbYpRQu8Knea\n1hk+/DWG4WDvPT2jZf2oZE0fzwJRYFMBXErjhv5Hd2ipI6P2/5pF9gk/tqqb\nwwt7\r\n=i5lj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"92ea402a90bf9817c9b887707abbd77dcf5edcb4","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.2+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.16.2","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.9.2","apollo-server-types":"^0.2.3","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.9.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.9.2_1567159565193_0.3978333426798326","host":"s3://npm-registry-packages"}},"2.9.3":{"name":"apollo-server-cloud-functions","version":"2.9.3","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.9.3","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"bf9c9fd7eeb1c3bac1d18d32b495936ecee28113","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.9.3.tgz","fileCount":20,"integrity":"sha512-oqfXFPKA9MUhuI1NpyEIbrVl0GmIt/oZza9XCJv2oMqLV0r8xE7Ujeff/3XSYwqTGWXWBptIFr+L4HXIh7Wegw==","signatures":[{"sig":"MEUCIB70j8zcm3nJfojReiMD0203PwAU69aTiHwwIZbullsRAiEA8TbE2B/eYEkpstLeYR85DgGYRjHo+JwrbIOEy7MiL7U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbDxjCRA9TVsSAnZWagAAilYP/RwmA5u3ZegCItqi79MX\nmKBvz7IIVAlVnEbXWDbL85zvEqHcyihet3TKHcq3GSpBLncElBP0DMyIjRDt\nl/DqvfRWvKfKVxRdI1b/XZgJy+JlCcR8rdIibawDkw2uBNhNwflkzUrHRqSU\nOYnZa3gTxFdeWdjymARzM6V5+7nA2ynBb8N5VDvS/Bmf53/lnIzuou/8n1Ei\nblYwT2M4lJEygf1cM6jovk2vLaerC3syBHDLHZYKEpAsKx5JKKlT8WuxTElJ\nlXrvWFb5VjRcvBjGU8UBPdu7SlGAL55ngQrR+oVPzTmYnOLy1sHBfKrvKfvV\nIcbrN7DzyjegZVjq6dmFe467TL+ZGKosDyIHM/QrUfm11ZNK59bk9WJ0gv2z\nl+TUdcqjzlqspGN1Smb5GPtRWFTh0j7nRGWPPr2YlBpiHawP/OMSj9xwx5Cp\nyz7t0mw5gn/18SgKTlsy8nX5Ji74hUWQXBCgaHqZzkGNTTlVLkS0TRnkulkH\n4fXdMlh/1SsAXqzPY7WvP9ZoilUGax6zbOnbD6M4pkatuHdMBl23+sh+ZioR\nfUJS+6Rw/gWNVKpcQe5XpOQem+Y56gxYFSPSeR64yM0i7YvpVMcOQkf53SL1\nOJtnpbUTiJc83SvkSOreuBz10P3wbnW08LWx9rRou6d8ClUPrcSzTM8nGnjX\nbe5m\r\n=C5/S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"a1fbf95fc01739d5cbaa59919149bb85c563fdaa","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.2+x64 (darwin)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.16.2","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.9.3","apollo-server-types":"^0.2.4","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.9.3"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.9.3_1567374434423_0.9096317729463386","host":"s3://npm-registry-packages"}},"2.9.4":{"name":"apollo-server-cloud-functions","version":"2.9.4","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.9.4","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"f5194e5c373065a9c183fc41bcdcc89ff455115e","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.9.4.tgz","fileCount":20,"integrity":"sha512-hVq4CqC+laBWgBuV6ODYS7tD+XA53/LrNwqvmsw2Itaq0AuqzFXe33UH37Edqe7PkuM6pYnwFi7lIj0I93XjLQ==","signatures":[{"sig":"MEYCIQC4gwyqxLmOJwzBWqC+L0cxkyIFSMy7dtUoKHYz1ruT/wIhAMkj5LaEi+OwwbqfAmwri81BVZq4eLFc4HOOx+uGpSPa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdikxXCRA9TVsSAnZWagAATeQP/jde7yk5Gna6fQnbWFco\nNHuATxVdls2knIvTarSAlKQRNAAwmwGu7EHfGaAmA9CD3++c7KdXtaLoyGv2\n+VhMDP1Ur2FteAIXc64DIlNkKwbLJbBu4oZCOKzdDpswAebCEWQ1VhPNAOq1\nXl20hoh3QEAWqzvJSiy/dMpWkRsBqNj/t6OFk09hnhHrsHvBsss23N1H1vw7\noDbNsyshAKwqNIakwFVkIViYnncI0q74ke7UlDfv8alZM0W0fy2QV0k4689P\nT+Bjbdm+64Lq3iF5pQtMOHDKeGpXeCqisxPLlyrEDKVQU7CMfq9yRzpbcC8U\nqualAEmw+mkbQ+9bdsIH6a62GMLlIv1pWyTMyedhMyrImO5wlIwKyMwC9xHz\nxqNU0O5P0rVbY8g/eqYWaAm4q368WkbK7nvGN3MpKNSD73/hwxj+LleRMzav\nce1AHbaIwNWMPzjq80/Cb6BNntDyHUCVCyM1EC5SmzpPi71nIPPKyJ4X3zZ8\nIFiS/96I2oHdkKNXP6ewpBKPRnvRgWBcYPB3VHvMBcnBeukHH7iydvzEr6Z6\nLEBl9nBPBf5Nu5BOebhCA5Q+MsOMXXfCa//INbBgR4Ai71u2VjnPhjskWScO\n2lTVT2iwVetT9lG8JGc/M1ilWho1jX5yEnTZDkHOvlybqyNbVk41P539w8yf\nhRMV\r\n=EXUC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"6100fb5e0797cd1f578ded7cb77b60fac47e58e3","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.16.3","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.9.4","apollo-server-types":"^0.2.4","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.9.4"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.9.4_1569344598946_0.23934130752200589","host":"s3://npm-registry-packages"}},"2.9.5":{"name":"apollo-server-cloud-functions","version":"2.9.5","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.9.5","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"d4aa7d05e59f994db7cf37c0520714c3ab523e18","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.9.5.tgz","fileCount":20,"integrity":"sha512-UdMRKiQ9NBGqQXvUHkbQVJWROx233ec5OkjDArD+cBKQUIZF4wymu/9WgkhmatjuI0LGzlJRSCo5zxQjOMouMw==","signatures":[{"sig":"MEQCIFGR90TN2UERypGFAM9devwl58MAHGncgbxIUkkW5A7dAiBlTWF99DblI35v4zpxz1D2G0HU/6c1XuFnp43S+5E5MQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdl7XQCRA9TVsSAnZWagAAGG8P/20MukzLhHTAcf611YY6\n8wZtmSqvvrqmV9/eUcLLqpLklqP2ltqTJhxIOGEJGNrpimkdk4fkt8W17sGg\nFL2l03YdbJfHzvT7ww2nQWUCERU0N1AgKJdc1z9i9nnSPBFO3wJXj0zJeuQe\nHLtlNk2zJcAtH+wnqQIQ7UM/Wkc9CJPHF0w6Zd4OQLjGDywbj0J5/blkLYas\nh//r5fe9v7TjqoNstqKObX7hULzP/5vbl6IlgSrqv53LamQ6gPJuhE0a3YZ0\nBVp7f8caojMGR64d4BV5/90xJjP0W9SMX2DJ9hVCQ9CJnJPFwGO7ivNZOkvn\nU9kYPg9hE4AUGoYNZT2C+b7gsJBMx1eDcqUX732WjI4+Kk+0gplSqbNfjhVQ\nW2uk72eSw/Of4tuEdj1VTI8RtyqDZrEzmrSzLQ0DKx3lTPlBi5mHylu0jyr5\nEKrcg+4NbrS4rcPQRkKJlcwoavGLYAVhrPHjGeqQgvemlXkhIx0JygXMxzfb\nWew5hQ0je9AhE9ySDPC+XCbQAyON+qOmDaPYj/21QYCo3gW4g37Kx+XwfG8C\nR4hDUzYAK20LhDTApDvEkWDKOVjspjq5DtQGvI3tfo5RpIF3xU2F8+sFEgUm\nBucRXInaiKafaM30e+pgqxRKvr0cElGs9xczoAiB35DAg4wox1qedGLHA/7M\nmnJz\r\n=IOkD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"aa200ce24b834320fc79d2605dac340b37d3e434","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.16.3","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.9.5","apollo-server-types":"^0.2.4","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.9.5"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.9.5_1570223568311_0.05485629453501217","host":"s3://npm-registry-packages"}},"2.9.6":{"name":"apollo-server-cloud-functions","version":"2.9.6","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.9.6","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"04d30622821951faf9dfeedd731543915fedd4c4","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.9.6.tgz","fileCount":20,"integrity":"sha512-hAGVjVrVSPbYc0F9dsvIwBX0iyWfXw5eDNaYDuTxsH4lIuR4yQ9YCb2Xa4t0nW3F8mlu9+bf5iqSFaZWhZ8RHA==","signatures":[{"sig":"MEQCIDRfJ5yBFcaEVijZXZOrlkxPVgX7eY2mC/P69N1QbJiKAiAOoa8jaPo+iXSMrEK1NmWnvr/IrIL1xPdkk+xgT0VJ5g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnyD2CRA9TVsSAnZWagAAPCoP/0HD26b3vaoeEdtpEC3/\nn4A6sOwZXckI4C80VfW1JYmFP/osN1KQmwjX8RTv9StbmZQ8YUOPjlksMrlF\ncE7Jue+LgwzKVDxZNvouwM/dNiFpG9BUJHOZSohTqWw0USXM5OGbir9iTZES\nfHHmtXtHJCN/aDJ482XRMwhRxOeOd4qr1OL9q6MphUP0pBPZLMLLiQU6snnt\n3UY3BUC3kBxHjollD4nWraFNtTGVmImuHMaCxjnB1p8cny2C0yQ0rSZrObdG\ni2ADzodRfIiY+h4RQl/DWXNnH7KO67M4GOeZX5laRd8XgM02NXw0O/p4r1W4\nEXAu6oU8IfuIVf8FIkmmHBYsBlGFACYZqc2rGe6XgLDOgylQaclAoZcXk7FZ\n5bewJSoOD5sgjOo+U1qUY6MG8jPds1YstkGZrKqgg1XNNZZx9uo5rF+uTZUZ\nNroq4h3SJ70tIwx0/53VMROWGW/BoSOzSYMIKBosNbdFpuujtDzAdVtymk4i\nuwWLmCGxYc+s5OuCtCMzf3vbLxOsvR6ruMYWPiMspQc9WomqJThVJ2mP4nLM\nSLTNRs62W1afTBYgYBqtrTz1QHnEhKx8hMjhgTbAyTz/E+1WhL/cI2jtWSM1\ntH1gfK5u1gT4dduXC1w5Cu3pymwAOxzPlBMliqSPF+LPXZz1XkfY6HhISHkz\nOoHE\r\n=aUV3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"fc7462ec5f8604bd6cba99aa9a377a9b8e045566","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.16.3","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.9.6","apollo-server-types":"^0.2.5","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.9.6"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.9.6_1570709750300_0.5998383807237073","host":"s3://npm-registry-packages"}},"2.9.7":{"name":"apollo-server-cloud-functions","version":"2.9.7","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.9.7","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"f079520f294092900533be69264a3629e2b4ba7a","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.9.7.tgz","fileCount":20,"integrity":"sha512-M9U5YnYaT+EhR45z0YMlnH8PaTFp1N+vZ3K02PdSDIW6dVBhriWgPnMgxo3D1+IoDj+vd9YJdfNogO6avyN41w==","signatures":[{"sig":"MEYCIQCmkaERPU+O9gi8+Z9kc1XOUwEcvKNg/dW56f7f9qnvdQIhALE1UnLjoSAAMvDjhhvvZbr0vy0+smqq6GC8krI49wCo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrepPCRA9TVsSAnZWagAA7jgP/3sdKe4AnEWi9oYF8pja\nbXOMMgneyL3YN33Mf5RQDhWvoryiXhGqdJeAp4kcdkEhbcwbvF7ywe0MKjMz\nartgMKson2pIoMAQpq7dEDMA4dAhJcqzmQ46f21H1UE1onJQoKDyRJbD8d+b\nK5FeiPTOs9YpL4POtko69e7+165ZsTjbfePF4Duj8xZaoZEMo5UnTZQxcqiC\nYCXmzb387s8XtCl0iZlnbFVawEQZcs01CxCDou7fb5tS5+vjqNlvS8hcU68P\n9LXUJ698mhavBQNmylGxSgkY4U3ethAkD6NBnQkvGKJXsh4Rh1DsAuIxSZpZ\n1iKoNHRcyO+GiKHBKvsTw8ZfMveUaVcdb8ueW/5GhkqnDTAMoP47PB3f5AJa\nPW5bpRDFhtCB0afZ6xnfpjMQMSEXusU+itWHSU+GNwl6JU16V6xAVD5bBPo8\nu3BCKsJMaTpc0LNFLFHdiwSHlAsZdOUkha9TL9jZFnreW4HZLpeET4x+qddl\n9ygZF3hbVPulTjuBH2D58tAgjpRpWVE7nA/nzyGjH/O5VZAZYBt+ODWEKDJC\nbR4mqWpldm/omWUGZppDRvjCTYupOiwNpu7Yagq31Nfk4bpfhe0gZ2VUu5lF\nkGHt6gcIUTzcdy/cag11jgkdr4w+e9Qb7OhbPdEBygvKs9P27tOQyXuhc0Qn\n6Q22\r\n=TU3l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"5d94e986f04457ec17114791ee6db3ece4213dd8","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.17.0/node@v10.16.3+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.16.3","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.9.7","apollo-server-types":"^0.2.5","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.9.7"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.9.7_1571678798944_0.2039438127244111","host":"s3://npm-registry-packages"}},"2.9.8":{"name":"apollo-server-cloud-functions","version":"2.9.8","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.9.8","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"16c244c6a11eac482f6ad029fcf8fcc444c285a3","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.9.8.tgz","fileCount":20,"integrity":"sha512-N6hKD68vMCk/nNAXcY60KEElEPMtvpjgTOOMmu+Utao5Cw94xT6h1Ge2KB+ywgiFgQcPYSWzpjxiFZh5ZRkMug==","signatures":[{"sig":"MEYCIQCuPRi0kavRqkirXaiCL5rKy8TjgvRgTXMvrwyDwYcL+QIhAKR5xfBqMPpAUSHPiusuplZ7zD9e83cHFi0bLVGNT3Pu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyv04CRA9TVsSAnZWagAAdeEP+wa9E5fIFqow6IXPEE/R\n5IJDJnRM9f4gbbgQdS+IGIofAx/zhTSNVjiO6L31yR4oRYg2mhi8dLOeehft\n6KRlmywfcCPrHFaY42TJtNJO5NCKUUd1+unwS/6cGYc4TPWPu22awztMQw9c\nsZv/9HTgHSP6VEtp618MrJSBCbVDnIxHU7rQL3bH9rajoC1YSdkNUiuI0KfX\nkacmq+VRmkRcxMx3UBUHFKuo+78uDfqJMZQtRMNorwQQ8L4TdqxgdI7Owuzi\nA0SZykpVifCHfogeDX3lBzpxzb7KkT666VCAjC20eJvWDp2d6DCnEPoyV2hm\nTQCJEIt7oWfvLJHwjmZJ0oAi5h7jdSxY1J/RND2LDj7z43jB4rcuSPCWzzQa\nmMLWdvitiDtKj6pyW6q12zhd3axCjN1bRsRUXbPLna2533t9dbhaj/JU9RE+\nKoRiXjVI6q9lSz1KhNg7duUErD1xPIlza4kuQF1hhF+iGimJaQ5hRGykuAHn\noIV+jewlA4oqGdDICpjcC+7PX2vPVCjq3mTjSoiYF5eVeGSIQ1sQmLToWM/e\nk3OqTRFI+jQUnIKE7cDYCeRLp/T6Km5VqizpNeHnSUJdn2qeO+gFy0nTOKjH\n2T34QV/356MgoqFBOFCxzaE7GTIhIdVA4mMAwt5tX69BF43nbXk0l6DgPqKB\nTxT2\r\n=Bi48\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"3cdde1b7a71ace6411fbacf82a1a61bf737444a6","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.17.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.9.8","apollo-server-types":"^0.2.5","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.9.8"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.9.8_1573584183952_0.024314401275206787","host":"s3://npm-registry-packages"}},"2.9.9":{"name":"apollo-server-cloud-functions","version":"2.9.9","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.9.9","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"f6c7effdc7f02a3251a6aa6edfa01ab8e9fd6d57","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.9.9.tgz","fileCount":20,"integrity":"sha512-UZTFYFwMzs95X1s/sKgXdq18Mc0dpWdodCEiGH36cjAGPCMJpNnsukIiCcnvSaX6xY9+MpgiJsjjUDhbkA1Ohw==","signatures":[{"sig":"MEQCIBCwaY81hJxHWBIGjnT5rMYv8KsYPmfvarzvm1P6KdYxAiA858r/pPE2khQ27XldCJum8M39oBs7pTgtFEaWE807Uw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzIcMCRA9TVsSAnZWagAAkaIQAKQGJS0U1rMxm7Qo/7jJ\nYa1oNyt8wzRouIkYwmOiyIr0FdVwZXBUcDrgPZDwZH7j61PvNUH8asEOiA8p\nl0Lyb/FP2sMvJRcQUGa5ydhWZKpIGigpYpoJSHQaUp8KnoKTVT7+AZI74K8s\n9JAc2irqC+5QPex/iY8Ca2nbgGG6vewoxY2skN5JerNo6o1Pg7as/MfZTrQu\nhvntrPCQ4NHqDWPiXb7a561EvAqkvP2g4JU3QlrNM0kx4Uc5Zp6VrU6M9THP\nNk/RA7u1TZ7y7IIJjyfqZ/56Fwqx8iU3jy3np9Cn2opQBcdrQYAqcN0X55ZK\n9aErftucQxzmGOGTDJKjGOFYCYprP9UV67qreVNkLnd9GZqQuUn3D1cqWSbJ\nvhWCLYzEC9lZgrdoE6fGS2HRgL9TGO87H27zoA4uJcyzGLdNt/G3EoP5DP8x\niRsN+Fbt1NPx5RSWPLBAwlKwzG6UCRVpiRqVffFYv6tp1qgAF9OyFonZQGKY\nOB3jBFAjwgIYaqowJtfjl1ZL5rZ9u4fx73EHb2NqagmJ/W2byYxHEeVRMdQO\n84eSOLUje2it/hDXdU4m3bk8TEC1yA2orHeHR9HkOwxWOVsY+4Cobxx1pEf0\nwX+nhGNnkS88xJo5h4A+DJWea433yut0Z4aPNzOulzS6t6QeRSNQ9GvfBVm+\n5K6S\r\n=icYA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"93002737d53dd9a50b473ab9cef14849b3e539aa","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.17.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.9.9","apollo-server-types":"^0.2.5","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.9.9"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.9.9_1573685004529_0.5586173655175464","host":"s3://npm-registry-packages"}},"2.9.10":{"name":"apollo-server-cloud-functions","version":"2.9.10","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.9.10","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"50b641502d59bf6327a00c82d1bcc55a50f8ba94","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.9.10.tgz","fileCount":20,"integrity":"sha512-sgoBMP4hkmE0uHO4ZkcmcfYdCObLUoepIApCuGiAp/jtdkjOR/CyUqXhYeHAHZgac4ETmy5PFo3/41IjZ5swwQ==","signatures":[{"sig":"MEUCIQCp1dZNicIcWmgQgYzyZcEp/huFuA00q1LQ6cBfbnodEwIgbtAlieqLueGuJGdNF7j0SYY6j0qcIjGzV+4ylIsPMFU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32637,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1b3FCRA9TVsSAnZWagAAV9YP/1UczWZnEkg7tZddQwcv\n86n8Cx2KtqTmSJQtssBPagk/Q4yZU5P9qoH6qLCpPo2/IL/g1kYiZKG1EB5s\nk+LlqO44Gd4fD9ivm/Ij/2HtrpKzAnM2VqQO/nUnUX3LJQ/Mkt6iUNbtkamW\n1ugUfsJquYZvNtIDPbFJGUBdgagZhBw5yAPzVC91RxSS1V4nZDlrIo0hSzxH\nWlUFULuFMUAhfIJC0wjYJux4hSqIVHR17gpf2qaWgL05rOFrQeOHZ1Sk0f+a\nIgYD6LzjfFzW801h5qDzCqpAhpeuB4QcTRGJhFRyAla+NlghZQv9wHOfcLf0\nrIiHqTSJeduKAVdtx/M/4f3cDyfxRf2Tj9IE2wlpL1SGjBhVrT2amchyxX7I\nnfrPv8buVWC/zKCR641iKipCEztU0/E4rmJkfqFW8jOZsEAJs5NfLCZpUEbP\n9sncJirA/ageN/qyGTLJiwMV/Qw7/gLSWWWhwKPcKfPkGqaVd32/b7ayyRVA\nBSegBZ4hJ+mTu715KOxC39E3/wuulN6UNrUKuO+XDBvGyGHNsUERk9tTvFxv\n8k1aRObDK7kTpFmbntQKl1EkTTaSu2EuUmIAnXrAF1W/XDKcAkqFTUQnGiK8\nIVyKYQuOkvQGVH3lsAm+Nu7nb6nDNcXHNjU6EITkaqiOhKZ72H02RjlX6WG4\nKu0g\r\n=FO9b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"2a4c654986a158aaccf947ee56a4bfc48a3173c7","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.17.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.9.10","apollo-server-types":"^0.2.6","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.9.10"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.9.10_1574288836795_0.9258885241445627","host":"s3://npm-registry-packages"}},"2.9.11":{"name":"apollo-server-cloud-functions","version":"2.9.11","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.9.11","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"8487c5944b996af775585e107c087b246ed99373","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.9.11.tgz","fileCount":20,"integrity":"sha512-xwpXyX2DxS5GKaa+ChArexN+P4uHUUmaywgca/tQkEvbMt/2RjseCGVL4oTVrLJjkFmRBgs5xj80VxyrNQg+EA==","signatures":[{"sig":"MEYCIQCeuP2uG8j0X9yqoOBvkQJ61CQM+CeugyKKeEArXtHiFAIhAILnMWtpscHqbWmPgdrUWW7q4W1ljbNGdImg9zceO4ss","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32637,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1cxtCRA9TVsSAnZWagAAWDQP/ReSD2XK9DplPlYCL/44\nGmcxKv2dap31onubryRpMoYlPOdqwPsp2Uda+2DnDR+laoeh+rUzHMQoAkxC\nPtD8p8LzQM1ZcZH/9inX/DHDzrDnqi8/vpIdnR03TvhqUxiEytLtSeGXvfEg\nUBDPe3pYUYx4Z+a0+aus542nEviGiaQQPTLnSlqL9HjF6FIYAWdjdcB6QuAv\nYV9xhWOivqr6cKa75WSARH6Tem3hLMQ0jeJNXQMDD7mMGMCQpHZIZOSHZOBx\nYf1MxjrJYtFdLu8Ka42vwNoX2YeSVHE3NOEpMSln1sWPMd1Y/Dn3PzeS5Ish\nAf7BZmlXG0hyDqmmwXzIpOA3/0M+Ln0JgBPcPUMYWRsOKANmn+yPgn/zXqLu\n7X1XM1J3ZCzbaPPWpqPOy+4raGVX1TqYE9/5m1y4/Feu071vbprFJEMWqE8X\no3OV140Pkc02+C98063KaTyJDbCPA/AjgQ2PdpDaxVus7STHE71XBC54poQd\ncDHFjJ8hA0NZNcno6gq/souS27pn5kBH+y69dU+OoVhv0pnfEbIHyABrvxVU\nvC9RPw4cw7nSQMEjzHA/0VTjRoDGpPAGH8fobzBWmcSB0XBB4V1WP1RNSlyh\nqZ/8GosS3CAUtP3wGP9xjHL4Nyvc6kI1VTZXldquPt3rYSizxSUVhnmu8W9e\nlCe1\r\n=5KEl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"d49e4d2038df4f5aae824a98ddb21dca909051a9","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.17.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.9.11","apollo-server-types":"^0.2.7","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.9.11"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.9.11_1574292589144_0.31739457307525076","host":"s3://npm-registry-packages"}},"2.9.12":{"name":"apollo-server-cloud-functions","version":"2.9.12","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.9.12","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"1f2a47081a32c8984642ae0ad8e088f8d10211a3","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.9.12.tgz","fileCount":20,"integrity":"sha512-yVRSlpKQpSfy4ocxIvGelTQqmoryecVvd14pRNvvIvy5FNErnrz1XkccksADZu84opatekOItaCFuXm0Qj47ng==","signatures":[{"sig":"MEUCIQCFJYt7pNIdrOe6C2+Quiiho1EuSmerAdTHeGmya1xRRwIgeY/7SSk4Y92FHG6CY+iVbVYIwsNrUyvzTm9USp5J/Tk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32637,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1tD4CRA9TVsSAnZWagAAq3YQAJAQr+4BPMv9BckuPBvL\n4ndczfjVSt/oPZdC7XrE/0+/7h43KzXsE9Co7Xya/VvIv3uJNJowWg14idRs\nHB8dQCy8HTwJjbDHUUZPwskrrcOCnP6eP8Fs7FvyU8OlHLXb3NwpjnBzJeju\ntkaNWrwS0qJOqRRS35h7fprJTZtj385EZXRt0aXsK1/5IugRzl+sMPfY9sLF\nL0zib+8xccoSUm/b+I82I71sUP+gxGu74AtfCwnlrFWeF4oLQpaVk5/kH9MA\nht7f+T4V1ObaaELvekYvfQFQnGeC298H7MrULfqpxtUc3Rm/QOhY929JybaM\n5XNwuZ/2g9fUJrPz+OsPG8Y6gqA7xt379c5eEhFuuscQhvuPLOTZS1fce6p0\nRfoG473wnBnu9aewflK7+5njDrrVjJ677Si1xnqBdWCA5V75mM27bE2v6j+4\n0k36SLe74EIwstSFvP5nrPpjTVMk7DRwCOdgeqE81wna3xVF9sCs7qXFKX5L\n/VRy/ZUBN6dn5f0huRSSytW7o4qFdpjBu8dAWuGnT1D6+RdoVSk6PCvqemoA\nOOYZ+2tTFPAAE2LdvAVeXiY4WMZqA9jZ4Ygj/Bp1logCZ9dC3fTgIXDUoRBQ\nlt99/Y6RCdtPbzM9C/L0P4qjAFRDbqcDN6O63VscwNbqIQDtZPj1kIND3T6E\nklQn\r\n=ZDQX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"8d065d8b8b7f35f814695e74f5c685b7d68d5e00","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.17.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.9.12","apollo-server-types":"^0.2.8","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.9.12"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.9.12_1574359287578_0.5261868355961994","host":"s3://npm-registry-packages"}},"2.9.13":{"name":"apollo-server-cloud-functions","version":"2.9.13","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.9.13","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"209b3af0f56bb571ee468e1c84da14a41c8c75b1","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.9.13.tgz","fileCount":20,"integrity":"sha512-/Fustg3TX7goqA82sbU81zh8m8RDisWtccAbQ+rbqANIUc8SywTTYuhlwmE64NHpbal0tVQ8vx0Ie+jRfYJWUA==","signatures":[{"sig":"MEQCIGUbWAGxxqD6ocBW7OTDtn5HQqI6lbgPAOUUXxR5KlRJAiA9ZafWoZk84Tno+WNHQhkpwA5buTLiuyUw7izo6W6DOg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32637,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6WIfCRA9TVsSAnZWagAAo0oP/1EeDCXafJtiE03qatFY\naWmuVagybAs9joygA6WTsyGMuoZkXYFtSKBix0QgjjgYwgpyE4eyWcaW3xab\njI/eY9/q6YbpjjD7LC/SP0XbcKh89/di06l0w0ikUA4b7FNUvvIepP5Mmikp\nTDXAUIczs1NwxDXXkiXaYFsF2zdFemVtl1agfyAsSBk9w9QRDNsLnpnf8e5m\nvBiZ7vlxGj90Nl6BGjfzLNEVTPfJ0Ce5HV6b6KAZWyJDh7kQFTBnEBZF7a7j\nOrJjDcKmXJPYvTwIywf458CD07lgFrTfDoupufZbFqLB+tGHs4aC4SPHxhRy\naac2e6A+CbOLrC4crgE8ozjtf/fF+ED4ZGtbU6zQ8fjLd/mpaxWz4nzZGRUe\nLepgECbTk8rlGu5uLi3/MdXxhLTKZTVbolsFK4kjNZmvsKZqEifDEQwrzAJI\nK0TLFNkqfE/VEUYMmu1offz5b2WAufDYnpsUBVXWxNJ8kR/NlHuXNtNJuAQS\nOiEc9QNmOClADhtLKBAwnmBSu4TmHxeVmgmcy8ic8n3FzasTb+a4bIFhGX4q\nW2N5GxL0803e0dBq0b0Dpd50u0XjcwkFfsgUL6LdIdFZoKyotoDm8EUkdW2o\n41HAhWoE5RFxez97zGI4nvvrw5eDiF3kG9uDV7UJ1yUF7P0WFinwX8rvvq2t\nlz2F\r\n=6ka0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"a0a60e73e04e913d388de8324f7d17e4406deea2","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.17.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.9.13","apollo-server-types":"^0.2.8","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.9.13"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.9.13_1575576095236_0.522655108790196","host":"s3://npm-registry-packages"}},"2.9.14":{"name":"apollo-server-cloud-functions","version":"2.9.14","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.9.14","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"8fcb0332039c0653cc461dd1869cd9cf3b11fd9c","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.9.14.tgz","fileCount":20,"integrity":"sha512-0ALPy5faekTIx6+v35BaISqRUCqQXURC7opA2aIUDfbD7wND0xdEo7venUZT+Y8rVqq70ZuhhZAEfMC7Ez8GQw==","signatures":[{"sig":"MEUCIGecVpUuuKd98eAASvnlyX/KSkGPyNNF4hjMIyqE9xWYAiEA7EDCOcoBEZyUWV1ugm3ITQEBflFfoIRiJQoF/2nn2dU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32642,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+MjqCRA9TVsSAnZWagAAjBYQAJKpv0Q6jwqTOYf7+vvm\nXuusz31CHOFUSAsMlrHp3dR0TQrNgUgRF56QMT5Eu62fCTZQaaBujptz7hyv\na4/zLZwEN2UNLZDu/bpngXrFjN25qYB3AosuEFWa2Gf0M3HCiYdHCZRNnCh5\n609xhxzpPU+V7PCiL09ieSWk7MnnI9oGvFFVH26aYg7bc07iZB6epE51tS7D\ntwKE6uec1YB4c6wzHoWLsKNP8MATfC2WqNUMjtZVeoyz/AN61uFB97ZQf/Zw\nzduwD+lrdFMbWs3Q4OXpRobHLl2gzEbMSIAo3+3mujHTqw2FmKhzQ6ENj9Ka\nlarSs8nhr1TbnT3V2ZD3MxdpuJ92d+SjQ+mcdzRMWvpUeotsoKmrQt9Fd1Dn\n8torVnxZoyMr8LqY4xle2LPVqw42k2IhJKcd02FyENCMc6b3yMxM+kIJ3XxL\nxeuM/FHLvQAWi/yCsJHAiiArL6NX3BE9AZBH+JzPH9wXscIII/cQEXc+njCn\n4ygsxH4Po4Ffg0nVX7U0WkEse+tlLKvd+EgVoQR6HiIJIKiwI7Ja3l0HNpAW\n68CCAKRLBt9RGDO6Q8rLKUPH1YzdFSrISFI0wqrkOJr3Nwgw+v+sgg7aBJAo\nhy6r7YNuPOSvTRLAvR0vHuNGWeIb4pR8/7r9J1PGML2pH1WfHDTrGdb9XZXH\nqTMH\r\n=/bKb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"ad5eac5ea1741142122e4cb8fd34a9748be31e89","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.17.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.9.14","apollo-server-types":"^0.2.9","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.9.14"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.9.14_1576585449789_0.15535517779876717","host":"s3://npm-registry-packages"}},"2.9.15":{"name":"apollo-server-cloud-functions","version":"2.9.15","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.9.15","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"921d42864ffc873814a26afbdb46151894b30dbc","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.9.15.tgz","fileCount":20,"integrity":"sha512-RqeLN9nqInc3R8Bf3ULIgDzT57u6DCX6ie7xKW0ZoG3B7jNGvJENcbxknvHf+RMMM00lLbNNPhzgZTP1eEc7Cw==","signatures":[{"sig":"MEQCICoIslPbLg7ulf6AAq9yWrHJ8sRPefqiKWbXMPpOmUz+AiATSkdYZEA4wqnhv7gzqyfmx6hD1DEawlaZO33HwELmfQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32649,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeBfTMCRA9TVsSAnZWagAAZMIP/3TahkcWFE9ufDhGylT7\nArJ+tiyDpLM3gGlKKlm4q8SryvANZ6L6dwwPXnJBA5ZfN1VQhgGq1zhB9X+0\nFWu33f6Rd6p59VwWKBW8zRaR1+X82ncoQJYtPEJ91wPs/XK2FrWsYRS66UXX\n88e9wR9VjYVOGF865L7xt/vnOYFujEXH4A6MFQWeS+CV4dJJfwPgMgJF2imI\n1ebFsx4bGRhHNuH6ghv4roymH4uELfNE896kG+ZOlXbH/Qlh11r9+/3ycYzK\nDS3U8lYbxGhiYrwOYM6en0BNfs2qIrfOR7ubfSozWHasgTaJ3KfjepINQlx9\n6aESBtlFdzUELBLiWA9rsOCNR2bIATiYyt7tYLGlPVmbxQG5lV0Gr0GdLEnW\nbt4lM0M2G+ZbvkeHlOXeo9NQrHaNjsa2aB3bjMNPIySh74o4ZKQJEilLwB/p\nmcat85ovaxzCRDOWDgr28D3ibnJIzhLkg9RDS4Z8WmZnoisylk5lDtslJCf+\nAokr882C2vgyE/55rS8g3SbQJiOx0XnYMZ7yaGTBPU+PW9h/aVe8ljY8vzJ1\nELNT9zRDcBeMKPzgIH/u5c9StWd2CVLz5lxZyeJktxfjIP5dF8fRtsJg3Pz/\n7V1e84vhKZDDjPRUatfpDuwW8Tsl7PTE72eckVUDAbSCj4qi8tIIkCAO1y6S\nFFJa\r\n=KaVP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"0743d6b2f1737758cf09e80d2086917772bc00c9","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.18.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.9.15","apollo-server-types":"^0.2.10","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.9.15"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.9.15_1577448652452_0.6664633107358795","host":"s3://npm-registry-packages"}},"2.9.16":{"name":"apollo-server-cloud-functions","version":"2.9.16","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.9.16","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"334a389373556809e3582c6ce15f2437bfd09d27","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.9.16.tgz","fileCount":20,"integrity":"sha512-P1Y6kXpyUrQcedRMCKMUi4IWs81bRw9GJZ8hlv1bYdxbYLvEm8iKsQhre9KBGdfPYPO2fSJzjS+I7yyEZA8vgg==","signatures":[{"sig":"MEUCIQDxwwvLZNB4gxWu3It+LTIC0AblsnI5NdRsjCyOolw/MgIgTBB1xSdG08r3MfQfHWcfs81bykFKV1UEFQ96Prz7q3c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32703,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeF6ZdCRA9TVsSAnZWagAAwE8P/isXIsUWxOi9+se69a4X\nSn1LUVPie/dm5NIl8cAD6s5tWIgJu5tp2pzUZnSLT/HfUh+uhstx6VU6GLun\nF/xs7ZKSDOaPDqqDQ1omltiarzVaiDAb1lLvnw7ir/8CmWnbPUGEDeAkupm7\nR8z4OqbKKAxRHwQGnGZZRKDGI+971zxZNZFf9vAofzZ/Fmd2zHvTOy3++xFf\nExFPFjW9m30CeQWGVfyMsxEnSBIskNKwvC47JpbJ7Hq8zi4m938U6WPhoIr4\nHtB5CTPfDO4mINvG5EEd7XnF/cKOafDclCsGZ4FyTqg3yU7tvHvcB+OmoPQA\n/uG0K5wKi97ytaZ6M0ylbyihAYEb9lZa46OPieXlZZdUcNaMJM621altm5Yt\njGXXIPPglg8PLLHsQ+TKktf0jA/i3ESAFf8BrB5F/VJinHhSw3BPwkVHaRef\nVOshVyk8YiCmkaEmgBEF1P83e5RHsYaqUly1KlGqT5HDMaEi137KXr+HHkpO\nqW8JOj0v3ukIdpedCdvZrOKsZI8+zhaEGwwKtAr5TAFwE66Qk+pmfb4PPtOf\nezuxqN0bM04k0YKwJGmXdD8VnAhd9xEBkD3puGhRlFyJ28+YFwyARUDCcXJg\nEC2F/fp4ubCghPCfxBLPJkGOfzDMwpHEhvEWROPoO+tywsYlNdwWNgZQcXRb\n877+\r\n=AtoJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"4d1a75e318897c335674c7ee046c0baec7df4a9b","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.18.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.18.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.9.16","apollo-server-types":"^0.2.10","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.9.16"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.9.16_1578608220655_0.6746685748794068","host":"s3://npm-registry-packages"}},"2.10.0":{"name":"apollo-server-cloud-functions","version":"2.10.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.10.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"30c9ce2a01f2404c7ca8cc9336d1a523fbb0f524","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.10.0.tgz","fileCount":20,"integrity":"sha512-lcd67VYs3olZdT5VyVk8AqvS+086wNj9vPIctP0mt2CtUk3X3nS0WvCcR1e0hJ54u3ChdFRnUH0IgNvlaDKKTQ==","signatures":[{"sig":"MEQCID6PV6INLU53AaMBTaZ2FHg7UUC/d0gf5rKc4yAc4ngjAiBtz18riAFYYPlbiF/QlyKV16ShX8e/FnacNKn8kCxtwQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32703,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJePAflCRA9TVsSAnZWagAAjeoP/0c/io8C/ObYlLU5mdWQ\nL8kKkSuPwQfV39TbyBHoiEE3oPWeDrOLGz4GsiAXY4mEUN6+HL7z/ceqxHTL\nwPRJV+zpi9oAaRodipxklkgjeIhlpoPZdSoJs8o+jv5ND/QCefULBJ7dQo1Q\nvQYztQpA+NZrl4R+v5Aaul8Pvg4oMMiPCe8LUGpIZxlHDBTBQYSPlqqMgkSd\nOzCHwUpahqUbiEJzawS+jtwq+qRrmtVcixzOW4t8JTRoSDia+5dpEGqqLvWb\nt2QAch/ybWRQumqmJUQR57Rl7BI0mGOCJDizU49nRjxY6qjBxcu3k68HgNCW\nj2vPCf1xO/hV6iljsHtyAa0RZJOTWbysOYe8jHg+b5NMrbTOBumSIoomtcio\ngcbihR0ZdAXxNM3g1HztJZURNMKiv9roIMHTpN7ecx4Y41dABVNDot95C+ct\nFv0dvZfpWEHfPejlW220Y/RXxtaIYM/oV6b4szWIm0vjAmosSqrTXc0iTkV5\nOpn1P29gwl1e+zP0xyWI16ZaQkAn7zR322/uiJM1aH/OZq54a8CNQXNfej16\nZI4Nl/675SXiUDVw3q9iE/FFYzJ1792K1ZhZ1GbJRUAuGeJ/3BOQU7fH6aWI\ntL5O8pI0fWiKAbWGy2i/mBBEI3QfPsijx0Qgy3DI+tdd9j51nOWLHHYmcCD2\nWKFo\r\n=AF9t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"9c0aa1e661ccc2c5a1471b781102637dd47e21b1","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.18.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.18.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.10.0","apollo-server-types":"^0.2.10","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.10.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.10.0_1580992485285_0.8697967231081989","host":"s3://npm-registry-packages"}},"2.10.1":{"name":"apollo-server-cloud-functions","version":"2.10.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.10.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"89d4439159a4bbfca931ec1cc2919254d25c7e60","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.10.1.tgz","fileCount":20,"integrity":"sha512-z1k6x7tBQaOEUqCCaFHx93ky27Gxf2HWE1WNaxdSr/aPz1gve97Cj+/w4RPspc3qptRydH10aoVfuDtkA4un9Q==","signatures":[{"sig":"MEYCIQDMu4lZaQsy4yanPr+ZbeRGH7xK2uNU9BXauY/bIP9XwAIhALCyKcLqgZSRRdFJprPco0xhclG0Ft1/eKDboc0EsZBR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32703,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRqfkCRA9TVsSAnZWagAAW2gP/RaPHIcCO4pVDut7woYt\n9NfugcclTf/XgeR4grMk4VjMheUjCoUswrz0RZNcTzolQIp6PMKQxBoxmgFE\n0KzuCc2haAs+fAcTrbGfsUMUw0Xc+OoWdGyUHzXFvsIgO+E3kDRR4L9Ydr6h\nMuw7WWhFb9XVDkdivdn19BhZlFvYSX1RGBlx26CH3zWPd3317dvQLJWfvTbj\nWIcgU3P55amhdtlP3N7MTRm64hwdIbfqqEOaXannJZMzFH3jyp9xCaW4gSMl\np+qprdzW8Q7mOVNM5SlXo97Fa9KrBWbHZ5xNU03S8t/9czmMioEuIpRzy4XJ\n353uyKtpNF9olhzL2XXs5Vll5+j20WU8taTW6a2b3k/4qbo4IRx5rdRICqGO\nbE68S/OvBuojPN3G+Pw9v1VpMfEZhUdQbmjfpHFzMaAJ2WjJjTq+2ZrHrWte\ndnSRkvsPevcp58egQbXOv9ZBdOXkq04bCjg8U/x1dFykYsybvTQqM4pbOnWt\n74jmLwmBQ6MqwtDFOo/xmcWOAMY4HA1dxDJ7N0IsJJHVK2DYvaROMwU4Eqxw\npKhY9ryJwie349JWT+Hqar//5vl/ZKBrUpPlwa/QHDRoM3Sau6xNmNTI7yRk\nExzfHE888sNRwMJipQs6Bs69BbvMS6KUXJNRgKG//w6qa8EH1vUpNPqCgHkZ\nYQ+u\r\n=xoY+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"dba97895485d6444535a684d4646f1363954f698","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.10.1","apollo-server-types":"^0.2.10","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.10.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.10.1_1581688803970_0.9379152485438866","host":"s3://npm-registry-packages"}},"2.11.0-alpha.1":{"name":"apollo-server-cloud-functions","version":"2.11.0-alpha.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.11.0-alpha.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"116730d95660fb7cedb187e5ed6b4e2e5217b6bf","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.11.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-MfUlsyhr3RrtvovWWPfhYsNMWzAwWTMbPTnIIB34r6ZICWg3P2iHtUq5NTJ62NtvsQo43Wj3IsJPNOHBEba28w==","signatures":[{"sig":"MEUCIDFsgQmUyFnLdJM9uadgvK56ZzyNPnVel5eM70FxAVIiAiEA+eGx6IAjLsia41KHpvdVBgycxuPBbj6Ybqcec/T30z4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeU+uyCRA9TVsSAnZWagAAvvoP/1kDgNpuAvwqvX8/uYPC\nfZtq6E9mLS8gcaBESi3Z4aAe7nRpHFuibk9povrks05R+vzNexw9ujdyESVL\n6uN0BPPEZmirKoc+Qfu5agV9etyH+W8uTgNaEmR8ISbEGKAAbBzmosUmNkgi\nJdR9hggwraqUBSHtDdPX972OkfcVVYo+OecI0yHOofZSlm2fGagJwtf5lqXO\nmtVEOPQhXN0GYslhDBo0kdLLD6LgGMSBnqltXLlYNNccKVN0Rk1faA7Pro2a\nO/MWIqDLuGFM6UTCdwWo8pY4lg+YHD3lfkNQ74C1QR0HfC2KteFmS9HM3wUv\nAfUaL8SbToriE5dRcD87B/+fTQ/I31bAJDbQHSlXV9MJ2q0ygyLkwcV4u6I8\nzaXfKbZ+BXLgAFmamTNR+I8ZZv4tBtRP7+hras3E/pw6dJ6+G1iOwgMrUHAv\nCnw5dyfpvJr8a6ZxtkdELUuzttyAIH/eKGsRYPx4y0Iv7irRMAAOPJbAhqPb\n3NHNvjkP2GCcU3CuSfVCqktc1KWEGoYq8bFo6yOHndvDVIKLoETTi7I6LjyH\nxDwFkZBRtCkmhqHLUzhGbWu+Sqj80f/XJGf34UnFhY8411KT6uRkVZTPNacT\n3Vc4knsfjuiaHclZvz5C0dL8F/ai98fMiyp1xFOdz0izNkAHv54Aqq6Tdn9u\nZR8S\r\n=Pov8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"a07ce0fba5a78d6e1a3c0a08dfda1b449e6c16e0","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.11.0-alpha.1","apollo-server-types":"^0.3.0-alpha.1","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.11.0-alpha.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0-rc.2"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.11.0-alpha.1_1582558129483_0.22498216088333645","host":"s3://npm-registry-packages"}},"2.11.0-alpha.2":{"name":"apollo-server-cloud-functions","version":"2.11.0-alpha.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.11.0-alpha.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"3b063ef6d62408dc6783c231e110f7550f304d65","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.11.0-alpha.2.tgz","fileCount":20,"integrity":"sha512-d8CECRTzniRqubC6tyWyh6zZQBBD9g8bdivB+EhSDeUTb8kruBU7qC9CzlDz3GXwbqT4xmhrc0Ih2t2r3yKjHw==","signatures":[{"sig":"MEQCIDsHsUSKBloH1u8BSYxgwBtWu3KCaJSpdRL/0qwUHS+HAiAEH5e/ai3QYHIcxG9YRFCgbrDW/p5xDZ3nF5aYCO+ujw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVUUeCRA9TVsSAnZWagAATxAQAKKR5JcdIvD+aPV8PVT4\n/BWFqlpOXUW1BVEdbCSd2ll8X00bST3ssNoWHi57nqxCaNAi6bo9WD2RgTb9\ntxX4TPD8iPvTaDsuFFF4LUghuyopWoXy3Y695MRJsoaRvRk/AJ8YWlE2PfC6\n78K62RkaUNfHYTjHPGy9v6ehHKgrdOF97/jJG4f1KsermrJ5E1q4OIDIjyOY\nasyyXMls1uQ0XmFwVfBeRhLIUUwxyZ+M58BtbSFZEp3Jq9LYT+kji+ObQXEl\nry+YeuijHoCUG1pXTKKkcgiEqwcMMHFbz81nyOlJ3tBjTrEd3JuwdWqq4nSr\nxLsAOqICGg0I27TWdT3X09ifyEIAMxLQUNeDuEC4ODH+fiHDhsf6hWOlrcR3\neS2GBYu0XtD1/m/Pd5zvIZmVeSUcf2xfvFU7O9K+RtYx5yy2rmuxV0OSv/rT\n7IQRnPUdRzgHWlbBmUJYcYNrptnheEJGUZWTdQkIvob6ImsMdNtXVEfqyXmn\nav7+xp7iJLJGp6mCmBWrV4piJYXbeU0oiVJJYQngPPegxVHWUnC4Z3LnYvQK\nafutG/w9Azb13ko0U0m6IBFf1+GA8apuyRiAKtJF58mRFr8Nh+2WBOSFRPB9\nze31GTClhlndsfMD4TTzv55QgCj5GTSE4vq+/vWmy/GLMfT4cfVDtum2Rpy0\nOr6u\r\n=ejmK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"5235abdaeebcf2000b49172474df150d0dd4a247","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.11.0-alpha.2","apollo-server-types":"^0.3.0-alpha.1","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.11.0-alpha.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0-rc.2"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.11.0-alpha.2_1582646558160_0.4554489979351095","host":"s3://npm-registry-packages"}},"2.11.0-alpha.3":{"name":"apollo-server-cloud-functions","version":"2.11.0-alpha.3","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.11.0-alpha.3","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"0d95bceb965558eced43ebd0874e47f37c3a3bcd","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.11.0-alpha.3.tgz","fileCount":20,"integrity":"sha512-yxfK7Ir/YFhuS8nr5pbW64T7beAfyo7xu55qlx7mrU7yd8ObyZSWFtVp99XLbzA+rWMuHA5Od9pGuZTCrRisPQ==","signatures":[{"sig":"MEUCIQDXJqgH8jwZMyaBVqqfjIXrTxJt8OoySmxIu9fBABcNxwIgc5xCpNEVdY4/M6Tag8IR20pgjl5RnJZqd9RhHxHh1gk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVUtRCRA9TVsSAnZWagAAwCgQAItExsCn0t0+W8/Bq6NR\ng0uPqpxm2O4qeuoC+DxjtbdrZtfHxg5B574GSwzyHNT09UqNIGlYQ72zhKA+\n0sIgOlgrPL4s0qx80Zmfr3eT0HGYFOvJ6zNeAmuCX4WNLG6DStuToo2aRT4G\n8Y+PjIszZ0eGTOc5pCsQI6mLW5Bjo3RUepAhi8bwn1BKQKvoP4OOhxQtSEnB\nlwngbhWtZ8v8NzHgURDNnV5gSK/ivwV2OVCFurgXtrqiBaBchi3J8/+ONiFN\nufwZjrdZxIOZwcQMIWPU/syK2IjtHNSa2havvJGu8sQurER0F7X4+XYAT9Zb\nQNq+hE0rSYTVEbDYiWoDEBI37bZX9H8J9Ii5fKIL2+XMTSCDp51v1JAue1XI\nvOrW1uL3Wsv5cK7oND2pHag1MrDNXtbDV0Ity47cVt/dgVY8XkYvGG37HKtS\nk1+Q07pl6vK5w4Wx65t6hVUMpictmCHYCaN9a6Np87NnyjHqoRALlylJAwZ4\n2wdms8tl8HeRMsO/+JNxJ5uzcvQ07p0NLvYSfQKHYJSWa5E6AMQlxophHDzk\nb4XTKyL6AvqiURuPyFZCUIYs2Tb7ZltF5mna1JQFYQaY6gLh89V5E4QUdm+S\njlqL06e8sewbKkr3EYmW3ZM/9dQm9Rir8eY5k7TID8yt/dO62wXoP+EglhwX\n6BEd\r\n=gr1E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"062e6a3a76f00c6f9c5253c1db00f77ba4a74ae4","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.11.0-alpha.3","apollo-server-types":"^0.3.0-alpha.1","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.11.0-alpha.3"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0-rc.2"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.11.0-alpha.3_1582648145266_0.29001197717295946","host":"s3://npm-registry-packages"}},"2.11.0":{"name":"apollo-server-cloud-functions","version":"2.11.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.11.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"b416807ea3e4bf4f0a9ca591e8198ecc9d095d71","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.11.0.tgz","fileCount":20,"integrity":"sha512-WuNJu3+n9JLVihPvTmtlACnvxXx4fUzHiwf9u4X1WtDAfhhJXI+9VSdwHbhSgBTe2MKFaGrmE9dmbFwUm65jZw==","signatures":[{"sig":"MEQCIErt/eVJctI+D+8XYGSDF73KSLGJ04iSd0Z/NhYZz2FaAiAjf8qWhaQDDCqh6Wglchn12kSH7kOLQ/lOsvePwKVhvg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32718,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXpcVCRA9TVsSAnZWagAAaXcP/0ZIWJiH3rnFcbuNgXew\n0APcsEY62uiv1ANH7y+0pKSv2M8v0MWeOjsx0kyoxjJ7PJ2rSZux+238qdtm\n6zPtHdWRBgMU00b9gdjdWNI9VLLIsvLlHYYEsuY6jgrmuuxr3dL9QKlx4H9L\nEFH/qmTk0AhkwmlPiYF2IBPy9+y+SQXbv7cx+2+CPP9prLR+pm+1I0vKvBQi\nte8dz4T8w96NRsQOy4lmOXSOYOFdpK4YZXMYfSo/j7biJPstaBzn+oYwfXgK\n+2meYhkS8gM73eHr4b/l/D3B7oA+/qD7tEgBiF54gZ/Bi9tMoYdJiZWM1dgG\nRdsqplI2aMsUcxL1rxHU4SKEfWdWUbSGyPTqgvznKPUB9HK5/W2dcSk1UgFH\nIzloOCN1Z9WJnzkNJsQqnaZr9xHOlveI0sOxqwXffOWPgtYwBd/70TRKyetQ\nYeuJAptACcpfxJihNu+N1bvsMkGuzDhfT7kt3ySKBqM1AA8AbLkMsXK3MXLc\n9xE7IeZP+QIxMiZHDB+APZ5JpwOvB0Mzrs8wuATWX1i1SDB+CTijezuUQi4Y\nnjPpdzJonx2T/Lwn82uXRq66TIfsSw8zDXlSzyADQQ5Adno+BKTq95ENnMNQ\n6+Amk3n7B8JpkNDmHNioa2Gh0zKtt8Wep4Q0Pq9vS1AhKbhm06A2hlsVk3bI\nqCX0\r\n=D8Ly\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"056f083ddaf116633e6f759a2b3d69248bb18f66","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.11.0","apollo-server-types":"^0.3.0","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.11.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0-rc.2"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.11.0_1583257365401_0.23067603461024722","host":"s3://npm-registry-packages"}},"2.12.0-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.12.0-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.12.0-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"622f10b1f3212f80f0375c0b72f802c399b90c6a","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.12.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-b5anzb2Lq+fQPZnAh3h/+i54TcQLvcpXHtr/mKc6ts1WeOjGm8uU7r7kxv5AXB03op5EV4AgxreDPx2pkHsLaQ==","signatures":[{"sig":"MEUCIBTsVFZ9kd6sSNyELKL8vnKTGjDoN4h9wFhGLxMsDOsXAiEAyr3YmS9NbmU8YGvnBoH3qPolFiSHxRUZ1Vu+BTfTR8Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32742,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeb9f/CRA9TVsSAnZWagAAt54P+gLS5kubOxE9B0MzP9SD\nsJ3p7rU0pao9iPVczVxxYa4Uw/h6WuTGdlILuzqFHjrCRFUqfPAtazjf6Jtf\nBqFI/exdEIIDp7YvVosu6SbOASMdlMshcQcKmEztTJYejWvYUBXiBzVa6mfw\nPQKRVErCzgBSGFm0YKZHfaqEXQETYg0QFJzYqX6aW+QBcGAHpwqBKXHqqlM/\n2RgGNQysqY9XIj+TvefJXaAuFd6Uj2dfREvv4XAkyvpyrL/2B0CgYIkHWklF\n3iPgnTtj4O8qa/CfWBLZsS102uLmg5XzLZ1Tg0BegJGIvo1HRfyLDoRJD86T\nNeOd0QnNv7yVBrVHsGMddeEnxyUPG200rFPsTwGS90UI5CxPAeTcQUQqurt/\ny4xC4uhoNynr5eXo3Paxkn7uty2KSRFo71kCUAOAx8Xk0c6PFDglLHcwcU8c\nh5/sPk8DAa6FVkgl/ct6uCdsHDxHslMKMAYMTpNRBuc4EWaHeBd6axHtm/0R\nfoYHP+6+l2U7wooFa51sQftWEj+RZHFXd0mpusAQD6MBGCy6P0wrRp+7IV5D\nBRuCYgvYJ8zKmYjU5aP9fc9uiCiUOiSxJKLkyP9fG98IEK/wxda2B0AutUjA\np4SW8xgraX6ujAOVdnlVI+/oV/3EG4N0JZkVUIaRA/ENqEhmKDm63yQkCQ4B\nNd7S\r\n=UPbr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"61f912de18abbbacb2acfb20a248b88149ccdf47","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.12.0-alpha.0","apollo-server-types":"^0.3.0","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.12.0-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0-rc.2"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.12.0-alpha.0_1584388095279_0.6304155997206273","host":"s3://npm-registry-packages"}},"2.12.0-alpha.1":{"name":"apollo-server-cloud-functions","version":"2.12.0-alpha.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.12.0-alpha.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"8875bee4def4f1fc66a962a64289c7c8e5b9ecb7","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.12.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-ibXPq/6ug2rC00JrQcrObpFZS5LU0YZxuZ/4kKS5oGA9xmDMs9FPqKNJ0pZlzrYQmdGqTJ8GFfeokAgiEiSH+w==","signatures":[{"sig":"MEQCIGnVkRNOOuueQIpAosMZPr+JkPHI0YVZvEo8uyN4L+hnAiBSIAaf6NDlhMAeNMUj9D+Z1wn8UUw58X3EqbrorK3IEQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJecmO0CRA9TVsSAnZWagAACUQP/2Cke5nk1pksmpUPjhd4\nupZ1YbfLNe9zzDsWI23bB6m78UxedJfBs3STTvHWflj7swsU5/nlMZZYQUMf\nctMlDWX7aAbDMCgLbPRdOb8uSxdvqsN3ZFcOeErcTpenRE/Gy+iBtvQAv+gV\nD34lEJczYJJDeMNhLY1QssHh+yt9zH2Syx4zzojp4wcztGenf8Feh2c6hjvx\nHD7vROUzO6laOEuPbzXd4L8H9SU0pPBwabJN4xFVNcBJZ3ImiwHSxLG2lcBC\ndu/BttueHGEnSDPh/oZIBlY296uLS/6b656YD4eukA+iV0BSPyGs6MlS7GwX\nimOJK3zdQQOfcbOvvdUSWvlA9rJAxcD5t/WzpWDquRFAWQMwebWveFdOIgbK\nmmRYvbjBA79OmJQFee4Zp1KpN6xzfKWvWkWNBgk1Qt2YyKhRt6SphUCMKvFJ\nxxIfIPMVbflrh16ZzSPQpaJk/jcBsyN9m3JCkLSs4xXsg3NYmKUjjnMY60Mw\n82VNkbQb5PtCy896/d6YI+hWW+Z/QqmP2RAaib5VEKQMbkJla554xThDHalX\ngY5iHHP7bpygP6tmn96l0xmuRnWcl/koG2vLgAqK6rehbViCkfzgtNa8ny+6\nq1aE2VO3LM3OqUIFDThxTPpJ0eaNFsgwCjPzxXtXCOH7QYlUzV8pR5T94VVI\nLn28\r\n=NBOk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"7422d70e19576f7e34aa289c535325552881a17f","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.12.0-alpha.1","apollo-server-types":"^0.3.1-alpha.1","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.12.0-alpha.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0-rc.2"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.12.0-alpha.1_1584554931787_0.7916687768617687","host":"s3://npm-registry-packages"}},"2.12.0-alpha.2":{"name":"apollo-server-cloud-functions","version":"2.12.0-alpha.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.12.0-alpha.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"6806da00bea27fbbdc349ba1fe0737fce9c1efef","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.12.0-alpha.2.tgz","fileCount":20,"integrity":"sha512-yViUD1f0cmiy2i3xVRf8Ekom1GQalMbGFcDpwuMeDvEYyf5jP9pDPZCatqQnjHmAuIOZ3ewSD1t++9GyiOHORg==","signatures":[{"sig":"MEUCIHhMA9XrrP6qSN+g9OexRrJ3a85eB7HuTtDNBhEhNRG3AiEAgxp0mNx7slMo4+tdfpdxb/vHC4Wj7n+zK9hPKojlMUk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeeMpwCRA9TVsSAnZWagAA7ekP/i/1AuUObCl0+P6cGeS6\ntAkCHKBHMyshvb5ZQDNjlRn8Z/R4mdpFZ0vRLiN64aNB/ZUe1MbG25GCIh2x\nLCQrQkU0nIHuqsDm7jsRhyoF5n2omXyuew3PHGCEfwOVt9UxiRewNdAyVD65\nNinIR8zuBR5K58GsPBMQczkpSh3/50yQALMBi0qd6FkW05clPRsbM6kTZ1qV\nT2xpZog5bDYnUHjJkDUDUHEpH5MtJtAzglpiBgdpEmJ0ILhpHtc7CuWLz2rl\nloOjJ8sSHmP9SOrTU2j6g++2GwbLLY2RGtg6LRtuoYNL3xzn12oWfnLJoYzi\njW7cHKMSHKbPeJIiPukKLmAgw8l1DGUSAVIAx0+EIrX/J7e1T8nj0NHsXADk\nh+pOv1k0L4x2vN3JrfVxrp54IHwpmuMH+lcFfFhK43v57UDXnmsnBO6Esyw6\nkqikMvheHSHiZKT521t35L1F9oGVz6UnPyiNgUjjn7tImHI3mgtA48hE2j4i\nnRxEOhFxqXHwMyKjOjad3Fpm/JhqG4agvjcz68jTv3inDlABRO0F/bZx4LGT\nt9EjOu9Cit96NTueeGUhvqRC34ExPIKresEnaD+seuzK3IbNpOiQ7+u65i5N\nSxCkKDNqa/iCp6hjA6ewmITp02FQ0h86+ykd0jqRDhQIqfJNsN6+VZ4L1Im7\n9I+e\r\n=DcuM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"34c707246f8df95a1916aa59469e78fc3144c8bd","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.12.0-alpha.2","apollo-server-types":"^0.3.1-alpha.1","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.12.0-alpha.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0-rc.2"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.12.0-alpha.2_1584974447668_0.7857711120212685","host":"s3://npm-registry-packages"}},"2.12.0-alpha.3":{"name":"apollo-server-cloud-functions","version":"2.12.0-alpha.3","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.12.0-alpha.3","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"81c016a377b92bdef84ba2f9933efa65a872e745","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.12.0-alpha.3.tgz","fileCount":20,"integrity":"sha512-fCLOmYfqUSH2abIziS2KB+OslA3yMV2KfTS/BYwRos6QgQtBKq3jLwuodWyEtV1YW4+iDVIygFmN5+EcVL+zJQ==","signatures":[{"sig":"MEUCIBxZkmeWxtQsTEI2u9HphS4wiS8D/ASs2ST8Wf072Ol9AiEAq3HO1mCD8Jw3lWl94aEks6Xc8F8BlfCfVwCApEje6+E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefKqZCRA9TVsSAnZWagAA+NAP/jUQPu0CuG0ntHc/MTmH\nFJH27E5X1uYJSUm1vhwNDZch4DLeTm3lcTnwR5tNd/H5i/lee3SV9/53YYZH\ny8RISx0eQhG+SfLnMIuYcQpPyW8bD5Qc1fy9GMGUHuMnwPvSzU7UYKYl2ql3\npeI+kBrgnl+ZxOpkSXBPA5sNcFR8BISipfFb+IEATSpVpKtOl6rH1AImATG/\n+9qiMEzrhKONU/GoFQ82pBHTAvcryo7R7KuxzaGxOVOe6ELALzbPhz2tpYb2\nYj6Qcp8KHjSROu1IwHsnbUNdPEV1Vi67rQBF9pT0guDG7Z5Dvunykph8AaJP\nIlr1fl37nxJTXEDQyGBRsgcs/1i5jpewHEdYUapLRjFl9NsmEux1c34vw7vX\nTxDJMN2CDhaVhhOkXLALFzwTyMb4wt/Z+Lg8o321jHH3lKH10kj0tFTDXbyW\naXd3KfzrIMlVKQM4nBwaJUJKZTkQWL8MpBgEetD/DL3grHgB8DreAB1WGHJ8\nWgr9cBDvg24eleJdq3yFesy7+vxvX/k0qY+LaCebnayINir80SRvdTVqB7Dp\nskWnd/ZzG+Co2FkdXwY+Q8RnroEfCcAvTveMlqt5pHgVND9qRMZ/q6EhjDCZ\nuD80O1jtrgeDLUxst0+l7s0rrFs4166VbzHOmuGeyWdM0CxozvkNYYtp0FNz\n0nyF\r\n=JQVZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"3eaed42548ad524129601263b4b2d8e3d7b65d27","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.12.0-alpha.3","apollo-server-types":"^0.3.1-alpha.3","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.12.0-alpha.3"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0-rc.2"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.12.0-alpha.3_1585228440865_0.18974851858277275","host":"s3://npm-registry-packages"}},"2.12.0-alpha.4":{"name":"apollo-server-cloud-functions","version":"2.12.0-alpha.4","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.12.0-alpha.4","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"45119e1ea8b36270fc31356ef7a44391ddd8f103","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.12.0-alpha.4.tgz","fileCount":20,"integrity":"sha512-TBa7n+7cniKPui467Eg2W13tw+L5nvYfQWF/wXZ9PU4ZSTDKKAJzO8IoNVVUnxGZBalvLW8+FewHypx8VfMn3Q==","signatures":[{"sig":"MEQCIE8QjrQFeUsnY16MS87zIZluG+Nn1XPSvgmlNdvZS+OoAiArQsL4FGUctFZgygxkT+vehpvFzRTsD4ltCtf4hwMHZA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefLQPCRA9TVsSAnZWagAANKwP/1H+l3s4Mi5V5QUxHAvq\n77DXMVsyPqZiaomDa5MmNHTU8Eht9j1URzPT+1/VwttknE+C4FnQ+dCBlHtg\nxg1F2wjvbVkDd3LlVLl/uUAhUdMkNaoIIlSLR4xZtYRfNjfvjQe0rrXkQdar\nQata/F5lDN5Uy7k0q1cwGI9IwEX4ftUHo/roLk1OnIOMPfXgorjs5uynaWWR\ndLKWl1qlg+YAi/wBYpznZavAtH92G/zmNy/WFu9LZ0GPkgrL9f3Jm2B3ES/x\nKz0B656uh4Iry1z3dORSPVBtDB1v4SMpw5g6uUHmRGcppbFqj/h1QpuTrbwt\ns8HepeNrqMTHFAgPmnjo8fwyzQTdjPUdiRaw1H9ZC6DuXhDlv4ax21ZsgPaG\njIn5uiphouClfuIHQ9Pgr7H7kgzHtmB/GC/BRorE7azDQqPmKUOKCZEGeJjJ\nTHC+1b9GWRQ3OAzwr571yMHgjqaHTjNHnFCYc9T7KUpb/wroVxHbeFN5gdbY\ntxgTDthv/zRzlR/cjmRcIhR9YZYu8CWMkA484p7Csv9TVyOUbYPulVtRVVDi\nDd28QO5Yr+tuDYvNfUALwCxd7GPJS/Dk4okGAToBAlULLzeDZTBR0GiYgPRX\nhCT/rfq8pXi9fKEIjQy9PgK9YYjzPngIPYSX2UFYbcrSAaBGe/zweuh3bZIV\nDSmS\r\n=1pX6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"a6189b32fec3f1ea1ee717e59d89c8137797aa50","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.12.0-alpha.4","apollo-server-types":"^0.3.1-alpha.4","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.12.0-alpha.4"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0-rc.2"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.12.0-alpha.4_1585230863049_0.4948043628091756","host":"s3://npm-registry-packages"}},"2.12.0-alpha.5":{"name":"apollo-server-cloud-functions","version":"2.12.0-alpha.5","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.12.0-alpha.5","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"35cec5bf48d1edd1921c47f2873072738276a2c4","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.12.0-alpha.5.tgz","fileCount":20,"integrity":"sha512-yzIpGg1A2srHVL9tUZQvltqjdL60mSykYrGkgVyBhYXyT4SDx+gPiruj/NTW6x8LplG7CeWxY71lBL2uwX+D9A==","signatures":[{"sig":"MEUCIHHneNOyvaZp3SFXkaxEBJO6QRuYPHSx0w9mFfy/0R3GAiEAv8kTBbJC8N5JYf0NvNjupwhUqhI/ELyjoFn4FH77NmA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32745,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehnDUCRA9TVsSAnZWagAAI5cP/31NxkaDQTOVuCOtCo2/\n5TAPa6xxsXIWv8dCueL460i3O2rpEFWEplJrh3g7QOXgvKzbrZehsj1Wn1yV\n9Cl8qfMvDht8vQdmq//8Hu/xUg4MKYSiaXcCBA8zXMlw1Pqhi8oQRkcDBt4f\nIb2Feev0mOMQ/vnpBnA7PuwS+KFoWts1Gjo1mLeGaDjBrOCqTyCRpoFXuuad\n0LtJ9cGrFi/np25BBk0vb36eDLA1kXMIm2818XNC0U1or/DJL1+/6LYi5xVD\n7nlzGJNcZJafP1IaUbOf8mb6N6/YSR+cQCTE3iMLfy/pyvqNUn/0XRSXOyR2\nRgMQ5a0DGnJ2T3ofMJRfZH1UnPNpWJTjOJL7xHOHmZlgTE1H1axBTQ4RQ5Tv\nHwHRCOKo460IJBh3sChznlG6WWk4pJgvZ4MfMsbyDZPqh7id4ENCqUAQLts1\nfO106Ys/OzCGGqISHlMyZAH1xRLudGqC/z8QZyZta0eejva3hCBKA2Cx0UAB\nHuBQqPvFxHfiBGTA+T4LTolMH7GG0gJYTu/GXAmuzAyWBDDiugpf8C2YxOtl\nr+sVfER+ZIjHyDmwY0O5PE4tvNNJReKsjNaPLHod8kYID7YfDHZKKI4JdqUz\n+SnS2xWi0IfyVCfdx07IUd2064B4MHwcLqNvFm4QDmtrs7e6fgchWcBUbLbm\nPzvS\r\n=gNiW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"c69557b0e94e15ab2ddd031ec46f20f58cbcb96f","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.12.0-alpha.5","apollo-server-types":"^0.3.1-alpha.5","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.12.0-alpha.5"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.12.0-alpha.5_1585869011682_0.834424432165608","host":"s3://npm-registry-packages"}},"2.12.0":{"name":"apollo-server-cloud-functions","version":"2.12.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.12.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"254a9453916877080e727c94e852b02d14626aa1","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.12.0.tgz","fileCount":20,"integrity":"sha512-vHWzwuweJ5VYC9HSDXj1hcjpeyqITEBvLwjn1N4ipCuiibQmeq16+Rd4XWohfpCPV3zTt5+Bmvc5J1SEXD4Fzg==","signatures":[{"sig":"MEYCIQDgCozNYeNs7VbV2QVxsc+hE4iw0N0rvw+9SMy9QFZJMAIhAMAcULPaq5lXJiA8ZgzfJL/saTiEwznrgY8jCrMPx3lZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejMg0CRA9TVsSAnZWagAAt9AP/jDOVCGFAV8AZzyKJoxX\nSWmRHOn4ock0xotGKVMV08ZkPoClfWukf8zg+Ej9KEQ+QjYeRD4CjlNY/cvh\nkXvSiAokj9ssdL2zoJbn414gt1pddlDc6x2ZAnfzR4ghlbl5jaCjywoQzo5t\nirrTT950SNqZ3pgph3MRO7/6PmUyOG3VnQeC5629k0ERlCtDrX61bS4PRdxT\nQiuCz+SGvmh+w3dWuA6wHyKRXlvfUqEcDk3kDCc8Odx9DBBCRntW2kO0mo1c\neZV1HRqHM/2Wa9Cl0BWZpeN/KFShg6ahEz1MionZJSBpFWkUowvNg1ZRKRFf\nyxauZ0U/D+014LS14F1aamzExAZa9VSOszUe8DR1jvynfj6Ofg4LvXlhXibh\nesXlUVbbrJMaTpVfCnoBcGd7s8ysj2GMPBLjwkLlziar7NV7u4h++3ttrJut\nOCkkKnmzFprA9of7YOXOMWuKyIIFwWc3/bsUtH7CdasN0Mpp7+EXd1GgKMI5\nW0mTYdg3kf5p0ydc/XD9dpe2fQedJ4pRJvFB7Fp+Z1MNX8T9chmiUiwaFMqT\nTqgwywezE9UBFIdxgHMJl6ls9E3xsMNC/M5aNNiMriRFNSow+p3QXUL/sL8N\nyewmJRtj2VNVcPcwqvbKo3X/8ZrxAJrTal9xXhN/Y2dhvO4YfRjBlruhu7zg\nRWnJ\r\n=RwkE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"71a3863f59f4ab2c9052c316479d94c6708c4309","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.12.0","apollo-server-types":"^0.3.1","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.12.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.12.0_1586284596078_0.9575381263217144","host":"s3://npm-registry-packages"}},"2.13.0-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.13.0-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.13.0-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"5488abf3db1ce9d32a46eeef9b05fdce2a3a3756","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.13.0-alpha.0.tgz","fileCount":21,"integrity":"sha512-QP985rc3D4VFzE/sveuGkK4fFYvpdK2C9wm7Km2dopeq52+RZFMzKRP7SlBFDh6mVzHeq3ZQ303ur3ElhrmLLA==","signatures":[{"sig":"MEYCIQC80ZcQK+A/2J31zw+th3KDyAzQ6t3fg8N9dpHgEPy2twIhAKQGGPP5RSOdvvrwcYm9TM5TwscYXRJKvLDeWyyDb97l","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33200,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJekGNACRA9TVsSAnZWagAAHrEP/1uAXDINwGQHHzXiABMz\n8TIe3Ft2rmPYbQzKvD0KHXnoeeCwYgKaR9M+tLpS5/FByZitFxZGFeBr6aZl\nibS5mjP/9L+dywO8mraEMqOjuuWJq3nMsbXHq/IJcoJqTltZnSZGzmyU79kU\n20keK3ofloqw50z6m3C6yOx5GHvqXOguL39nPw07x53OGYonhWCjLjC2CdgU\nqxx+g867fTMIkrsJTlGT5J5Cl2qbqEyc5nRjuhrsI802V9DfIseNIJ/is4o7\nYyOqleS6r28cIkPqEVfmlFD6jsxpEgOGILHCjeXSkQkZxh+b5BbsN7EIlYau\nPdYoq8de+DtTvZZKKQfRmtm8y4RnIct530/Ihn+a8Gaqb3KS4hAFqjPB47tw\nbWbJhinooRJ1Fb6CQXiIdnfKlqwDydR3TSQ8X/v36fTnhTNX3YaFLxdCrZjm\nCzgE06VkFHvYKW41e1PviSeTB3Lnn2Lj2Lcjx8e9ybhXm547iSf+E6a18zzU\neWiaNXTFMZkaCGpq9TfR78y2X/jBedKdcZ3XwiSvt0wwhWVddG3Y4Hic0o77\nYrR+P0GGOHgZAYXP7r7tQMiocquA5IjUmhA4HsRlxtfQYfMnxEdzYakc9huM\nm8UX2h/OxLoejKhvNeN78ICTLFS0KLZy8c2y+5ajcMCrBYWUqV6Gf/YpFlmQ\nQivC\r\n=jSoP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"e8266d6ed37b1072041f9d6d9353caacdfaa069f","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.20.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.20.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.13.0-alpha.0","apollo-server-types":"^0.4.0-alpha.0","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.13.0-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.13.0-alpha.0_1586520895622_0.8635981925944569","host":"s3://npm-registry-packages"}},"2.13.0-alpha.1":{"name":"apollo-server-cloud-functions","version":"2.13.0-alpha.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.13.0-alpha.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"181c09a1a70bd52ad51a0cb26aa8df0bd9a2b9f7","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.13.0-alpha.1.tgz","fileCount":21,"integrity":"sha512-WDNYf4S/1fF67+zFaLVSw+6YNWsXC+wqaOweA+4DF8JjERExifA51nrOgK+u+UzMa4K0fstuFrx+A5ub+UNUsQ==","signatures":[{"sig":"MEQCIGzZTH93AjNuuZGuOpS9uxp/cgXZjbGj/ddYLTs93za9AiAH0WvP9KgonYL2zH8tDYAnVLqdFD6agonjlqUUKaL5Gw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33200,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeocTLCRA9TVsSAnZWagAA38sP/0JZSnVoNR3uEE8rdP9s\nkpoXfckZA8me1aTxZ0szVNLjx4ivSY4TN36y+KCNhVInIkw9O69LnAjuTqXL\nvLxD3lo3UxPyixibGR4OmUWzVG5TmPWG6Tu2FZDVVH49+KnYtiRRV4mQZTvL\nnYV4mhxHhhmUbYJZBrvPnekz52VvUd8VAe1os6n31x9L17L4oVk+/wK8tTRX\nazZ+RPGvsjD6q9iSnewi9FMGdtIi05NPtlGSLtXhTaG0E45XX1GAdnt8tFtI\nYZj0nC6SPqBQljulC2w1bjDuy/yG2lY95Kz++7JIUdI8O42FCwxL+gyF+b0O\niO4/StwIgJ/7W6D1ftCJcArt9Wr6wpl7IUVwAs1ht/FclXJ1dPKKN69V3+ww\nr82jlLhtM0isPuG6PKmbEhByKtVa6NbGTRcOKWri9skw8aRQ9UCa8FIFhcjp\ndYUf8T+jnaa53PhpPscDukY6kMLpKr9wUG1apgouil49AyQFaU5/QL74x//a\nzVincwE0Y9UXXGh1rYnNQZ8xp7dMWUT32QQGCy4p4B5R0pjkl9zzh4KtCZ9r\n8beEi82a6MGauFg3pyzFTk/xGgjczRfQliMGMlMvFNn8dqQxw7K3sLBKs2os\n9rUISSDvLuDubRjN6QKDljy8fHIojRfJ4TMMDbL2aR8FbNg951hCO6OknsB6\naOBQ\r\n=xp/w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"0c73f3180a960ff5f94ea87466a7c5aab986a03e","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.20.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.13.0-alpha.1","apollo-server-types":"^0.4.0-alpha.1","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.13.0-alpha.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.13.0-alpha.1_1587659979333_0.276275060697837","host":"s3://npm-registry-packages"}},"2.13.0":{"name":"apollo-server-cloud-functions","version":"2.13.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.13.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"bfb6b95938b3bcfb1097b344f8a6ec69ffc1e655","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.13.0.tgz","fileCount":21,"integrity":"sha512-53Iz0n/Nc8s7LbVNindsn2wOsObA5mSplfVdvWFMsSyqaT5z+XbzsPSc4b6ojN1urB7ldYzVDP1525m4m+k/mw==","signatures":[{"sig":"MEYCIQCtehxnmN2epFrduGCYe9sOD4RDvvw5uU4njJ/iQKUi9wIhANo0Y8ybCP72OKCJmW2llaxVP9irTagzxWPXLySEXdMQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33168,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesCt2CRA9TVsSAnZWagAADmgP/2fKxPfaf5VVKh2hI7cQ\nwgzW/vXnTdmbrmGO7I8fO1XZ5dZo74Sx8E7/6DBZAgy46Oa/NL8zPy16DSZE\nFnFS6sz4eejHeobYw0GatYhGqgzkwfIbBHc/NA+wtkUM3xGmmr2po3eqTSz8\nEA11vm4QQLzQIzqcPTZLpbmkeRXvdtpQohBSRrs/KxyK9yWnnIQ4woG+J8Gz\n5ubt9xA5/63nIYPo5+gxkbo4sBN0Zroyz+WZ6WmoljV1IcgZ64+dimbVuUf5\nP2DvqHZ/AcLSTW/TJh+qlijtbXAdPm81W8sQARUhIuh8k1dO/MsVgVAzac/9\nN+/T4vRX0IJoVssNZXoUFfCv4kybuVvTQeT7QujCRY5g+bN2xvxQ6nqI+GRE\nUlIQnKBoFGRkrGHGKdH1hSPF+8K05UIuRGXfrXln9DDZCyrculk0ZL3lodzu\nS6UgRoEmqIwdzZyzEYNJ87uUvhbrDg9x+LdBJ8t330fsF6ZmrXBiWdhLUUyA\nXgHTZg3zfUn9oDvdnqGQpht2GU8KpLk65CvwXKMI7hjTpVN8mV7+Yyq/vYsQ\nLXfaNS/AwUCDk5LnWE+paLQq8cs01je8TBIuZI0pcMOA/fcBmudcr3WJPjeG\n6L8vkQckfY5/3n69sJ+g+DGIdPZzlw3BO9kGvndAhgxS3JoDxy8alu8Rsfw+\naw49\r\n=rdOr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"e37384a49b2bf474eed0de3e9f4a1bebaeee64c7","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.20.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.3","apollo-server-core":"^2.13.0","apollo-server-types":"^0.4.0","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.13.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.13.0_1588603766463_0.18816756930484302","host":"s3://npm-registry-packages"}},"2.13.1-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.13.1-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.13.1-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"9d3b7152d84b5c7d63c287a509a70974f4f0cfaf","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.13.1-alpha.0.tgz","fileCount":20,"integrity":"sha512-1eLcotRJh4DekRLNd7WUSNpug5VnruPIK4ieFIRl8nbY51sBSx0+iWDdFDA6P9aEEHOFQ8ytqaJOFHqGlKhztA==","signatures":[{"sig":"MEYCIQD8+6QAZ1Ysf94O/g+WVuYKarSISII0dt7l/xwPyCXsHQIhAOViQvwTf3nZGAvXIJTtBhH5uYrWJAymqpTMZrYqRj5T","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32747,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetbfPCRA9TVsSAnZWagAATpkP/3/cXNIENDPhe9s8MxOc\nXbiZDdeWnXHLHqCsjvIZOtJ8Z9epZ1tMOwtWAeBBQRea3/IWFxqQhkMzALbs\nUhVo8kP3u7SjdQ9Iowd2z0wUiBHm8x/XxSxVU0h2HyUezckDdGJ6rXuVaXHi\n2O1dpZ6/mcJ2vzH8o+wT2p0FQtVroyPMV1l90LGeFovh6GuQsuiQdoYWQiwd\nQ2IiMUWEg+oi20VcPsPIf1MNag247BshJIlNuJT8PT0yi3HcDsMf0ft96HsH\nT/BleVeubzCCxtXg0XwG+VUaX6G0XiAVjMZArIOnB5LOJCvCSY7K5tTVRLfa\nTTAi0q7EN8RJDq4faj2xQCnjIgEHeJ4WPFojOh+NP3AY5fDlfpbkxBr5WBAY\n9E4bzotowy14/QY1awjVx5wvv+sDPshNUbY+fIOmHrKpgCFXgUHNeZrcXg+q\nhPWlQz7RKImL2mSjKScUYIN9CYIqKNnN+zq7At0WweuPEskT3lXechQb/qB1\nRMSt2Ret9dPg/t6p0Qoo4DSX6ZV0uesOa6DiAVTS7rCMM+WEcRn6Gl1oKm+S\nkZIlaLoXySIR2WdOHxEu3Ggkj+Fh8G7kjW2/gtG1t5nf0MT/SwrgSH9eNoxu\nC3WYBHQhQz2vDeBEs3LXSDpHtOeTrHBBCp7ytOp5nHU4raG7ZAFbTTexmPNY\neCmY\r\n=UJ+N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"626c4b6505ed98d47855712a568fc4eba9d8ff18","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.20.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.4-alpha.0","apollo-server-core":"^2.13.1-alpha.0","apollo-server-types":"^0.4.1-alpha.0","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.13.1-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.13.1-alpha.0_1588967374645_0.8201777159093655","host":"s3://npm-registry-packages"}},"2.13.1-alpha.1":{"name":"apollo-server-cloud-functions","version":"2.13.1-alpha.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.13.1-alpha.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"60eed1baaf2f0805d2c11753e84b75a45a837def","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.13.1-alpha.1.tgz","fileCount":20,"integrity":"sha512-D1tDyhSmtEsfR4QaUiGdv18lRIhNk9M1Mw4u0hjCt5Tm2G5TKvFrdm+0vHK0+CKKAEJGffTsI0RGKu+ScHk4YQ==","signatures":[{"sig":"MEUCIQCl8kUeDDkm8ZOiHGuBLSERZuj2wXR4GDjJMHsw6wNGuwIgaI+CQqypHPwCgEulq7gfT3DWMScOebf4rvoOlkE+QCo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32747,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuZrdCRA9TVsSAnZWagAASuMP/RuL9DqhcepkJHkN2xwX\nn0oP61Bubr5RM44rXsno/6Ffd6TvE41SyYpHzGHeldazWlpor5wITyAqjyfe\nFaX5g7lTE/eQCOvp1LhvkP8yQ0MZBUxPZIJ/dmZO8QcUp1TE0cgx5TxcACPr\nspZwVORQlQuyoyNCdhrGzpxOCWc3wk6mRRFwk7dKRcHl6l3KzTHLg/kOnMJX\nzvtTfGzpR6Vqcd3weXGOpYdiVm9LfuupN0f828eBV5bWSfD60aE2Y4n5KbW4\nNNmkTASkKRsyntATTMOXeMu1FoDafi6P3eC4bJqZTiQJQVyzU1USDcqHJkxe\nXF+cvB6Z+VQW8wudrSgNiKS+5DimkiYYPzZfzPr0V5uMrog0xvMOOTVQ8yF+\nGTbQ2x0U1OK3i1kQ5aGuP4EE5tF8BebCnW9x/ZpjrUhLs//K8z+1pJmikJUM\n9jOtW0Pk3oGFEub+X5xbx8LWw48V0cdVZQ9FUt2EyRkLRm0qnKaXENi3NapN\naZImg5v5NiHJWDvLtx2/3u52zfd7yamFJ8dt4rTriVFjXeozoXZOoB9gapRi\nKbJ9QVtXSezujcfHv7iQKoHx5iOQEuhvKKMi11sk1/ftw2yMa6C5RqZZ8fnU\nt7PoQL1MtGvJXfI32adulLtYjEqgvW3XTCMNvXVya/iSslvv0gNsikNPSMWc\nbMk4\r\n=emXt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"e71ddc404865cfc8519241ed713254a3a73bcc69","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.20.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.4-alpha.0","apollo-server-core":"^2.13.1-alpha.1","apollo-server-types":"^0.4.1-alpha.0","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.13.1-alpha.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.13.1-alpha.1_1589222109383_0.6960292455091825","host":"s3://npm-registry-packages"}},"2.13.1":{"name":"apollo-server-cloud-functions","version":"2.13.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.13.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"f77a5b1b1a79d0457c5f9d6e9846367984ff014c","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.13.1.tgz","fileCount":20,"integrity":"sha512-LzOt9gk+wWfleqcoAiEO7OmojrCrOTWK0bqOaeRsELUEeZpEt0pufUzFV5PyBllfTcFveACya0XkDnRTMjv/iw==","signatures":[{"sig":"MEYCIQCAPKVaI+kcaqvKmyjgJf1fSjUm0SCgb6kU0L9zvrAlkgIhALlip6C0IwqscsfvbiDOmILoQZCUL5HlcW2OZhfnPJEZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuaQ0CRA9TVsSAnZWagAAIToP/2UNqFLVqLKafIubfL9f\nHJ3oz5nR4zlzpwqcZCfg62bXVVfBgXwkEnRfcYjbss3imzn/f9idFTs4Hn93\nvy59DVdLBzPpR+cntqRvM1UtYjf7M76h/jIYixCwBAZY2PuCRZFQ1A5CL2PX\nxaI4yKC89Q0CrWIZBT//jSB5bEXTij0vabQEc4b5CE6ldjr4yib+6Il9uhW0\nF71eVFZXRZGI7LsecHAt3msxq5+gRVsO1FsXsRuGg63t13UYLdmLjgBqUdaz\njrXPA2gfQCKhNpHbNoup9CtStvgqywg+mbB2ZOVYoyw/lxmiiYzCdVL7ljnQ\nX3gxvsN9JC9RA9xjw5uUlG5oauXJ9poclEk4sJ6OO0FDDOVu+5ATHDPw561L\nWmxeX2Q5NsnGRxu7EAWMSlRQ3YGSzTJFLrbW6JosqaAk4fN/NHQjZrCimFs9\nhIuOSZiTB4nYMV16siNeUFgmtCVU1smUFlP7PxCvjb38+AbG9Vt//9sVIW+r\nxlJFl6rp+wzpGJHey6bEyuzXPOlIjL0o8rqwfwE7CZl7Yi4COCnlCoO/d2Pd\n1AEnb4lJWvqu50SR5byyV/CDBIJ2thvJsom0gccEPAV2bLbNAaSgTkCc75C/\nMjMdAdOssqLEusjIB+qcKS0ILkOKZ4dXvfJlhS4w0HALJtvPk3Unc3cecqfE\nlEh6\r\n=EtqS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"05df0790346facb64d7bf76d4520f4ba734b114c","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.20.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.4-alpha.0","apollo-server-core":"^2.13.1","apollo-server-types":"^0.4.1-alpha.0","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.13.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.13.1_1589224500060_0.24649377256929306","host":"s3://npm-registry-packages"}},"2.14.0-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.14.0-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.14.0-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"83d68a93b8a91430111b172ecbcd42ffe61fcfd6","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.14.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-SsYep8b9dXSP99Kg4zRvZjgPNaGMpdB5kHzc/ock/LSXkK3rLx7aWtDvGlAJA4JX8NFvSVtkDV4C/NMWIgrh6A==","signatures":[{"sig":"MEQCIBkQB1Vokdk5zHcTEDQF/kW2ZqPOtJVpLy7gZvsiL1vrAiBaiCdT57rsWQRy9j7YEASMAO7vpo1ONIEDeCf0GgeC9Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32747,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeu8afCRA9TVsSAnZWagAAKp4P/3SFB14hcN2Uamp8KfTG\nKWb0lHAEV33A2Bam5Xx8a5kExMuk1LPAcL8XsV+aCA0cTROsG8ISk0E9gf/m\n0YOIu7mz/KGReHWU5Ypcsrodx1Sp9uIvLLsG6d7Z7ygb95byzdVvl8ficRLq\nltohEIOILXKCc2Or2pW1IrR9dFzg9iJB7atS361kfwqsA7yKSV8cjKinrp3c\nrE4C+L2HnrbDLO/ImBJFFVsNMI61LtSqYDXclm9wtSe5anPqAlZBFp9tUGP2\nCQojqTgSJT5Jmy5ZzQBKXX6+8x70nEMNAPB2c0Z0tu7Ou4sO9KKtxKSETNkQ\nASs6WeYjvgXav1sudEhCb+5EOMz7jvT7HKisj1H+ecqshRgop2dLu1BRWViu\nWXGiXg+MN22RrJ4sQDzoX4q5107P6m5hMec9midjbx6E6VMWtv5LTfTO4mce\nwgM2ehQeJM9v/3GDARkohc6CzyIB5Tn2DOfbaQfKxwTpQg9zDpmCcIISX3tC\nSI2+k+AGU2LEmUqRRiy40w2WvQQvcx+0I6Vh0jvtwUQnnJ1Q6ZjxfVNWw799\nWAL22foowbyRgonV9keMty6HsRofHxWLOgv+EcZZqHoAVP9Sjf8E+Wuha1Kr\nUUkfaUL+wz5GXRHnZAGvlEaO9jb8yNnTbrwT0H9EoowEMtQEtDJkYvuBR8zN\ng/Tq\r\n=7nFA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"bfef89b8cc44d4bd94f9d5fcd3df8941de526360","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.20.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.4-alpha.0","apollo-server-core":"^2.14.0-alpha.0","apollo-server-types":"^0.5.0-alpha.0","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.14.0-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.14.0-alpha.0_1589364383061_0.8474426148185632","host":"s3://npm-registry-packages"}},"2.14.0-alpha.1":{"name":"apollo-server-cloud-functions","version":"2.14.0-alpha.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.14.0-alpha.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"f65e84f8fe1695c5f774d60daf5f759a24e992b6","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.14.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-JI6ATgQiQ0/YviWzL/L+K9kejdbHhwyp+jCshAhuNeFMAHteecRky3rWHBSs/+ZUMVJ+5M23ibdwutuns464zQ==","signatures":[{"sig":"MEUCIEA/pXZan/3ywHnJOymImysmLE88V1v2AhcTtJtwZJ60AiEA6xAmH5YwWveztWrITsOqad8jqtDxeodxd7L+h7Vnido=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34110,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJew6z0CRA9TVsSAnZWagAAG0YP/14Vh4bSpoVx1YimS4zV\ndnK5RBK6qk/VAtOm9khSqeHGaIAgOAkO0uCF2Ej04hfq966mFu3IEm0PRbwm\nQzfFdXwMUKdR6og52ouKrwcCgKOvaqTzaK6OPZcSrU8A3VLRZTV17URdz642\ncy8oQEuVtYAC5x3V7LptygmRA+MRrRsH55zjn/x5zhy7FjjnUWEqgVKnTnAV\nVdH4GX8dSSrKRMSFWhO/khUP9ZXCCZ2g25x1foxTc5c6pjSeBIhfN7pT9FuC\nrI4069iyW8Q2EGSfG5BamIZPM5mHgjlrC2VOM+uc8Gectjbdujlaw4rM244j\nQfSWxAJO7IAeGU3KICpbZ73eLsDUiC4ok1SDRhy8L4NJGT9x48eTTxCw1pRr\nvMIZZ094Hwg0yxTOtifH+PzEAqkJQrY9MG0JNi/zCie1KNdCmUfG488cM4ka\nWuOY2kh9eZPCnD5TJQoTRp7eHKDmyLsuY12dOOULywBXhuBD+vF9HMv4adV5\nfvNoyVdwILiQkpHT8EXKKzZqTsJogXfUaHwoDJBh5KjMKwqprSWgH9eImglS\njkwKcvm9TfFnGAkiu+C0TwbZMLdvREm77l/qedq87oK+SXgo3b1ZxK7vxV/7\nAj26dj7AIq1zcylU9YeeBf17Guqi6N4bO5VnBOtFynVwQ22r6ejftLrhSw/X\nYbW0\r\n=fHYt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"6b8a4366363c27a8d828e733edef4d06ecc1cd55","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.21.0/node@v10.20.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.20.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.4-alpha.0","apollo-server-core":"^2.14.0-alpha.1","apollo-server-types":"^0.5.0-alpha.1","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.14.0-alpha.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.14.0-alpha.1_1589882100240_0.5765023635656035","host":"s3://npm-registry-packages"}},"2.14.0-alpha.2":{"name":"apollo-server-cloud-functions","version":"2.14.0-alpha.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.14.0-alpha.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"3caf561849d2d14d63bdcc0c0078496a022c4224","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.14.0-alpha.2.tgz","fileCount":20,"integrity":"sha512-x0EFFxC6z8VwZcHy3vW/Wr2teaK/i0oBQ3NbXyA01l0U0eNhu+c0bbQnvrGksgEhrXLLo12jy6zudUlzUts+Aw==","signatures":[{"sig":"MEYCIQDb5hUQET8doy7SJ/PJTp2aX+BV9bCa8zDAy34N9/bmVAIhAJJfC1ICuvYPLRL7dcgs6ndA1vV56HgIrwNkF0YJ2GKA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34110,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexUDXCRA9TVsSAnZWagAApXMP/23qJVZ47OaKQ6wyOTkP\nmRk/2wFR+W4cyKkj7vvLZUvgI0E20JlZ2ChKjsZlBta/O7nEvPysnj/II/vq\nhCHGDpqpDQYSmoRyzruv++Cq3K/O3LetXAiXsxyNVhnlaYdbcjgTfPSUlqVe\nC+nYxBfEe9ho19qFJjzKEZpAP6QEMRQ+ADupb5p5ZNDjh1VKDo5vF1WiE6pW\nJD9e3d/Ur+I9PhwYFqMq68LlIj2EKO1ONxKRH/az2xjuGy3zeYWhZXuSZNWf\naYAyLZVTD+FpIiQy5KRpbwgMOdD17X5jVJlb2IgwcViLc3iUA0p66LI6+D8o\nY8Yii1BFK0F+A+2NYAudlI0cZqAl6hp29G04T+Kmy+qdQ0Q2tfhV3VhaVe9u\nIUiP6voXCxx7tHxL1MpgNeOyMM/hzwirlSExTd1chajXDFhipFo1gNyZO4S3\nueuMFD4i1wJWEiaaKiuU6pqUpVhBbY+eWSMUlvRiri9GoyUmAi0blPHref5J\nNhErblQa+QDNjcJY9fpyZN3cXOWTiAYU9yUi7jqnSayZ//znV1mdlD6TdvKG\nDMxne1YIFR0W0/mE/uo5Sb31ViLkv+t7h1Hwd+wn4Hvw7x7vefymKEzJ1pQ7\n733r2UVlDFbpJ+XoiS7jclr5ygeMJMv+crLv7nZq9RI8KoT6omx+azr2FncG\nxgQ9\r\n=RT5H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"36afcd616858a772c6c46ee4fe4544f54c69ab75","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.21.0/node@v10.20.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.20.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.4-alpha.0","apollo-server-core":"^2.14.0-alpha.2","apollo-server-types":"^0.5.0-alpha.1","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.14.0-alpha.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.14.0-alpha.2_1589985494389_0.2287134343711752","host":"s3://npm-registry-packages"}},"2.14.0":{"name":"apollo-server-cloud-functions","version":"2.14.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.14.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"f62b69e9a0d3d3f067c45be742d2ea5f6ec29a9e","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.14.0.tgz","fileCount":20,"integrity":"sha512-gRIX1rYQZX2ezQnie55KNcWKexohGsFuqK/I0zAnwfcqzfKN3o7nZ8r6MH3NEiCUfNU7IdUHOnnTAtGvW3sNmQ==","signatures":[{"sig":"MEQCIBLcWeLWtILV+ySfu0BH/MpTr/oz2MKSCh4XNGF0aj+MAiA6X+yHUXvw0U43qinlzjo+0kA/y8Dakb1zUG0rkRmmrg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeznn7CRA9TVsSAnZWagAAgsgP/1NuXqrMCk3tlW/OD9fR\nswYHl31tr8EeehyWkxom0cWWoM1Xa3AKe4VfbTk0kJ6saBHia9mehx4Xbh4I\nQbmjyr9W6d343yDmoNlVsLd6HKv9UxPOfz3rvWcAIS/pzkMUI5fKIl+aX6HZ\nCuOEyaLqL0A86olskmi7oSqgPdcL6p3nBmYy+1a2CI4bT8YJHUzzb1VC8Yhr\ngBu4GERlALF8Rabeet80gtY9PzbRQkI/OPGZOHDNCtpj0IQrshYeSxxYv5s/\nYoowlH/bDIMS6RBxAcZ2OAyY5jNmDth/u2COHZIl1UsjnWcghqiVHAJeNxR8\nZzznn1UC5y7RCb1pmuHdubkJ0xfm8fGRu+6zzuu9D/oM6I7IlT5n8GUXRcTi\nVbAw8qWuTZGfJsEK4kEfUSu0GGAUcxWPVu3z8g5TkSPmg8zshzfSJx4/VujE\nzcVn+3H8Mia/NCSxUCLE8ZnsNANkBBrFRBCZQWyoz3O+f0J16JqpKo2oZf3v\ngcY1JMf2MEnL+OUa7PTy3FfGxwaKjyxn/pAe6BK3uxjKTEdyMLleN1UtpfdO\ncMilmz28PFuYnNUNET6IOMMX+bJjZOZ/uLynXSJd8ilErrVX5i5M4v7xjPVZ\n9y1v7d6tS7Kur/ZfhBxtDnsXh40QlwX2CdMkvlf8SF33gMUBBClG9rEO7Lmc\njKfA\r\n=Crzj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"d159e320879f594ba2d04036e3e1aa0653ff164d","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.21.0/node@v10.20.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.20.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.4","apollo-server-core":"^2.14.0","apollo-server-types":"^0.5.0","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.14.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.14.0_1590589946513_0.45340631132975995","host":"s3://npm-registry-packages"}},"2.14.1":{"name":"apollo-server-cloud-functions","version":"2.14.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.14.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"5a738a7a87c504ccbe3ba734c2814a86a61080e0","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.14.1.tgz","fileCount":20,"integrity":"sha512-mV7gKpF99c9ydTE8pUJKUZGPFupDVP7O1EKSiQx6jQOl6oP7wdOSPNMr8rS2wO40HnxaoDf24uVSLQeg2scCoA==","signatures":[{"sig":"MEYCIQDAIoKuHXCdKyyTR5gc+R72mv81dD1lYc1rxsqo29QRvwIhANkQIvIkv1Ry+DC9Uqwb2lLngEvlAYD+M2Ez8WUkEOmt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJez/LvCRA9TVsSAnZWagAAcIUP/AwpQlifnrUKhaAEG78K\nBVqEfLETWxDcbskxcUW3QGyhvZcnK0TMQ4j/5eAdP8p2vRAYHTC16If6nRiN\nYC5y6Si4191HIFRjqy3wVYkvOMtBigebB0DLoVpWAf0pRxxJZrXa8fpOkMy7\nO2IggxWJLL/wzc/9gBlJRCZg+0bZi2y3aH5mPBNV2VeQ6RYtTsK+J52k6S+X\nGxAtIz6pXoY0Befluyj+mSFbwYzk+rzHrYQy2VsN9IntTr1mtD0TYHFz9CPQ\n0Da19M+wZkf5LCXs371SjF/dC5Gn4V5VrQ5ftftWVDoaHdqof2kjT55vBHGP\n+a0N8FC1Lu6jDN5oKA/vlhijOQxQ2fVyknMCOUjAoOHvKbhpMbNryLvRH5uY\n/fp9oajHu5uxXgAlNdHqg9v7tnwDnfCyICgrZkoIouR1DZbH0XIAL63v1RY7\nmtWrUj/Wy42EsK6/apHyZPDrYPxPLNEWgY3V0CKinkq2NNjOWURhOFYPUdBb\n3oZsupSnA0TZiWq5ZsOSKnQGY+QY4GHPYdHKeJFseD5Uzv6e9KEZh8ubory0\nGMewgLJJkZhPlAtgq0604N/mI0a2kPddS0yvArXxcDc0EJcraBhSPn9z2xkd\nawCCzaDFKmKBxnAGJd6XuJ200Tp77XOXSJdiCVfrD5n5UpfPt8qbKb2q26EW\n9n7J\r\n=BXEp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"2da65ef9204027e43baedf9ce385bb3794fd0c9b","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.21.0/node@v10.20.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.20.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.4","apollo-server-core":"^2.14.1","apollo-server-types":"^0.5.0","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.14.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.14.1_1590686446708_0.2864121599268086","host":"s3://npm-registry-packages"}},"2.14.2":{"name":"apollo-server-cloud-functions","version":"2.14.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.14.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"45101ce304279cd6af53386e2a4ba2401891657e","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.14.2.tgz","fileCount":20,"integrity":"sha512-8wLnJu1yDc5oZY6gOVLGtqaIqXyR2UQoN9e+csYckqBFdsSH3GXcUj+5umdXTb/sz+Md63BVXjYZ0Xcj300Vow==","signatures":[{"sig":"MEYCIQClDdEGxWq48Qf6eWk38RYXdG+q3IkHge10iAcoiCXL+gIhAJj2K4sRxquVF10z09xdkEZ7rYmrcCaIwhOG4zvruvKA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2S5JCRA9TVsSAnZWagAAJOwP/iAp5BZsndIf44HeoTz6\n5FDy2OSaILfyKq+hja0BRMcawL1nKfRVtKIeWkEtkoLxq6xPJJy+INQcNG4y\n3Y0ZRDZkNvLPYT7XZ8bLoV7LMZd0gjXazHHJg7U1q53P6sYLl7GQgR5GlJjV\nGQ66jiLYOloGt6NZkpo0f9UCx2N6ykJ7yi/74kKCKyPkfMrsRlRiz4vvvnqz\nBPWm/cXfSdzDNflQDA66tFulqaUKIuwcoC4APEacShaE7GuBi75TfFcD7VCg\nDfSninpuwLCVZKWlxckL6jRwSOexfg3AQQOUkvoHtaojj/BwQZnCGBVd0ew7\nzTr7YlGd0s78Gc7I8wBsyR7yFX3fughN+UGswhl5+6xcVjDsolQwKu8wNufE\nKfCF44VFQYkXLOCBjyUX1I+b8wNUjsxrwfvsNJIbSnKihTZl5woFsYFwvCZs\nGUNuU2jzx0ywJW/SxUfOGuPFbeUQShi0itTmtbh3gtphmtKQnR54JtPgVtXv\nVauXW78ND89daIutgDjkNj6p8pxJoEoJW9cAxqjo7R08O64P8Of1RIIFhASG\nWYdc+tIx5v/ItcaA2/1cUc0lFIycqY4sbUc/SfkFZAZALE2HpHafGTe5+oaA\n9ErO6Y9g9x0bS7blAvpGtjbO/7Z1BZ7jTnwmqg1WklYRmBZTG1XHRORDrTfD\nZ/t3\r\n=OSJ+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"a17f26bf3ee2892f5c3751713cf59920049cc73a","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.22.0/node@v10.21.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.21.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.4","apollo-server-core":"^2.14.2","apollo-server-types":"^0.5.0","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.14.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.14.2_1591291464949_0.3058338496906876","host":"s3://npm-registry-packages"}},"2.14.3":{"name":"apollo-server-cloud-functions","version":"2.14.3","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.14.3","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"0d22feb70167b571251d740fb3eca59482ff8359","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.14.3.tgz","fileCount":20,"integrity":"sha512-DIlbqEeXE2spB+yIVAdeyXQqtNrGceV99/IyrIqnbN9gVLqVdHz2arBGqh8AhnT2HLmOOJm1Ws/X8+sB9vtidg==","signatures":[{"sig":"MEUCIAT5Ovcrd9dl5ZZHv983q6CspcpFItni7wtcAHfiTKw+AiEAjEzN1zJqipIzYlqpfxcSOpMT81Nf+gqaSpo8aOJ+ucs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3rE8CRA9TVsSAnZWagAAEN4P/1x4Vefkam93FjMiyfQj\nnSQWe4orjpLhj6H3cQDtwrQu8E1j2RaoYXTr4W1lKDI82gbUx5xLosmzFyD8\n0Wk7YoBNh9wigCrK4Wrnh6P/m3DLhiMN1qb74ZA487sTBlsQQP29S2x5aA/h\nrxpGGuWyAsnA2DDCMgkLUnq9IMOYkiIfk8dizB6b24znrNSmcuFxtNIsr4p9\nMwsTB1fLtr2vUBEr2N93BNHj5LFa/s9UeGCJ4yc4hLBKusJweJfbuUFu6KMW\ni9Q1vw324h/NV+YVpVFkBT561oFswdOsk8cfc/EbRjKOVD9TMGDIuEu91kM6\nTy/XmYgYOJNaI92gUMrbROHuBBLXhMEIPi031sw4kEz42MOT7rkuU3OWYTQL\n6ICzBO/nNUDseNHGqNCpmfZQPCkZQys2L1jkYSA1yODIFoV/Gs3KDU7XPFRV\nw+DjEiIHYmZl499qk9l9vuEqBMZXHJUWsMJJZ5AzZMGp7dD2LdIlAo5N+l/j\nE6LwffAunoLY2H1O+WyV4flOkVg6MV9JgcE/MCWftUySediR6qPh/SKyPnRr\nj1ON1ncl0ehdV/G3D9lduRlkUo3YEjLuq+UzV37EcudlN+KycvpPPdynTDT0\nFv63wk9hlwwWaf4/ksoLH6fsLwQhYINSuAd1oQ4sp3xvGcgWWY4wM5A2Bfm3\nbLI4\r\n=PpPV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"724806fed355dfcb9203032bcf9d7ec74e8529cd","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.22.0/node@v10.21.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.21.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.4","apollo-server-core":"^2.14.3","apollo-server-types":"^0.5.0","@apollographql/graphql-playground-html":"1.6.24"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.14.3"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.14.3_1591652667748_0.24405698296941392","host":"s3://npm-registry-packages"}},"2.14.4":{"name":"apollo-server-cloud-functions","version":"2.14.4","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.14.4","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"efda2f80fae5e471fab6ecc8557d97957e9de59b","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.14.4.tgz","fileCount":20,"integrity":"sha512-89crJPsvGBjc6Jcf2CiowKUhtvzPgOGwAAx0E7KDe/zhYxje5+Jt4S8nLJVCX9/cWhpnKRYxmVS2d0QEs9z7MQ==","signatures":[{"sig":"MEUCIQC4pfa5nx6z3DHZfW/iYkIw42vkS6RbmvQEMlZ9Z55h8gIgQj783ag946fLxkTTBmBBz5onB1pSTsG8/sxFQY/SNec=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe45QlCRA9TVsSAnZWagAAG90P/09JuKEh6HxDuHNDYZzf\n8x0Tc7E4eGzPjzlYyw9XAd5musKdTHe6Nt61C05U1MAzuqHTygEB+SYP74yw\nErMFNhoZA5jOknXTsaxYv4FWX5FUdtE567cjgdVsVtFSwD5xDOT950avZAxd\nFMUk8NvkNaaFVDFf+RbKcAFtSuOqEuTfzmexRKXRVFcImJrtKAY5UutD4NCQ\n1REB6qpzs8CIMBoKEnFnsqi6DnQ+Zv0o5bboANuDtBniNG/S3do+i5eOpD+j\nGeSMv7rCbpzdwNHOqnWu7Iu9bn/uNHIe9Mrc9szx+MUJtfgyBa1o99ENZ/O1\nDxFXASvnq7+ChoVsYBk4A32NjkFahUGNRsQprtK85CU4hEff3oT+WE/+bwHm\nvQjpJ6NvGnd2gcv/uL8Bg916kWXGYVNPCBVVUnGu7wnDLRUWl1ncWwBLXKDJ\nlBL0hVqPtXcWgranAfwyaXuv5yXAYBSBXWvaooaUX1M01HHt/420a8kvsqWs\nSkvEL1fDdq76F1kqyK2NyL9NxzbVnxEfk1ITJJKT5hL/iJvSfZE3sW+j9brE\nEpvabbLO+AUhj8q+FRi7p45znqxbEL7Dj5kkVU9MQEwwUSp/R19HO0KUgn2X\ntuWhjxI/pZsxDpuspwahUCgtkPbTeNlUd3wx0878ImhxBlBMqGZr4hHPkN9I\noO1l\r\n=F/gB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"0ddf084f8c8a107774ce49e534bb2733b7e56c5b","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.22.0/node@v10.21.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.21.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.4","apollo-server-core":"^2.14.4","apollo-server-types":"^0.5.0","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.14.4"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.14.4_1591972900949_0.11191892609702236","host":"s3://npm-registry-packages"}},"2.15.0-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.15.0-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.15.0-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"35f2c11842c1389db0ddb1220dcbea50bc52948a","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.15.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-bz6L69q00GHFPNiXinjAZMVnr0Aickvco80s6Cfd/OlzRmK5bwqA3U5DFYLYBxqTOHUvAwg80Oyxq5ecKf1yPg==","signatures":[{"sig":"MEUCIQCOIhahdwdQmyLmEm3Tj7EXU8NZCT37mGrlapairXqvPgIgBFKFkyqmHz9i9adeEr+n3l3JU1R8xl0EHe+yZY84uzA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6RGJCRA9TVsSAnZWagAA8KgP/RF+dIvJqF8zjwn5O8h+\nEg84wPZ00Vmf6VopGC1OcwibhI7qFoVe0Gwuw+MOZ3qH7vWLNW62HJCqhJ80\nGM3NOxM6+STj8B32jAKt2mCRbKu6M+RKwCBPgDi71XSZeNKx9mzI5aWG15ZZ\nrZmFhXmjmpnb6BpDgvOej8L9zkLg23YwBP2SuCq/uGGuJFwCym+nMcf/51d/\nof/mYpo7UWc7O1vTQJextzT8Jq0+VK8L3C9TVKdwwnAe9LIwJ0kzvchSmyXq\n87FLnIhxfqxm+O39kPIFY4HbdDAKNwbmddozGZluA/919HmlRh0ZNj8OhPoG\nekG86BDWjJvZsnfkyI9fmtjBDJAp8je7y9yHcDYYEXa/ePiezakOyQ7apR10\nVn/6zqw7pT1YS4T74OpMSf/8HNi0dkIvyIDT/fgXKUqIWC9xpNp73Imy6PCG\n3XNe8arfTjRBzsUxbovkt+Ur0BpAsEiM9YbD7N7XXHPZcHenMP2xAwdt/Vuf\nsl2vPIBByI/PtiQLDIEhDoq9HStq6/7EUdqmSKBiqLNU3tbCs1lPoD1vUDa/\ns6d/qjrcCjMo/VQfzeRoGOMTpqjOX+yoi8f6/chUTEkGxWXLO9wxsxyZG98W\nPMs+sIYBFxfGhHCyMgQP3bkBseRPL3Z1usJpxCpWU1bSXPPQr62CUMvOIefr\nP7W9\r\n=xLpi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"a7d6e26cb1915a2d11f766df84d555562e9986ba","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.21.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.21.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.4","apollo-server-core":"^2.15.0-alpha.0","apollo-server-types":"^0.5.0","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.15.0-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.15.0-alpha.0_1592332681057_0.19426107129691395","host":"s3://npm-registry-packages"}},"2.14.5":{"name":"apollo-server-cloud-functions","version":"2.14.5","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.14.5","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"10f9b5c9e03d24cf3a0ff20a6d5c5b826d9041d1","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.14.5.tgz","fileCount":20,"integrity":"sha512-VmOZVhiQk0x4n9rdEwqu4PB16WDa2AdCWozA3tUQRt5/n9fSI8pfwPHvizHmjiNe+cUw6rwzZsEgcEu1B28ZXA==","signatures":[{"sig":"MEUCIQD9SYCRAUU5bbwFGERpNyax2UVofaAZQs1HvPwcld3qLgIgGtI3uktaFeH3Kd48QCyDP/kkH0F8RSWOr/zKGLGnnOU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6T0yCRA9TVsSAnZWagAAG6kP/2Fa26Pxw6d5NTZ0YiNK\nwOWIHTySWZv3EPNC4QZCcjYeAU9eFiZSeqd9y3l6GNC3vd68OdExyYjChRtr\nv+wpAveU9/SJG1S3phPpp+G5T0D63fiQouGjQSpbVY1FvoMtAdbBrzepGYhm\nz5kEXcPE/uXo74ghDDWiZdMBKsg/79dwr4jnoQeaBdMOHyg3Dc+T+3lJYGvt\nfBbKf3BuGrt6UWOZDdC0XTNyvBN/gfoD3k/KtgAskuXaqWpqCTcB1IfXZ/Ua\nalaHNEBshcK8dCqOL5NlFjwL+vgDsNtv8VRkPVMc0+KeFxr7+QG9InP+nNH3\n2ZjqIxmRMDxAa8c3XGnBDnkN8TGyQPXGI8DMNkyMbAuZGE+OOB6DMgK4EDqw\nWPVUNliJ9eKOq+p8MbE/02T8E0IaGFnWqO/tRkk7Z4yqkvzcysJ5C34tQfG0\np9cb7A6pcz3S0Kjh9wBuVxxna1V1AUF3s0471nOwDZGbxsKxUiEe35SuUKMX\nC8n3pEWWKnLjrOd/5j/oblO2OqIy88gPTcgJyfI6nHD8n0u2H/cdoBCoGRc0\nodq7HlgFZbgC0hVBcd+RUIT0ow+T6Fl/cB7TjnaLd6epGaoYJVJXINMxLZVV\nfFYEd5jhtPansmn/Bs6CZui18bf4ooGgwATBcpYqdJjS7RINEgHi10G5L0HD\n3nxB\r\n=IJvu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"1824b55f68531b01c2ed965ea44a250e16e5e46b","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.21.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.21.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.4","apollo-server-core":"^2.14.5","apollo-server-types":"^0.5.0","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.14.5"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.14.5_1592343857839_0.01808352863750673","host":"s3://npm-registry-packages"}},"2.15.0-alpha.1":{"name":"apollo-server-cloud-functions","version":"2.15.0-alpha.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.15.0-alpha.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"29afefb643a4c826e68bbb264e8cdbf85a7a1d20","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.15.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-gczMIrpyokvmbPSgmwDdiriacPNV5r9Y1ey6MzppvxNSukGNd0Qr5YRJJqvQz3OzIp6p3Lpcb3W9f5nx5HvhDw==","signatures":[{"sig":"MEQCIB5XdvctipCVgqSvmX+yGkhE3XPJv2XzvTqiJFFrrvAtAiABKGKxqKmblImok4dWwBshJACQ4z2myu6TiaFSd5MedQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6lBVCRA9TVsSAnZWagAAEfIP/2telxbCa7XYDFxVDMEz\njkzgUG512mz3WlYnyAVzek/yo2FpkMyDXP8ZIaHyUTsrEw1L3IWMf6esvdoa\nRKZTw5yU6fYfDuwUnWGzhQB4U7Dr28OOO6Isgep2uv95ZRcMQ5s7X2I47otj\n7RxCJ6rBf/o207acEFyiXsUHsRDaUIRXlrZdHet8PsfujyNHPAZqFTvRdQls\niIRRzgAThYGgKibvpN1JF+lD87QXh3+rToMOKFYYEWOdS+9/ZEx7nxfYk0qy\nOoog8+nwhy8H991aMEKRFYF6nC8PUIb9EcbXk9iPx5LRSw6t1J9vtTsMybD1\nhr4URQ0P1Mb91vorbl8v4lMuGpylcI2LNlAXkPG+gU6kOIusMhcR1ukfBveg\nzQTRa5tnNFk9PhPYKesWGIrhI/7rVbK9sKkHZNykDpvzB1qHdxkbqG2x4dGE\nETf/VHcfOe5ZqE/aec6qP2wlaAj6X0446LMvO8iSF71vaA3yZPnnUHXRIm/o\n61xhk+AfmSuqRndHCtuYwxdiLal5OU7I8Bxc1ezyvN1hZFZWIX0Az4s2Rz+T\nwv3Dkddu4t04NeXIsPytBy26/q6H4FLHWjBT/dkfyI1iSH8TMkwhSLn875c+\nWyGQJLO4Ta/q4s9CRv835BMEy1ZzCynRBeuTPYw9zux5YaFSFUJtPLQi96b3\nc9OI\r\n=voWU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"803db445585364f1ad75b1984008ce44524679c6","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.21.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.21.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.4","apollo-server-core":"^2.15.0-alpha.1","apollo-server-types":"^0.5.0","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.15.0-alpha.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.15.0-alpha.1_1592414293434_0.33703153149891407","host":"s3://npm-registry-packages"}},"2.15.0":{"name":"apollo-server-cloud-functions","version":"2.15.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.15.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"5d1ea4a91b45e4edfd71b341a4720ce5436cc875","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.15.0.tgz","fileCount":20,"integrity":"sha512-6jqniEj/Y4YnmUS48UGPkF2sX1PdY/vB4InshfjAxIb7pHksfthM8KyATiRaxjCBt8g9McSPYF1EI12LVpFzyQ==","signatures":[{"sig":"MEQCIC+ZZEKJN2aTz+Tb91SgbIZtTL2HY3WoWEgqE79gxysTAiBazUdAAffP9wFmEdCN0922dhxWrBIY5aS1e1xjziFhQw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6lIGCRA9TVsSAnZWagAAWH4P+wQweWW2kbHVg/HXqUIy\naRFXtUI/wn74MQZd9suleK6J7FbezsFZyP7Sti5VkuDzdTwe9PTe5Wy222jT\nXKNBSmZ5I5ykWjtjOx5JFlC+8ac7uUtbwesWUTle+c1Vu0nVZZzrZS3kBNC4\nl4GRHJz2qpAeq6sHtAwdquC2TzB5IrVgVBCsEcEL6oQ+zH06OpI1x8anCkr2\nwZWAsUplzVn4fEwYbqIRe2W8AJk8OydiTeO2raian2etzm3zu+WCj8KB0vfQ\nNQILWWtwFYh3NKur3GWLa2lAJpxfhbPNZwX8doSpR4lOSDK9zPp1I90ywcSQ\nfqYDSq/EY0rRxrICSDnB7AqAVXpkZIQuUyGg/uk4lfNRmNhE4yCaW3b94FUJ\n7BAd1s7m0Cxo8NIqcAwiY47ckUYuq5tq2bLtsuKAVAIgSofH/V6oFU892u8b\nX+DqjK7FWXPmZnoZU1PwG6bKwRAzQdJFjwa9kxHQlC/KVJ5epJGlqdwof+FG\nWlvorB9qTSIZiDJYiE97QzdLJ/fL40cev4R63WbDV6RcAeDWwdzxxdHIyQJd\nuG0hOm4jZ8Hv6+ejaofJ5+TTWs3WyQs9PDQwFREBdrpxs1NeUplZiB+b85WW\nEbpI79qCOu6YNZRkIpKHvTPnD/m6FQj1LfbNIgSjh1C8BUPP2uJ1tnfCZwhi\nPkNw\r\n=ipNV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"6f7bdc6099669728926ea88f6317cb17cc6a4b43","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-cloud-functions","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.21.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.21.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.4","apollo-server-core":"^2.15.0","apollo-server-types":"^0.5.0","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.15.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.15.0_1592414726221_0.4657671282684517","host":"s3://npm-registry-packages"}},"2.15.1":{"name":"apollo-server-cloud-functions","version":"2.15.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.15.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"b7cc0e44e5e3db4b668d2ee5326e41ff25ebc3e3","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.15.1.tgz","fileCount":20,"integrity":"sha512-BNXs6oaF/EHUmfl2hfxus8wyqPU0BoJFmmcXi+vfns95NpQMJSXfyioAgvTuIuzuqX+7dAL12am0CW4W7fCD3w==","signatures":[{"sig":"MEUCIQCco1ljhdDAiuEgI9+ZNM/rXYMjWxcjTuTqj4RzmuTX2AIgaOz89zxETukj9jfWEJtjUfJrJVACsq6WmfTfgn1hBCA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34082,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+yEWCRA9TVsSAnZWagAACTgP/RJjAq/RapRqYn0E0ssA\nb+VBS8jIVANtHNVTGkXIDZ5sd1AJsdbFjbVovZBDV4cO9oHQxOLQOYQPR/S4\nLlSlJtNHf8+Nd4JAoDbTg4T0nLpe8kS3txEiqYuECuIbFfOgv9talHgGJPOg\nVgP0boN8HBjOrjv3ftT3WYlf23tdM3NoIhR7dkDU7CAuN8aYV1rykLDDGZMv\nCq/jucXzQO0hXcLQJJ1O6VzjHsSE/qRC7Y8tK4byeycVQ76gFR5l3VsDxfly\nBJw2ytyC8eMs9SFTRM9SIaw4kx5vYPhnda8iZ1SK8UndqDS9VLgahfgWcTyR\ntFuuJQsu8g+XWt+uiw+4AVK3x3IWDqwXTeAQwc4LuNYPUYYZLjmi78opm18l\nPHIWcwTWJfcIQpU+ho5ugQcmXY5I8HUJezHOSi7qCOHNC3IHhmrCt4nni6p6\niYkxzUrEqwR9atjBkg+js2ms46+UzPjQJvSr2L/2BExBuOxX7zzdWBkIj3xR\nDfirudWsry6ZwcnfMxCWIFc63BWrBVhVYvliPbIzx+NwD8bAOSHBfn0Yygsw\n7RHu/PyJcVaovVKjKcVs/2OP0JCg0QGWi1d5FwD8pKnuHZBTzMBGsFlBcvu4\n+IuJzLI831eh4dTZAO/PesyKLXHtUOscDj6r0mWAoFQvpnE8q27IBouy+VXG\na5h+\r\n=ExvY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"8cfc947ed56fa3f32b82b32b4bcca53470712984","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.21.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.21.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.5","apollo-server-core":"^2.15.1","apollo-server-types":"^0.5.1","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.15.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.15.1_1593516310039_0.05424209019287951","host":"s3://npm-registry-packages"}},"2.16.0":{"name":"apollo-server-cloud-functions","version":"2.16.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.16.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"02827faa7d0bbdb0ef568b76412911526d1f97a2","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.16.0.tgz","fileCount":20,"integrity":"sha512-3yhLWP9/8hih7/FdqIzXXhOup2K7iIc8yeOIKY+zLoC1yX/CUSy5vKOabrWKzCYLq9g1X+HSJJY/gxOEXIdCYA==","signatures":[{"sig":"MEUCIQCmsfWslCqiXdApVc5YJ1CClYyVgR1OsMLbt5rlgXz6SwIgQpbDt+yKhDphpkFAr2LKSJP2JpPSoRFe4G1v1nP2J6c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34082,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEZYBCRA9TVsSAnZWagAAoNUP/R6o3iIAdQ+tuCvA0h+x\nmL/+umEflV8+QnZlDl7Oq54uofAkvb/JXo1yPFvMIIe9NMp7gkYDUmqCVF+B\nOBrot4XpTVnmppBMilXHHCjQBxNqBq2rGEHZQsPher4uCMOx///rk89PWzt4\nLSMOdrDFZDlQYE5rDNm6p9o/vUw5eJYRI0pt/dtQNTuaTZwYgZ+IA98NqsgY\nLZI2zN0/caXKGPip69DqdXDSDguINAKNHeEDoesOfyTzst0Z0G3g8ko3fmwK\nIzIo6LFCczcbV56GkMoTdMR4BLiXtgmmda5RI/SD5FGi1P7P6dHNr2HWfUVb\ni7SucmqrvYrmaUtqVEqlzTdYDLH7TSp63qsVs29OWi5jxIPipkxw4blYZJ7a\nUkfBrMwcwWSYRUSgWRFaocBRAjSHfh14xuo0630ldRsAlqfAbfCVRQwidBde\nMDe7+ROvt2klwWIrTlRhjt3wedRKTDb+gfOFGkOuBBsyvCtdwgz1Q0g7ULf6\nGOpaD1Ye0I1oTD/omkGPN+m3FxmDjvOAgIuvZ3UpU5qYmc0d4b+mu375WXjm\nTO2GkJdhTAcTFdavEk87/w7WYhEhAnIGnevdjhkpmqxTJpB8yybLffYU8aM0\nQrkw+TOZKQBzh1zL7m8ui8KWtqlwHdoRPsDXRbJ9i94BXBN1DaTKkbxW1rA/\nUnBx\r\n=biul\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"f4cfb22b93913c98e54c638ae39f39ed153daf66","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.21.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.21.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.5","apollo-server-core":"^2.16.0","apollo-server-types":"^0.5.1","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.16.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.16.0_1594988033009_0.6461275586958228","host":"s3://npm-registry-packages"}},"2.16.1":{"name":"apollo-server-cloud-functions","version":"2.16.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.16.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"a2da25cff5601492ce995284f017d17d6010463c","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.16.1.tgz","fileCount":20,"integrity":"sha512-qQVkzOp5iqPc/6UNzQ0wh5YxLvaU1TqdGUcv2X3ZYIv2HghrdrRqhDOQKX13a9qo2IbfJhICL754E2CAaRjbag==","signatures":[{"sig":"MEQCIHOpT+vKfRm+unmxkqnRCBSH9BFjeWBmezvVLr+meHK1AiAt4gHymue130f6OfewfKgFH9RMMxgFYKVoXnJKPv8Xaw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34082,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHz34CRA9TVsSAnZWagAAYZQP/1uM32cRU4hNgd3CENLN\nPUImvgMjbQZB1hZy5Ww/DDLUlae6Gs7Oq3JR6n3MecpXKcb24VgwPUlEdW5z\nYBHW9p5U/t2tt3DvfDA6LSl9sN7M7Zt7vqT5TrJCXnR9nu9u1rFFA0d57GWr\n3so3gJBMcdUMwhsiXWs6q6iHCowp1a3OoasTI4ucoLmRkwhk3IBfzXu2qHz6\ncTNSmW5sVRzVsQ1mK4u0uZyDofjFlI31ZGrUIsljOA2Qh/iv95tVXFDLLbdW\nhLcEJazC/MwcnUUuuAIRDXU5hK7SsJG6CcDZ4quTLOioFe9WvHWI+kP2JPpq\njqK9vOrypnkmgkxnGnxYG4+eB/drNhMzU1mkeahZNKyw7vh+dfw/vuGgZAPJ\nrfmXWKHhRdgE+MpRqDKsK0ssOe1Ctkep1BLwUSg+M90W4ArZP2dbHC+/QLPi\nY842PN40AeucYb6GbJAJoGBeKlTw6NSxGbuxvYGXKC/+HzgjqsHUvkucsttb\nYVn8qrVbmuLCYLcyjRuGMjVxzhW+1KKK3K0blp2ZktSMQSGtwy6EgZMPJjfh\nMvVLXTIRaKtnsPbYSpJH82l2Ry/5/gUXXR1WcjAg5EqLNlE38XDgN2uDKnp4\neu0JlMEIziHqUDerTXMM7uXld7cb5Q9p8BWrryWxSp2WL50XMD2/8bigaED3\nSBiQ\r\n=73Mj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"128c1b0930ff789c55ac258a0b579f18c6d5312b","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.22.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.22.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.5","apollo-server-core":"^2.16.1","apollo-server-types":"^0.5.1","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.16.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.16.1_1595882999805_0.7336230241220105","host":"s3://npm-registry-packages"}},"3.0.0-alpha.2":{"name":"apollo-server-cloud-functions","version":"3.0.0-alpha.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.0.0-alpha.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"31f6eb142a67a80499d81aa353200b4da983566e","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.0.0-alpha.2.tgz","fileCount":20,"integrity":"sha512-Vplx+q13jbMq7LUM29mrSX1Z5HDZW1WQxYeyjHMSX7/u5e0BGNC2ph8s1xGw8FHL8Pg4FsiVTO/MnMZlYxamgQ==","signatures":[{"sig":"MEQCIAENDjFHFLJh95aZEqbcXWng/nlyHO4I4JMijPGWwk3EAiAZM5ORedLRMspJlB2o0VUP3Yp464PeqDWvWlxFMB59Hg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32419,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLGGSCRA9TVsSAnZWagAAfW0QAIIwnL/hLMklR3QU0jHz\n5JbaKITDOwBnNV+VulSYoWnxKH4MXrvci2GI0nsOv156Pf13XmAIa/DO1HSO\n8IsIXfoU4C1arhOE93Eevv3SrXG7dJl7nOXNtptYiB3MUQVX7VW7091BrHxk\nZXfRMkz4ImZ/cS4wTN1rP0Gh5aTHxsZMCQe+wFlxsXLFccyzxIfu2ZLUOXzI\neCZ/rCkSNMV9kC2FYqq8yRyKCIrM4F6vcB7vS7FMbaxC83QHWKCFZD8nRH77\nIA5Sv+0kVN2G0nRECs3OmViDgjUBNU89VYlZBQZ7ULMRPCrBfwADtfqM9C2b\n841A+UElUTzGJ/eja/DSuG+1nDvPW/6QX2iGZtAgwzIVPdsJzm6pJT7fnQ23\nmqrFOv9L67aVxiZtMrHNup1AjTSWSMw8l0YUHs4xTU/MafmlUjRx1mzcia1s\nBWoi7a6XAYkDkPtE67qH59DQoLMffEVCMirXB2BEKy78cc2O15+2ik5ZF1MG\nucil18+1IkKNPK/lFKng9zr/yP8NrdGOXv2zI197LidGkTU/Ex0DBMF9nbLL\n3GRf1GbRD27Zeik2e5UetuZGgh5/nWcBGU0Hpwq2Z1xZr7frGSe2vdrFXULi\nBcjXblHsBbvgd5Nhtmxmaw1Vfne7k9/vpXohb2VlnHgKe/oPVx2/ifemIUK9\n/P5P\r\n=1Tx6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=12.0 <15.0"},"gitHead":"6f3711b589dca8079264969263266cd7b6010ed3","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.22.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.22.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^3.0.0-alpha.2","apollo-server-core":"^3.0.0-alpha.2","apollo-server-types":"^0.300.0-alpha.2","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.0.0-alpha.2"},"peerDependencies":{"graphql":"^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.0.0-alpha.2_1596744082571_0.4866279464872405","host":"s3://npm-registry-packages"}},"3.0.0-alpha.3":{"name":"apollo-server-cloud-functions","version":"3.0.0-alpha.3","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.0.0-alpha.3","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"29af453e3da15859dd2c676674ad254b5aac3840","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.0.0-alpha.3.tgz","fileCount":20,"integrity":"sha512-S7le2fGGjQzJoaXUZvTL3vHaK1OF3H+6K2diPEZfCqHJePpmMTdTLi6k4KM4qqYwCkFhaqwW9rUOTU8EKRtfgg==","signatures":[{"sig":"MEYCIQDjx5FiNCcix5MgYGCq6fBc4YdpnyZnPFiCAFJsti3H/AIhAJz9aheCFv0pMrDOR65CeLmWzJmgNra1IEuTSvRFy605","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32388,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNB/BCRA9TVsSAnZWagAADqkP/A/WRRZ+NfhhSJ0tLOoO\nMHOGlFkABvsJP0tF4SOOIC6oqSW+XfOB615z2P9NRXOAkhoJkhzRQtQc2/Tv\nUXAVJHSzxb0ftSwODXRffmdQWiSNr3yse/v/l8Jb07Rcp2Vz/mv7hWOUIgTK\nMVIbNLKjdtdg+gSS1aZWbvSkvfIa68kdhz9jy5Z4GrydAyiM+VOPBv7c/pS2\nR9OEe2bXTe1l3Pt8zcXaHUfNFh2y8ZaC5bcTntKPHiCHOiWbHpC9PxInhVXY\n9uC+qpj4qdMdWNZQlwgZQsCh5x1DfRyLBy9ky/vjpdmt2n+54Lc3dyy3VYUJ\nizcIC5pLKdD/eaMkhQCTQH6qvq06Wc9sBA77I8VfhR6SyiMLD1TIRyONhdLX\nYpMjaPLpJbqA+1nSav6kupNp8VGThVv8OogcppOMwxvIft8ybSHWsOEiqgoJ\nIRwlqppf5x6AnCK56pKS5GIB9QBtItOEZ95VoPvGkIvt7ZghyDAu1RjSqAp6\nWnI+KuclgK80AV6E8hkNNk+cUm8v1qeujlV8O+AH0BXzsgmJaqplf6kZtFKH\nTRpioT9ZG5NBr/Ij8puoqBUomo/WFaMjHBpv07sbGrmpskyUwbzVdqpFz+UQ\ndQvf4t+MjOyKSVirHnwgkZ2/40H0TRI5sGT0QA7APvHB4FBouTunoBpDsszL\n/I72\r\n=ftGm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=12.0 <15.0"},"gitHead":"15b90eec22523e32e00d97a51b28cbfba3f39c78","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.22.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.22.0","dependencies":{"apollo-server-env":"^3.0.0-alpha.3","apollo-server-core":"^3.0.0-alpha.3","apollo-server-types":"^0.300.0-alpha.3","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.0.0-alpha.3"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.0.0-alpha.3_1597251521001_0.293701670904007","host":"s3://npm-registry-packages"}},"2.17.0":{"name":"apollo-server-cloud-functions","version":"2.17.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.17.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"fc269ff7c449f6d034bf29c369934b8df0e8b6fa","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.17.0.tgz","fileCount":20,"integrity":"sha512-1CO/4baRB97htzVet6JLhYEVa2282Rnu8qupFT0Y26DdEAgFE6zGClvwTpv367Mt9QOH9GQPZ8ojuUZsC6HLLA==","signatures":[{"sig":"MEYCIQDugk7Umi/R0MyOdOrp3GB14P6vM00gMLX9wEYw9ldu+wIhANMK7lKETxMViNmHT8UTiivd2zy2/jooX6UOXwm+j7Jl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34082,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfR/6BCRA9TVsSAnZWagAA2zwQAIT3xojJyWaFZzpQnPrH\nxcwKjtyrqG+9QtdS0y/ytdKmX0Tz4vRvZ6sH9Nl1qTaSGQ1XTtAitsTsTtTU\ngvl3sZtjrAnhk7mSsxfEFI1W4D0E4jgOmTKPl4rIR4rcDLKz5tI6FB8+rKS5\ndcy1l/tDcAObjExu0eJAx8APrWzTf/TXUSUO+s0HN379wh6caPPeytLpY8T/\nFtplF8PBLc5SIsFpjmEEszfH4p+0PL5d92djzWhhHMzZ2DmpN6jLTHhflLNn\n1njXXbnlc2QTZvJOOvQIdYV0FkEV2h1zaFlt0IMHObEpBQxoUpG5ziyheEDQ\nVIxU04NQoXH8cgIM5Cgt+WoCXqzsWVhzTbFuXts6HbJTJup5GNu8JjrbpYaA\npTp23oo9g6NZIO61/KSEUgW+sTdH+a93Wm8dRuJWBYripd0+YW5HoTr/peCb\nzYvr6qbpGTwKydKqJKWPYArVkpAFrb8nmdCbw50Pl2pFykrJYgXYxGkMc3w/\n3W46ZKAyi9izS2R4hkw6PKyQ6tPD23pnpAbyp2T9BldaxhJpFUmjmiLPIN0I\n4+AJabWcl3JL+IJiPRHbeHDor0ZRU9ynUwgtVJLcgLGEp235bj9CeKH1p8g4\nP8KUpICkG8LdQDgEIf4zB+Ft3zBIVx/5IXwrGqldxDFa9rhW4ksHkZ2IDzEj\nRU0f\r\n=w3JB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"2db096051fc5bad822c0d37b530c792da39eb6f3","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.22.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.22.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.5","apollo-server-core":"^2.17.0","apollo-server-types":"^0.5.1","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.17.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.17.0_1598553728974_0.8448718582029402","host":"s3://npm-registry-packages"}},"2.17.1-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.17.1-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.17.1-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"9139c2703475e1b5c1ff0578fc91510b81a5c160","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.17.1-alpha.0.tgz","fileCount":20,"integrity":"sha512-2Yav7gZfYdiUxSMAPtifoeUvBO2hNs3jrLxwCg0B3HgPxXZL9GM2ohB647SzB+pssYGwrJZqQl+jfXkYM/uHVQ==","signatures":[{"sig":"MEUCIQD1xSw7n4UihjjIcUxra/43U3GPq63geNdkyRcYKVdz+wIgXNcLF6zxp304YvYYeQdEnzqk4Nslhx6nmdIQQATH/0g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUTSUCRA9TVsSAnZWagAA2wYQAIjID29/hq38tMfsHzCA\noBM8WsVk/IcB+oD+yetm/2gCnA9ThUVLKwzcfEISW9tLNSPXao7sUs/HmGK4\nAWZFEAKvB8hZlzHC3P314OujDH0/gssGHr/BlsZ4G7UlxnJkDBSn55mD1haN\nb9BbUYeCbka1QcX7FCambayuLgbtmlHe7iIgJ6sGQooJewWe80qspQmebX7C\nW20PyOUSHJdiqPgauOMqtkfZG7bqTHpT3crBE41/h66HB0L6aVWVFNP7AFDc\nnM/NjQDh9LWVjOgdvklbm1YTN5m2+lbOz4vTOT5c3avPBisY6heijQgle4jl\nlquC33Qyt+Mi1oN/JswnR6YduBVzju2+gayxyZUwsR8mS3NRm/xkDAMnpwO6\nPd9OKBRNppBmtt+6Zra3O/Ks3ORofVbqU4Df0hqpy1G057rKXCWiVjpWKb6z\nK9kaZxbBTzq0uNu3Hms5j8HTv2wG4eqeyIbztXKanjsCQiz0DNAbOnhpUYWC\nXKtS9PMXZ+BBvOw7QuO3Arl99cy5lPW1YBbpXL25yWz075fMkM5gBGzfuWcJ\n6krxFa04G2HE0990OzdcJFinWocO9W01pseZHzRX5MXh2x4tI87X9gnkttBs\nv3dyTiKciW9z3/GnZfgIul2VFQy8h/gWbMpmOg+mDsGBXUR4NjYPjrYpeReC\ndnD5\r\n=Gd5B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"a2571cd6efae7e8c9bdfaa6351ec2e62dba4f5bf","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.22.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.22.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.5","apollo-server-core":"^2.17.1-alpha.0","apollo-server-types":"^0.5.1","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.17.1-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.17.1-alpha.0_1599157395625_0.7296744867503724","host":"s3://npm-registry-packages"}},"2.18.0-rc.0":{"name":"apollo-server-cloud-functions","version":"2.18.0-rc.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.18.0-rc.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"f1dec084e5d92430d3c291026465127373c6d542","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.18.0-rc.0.tgz","fileCount":20,"integrity":"sha512-ip1bdvdSjY/8Rp24trp6PL6INNsfRQ97kNywj7l/1OTiRvzbfvdEWYVGNh5bVHhByc2v+JwpBSRC295aCf+EkQ==","signatures":[{"sig":"MEYCIQDiSLMvUeAeceXSUXt4uqDp+TS5jSkGXGcmuJFQudCR0QIhANpvZnaBbbs+0Fd3tt9FJ3jO3JeeB35IfGuNrljLwWI9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33412,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZTHpCRA9TVsSAnZWagAAO1oQAJF7hQp7m9EKyNmSZqAb\ngjmP2fUPCjvhXVJsjJWSomAeyuZ2g6qIo277SosrudsrgR2eqaDGHTKajNi5\naJ0AeGSiKS2vh1gXtYVOqjIBOYHnY2fNSDcWu0ukdpGJEt01Kmyy1LEutu4W\nalD1tvNuWTNKLxYrFN2ynahpPKjd2iTOZcpaMtUxrushEcDYWQduFel9QfzV\nl6J2QHnrUqcM+hfBwcXEzQ4sfdf/mAbdyoGxwhUeLYKJvJWQTDsYdJw5NxcB\nDk6XE580MBGs8oIGfAfbxVJCHvf8EZVsTJ3/oVZoLCZMbMsGbOZLEGUnmuPn\nRebf0lqKh4BVzVTmmDH6rzpkVsOjVWNXjxuDJ0GZQIrwbnE9LihtcOoZ9s9z\nH+/LtVKQs6InOF2g0p8DWZxQzudv4SK7iZpxjfbwNsptS/IkeHXBHYWhvKGe\nNKtJYJLk4vV0gE+uMR8vjkRzBioGrjD5kX7Vc8DIVxzcCjzn9FXNxzmvjzBv\na0lLeibvFyNGJFCfNcBvnXGp7HSpvm2x3hwDuhMqpGumczlCjDwSsLY6Io3/\nnSpt6aW4RiwN12E5GYn1e9TygqdBzkhizUngF6J1VQCJF3FenEutsenOM/F5\nXWqFJlVV81c3jE62sNmw6WcK5sfmAikzDVOTBZPL2+192H/wUcclGyJ83ltP\nkD47\r\n=MrEb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"9e5cd2804c4a5c320cfcee3d0b7448e02e9b2b8f","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.22.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.5","apollo-server-core":"^2.18.0-rc.0","apollo-server-types":"^0.6.0-rc.0","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.18.0-rc.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.18.0-rc.0_1600467432958_0.9700168720755935","host":"s3://npm-registry-packages"}},"2.18.0-rc.1":{"name":"apollo-server-cloud-functions","version":"2.18.0-rc.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.18.0-rc.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"e0155cc7d0dd5ed7ac32c96d6df1d3b66cc64667","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.18.0-rc.1.tgz","fileCount":20,"integrity":"sha512-ry8nuBPhbQPWhe6c2SoE+hmV7SxGjX14n5j9mrEKWkhvMS2y6dVNdf5mtrzBpV4J9FmTHaN1ds/Ay5bsh9z4Hw==","signatures":[{"sig":"MEUCIGlATy62BYIYXYQ1PYKBDdnn60WQa5umg1dS5V2QyDU9AiEAvWnZPtYZXzmfUFArUHVseZrXKDUCZBta3ZmeinhTllY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33412,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaOcFCRA9TVsSAnZWagAAEXUP/1ZUz2FBO++DNeREg9eS\nsSHxvvpsIvWAmaBKL0IVUB38YTuYg9RnaGFQHGqKbOvADeElQzEtxu+Hbyjn\n5x+giCbUEWbwC+ODi6m37498pXJurNc2eadlsdl+188dqY0xeFbSsKPic8xd\n2dC5GZVNfTuH60FO93rq6ZX/D2CJ/CwJP7kBcqoVCNKWrm/sbc2eA/nQAvhD\nvT2HCMMckAxgpRs2K70w+90AxrsN2vRFOV8cIOKfRXDq1emhBLr6CW9rWOFD\nwr7fYd56+WBaY8OuyksCMcHXl8EOuD5agdAJJKO3YJF1GnzuHfC5urZhD9lh\nOOXd8mXZ2Bj1+U3y38AzRfR4BgwbNjqFY8GOtnwvc0+HeRnXBADssP/7n4c8\n8oVgAbnIQswPnUB5EvEMwEMkbvnP1G2oUIcikWGIg36MdkNG3Ok6d3smwgpX\nZ3y42nLmtLClnvogeC56q6frHwynOix0BXV6gvjEoTuObvKBpjn80TNpgA7J\nTo76i8eQZhhovwedzDGThu5W73tbwL+tqaap4ZNS3e/87VoNowWdDrvsogyn\nZjyMPvg0oxf/7cgeVyURozixqmYVXP405T0eBSL2dykPTT0Sj3SEtpVLKwaZ\nLzJFCpR+tHXErD5mg1EV9zOnfOXpUSOMuU88DLeGqxL6z6OoWGxpwFR0yYSM\ndm22\r\n=5aVs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"7481e51d6de10e684e9fe0252dfbac22392771f7","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.22.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.5","apollo-server-core":"^2.18.0-rc.1","apollo-server-types":"^0.6.0-rc.0","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.18.0-rc.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.18.0-rc.1_1600710405050_0.23153319585145105","host":"s3://npm-registry-packages"}},"2.18.0":{"name":"apollo-server-cloud-functions","version":"2.18.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.18.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"a3c9c35ddaa66f0adcfd76139e310f34072cf689","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.18.0.tgz","fileCount":20,"integrity":"sha512-JmLoLzEGFi/FXCrzGU+1B8J70I/isZXplnPByxSWEE/jZsufPob6jIFPkc9ieQqnBdy9Auxun+jrgBrB0mFQsQ==","signatures":[{"sig":"MEYCIQCDweMDy5wAIVZIqt1u5CFMRbfrMw2S9/TswvoVNh+WVgIhALids3RHEUCleEG1ONtWPMPWEXEijlivDxhE8MI8MB7s","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33392,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaXx2CRA9TVsSAnZWagAARLMP/AmWa9ctwT5VQk7kC3vK\nYQykZ2vfwBkCHpXsdkClA7hBc275vb+1gBt4GptGk+UZ6BGHETDWHhuxIhxf\nRkvEXjKZQV20PggMeSxzlZe3frV6+aktlXCDg/+VU4+B2KNno2H5ty7zPLj8\neY2QTaRbSB6pPQf7gxejO3RX+NX4JWIvsxAHPNZ1W7vbIjpB5tzo82uYRkP8\nCETcgmCpRXXM8eA13UIq1RLmgOZjok2ssX1SseOeJrVOjbwzsLmx3UR5ksBP\ni6TyT6Y4KPmeOqVGMjsaCcsH1L/2P18M0eaSHsUQRas/bZDvN8IREl8Cex71\ne7vB8HlYfhxdpAzNhGmOR0gCe6dT3fD9F1K7ulDl4tc7FB3ZbuXZbabllK4X\n1FJPL9PxUY0YP/f9TvuhiIfeHtefLGAHBjJ3FzsxQnFV62xglURpxiLuqgx1\nNJ4OuXoipVOV7lb7CBRfNIRUDgDMZzj8r9TrIX/7x/YUheMZqXmMGxWTPNHD\n7gAlK+eX6e5baY2VoN7voKZtlmLUNOIeR9oxP6xtXhVQezDkj0sfGXGVbSQY\nirj9JiyRZo2oct5+KLBXTCkcAzueE09bY1kk/Oijjhyq04hEE8RUe8ku6svx\n40BrpX9mBDO5aIW8s2jnTIEHAkdzvsEhGJfovb8XMRTUTQszNKj9Q4OXKK9S\nRdbY\r\n=tDwn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"2aab7fd973bf352a0de28b2385dbad4be7c7fabc","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.22.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.5","apollo-server-core":"^2.18.0","apollo-server-types":"^0.6.0","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.18.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.18.0_1600748661936_0.749269066592918","host":"s3://npm-registry-packages"}},"2.18.1":{"name":"apollo-server-cloud-functions","version":"2.18.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.18.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"3d0bedd8ed9e944a4ba7f7eac78d70ac46886a72","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.18.1.tgz","fileCount":20,"integrity":"sha512-YeLnf3Cw7vWfszJ/a6zmpk8rAFxyZzlP5VA/mNn2yVjvxT6UVpviWedJNrHuhrSs5UPt1/mBm9UIo01wYcAlMA==","signatures":[{"sig":"MEUCIQCv63FHt2bBAc8FXGYy0Ldzh6NBVv7sm/uiqf30nW13RwIgDSxzc0hBvkCFhHHnUJU+8v6VHnLy+oUddl0NnNTdBL0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33392,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbODvCRA9TVsSAnZWagAAgs4P/0cEnpOLOE5yHZCYisuS\nRB5lImLkVQqmOjj/Swvcl1WxTk9H8yF0L4ZnGPhdS+zqEa3PDyhHDH+hn9/d\neVk58TwmoAhR8xf7dhZOAivy68BEZERsADnUhvP7faiWeZXJpuCFy5D1joNy\nrP9vA0g0SL9zmZj+i2RtOexhwGzQfDT1cwWP3mqg8Dqysd0TkM7Fq20VPKh0\nl/2LJUhNfqwFSG6ySG/va01FEPJjtOtoob8grmLYwEX5F1+vs4GV90css7h0\nknkSFBO99WDiG+s/eoAgEwHUryKK4B0zpubkGEqmDHus+D7GSYnGrolNnDZY\njPXG2MKz8giIY3u9wtrrcjeqTo+w0pZ0XAvkPcEnWqPibYLRVh3Fb7AJE19B\nwycdGNvn61k8AVmBdEoqG55+agthxXwietEhGHAcZ62YCttrugSvpdrehkSg\nmiDekdxG3LeQYZ09l17qJVCJrGyHFJbUuwKOkWTkz0UHHGQVD9vDuMfa8Q+G\nURYpVYtMOG2xVAZiJ8JBm2g8DWjrUvwGcTB9LPiDxxkMxSZSOGFCyVwbNfII\nj86rD614nCqyTnpxumeVAzQrwH+iKVosVNULsmeqO4oovZkLqmV0zO3dhoIm\neutKT7D3lhgFy06aok3ZcZfYjEzxqZksj0b6Xdx66y5PlKsQP8vvp2gwARey\ntYRT\r\n=kuqx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"83e22003c717e93bc57655d4849b0833369f1152","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.22.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.5","apollo-server-core":"^2.18.1","apollo-server-types":"^0.6.0","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.18.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.18.1_1600970990975_0.5345731663279905","host":"s3://npm-registry-packages"}},"2.19.0-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.19.0-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.19.0-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"3d1cd7a34b7284131c08ae7e08838a908053c526","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.19.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-Xp5DvNeAXr3R6myZX7sn5W4JJpm9ueIDuVgCLjo5nkQBaY83QDRXwdF6jIq7nvmL2rEaCwSxAAN+1tfv3wSRCg==","signatures":[{"sig":"MEUCIQCoVeFnryswBBxYiQjHBPKjmNNST+92G08sm3R3+4DBOAIgOnZSUgemnxXcUAbViNJybmv/T+cVb55OrVlzfB9PF7M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfeyxYCRA9TVsSAnZWagAA6dMP+wbCM4m6x+PRkSQzxrCF\ng0JaqpCYUkPdlmvPYXIMMCvFRTktFLhiibGdK6eaeD5peBsj7uvHzeuSCk9U\nYc4euU3oLqa0aTf4t4hKJcbYztexgwQ0W6/QhwPWqMvc5BGCiLR3N200reft\nPiaxxSzCcn5Bjj1Lfe1ewz47/BVpvhtPLcZgDE7TzEXXkX1Y0IkYLHRJGcco\n8IzZ3wZE/xvJdhjoyXBEDDzH/cOvws/WU9DSfTcZ0ZV9HTaGVRe/kfXNB/iv\n8IzmhI8HPXbvHMehD4S5mxMHiMTdb7PVIo7KED5FEnx6SxZ0P037mLPdE094\nolHLAFlwcScwayp98SMLsqnMZUFSe1Nyp6E2KOUfkcNoT0lZxYgRw0mcTp+f\n9WKH4w1xS9voFu46PwPwLMDFvvvixiI6bTPRLBZ5CuXMtR/iYEsjN52vOpBQ\nmgTwq0vuXsD/cQWsVR25cbhQpiofAxAhULelA1WUABtJZ4u6Q9Vt0qpGaeKr\nvqLEaTuyhSFDM2T+DYVwZEVRRKF7ibZ9KONNI3BA9yR32ILsWjjarM/HDMCZ\n4/27+8OVpFUfwSoTgdGX613UOJgNzAO99KZ/ip1+3UhA+4vuqiUFacCFgqtD\nyXPsZOq/EbHLRBNHm5oeBPZ3oO2amcDCcHRQBdl7aGdOx38s2HFzkItgQyEk\nl7aw\r\n=sZu5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"507081eee4cbab5ecceee39de341f8941d2d7b06","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.22.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.5","apollo-server-core":"^2.19.0-alpha.0","apollo-server-types":"^0.6.0","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.19.0-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.19.0-alpha.0_1601907799912_0.9222605911086725","host":"s3://npm-registry-packages"}},"2.18.2":{"name":"apollo-server-cloud-functions","version":"2.18.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.18.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"a03c6e15cff96077f447227a5a49fbb82b1bd098","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.18.2.tgz","fileCount":20,"integrity":"sha512-D6souFMGLdWC8Xid2f3fV8GweB4DE3+4HmIG8N7like6PMJAlDL3fRmrs9GyzZB/FHlufDz6KprypdKJHSzZ0Q==","signatures":[{"sig":"MEUCIH4CV2BeKOIj0W5n+QToW85knd0w+pHhUSeDG2iZKeLeAiEA2vTXRN4HYqbvlWJH0ux5AYpwf5DL7uDHYHv58XDGqj8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33392,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfe3B5CRA9TVsSAnZWagAAwpUP/igxxEYymPKo+1jvDnI8\nCSdrwXLCOJL+HVlmpzWz8p5DsomJIZZY1KBqLNaRD2/5zwl0yE5fgI6f83zH\nbksKZMwQ+k/5TYQvojc+IjJ+4RYve6oLivFhCF1AJsyv/gaDHpZKUMbpmjyx\nsvulo3XM791Sa015Wz9ugJ4+1CENBjB/o6huDcDqulIofTOCfSAHBaiBC67o\nDbbwd+bZ/odtVSOj2ak7O5zESBk7fwfPDFbNvNumcVkWpt4x1FIo9gtRvzOB\ncTJJm1/ad11ynjiC9YtcJV0XLIrl/YMvSJx4gypswQlYYLFGPaRhFmtJF/dN\nBbseL+PX1CZiO9sTlYq9r2Ym0kDWxifJSH8f9BISxxctwDWE1mNoB36f5Q9G\nrth6fxobpczaCqxY0cU/RczZy18Y2i953k2ar14CpWds28Wsi6QSmYwL5kZJ\n4lnRvKXlwcrvlQFTfrlsHqP+6pXenAsMtjAACwejhudnA8CFHOP3ydKaWXMu\n9QiFbXssev74xgF1tm+PEJK8dBjW5AC7hFE/uHJv4sBXrw81lw62LuNb7dRU\nEjtjsKDyhrA/Y7d9bns+e1wO3Olkur6YQOEtpeX5o2ms78snIytVBOPcd/D8\nct427JFnRzGcidB/kXHzn1VwzWae5qNUxObxM2bPzm01GToLf6v1Mwclo21J\nfm8C\r\n=66Lc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"a4786b2fbfd2ae60e1bf1cfaaced3f9c8d174a93","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.22.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.5","apollo-server-core":"^2.18.2","apollo-server-types":"^0.6.0","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.18.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.18.2_1601925240893_0.44157749850850614","host":"s3://npm-registry-packages"}},"2.19.0-alpha.1":{"name":"apollo-server-cloud-functions","version":"2.19.0-alpha.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.19.0-alpha.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"1532c6a0a099aabb62946eb99ba24b0153d2b74a","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.19.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-AAhbtoXj8dL2leU8O4Ws61yfKDzVc+4Grqa/LBvE3iazJdTTQw1kuWP6OeGxCrA7GSmIY2Au7ZMyV3jtDAf+LA==","signatures":[{"sig":"MEQCIAfdWkoBpl0eFcBM1xLBQl5zn4DjTt70pwOdlfDaJunaAiB7U26XDubAhU917iiBFNdAx43RraOxAYjHuAf5W4Bdng==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjdwNCRA9TVsSAnZWagAACDwQAJcC6wZqwVFkF2Zh9p1j\ndmB+xm7kFizTYipB47tKWswNo/JMPS5TS0MrAIlUYZ2Ab40N3UDMJDVMX8EI\nzCLYWli4/TqMMOxGSXVyGFmbhCyrcQ1/fScp91cK57z2Fa+6Fz0FDVStMxis\n7ojpeyih6wvg6DZUojpOVJEzfNjUy9cSuYe67gpV3uonhuoc6YavEyQ64Mnt\nl29oA9TTM+pue2sh1pE8aAIy6eDGHAJJA7L42+7kUhtH1f5+E8py9TrWT1B2\ni/eMNwBGuUZUfnMe0jLk3iYInPkZ9/CbywHbHYvc49XpbtgXsKhYdILdJjM5\nfSUb6przx8U+GwTgj0UyQOVH4V27/Tz9itK0ZeJ+4LZAnMCRizpMJLisZGBa\n6Gs0ykkrfPjphjvjCuWt/gX5hWfMti4R/Dgvhuoc/Wim4dXafvHzSSBVPCYF\nRbcqLKKCzZiK70Wed7xR1YAkcDXGvNitT7SwnGe6rCWuby2lYspqBcbunptq\nYb9Ya9iKL5GL54O84qeaeohsrum6qMlLkNRIv1Xmt6mrYbiUrliE6su+BPVR\n2T8WFE0LmqiwAecR+/nV4yzPlEcmUR7uSBX9C9toa3rC84rCItm5XXStVzWN\nWmGAKlOGiwU+fpRvN4MccTcCO4WgSVm72N1N5G00eQlI6ohXzEIRLVZi2uU6\n/EXW\r\n=wl7C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"495f8d83689340357f6d8ba959601913050e35a9","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.22.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.5","apollo-server-core":"^2.19.0-alpha.1","apollo-server-types":"^0.6.1-alpha.0","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.19.0-alpha.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.19.0-alpha.1_1603132429179_0.10900919102236828","host":"s3://npm-registry-packages"}},"2.19.0":{"name":"apollo-server-cloud-functions","version":"2.19.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.19.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"2f9b8ea0458d8b8c5f4a5aa53ca6034caf40254d","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.19.0.tgz","fileCount":20,"integrity":"sha512-TYCg+KAvxuB3N2LEwxqB4wonGR0+A0BiOPlSUm79WrTrA2uxrrnljJ/TXM9p2NP2kfAoR1GzbHfdjZuRZUSHMA==","signatures":[{"sig":"MEYCIQCmaVklnx+/NmccU2TL2jL7AagZBuTD6nYCyvw1UCisBAIhAO8ogW6NznRKdtiWHDRqhgIbDhG4CXs02EbB01gQOHNw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33392,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnHFhCRA9TVsSAnZWagAAtEoP/jW9eKwOso7Qp9xq7q3X\nQWtuEez4MTRGgy31sQuX0UrVLTtkYBauvHut3tZzv2bj+Go4AcsGWsmcH/mD\nEjM2i3FMG8qOzZs3HcJsZxdcKx8VPSk7plAd5FxLT57Av7cTs2oTsJxFY2H9\n2OWd+KEI4yrAH2UNMtBR7XbMnvo7maf1hYqMSy3i3dpsZYkxPTGcR8hsW4RU\n33N2v6zhX1EEyRNKUI8M0r3bbwdTMev9R98nFxQOwFh/DBZzbzV6DIAUcnqT\neEp5SzrNuAQTZTkN6v1px3vHgZbIcSlEFsoojWWPJnM/Bn1SNPDeyilnIPDV\nZi1j5dXdKBa1uPllVSlYdP68M/7WdK7Jo8JNrgK1wmFYScA654GFRn/WC7nD\n2ALk/LwdEtN/qs2rG8StRQ+fkYLEaMubrMe67CfggWcEXyxjkRMkECEBeJ6N\nX19MJnmfQHVk91/hn+a24cosZxtXfO3EsCg7BRyNFMPtK8h5qHrNAyJz9l+c\nBxNn2LROoM2cMiK0woYgZdeW5up7rAJvbg+xJ73vpZwwGD+u0vzwtQW+VBtk\nQmbdkRF0QlxpZ1FUnxfFtDpMZicx5PENochHefnU8XDAYAos1+p1G3lyn46N\n+kAj8/A+kdkhchgPCOp2G7cIex4bRPQS32Kyo+/SkcJHSfaorQ06CH9gkNzp\nxL4b\r\n=vfBl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"4c6d16f14ab735ba0361057d75e51adb6790426c","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.23.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.23.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.5","apollo-server-core":"^2.19.0","apollo-server-types":"^0.6.1","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.19.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.19.0_1604088160645_0.5141835862702167","host":"s3://npm-registry-packages"}},"2.19.1":{"name":"apollo-server-cloud-functions","version":"2.19.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.19.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"c4818a2a573dd86185a774e03642edeebd85c0d6","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.19.1.tgz","fileCount":20,"integrity":"sha512-bichUELrjs2qj6ypmW21vULNbyJiAjdGkMy8yAUHgvstsC6iD1LT/IMhpTAiDF3r/JVIrRX9eTgEEaDY62pLpw==","signatures":[{"sig":"MEUCIQC5RTHYUHA/NNz9x8Gzhf9FEQ9lJjXe1v+e7XI0MCTJRQIgDtuEUhGpJ/+/DhMBMrdbLiKXwZDmGuFzsx/OTHB8xg8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33392,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4nwoCRA9TVsSAnZWagAAJLAP/iX28RJ+HwMaCybkSUfZ\nMuGh/1mvblNOk4pMHewPOrOVKVDH4V579TX2UgiUMRH2+EQkdSubb0r8H7/M\nVoHn3Xn4FdulZ6NgPSoth8+MubcfufekrMuTQw/u/wSb0M5lY5KEcyasdrhA\nNNoF3V5SLNZP5QsUh8k9bV2m5xGBFn2xXxhFKQCftWg2BrhfeN8CkrbDU8qP\n0yrkBH7DTF6Wpg7z3jSVHDPfEWbtol9XTwD7to6GrQQCTSKOP9FnfqbG97LU\nKvW5x3o7NKYzymR8nfYn1wrSi9z3Bo+PP8uc0bnuoI1EPjqmvjB8P2y1gjWe\nNB/fRRl13EumAVXdoGBWs8SDEUPHgoCprr9wB7oiAO2KZTMM7rujrDfiwZtS\ngUcaa9lDK03vyMg7aBOTNQI6k8Fsxq8EF2ItwL5RfCzr+N1cO/mY/Ud55viz\nDw3z6o8TJxoI/12W+vDtfw7HqXcqAxNpnjG33fXDAakoHn2MwNVDIxcjUXZG\n7D5ZblYm6RDUTk1R3NhJwV2Uk39pPPSGaUvtR7Cziv1fmXxM6R8fWjo92Qzj\nPyacs/LIAZYDtMtPlqqUGXQex1h6iyZedB0J8RYUEK0byDUIYirce4neoKFo\nwfZArS4c3hSqXVA1FtmD8D65RRvsljVCe/5uRB4N5y3F/wD+Uf26GUO+7A5M\nJ6FU\r\n=oUCr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"7e543ed5540ce5995b30b1bb2a7b54367fd49d6f","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.23.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.23.0","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^2.4.5","apollo-server-core":"^2.19.1","apollo-server-types":"^0.6.2","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.19.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.19.1_1608678440030_0.8622631368968459","host":"s3://npm-registry-packages"}},"2.19.2":{"name":"apollo-server-cloud-functions","version":"2.19.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.19.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"1ba12dfae702f72072e2a0f497833b3511022378","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.19.2.tgz","fileCount":20,"integrity":"sha512-+rObreuIKbbT2LnTyk6f0qAF07LA/knDctA5zuarlNsLNvSFyomkaaJgrW8ozG98kTqV04z6wrKrXWpSfQVUkw==","signatures":[{"sig":"MEUCIQD0eaT44qKuE6FHvX3Rfocgmt4YF2bjlyS2oQrepfo1egIgV8mQBBqNozZEh3fcqIDLJTKUJIeh5pvpIj7cYMupz7k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33392,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAHaFCRA9TVsSAnZWagAAUioP/jgPQUX4tavlobM6jOx0\ngc6ucN1umdfsiFVTBde3PjULnbJkanv3ZHRjhf6XdebKrbF1UWfbpzCv9eg8\nqYWsdR6mziO402cAtIcPqylaRayA+9ar16+5BszDprCIVfbm6+LBK598T6B1\n3mqjZGXVTF/+SfSDgN9Dy/RjZxTNwZByYe8ruEQvOE1UKL455wAVX8l4TAf/\nRA8oPLbb8NJB0kE9yk8ybaiEQ1izVbC8j3jrI0zwuyRf6YX428ZvbEcKba5f\ns5gnLOlfeLMmbQ8CLxFhVe9tms8erzMZUV/jli4f6ilvwlp6lmw89w+5Ft7y\nU19l2ox/x2EIXimxKmxZftnROIsY3HF4W13Gc44RBq17+h/zOZssDl+debod\n2gWV7nzUc3Jx5KNV4CBDpMPoaBtAZNbPPyMytfvAoL1EZUamlHTLepqj3xjQ\nr8i0a9RJvuRDMzoFX0aUno+dZGvbmCdYZn5G/vZQWmKfDucwITWzwQ8BUgM1\n6QflCuiWYh8AhNiIarjsyMaFvnVTzgzSroJsrDm9vkqf5KCWH8pqjB5CY8VK\nMUKHW5BeCoeLQT1AXcw5BdVfrBtjAQMlKYaXUR4nKqudJk3C2rCDqxviq/DR\nTyYc6GilheFy5AP/WWJOgX7WgLSUXYUVyYc/ljqIJB6NHIoOuKW2jNdIfecB\nfH2A\r\n=Q4t2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"c212627be591cd2c2469321b58b15f1b7909778d","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.23.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.23.1","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^3.0.0","apollo-server-core":"^2.19.2","apollo-server-types":"^0.6.3","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.19.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.19.2_1610643077048_0.3359541496376792","host":"s3://npm-registry-packages"}},"2.20.0-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.20.0-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.20.0-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"ea9a109dae2dd4fb1cfc3089cc96fcff6366db49","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.20.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-A4ceRKyNvnK5pBtYxtt5e0m3Kd1FYwh/2cGPYp//lsU9i9KJkdBW0qbz9sUFxIumjyn6gADKcG5G+NoR+C9oIg==","signatures":[{"sig":"MEUCIQCrytneDINLHZ45R2D3nb6/+EUGFeDNvbIS7uE8I8bI2gIgKUEkgIGHLlS/LyCngroxb0JM9svgvAgZFAxyVc9znSE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIeE/CRA9TVsSAnZWagAAK5YP/iFvjRtAZWf6JBemd8lD\nFqJqp/0BUeobg81amoYvVOTnqJy2ocdj2kMb2HVrougG/qxrN195tTizv1p0\n1D+umvnp6lve15d1H9S3hzCO51SH3yUv9J2fHlPJzTUhM2Z4y8I1AMq77dWU\nqr9GJQh4eVy5xB3k6pApzqK/XpmcrTnDJ3UCw3OerZULMo/6sJ3P7Pv8xNUu\nqrsLvA1wGmhmBqpbtXlkCXOqVmjaVVIw7Q/Pn+NG541UXReIfx7xCPrzxMmT\nfAkFcC5RfJvZfB+yMIEnoMqcncYsfuuLEgBKQoVRCykpIDKluBoXezUig8Kc\nrQbFUWStDCh8Tbe9Y6CPMtCwm8Nh473ZPDmqUNLQP3VjRzEFD/NaYlq9z1iy\npNFnemCdIZWZ+C66LzSbm4pFoddLtazVfaHNKPN90ED4L82WmVZwxnNTdlSP\nqhYS1jIbsb80zYR/aPyI77yxNhQ/Dt4PS13twSEb3RxR9OrIwY3uRnpoK8rN\nb1Jv6AQ4aReynyNsY8eD3NiAE0XApR9JatoEwCYq2Worguru+YgYmJ/WWsH2\nD6sjwbHZnga2uaE3yTrnPhBTotz9cz99NONC7z8SZTBTIv3cF8uN66jweaEF\n3wBXf7w4kTy94W53VonjXGAvJzVgiAp8ya/i67u+IlHmetVwyvT4ObB1HqFn\nkCpW\r\n=e07V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"d18b7a94a6984017955e117060738f190b6f604d","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.23.2+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.23.2","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^3.0.0","apollo-server-core":"^2.20.0-alpha.0","apollo-server-types":"^0.6.3","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.20.0-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.20.0-alpha.0_1612833086477_0.07250004323782644","host":"s3://npm-registry-packages"}},"2.20.0":{"name":"apollo-server-cloud-functions","version":"2.20.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.20.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"2c31e1ab522cdc725b91c5cce263fe5213eb6881","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.20.0.tgz","fileCount":20,"integrity":"sha512-RTVSDijdIcVJeGC6/HJ1tjG+oBv6LfMJO93VjPEKnOxWbXlA3VOlIBOX2RKEYrmmBwWSzvnKt8MIxAKPT4gU2g==","signatures":[{"sig":"MEYCIQCZjTRYHny0cUSXe9FbyPgpQtKa7nW0SpgyvYqW+PnWyQIhANExBPpHX0EtBbk5gnESFKzWMgVd6SEw+HrU/4aXpNdc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33392,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIxWACRA9TVsSAnZWagAA22YP/i9R+NjTC8ppQ6R3+IF8\nEKVQJH+A1b1rZT69i3O6wf+Y4+t981/x+1DSXELPBa1jg/I21EQeyED/Qr2y\nfxUMvC4rwWk2O5T5sfR0FqMTTGG6nUHIx5eXALucBDeS2I/2SWRzmw92hWK7\nOkbdcDxHMy4Zcb/JnffRKDXjcLUiUaC3rzRhXsyPjyOUiha+g1tHbVkEBhgs\nrYbtkbxNUai6oKqaY8+0MpkHc6F/0Z7InD2ZOB4vkU6Z/1Vm8WyV1Tl4eyWs\n9R5BWpGjTPAZW/CHwn1DgZzCHUtz167sy79PRRHJ4bTZR5ObiORVWe4wn2Px\neiL60shxLW0ZU05vIn9zmbG+jI4m6jfB+dImcJo5W63PoOJ30JpKYfmUdclr\nOWQjAPne67S7LtyFJ8wOhlnOrNtjEVXOzIm/6AIOK4MbqsQ5p6TcTkEvMETC\n/qpliXyBaAvnfmhfjKVBaWh97X0BPeiYJTZCZu3oA/6IyaTf78ebWq4mG1Oq\n9TX61hdiJyhvBut/5j/wVOGlUALd9T98vSfjdyblWeW2r6PQ8cPGL3bpREG4\nv584TOV6Lt7pKc7TWlJ4aHMzLoFBq/mQWeQ7CO/wxTzRpp5u40C/I9/PwGN1\nLV/Xf2hGNL8T0MZ48A+5DrSmKY3iIcfg+tRNsWqmrRAXTVL7j7jGnH7nLDGN\nNnTT\r\n=uPFx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"baf9b252dfab150ec828ef83345a7ceb2d34a6a3","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.23.2+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.23.2","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^3.0.0","apollo-server-core":"^2.20.0","apollo-server-types":"^0.6.3","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.20.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.20.0_1612911999531_0.6737835034155792","host":"s3://npm-registry-packages"}},"2.21.0-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.21.0-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.21.0-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"76a7bbe7be120f11ef780834559e927b953dce19","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.21.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-c5oAWg7RrwO2E1py1oLbxG9Y45pvddQopBiu7b/5vHJGNm9PWk9CyQEFv5v15yMJ9eqpqOp8eX2xJx12LBOaMw==","signatures":[{"sig":"MEQCIBeMQlA077yoLz8o8vfMMSLE1UolcE/aVvLKJ6IfKo2hAiBJy88lNprZ5RJ7rHoV1vcJMbRPOdrnDXOZcJLmwyhncw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJYKECRA9TVsSAnZWagAAkwIP/RA9WE3+9BfG+myREO3X\n1DvIuMeAmpSbKnYt4oQm9BMFUhEgJxxbm1oaVIz4hok48/GdkMAlgPHuozBq\nolQ3/0K7wWPsLqNGWKlffNvk+4M/s3TnndmIRCo+oTFAQKM9o40+cTTKrTVF\n2gs6AuVnfF1wQPbltYqgZ57Md9FXMApffEeQUnOiDeuI9oWQRmin+4p+t4ik\nmX/qOKf6X6ap8d0xl6plV1YTl3cYT0UKcfPowEdjGun7TyqgjcUiUsVj6Atn\nymX4qWXI0Nm3mkPneUbdPU7G1GaqBsIMpNUJ5Vbd7C8kldmaZ6bemXdi4ijA\nSVLlRbwu5zNWjfLafOozIv+cwkOBRXzhAr7+rGZHQDuuc712Gu0ycXA9Nzed\nmKeVmtmN8MvrxveKSjRk9/ieXMEn/IPGhg8mg4xVI8ER6dQtUXtcGDl1kU+K\nNDFlQdr5+fKAjFpURF2usLb5SvEgU4eFLafxe0vwCajaMJ62Ng0fn5WUH1ht\nJPn04HuruHo+8C41/uD/gDlFprK2ZC0iM9UtKT+VJ6tnmcODe4fN0DuiTp50\ncr0d7/M7xwymFeQrhiKP5R8ERTxInxnAptedVW8hR1esWB2gYepCHaXYavss\ne4241g8qZylSO5Yw6pqJ6jOcq4Ov8nKENr+OFzWydSHd6RWIlHuHNgmHoffa\nAiIU\r\n=Q4H8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"3642ce88eb6b83150a90428721dcdffd5bf48a4d","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.23.2+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.23.2","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^3.0.0","apollo-server-core":"^2.21.0-alpha.0","apollo-server-types":"^0.6.3","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.21.0-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.21.0-alpha.0_1613070979913_0.5480913397501455","host":"s3://npm-registry-packages"}},"2.21.0-alpha.1":{"name":"apollo-server-cloud-functions","version":"2.21.0-alpha.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.21.0-alpha.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"9c39ceabbf8fd85b0a58bf838bec00133938362d","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.21.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-wU4LBGLvAJTrxaXAGFRQmUKpCFDKHkIOqFy2bNARHG+Dj7QdMD6jdhOJ7g8ilUAa2TH6haLrmjGtFR2uCCNtdQ==","signatures":[{"sig":"MEUCICSWd1BlGzhesPMvdwxM9wTpbfzvRTIDXWmB8oz92qRlAiEAqKv/Cv4OHmf0JWfDwh5tgJ9g41ky63Yf3T+8K37iR/M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJYs5CRA9TVsSAnZWagAAgOwP/AtWrrSwm+MzXwBY3oU2\nvi+bHCszyDzqHe0OHvWwbRq4d1hU8pvxj5Zd4G3HAwucS7m8GVtOS0QVIvGi\nYCg0uLURP8Y2L4SmeYrrOLClC5O24kOzuXU02AeZfW5RCvqBReATgLdE9scy\nzAe6I7srHiK55mC6NusYNJKmOwExZjy3DRb89bBeBu2sRwIHiMNAMjIdX5qx\n+7/c+ZBD/Oo5e7r55jnl8jFP0Gz0HP2L9eGyXYA4FHsbB6pZSrZo/9ZWcu6x\n5sEy0uzyOiv5NW1Zt6FgebWEgQ6f97l+jzFmVmQZNIekjLPYgCj3p3e27JC2\nVesn8+cuvuZtPDeohyCXBvMxx8YLWJrNPLRHGbO0U3+KkIgr8/98l+NyZLuH\nFS2NYgGw5pAMMPHd36zPj1seY+anFeqzdvWXLCI/2efBF27s4Od/gvFwbN2z\nx9N++VtAj95XlocnOXiSyK8ziOeFK0LjH7sjD7SSLa86Q2RM9vc9YpP30VKE\neySbjQm2sDdN9J4O0QIlre5aLgEcAn46mORIzIzup3yP20pjHvUJRF5woWvJ\n20H8MTv4siboPrVKtN05e5Dl+5sYm1qY3W2pNKitr8xiRF5Ymp+1ckB4aFjn\nCtq9mBOEz/pi52I656d4CwDvvOwj5Wuk9SWrTzXTe07je5yEiPoKpI5vzcqW\nBqRq\r\n=oLnO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"26279de6a638ff1e76c34bd3f9177669a4632f83","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.23.2+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.23.2","dependencies":{"graphql-tools":"^4.0.0","apollo-server-env":"^3.0.0","apollo-server-core":"^2.21.0-alpha.1","apollo-server-types":"^0.6.3","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.21.0-alpha.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.21.0-alpha.1_1613073208821_0.15423479221030534","host":"s3://npm-registry-packages"}},"2.21.0-alpha.2":{"name":"apollo-server-cloud-functions","version":"2.21.0-alpha.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.21.0-alpha.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"9f879fa2cd7b4c9828858b556fed3e9be4dca634","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.21.0-alpha.2.tgz","fileCount":20,"integrity":"sha512-j2c3Duq2IoAS0aKp7zx5YrxbRlVE90crD5q6GhtS5CCoLk2SNgaPkrl4obPl8d0Gu6WWRtJz+nZxB9oLh2RNGw==","signatures":[{"sig":"MEQCIFaXZn60Gxc2QngR1EKzRBbTVEnx2xTW1WwTFW+gHT/yAiAcC3FjJn7G8hGv27BjlRhk9ZJMiYCSzdWtLHf2X7dJNA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJaYlCRA9TVsSAnZWagAAhUcP/jAk/fkFv2DiUl+laWcb\nb3ns5zJo5pStQaHjvLvR1K1PVsmV4dc4ZLzrD7VCNs1RHogY1r2DRYa/St/H\nAQfKnCpPYSIEJYLjX8J8FrKIlRvAYmfwJpF6RGykqHhZQkeEct0OuBOyV282\n08HyVZWT3v8kc5OtxkqmFQBc06qFC27xP8wruK7sJ8/rGMm1G0/5LdczHw1Q\nJOfujsfzTSoEuqnAp79zKbotVGOEVr/fIxu5Bu6IETJbExZ6Zw3CGMmaWXIu\nd6WD2xry10xXmdggs7u7wA8syhKIaT/bjxoAeMvdvbVDqnAGBDqlRKK1COkI\nPaI44WA9aVHlzw8Wg7cK8RMzYgNgrd6ZOIpS7O2IZDJf7F3w+f77INjetfgb\ntEeYFCgdzJpRdvVz/3TwgzVOvXd5xdZrriH30iIvnqaw/ATXoqAtZJC3PpBP\nkTLeNONAqR/i8zsDRMovmjnKBkRNIKdZfOl6/rswzEK1JoFZto4dfMJ+tiSD\nDQ8yWUyivm1zxlwJPxMGqt06L13vMZpvFSze4quWmily7cnKmEtWM23EE+GQ\nbAqKIIn8E1GIg4k1uHsqe9UQ13U71+xq68j/jGgvhCGF4Xg712MCXybyMEwW\nNGoS/o4TZHmAodcOdOoMCQAj3tLtmhXlSNHbBJvn/bMRgCTiL+7CxsqvpJCh\nib1L\r\n=0WTU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"ae81d5546aa73e5328f9b08a4166d7e50d8f4f3e","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.23.2+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.23.2","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.0.0","apollo-server-core":"^2.21.0-alpha.2","apollo-server-types":"^0.6.3","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.21.0-alpha.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.21.0-alpha.2_1613080101391_0.41160570369930594","host":"s3://npm-registry-packages"}},"2.21.0":{"name":"apollo-server-cloud-functions","version":"2.21.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.21.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"bcfcc0b81c2c6aec963b729bc7b401fba8c9465b","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.21.0.tgz","fileCount":20,"integrity":"sha512-a2x4D+ZenS/ylUpsAE5Yx6s0lkwrU32Mb4YNmNa0IgOOSYVZHIKUu16KixJkfkkqpdxbaJDBIzwGNgVZauiKRA==","signatures":[{"sig":"MEYCIQCi4EbPxf9R4ciy2Zu5bPB8rm1Ioipm2V4FpraPswQiDwIhAMqj2h5q2RTlafOKwN6tdN36jWA8YFlJYNsEcbeKxo2i","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33392,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJeCCCRA9TVsSAnZWagAAMDEP/3eONxRWP1Dm3pVMfR0T\nyJB4qK/z4AnhJAhFeaS/fKl8Kk6NDgjalam0jJZush6/cPM2QgJa4F6KRZ7r\nvMuOgLjdOVFLA7ZFWI+K3b8a6w0vH3jwLW+rWNOqQEXrCk+KiU4lnQOzxbWj\n4aV45Pss9am8RK96PC2YsmIgIiuv+ohp5AGGixyTcoKLV87/nEhwiAHOJJtm\nEnTRU05WOZ7dF430XdcTOYo/IUML4E2uYwOf7tbvSOwNRm8JfUHtACw4XHyE\n+PskDWIyDyW4HofUdeA04tZ11v9SUrPJ6PNWs//OI09nGDuw6US2ADDgfDO4\nAmHRgNk4Y5ozFaX1GbouLkyGjI3zo/Tad4kR9WBc4vbmG3TcsPDwrmRZTEk0\nSyp+DM2BNFj2yu/fuSxMvpkgH0rIJCF4D5sR75umwg9e29oNlo6FHrCmtt3i\n2sNy0uumhnFgjrSV05YD//DEBJzdO/3Nm6pv8EC5O2Qx+WC6g33tV9CMmxSX\nh5iUucvILaXSn1KtT8NfLl0iBIiLsP9qtPJPZQ3R8zI6CLUW6MGyXqtRpjJd\nlt372CAfB4j8b+n1gBIKxdKVviniXQw/tnffmnimTFaso7hCdL1JU7P85jnj\n8ZCSVd2RKn/d0zqexv+Gsjkr7EP7KLhpoV7RskoPVhMYTDKqdjzFMtroTpXt\nzdT4\r\n=sOu/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"456487f425d3504c1b1425cbb7c954c664b0631e","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.23.2+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.23.2","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.0.0","apollo-server-core":"^2.21.0","apollo-server-types":"^0.6.3","@apollographql/graphql-playground-html":"1.6.26"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.21.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.21.0_1613095042124_0.11045593170150747","host":"s3://npm-registry-packages"}},"2.21.1-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.21.1-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.21.1-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"0b13c02c694ac987e0e29d85f2505e0333d9b075","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.21.1-alpha.0.tgz","fileCount":20,"integrity":"sha512-aWqcPyAjZaylcSlcoNw/3KLyy8sqKwsmV8dlaHCPTURfdHVjg+oyaW+EKqnvg1GknFSsaGQkYJskyW/LRVV8Ww==","signatures":[{"sig":"MEUCIQCmqFSEITggv+02T9RQ8iA2qmIKmc0P4xXtA8R7TljCjwIgYSKA3V1f/U596JhZRppIkjZbEFjuVihlqOhKT7ZnFOo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQs29CRA9TVsSAnZWagAAr2cQAJFdc3LLO1uzRcGkJbKX\nt1269GfSIuwW5FmuyAMZ/GVsQL7PerZV3uMgOlZ7RAEnp0jOiC3c6Rij+tlb\nDbVCx1lyCGGMXAa+7vo4bYDrKIAfE2dicFeZe4YtRQvRExoFVZn/qcfZ/c2G\ncaBeQrcq7L+/t4Ss8vyO2ezFKeFaTmxU61QVjUKjHou+8WAX4RqwgRXjUhWx\nK9tqHH+QbqKbXsILElAnDyCYeyCO5ylzuFPihwRuDg6hJXhjrbNU4iXRVVWi\nwvQroem6HrtWZpvRYI9CXBe5CiTMNBQpUUknaEVq8FHj2Nws9HsuPGYeJ74b\nM7LOXrE6osv2ufq/foZ+0QEtgtc9JIDJLt2Kyr5ya94wyo9RbmtalI803oXn\nNHzGrLTe6BcydRqQkRhLm07DTRZoDu5fLn4kwjLNC5F39xa9gVAb4NvlWo9Y\nzfkzDhEyghSTE1WQCQiDFnyECwZU8gEA9p9vy+KOuTIDQ6mNg2xaNbdCeuGS\nhpRAORFvTFVRbcDB7hfw9i931+BEjtq+I2VS6mbpKtSCFXOKCXuttc1tsO57\nKOnmUC0PQ08j0f6i/EeN5zC6sBHh9O1C7JW56JnXMW39skiDMCRAVg8AkpGR\nbhvXLAUHNtdhmakkQOC6Ls64z2VPnqSU1wGp2SwLdTG8HdJ3K8sWw0sr5hrz\nP1fi\r\n=6SCs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"2397291e292dc92b378ac6628ff8d291c2006a68","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.24.0","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.0.0","apollo-server-core":"^2.21.1-alpha.0","apollo-server-types":"^0.6.3","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.21.1-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.21.1-alpha.0_1614990781384_0.9136798827903092","host":"s3://npm-registry-packages"}},"2.21.1":{"name":"apollo-server-cloud-functions","version":"2.21.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.21.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"fdb0a9924989272017e39b95759b092734510ad9","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.21.1.tgz","fileCount":20,"integrity":"sha512-uq6M6cA59xAod51VMJiklQcMMc/m0fSz5WKsIZSFsZ5S0hApbCfN6OoRK20VXBUqnMdRgRKxLAn3bNx31iX/bA==","signatures":[{"sig":"MEYCIQDlAUR3Je4sYj87M4cKHXpuKkrEp+RgOoXVCDj55JTA3AIhALsV8467Hsfa5/VJizVF9/Viw63yg6Xau1A3T3qmodXb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33392,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRmx7CRA9TVsSAnZWagAA/xgQAIRxRINck7yjQj3Y2ma+\nlcIyLO34M2a5FDjY4vr0sCvm8u/E03baROwuEbiAAmXPyeZ7ocF1H9C4S5oU\n/0/X3hzTfL/ANoG6eRve5I0lsSYlFn4wMIrELDgRgNth/95k4dcyTwtdsFv3\nKipXSXWD1Ggd8ML/6rAoEvYHzXu/L9o+VZO6sQzatQVMl83GbY+pUYiY+L/d\nqCLkJ6vRTSv/v2Kh05rQO13QpnQpbghFNklLBbrCWmUorrBYr8q3j9IUJvCF\njg0tUUZ4otjXlsmfI84y52XeZLuknpblGRVkECwBdB5bkFYNgLvlcIe90qML\nVW17GyNPUC8RGKYqNwjDYKzE453Gy2iFl0hfVkZjYKVKfmSkQhNJy4asTU6a\nYNLjGfmNANct0YVLN+9WWA1LA8PLKq1xfP7i9xsk2pfPT6yRH/VMjr5P3/gF\nj+fCKbILUD8hLPmRCafdc6ZzZlHzH2WETduW5xFaxpqS+aZzY5+Y8swgSJQY\nZZRmrhpBwMJLg9jmL7wWGdawGvg2hmFAhmjYNRakVU264RK0p6vOep2ss16f\ndRQpkQRQ78arJcR5kj8csfLrkXBi442QSot5pqAOOaLu74J2uFk7jY2x2JvD\nzGfnn835rioDCdZRulXKJWZhvLNpFcOhuqMUJZ/dG7VJ+jvmWCIKwT2iAaYb\ntjrk\r\n=WmJN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"9941c8f027cc8fce6a15f8678629fdc5dab4c2d0","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.24.0","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.0.0","apollo-server-core":"^2.21.1","apollo-server-types":"^0.6.3","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.21.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.21.1_1615228027028_0.3714984222261464","host":"s3://npm-registry-packages"}},"2.21.2-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.21.2-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.21.2-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"f663a7925b51d5dbdec2220865d4a6bdbf284931","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.21.2-alpha.0.tgz","fileCount":20,"integrity":"sha512-bUzCocslHNfSjmT0yGwTYSdVmUV7OB/XbhUcquGIj8P7G6hFn+ZWp+cgVaj3omhmF53d50yVF2dWS7K8irN2aQ==","signatures":[{"sig":"MEQCIHBTzAKUdO34RsDyNfEm+GWJOeN8O+QVDl3pUW4VdSUHAiBBEEerg4LPJAFk/sm+bQUPUvDt1qYKF5A/EKcLWjW4Tg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUSShCRA9TVsSAnZWagAAJ4wP/3ZGZwQ0wuK9WaaSB6uy\nQrM35yLi0vo8NEC7MO9/K4ARrhAy9Y0wq2dU8vxUP7IaHJ40s6SbMOlemF2i\nmTmlgAuUo7Uhi2aN4zv0yczt+OWSilsNC+KGr8Mrpwynezix/HDiBRz8i9B5\ne8wDIMRk4spSSuAawngS9kKf/VPa9UIdq8++mwK6TQLAr25TYZ4tCBGYoLOK\nWp7JmdgAWn+MW0vUeIHfv4X/ZFwq27t4RTsncZa8es6gbz7JJq5tQxa9g7yS\nBtJJDhRNMh0iS3dDtdNK4l2PQzNpZFY6FcFxAtuA75+0dqVhiE8CNgeZmroD\nntUgusvocR6/I+o8X4q9y+4YGjAhzWjckFsvNvn7ZLYRR4URew4EWufwASyz\nOc9mfvNGDCEb8kO6bap8+S3uV4LSUHnxd2HYFYfTnHTIHfJ4FeYWkmBa+jVG\nHyc/Tt8gkk9vEvWcSNNyNvKSf5AZng0kpviD2uRxZv1LzUdnwaWeaJIvdyEy\nZow/xz6yEZU3tiP0iZ2J97VO7Vwrhx3XWdni4JfO9h4v6oBEWRwTeiQQjRmG\n92Z0B6CTqa2yUbFX6oEiX2E2EguVz/PQGdEoGiND9XoYtAEk2+Q/BNmHN3iV\nz7IsbPxb0JgqaA4vA8nxHrszKQYTkQhsOUQ2I69z7AQh8NU0dbmnU+3nFFop\n+7W5\r\n=VvEf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"2f717937413c56aa66470e76c9c8c423a95b67bc","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.24.0","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.0.0","apollo-server-core":"^2.21.2-alpha.0","apollo-server-types":"^0.6.3","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.21.2-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.21.2-alpha.0_1615930529273_0.6299985465956079","host":"s3://npm-registry-packages"}},"2.21.2":{"name":"apollo-server-cloud-functions","version":"2.21.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.21.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"607f6ee07b0c8db7db3b744492cfc58f938e2706","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.21.2.tgz","fileCount":20,"integrity":"sha512-Z/4/j/UQNzhlW4SiZUABf3og6mdszyIPQqh7mV8/5HWl6kXXsSxDP1w9OJDGvyIeZoUNaQkymkdkGHiMAeYnFA==","signatures":[{"sig":"MEYCIQCEZQPIP5KH2y+YY9kIMeWM9TTFU6JL+CccApLn2c9w7AIhAJ6UdQUU3EWZ1gw7p/vTxLpsBdzma7mLHABhMfkkihOL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33392,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgU69xCRA9TVsSAnZWagAAz8kP/3pdiO6x58cvKbkArYfi\nhDNvKeQzuwprCuBQ36vc/KeRsKka/ZzsgexRss4090xXF+IkPqS7aNcsSPyJ\nOPluUQ4X7Zh5Hvj8kREu7saCMplUni+Bf+dXpF/Nho6agton9yMps0a2S6BD\nSqT10mL6dS+zrlKAVe7XZzRRI9dLzvZCVU8pStRk+F8bnaYreIB38Ih+cHlf\nJn7XCdHTMZS6DCoW7ymHkJdC7X42MmS+RCmCgHMIqdJAv7UEUs9Gxzm6ogR/\nIClWu1DtVTd9tG9eS+GK7Y+rH8DdlPxYjejaqJaZ5oO5dK/Q3jnVLwm+qjZG\nqKAh6t5UwSa3g3ZIUFN+zSFRf4q6LyWX9yxvXkn8M3GGltiI1Il3TCs2Aku8\n9lj5JU6JKbRy8qrql0qCbSyYs5XOf1jUu7tG0bHk99r0usj4caHqHC9Z5LBQ\n+FEzdltBj8jObBFDDP9iqeOAKQoqxXz0PJYI3Nad4rEFY4hh15NJ007Ehy5Y\nxqzO2bE0yb+2cTFzuSYKaUMyXPrnMPu43CBZjfxc2sqIofumEmCEAWnevOJj\nrRGNaoHtPdVmBsFH7HGkG2656Vx9OTVUbhZc7GXoXS+OvjbJOy89eFIONxUT\nkaOFcV+mLQ8YpbdfZ7+chSF4TFDtDVWbQ16T+8HVCDSV6RqgcH6tFpeLECZ+\n9UiE\r\n=GgtE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"7d3593d2c27be2a74cba4adfb57894856d8fac81","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.24.0","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.0.0","apollo-server-core":"^2.21.2","apollo-server-types":"^0.6.3","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.21.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.21.2_1616097136538_0.7024290101525896","host":"s3://npm-registry-packages"}},"2.22.0-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.22.0-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.22.0-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"7c82e9711440690d79f02a176a9e71157b8625e0","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.22.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-OvslPCRk68zCrIkPiL8V7FzJ/cQ7bQSuLpU4ktgMWDX3MvOjQAPSYL2BkR4BCsRMa7bTAffc62FXak7INeGbeA==","signatures":[{"sig":"MEYCIQCvvjJy4loQzsey9Kd9GhV5Pbv7lJ/nK6YX4/RrM+Zg1gIhAIv7VjJveQVcTHdSskZMZR7LjCN/cE67rQICJqCOvtq0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32433,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWRMwCRA9TVsSAnZWagAAceoP/2ek6QUkoJVtXpo15Euj\nZRqKhqZNuRLHQDLUlBiroDUYYLXY+byCn+kLswPYmVMYTVb/+Dx0BnKqduY/\nWtUD2SstewAJq/4pr2rkuJG7nb3Cg0znBXqj1zcWmcnfs2U1ycTCi0GX0gI8\nI8vQRIffMINc3BOE1qeKSPV3dv+mpk2UesAugJmEgqowPkrGWTEmkayXZyga\nFbE9uJs6i5BcJwviHobNPMQ+e//IhPM2JKZ71bI/QW3BjKr+Ux9+G4JTkza6\nwnQCcNjK7N90dTRZ+co/rUo2qBjsfKxqUxGIVcd8gvzx7v7oPKB6fkzVyYPy\nYRtINSWSUToOaeaWvr/QDkge47cDEHwcYE25dpdJXyzJ010ONG33Jx3F5d3e\nx+KeZu/EqJ4sup60bAMEJG/6dNrNqNdwgC/QpuoHfHVm93Bp4XsE0Cr0m8ta\nntJ3yJ0dEcUJX6d7GocJmewQCZGB4YyZxbvYl9QI7Ogn6FwOEv1fmLkrmSgH\n+Zk/EqVrOonak5Jblb26Dscb4NyE3ZRrrunXoF2Jc8ronsmg5wL+iarmD9Pt\nldCjcTPxuWKq+aD7ZALMj2lsssoInR7zXJC1kFyaTPCdeRdQvUmIlHYWvu0o\nG3Zn4Ez1fzCKS69AaVpngUi5XhH26QIBv36bllrQyCezgX9saKh1FQ+fXMOI\nwRnh\r\n=T2qr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"1682a2566c135381b67310922ab7fba44c4f0644","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.24.0","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.0.0","apollo-server-core":"^2.22.0-alpha.0","apollo-server-types":"^0.7.0-alpha.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.22.0-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.22.0-alpha.0_1616450352303_0.5494505781132482","host":"s3://npm-registry-packages"}},"2.22.0":{"name":"apollo-server-cloud-functions","version":"2.22.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.22.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"3209ee41cdf550aac53ff889328fc0fd825fcc4f","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.22.0.tgz","fileCount":20,"integrity":"sha512-WRf4jw8DjVjwAn/gR9MTcKgD3RTDDR2rKZfaG5wmbQowihUiM+JvbG0Gv1PApTdzGn1CjFWs5OWCC4MXsfpfPg==","signatures":[{"sig":"MEQCIA1VlE0CqRjsGQbOtoi29fZWqwu7jfXdGEnbwCVDHzddAiBLdOsfg9bgRINGS7lf47deD1IToHnwwOXOSj2BGbUPLA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXSqqCRA9TVsSAnZWagAAPdMP/3w2mcsuUB+CK3eZgM+F\nVp+spQdYJXLNIiptorSUYOZRFK75g72rbk5f+hzAan576//IzBo4LdBi49G3\nmtpjOxSPzryVCqX4hopFuu1M2oitiBeniBrpytTqVqlApfhwsWELmmIBiCFI\n4CD4vJDUvpxTpRJd4ZPnOiPRxU+76kNcA5dCHfr1PsfB7armD98XsV1g9EWX\nco01f4DnB1QREvaUn4nVsstF02o+oykeIjq+6yyWgx6wN0LjHlqci01buwfk\nFJTPMMFxMB1qCx+ZQYjXwqmhq0UDoL0jAe5wd6mH013l0iBvXiY8QrMudEOI\nTiBiDpJBps0HOAPcPSi9+q2ZWvpQGhfeMvKcaLkrwOEjVuVdFa9M825jP5Pa\n4cWsN8mZKKT5gFFYmkIOhJYBNmaIfuA7R5xP84YcrMuQMotvqAyMs8yw3N8f\nM9M4VHrjJl1PIkmxFzjn4BHkbg0X7rjqsRkfyRgMD5YiBN2NqEyZs1qr/Ewj\nY6pyAploba4QlOiNAHhVUqzcH51ZOgj3XU02u+H5B6F6RkHofay1MWuepeyS\nfigqvVfWatk3EP6Xz5HMLzGx5+pDQSX+r/sCxH4YqR4jQubI+nNVQyn8EL+J\n/fufHQNdyEX1QWCn1ACmDpv18QSWRjy+Nqb75Djir8g1EUWdrUPWMG35ZLPS\nunFX\r\n=efsX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"93499e703a375ff0fbd128138e46b574074b44e6","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.24.0","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.0.0","apollo-server-core":"^2.22.0","apollo-server-types":"^0.7.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.22.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.22.0_1616718505937_0.4479652062495636","host":"s3://npm-registry-packages"}},"2.22.1":{"name":"apollo-server-cloud-functions","version":"2.22.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.22.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"1275e3473cadf11cbd5085f832766c28ae2f07d2","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.22.1.tgz","fileCount":20,"integrity":"sha512-3+gpWOHXxf54bys2Lp57WpsGOG9hnVlvtgefcOA0R6DIk4NBvEj3unyE9qStDokW8WcDY6hejFgj0Y5RC8oCbw==","signatures":[{"sig":"MEUCIHeZ6aclFhhn80/HLfRATXzBRRuT2DqcrWk2FYqVuw9AAiEA7JTKxMNyag5MKyAxaJ7UUEbSo42EFdmSo31b0zMq+ug=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXWqKCRA9TVsSAnZWagAAgE4P/2RSswJzv3QSCHAx/EX+\nx5L0yQwjvHd1Xvqa0BSC6yK3ACroKWyWC4hyyQeGHeKnPCSpB06AGDA41RIC\nsrwigAdKuvATK8RBE7DmtUCeQmq1pYKaZOa8wgR3DVcN7DHtpLbDasZQVuB2\n4dkR7/MnKvNkmom/HUVo8bqIP+IfAPMkdoY95DqeCj8wNCw8MpPJ8xhVMgYJ\nu1ASQjiIv1446zV4o3AhruvQLzPwMUVTqliuqtlE6lbLNZLKyueJyjRBZ0Bd\nWmCpSRPrUpFlgAeJwcfMTN02HeOfB72oiszOoz6/S9ThqwyEEx1db+6Xk5FZ\njGmGcrEgEmR3ifwl9XB682ChLQ3bsdzHhODlivjB7ve4idouyStB1ynUnN+V\n8dKqLImHMB4/P1VHinmOcciI3pTVjyPXa5bRoZ5U3eYrUTH/aTLXCIYcOfwa\nSwmKynsGQsGAUtkDP2lSuiOI8Kx5yXbmhGf34epP7W/xUV0pJEz++WJ3QlwM\nk4uJepABT2HN5JqIqXHBAwoEPnLAP8crCWSrfrioNqvO4Y/hQdc9/SKSyvN4\nXcsxvomUdJb+tk0uruF0DdQ9Qyo9sUbD8mbFeGbtGFvlelN7YMjZ+vcFkHwu\n2xxiHSQ14tfGad0E9vFPyRyPvvN8b7NVyXZ5AtqXA/WRAdUF3MUcfxzCsgPy\nT6iC\r\n=c0LH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"6ad8f8f8ce743553d99097f77aeb7fdd4a536e7c","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.24.0","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.0.0","apollo-server-core":"^2.22.1","apollo-server-types":"^0.7.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.22.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.22.1_1616734857500_0.573021198213499","host":"s3://npm-registry-packages"}},"2.22.2-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.22.2-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.22.2-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"b79c41b5fc51b21ad2797060e0f4d23d7bab9c13","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.22.2-alpha.0.tgz","fileCount":20,"integrity":"sha512-2mt2Nogf19PGtaorJRdnoO+LJQllITVp/YCLJRzD3yhhJipZjwv0E6p8APNxYJJyrVZzK6bEa05THvpQSDeMeA==","signatures":[{"sig":"MEUCIQC6JcKt/U9ggtTnM8clTERMG5IkQJ2KPQc8vra8ai9cYgIgbTgd82Ms5tsU6OZwcqXwRWCvVClm6hYwX7ktoucoU20=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYinKCRA9TVsSAnZWagAABQoP/0T56aJ+Na+AlnK6NP2Q\nQfEwIwGxoG6V9IeN5XqeuBCCza5TBzt0haUxrX4LIj+ttXVvzuuOMXYXtlMx\nx3RJNGv7gNrAERLv+GaRFxPMwiJJ8TvlKsPMKZuE/3MKg2E29GuxbRf/jS2O\ntf81OeGLBBJRyQ5SSEm/BwFhUMH0ZzahzjIwr58XWTl5wbWlrTiqS1BBgquT\nPGP6fo/oH3rRJ27tzs0HOWkxVUd45hPyU4a1QXGbLC8Hxo+mPMTmSd1cfzYY\nt/kKX60XMa8MaRT6Ex8M11X7w/L6RSKECd13UBdnBkie8eeuAialOs93VPvu\ns7PsEPy+tS3o0f4wz8JY3mG6eo9LpsKovejZYvG1BYksufEoFUT5csVe3xcT\nnwYrdbNLPruZ3ZpYX1E4yUDV6eCTmD2Z/sNJDtOIhB+yizKpwJyQL+RoZGDS\nse4u3Rsm+IR/jOvJX/ezSdEHdHvoe99M2SXIsQq/T7xgbpmAOgqTOJw6Dvox\nQaq6tE8HnR5DlbgAXrt8uqPWs4KAfyU13A5gL3/10sUloonRByxTIfM8Fy6r\n/GHrJF45wQ/FNzjeECYWzKrC67KDExsXLojJr5QDnTD28b3fkKWT/BRxRSkc\n49o34BS8dpasNq+HiJI8NUKLluufZPJP81OmInLewXnUUMwgkh10DOP6XIpG\nhygT\r\n=KWMd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"f4f14d3d6f7a278a21c334b39644199d2c919202","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.24.0","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.0.0","apollo-server-core":"^2.22.2-alpha.0","apollo-server-types":"^0.7.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.22.2-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.22.2-alpha.0_1617045962419_0.13390193759742774","host":"s3://npm-registry-packages"}},"2.22.2":{"name":"apollo-server-cloud-functions","version":"2.22.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.22.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"609c74907c188a109c95496d23ee2bc487bb0824","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.22.2.tgz","fileCount":20,"integrity":"sha512-2EpWfqeZkhmbOnDIYpJ4LepQJk6EyhxY9CeXqBbcKWZG1iE6mH8Zo2J7bJqwMx7py7BgFdpYCLhH03LDuvddKQ==","signatures":[{"sig":"MEUCIE6+m0+B+lwh1g0mgwxjCwFimKxyZnI4udVLyiUp+BG8AiEAqec1YeeeEOpMn6AcIonp2ty7MOaDPCOvSkLXgJI2tnM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYixiCRA9TVsSAnZWagAAVZwP+weVppg4jnqvNE0SD1PB\nppBgitCsDn8VF+WsCYuNltoO1H+jL8rs/kXr2QpobyGzBki5T4MXGG1klitT\n/FukQ7kdUbkwRG1MzHJHt7lR+TCNeXU4uCgRKVncL8rB9cMB2nzyLSgIvusQ\nfDMQG7KXDHca4HDmtDrkc8iM71vm3PSigVx47z7D+Q10Mlml1fiV5uIhoDRK\nA9Up+gDW75cPpAKLBBhGr60+d3mr0LDDO9lY6BekBnwc9SB9DBQ+wYTclG3z\nTz78Ovt2BRutHeUEGosT1xN6DHGVHfArw6Oaz3aZ/CxSikbig+HGRKNdhBBg\nLs0yojy/3/bThICwg3pPVIRChc5BHaqa8MZeYgKDGhWALGiieI/O5ufZFetr\nke4NknLv/fs59DBLdmj/Mr77KGwFglSSm5tKb7Mh/WG6c3FiWnvRNB2VHuZu\nPGMJ4E9Cc22mfa2zAzHRO1yTy9l1+HIieVpWEww9Kzk/1gBKpRB+649OdwzI\nedcJUwIIuUf9FtKQreijhz4MggisWWqztFAa6TPU3vLgvz8fX63iavFwTY5o\njBRJfjpcdEaWAZqq8ZTYO4fNjJb1m2pNg4I3RjyRwtOJCxH+vcwFh7bepIqV\n3l17SjxmOD8PBUiyJBw3+HbVZn651lKMITOsNXP2gFPwB9W3tzz7s/u5dyTf\nPKlb\r\n=C6Bq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"9562af498407e86923d96902683bb5285b849800","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.24.0","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.0.0","apollo-server-core":"^2.22.2","apollo-server-types":"^0.7.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.22.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.22.2_1617046626278_0.9732087437435737","host":"s3://npm-registry-packages"}},"2.23.0-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.23.0-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.23.0-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"443f8749efa09dc9be2a3441ce026f7fd9b278ee","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.23.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-LNEynEfFKP1/V6bnBsTo9jq5906LZSvIJpfSIWqzb8D3ZfheN4gIjh9SEcP8aBiSOjkErKyM86aD0IsAFJmeuA==","signatures":[{"sig":"MEYCIQCQ8DU0yZy2d7qXVFGQsSmRzyj9XKWenmakNno6DT6KfgIhAN9alFngV56x1r0v44xDxFzfdmN0KrVV1ovN+mSmgAP8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgb5suCRA9TVsSAnZWagAAwRQP+gLEXUlK/jh+lwAk/9d3\nZK+/GjkFmt/huMOAl4Jk7ig+yRCbz4MOfgtZXOgmAD+uaLvwPvdk3BjaopEn\neBrc4yqubi1pSwg3UwMPOFfGguCxQAQYXFP7efsBr9zNWOBiMOwtJs2JvokY\nJVo2CWevFkrSmvggm/7hNInTwvZClOMv55nzYOitZzq4zD4SsSU0WWZ1K+sh\nx3j2R4/BtibgNWs+fvlbTequLLwqQpN7/qQEb107vK+cCrzaOoX3PXSKji/C\n/+3lw8PkysKgjDf+DU8ON4Yo/8DeYhHBhIwgtg20nhEt15rj+Z89qlRL93B1\nHo8hzSQTqufV4WnCmQVjmkn/HZvfIVAjLQ9kl6W2+Qq3fjgYsBQJFlHG+hy+\n7YEh7l5Sct7Pdmg/F5Ffp0IHVoT2XBTCkNdj+CzDoYIYtuZVDhxh/Y8LjxsI\ncwEbag8SDzmxEwuDQ5VqffLUjDPypfwTOM/cleneFMjInxdRzlurrXfrgb8/\naI6lSJOKH6i+ZFSXeOHwDNzOhypBTvZAE1os7jGlO71hIot9/UYdaO82+oxv\nNl5+NqRwFLhxXJobZwQvCAFxTvg1EHZeCFYF4ddnU3vCOpPux3kMIFOq7UDU\nD0uhqcTs/EWDKSbO0Kxf7+S0bEWETnD3MqB9Ftfgyn73LL6S2jlpzrOV68N6\nHydt\r\n=fjG9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"9d1cbd17e61bb0146a0c0ef2b207eb100bfc70a6","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"10.24.1","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.0.0","apollo-server-core":"^2.23.0-alpha.0","apollo-server-types":"^0.7.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.23.0-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.23.0-alpha.0_1617926958388_0.3910722113659937","host":"s3://npm-registry-packages"}},"2.23.0-alpha.1":{"name":"apollo-server-cloud-functions","version":"2.23.0-alpha.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.23.0-alpha.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"1e98cfef88e8a6aa117351e33d4e1eb231057566","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.23.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-/oojlHRBzrcNgH5/0HaPM7/nkYM6olHagiwFZc5V4dlvG9XQi4mKL9bx/IxiPFtD9qxoDOJk6G4uoQRL1j1bEA==","signatures":[{"sig":"MEUCIQCRMQpl1xgmn67Ovai36MNShMhOex/Myg3RpTqIBRC25AIgRkxWnCNobUk/fFu+PyVh3gU2OvNAxsxg6RQp84xIKqw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcLPyCRA9TVsSAnZWagAAjaAP/RhA0cCQOkYG19FmP8qL\nLhxcTLI/XDnSDGewM5gRSqqd0hNxpmJBD2gFjSGIC1lyFvgg9DX30rNlzSuT\nqIg4iMqI/TImmyPmfSiKUezQvZuEx9fl+TKl8FbiONoS0B4lV9WNIF44mhor\n0p4JmCbwT/uGGrYWWXvQ2GzRaaNPpW3Yx3uTqODBXAyG7Bgik5ZR7vATZ4ZU\npgQjrg0XeOG84/nuaN1S+C5GGBVf/E8do21gN32LjWgqu6XQMKjYUpRY7qLd\nhLKELAhsX26qkYWpCjtmmrG7cxEFjh9M08OZWENGLvHr1ytOSTWzWzno6sRd\nSs6cB0JQyAybB8sJLk1ZsfyMwEGdgouW4wRzOVnO+QZYlYnEbrFC0m+sWzLM\nGGm3Xp5geAORLCQEf4r0oUECN48Q6BC2/WGyM8hOE1Bi/EgxH60vmL+LSNon\n5qPr4j67l80CZJqqNnHgTzcACbyNXyHHat25rVg2n8mq26DAcC18vCfDuG3n\nmY7/kzWTlnWfBHBz5saEnTYC29xyzFWJId7uBnF3TQGfKI4jyO8QGlRLE8q+\nUIcb+2fP2ueMEyw3wlPZfY/p8+bgAuPvEgm14Oly03Orsv1UHOq2q53xJaS2\nDMaJV16SR5rRAtuEF1q1LSoEGfdYpPwpsK7h/GigyApaZpGOfH9lvZVXbERR\nztIb\r\n=exmW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"3a369c3b43ab389492ed107331fad4f947d5217a","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.0.0","apollo-server-core":"^2.23.0-alpha.1","apollo-server-types":"^0.7.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.23.0-alpha.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.23.0-alpha.1_1617998830867_0.6088139453027721","host":"s3://npm-registry-packages"}},"2.23.0":{"name":"apollo-server-cloud-functions","version":"2.23.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.23.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"3daf0b8a812cc7bbe63627988ac75fb4b716c059","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.23.0.tgz","fileCount":20,"integrity":"sha512-UwwfijI5RiFcv4GJyCKmhEeFBpl5xoSJ8whKeDj0wmNzugBQRtnulDc+NhK7UqAkBVKeBZa7NMwjIkxLRwxN7g==","signatures":[{"sig":"MEUCIQDotYG0E4YPsDGlWkvRhQG/Iuzhgaamh6JsZnI5zFV50QIgCBSB6JGSdNvGGC1ebJt5zRHM0v7KgSGofHROyHJz5YM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd3lzCRA9TVsSAnZWagAA4ysP/0UEzCwfP2q7YA1Xo9DO\nYVXYyKd8MLImt7KvZL2ydbvrH3eSJu1KcM/1ZkDOMhqo1vxyfjNeRaF5U4AI\nuuLYlwQp1B1oh1S2VxZ701fAnNSxg6rqiPxt1FLrIEUdOAEdET6ZH3VgS8c9\n/NQP9lHYwiy0cEuQcol2/KbhrscHwKh6SW/2p8a2Vk3p2JabBbZcHvUREiUQ\nM89R5yQjnkEZlBha14Q2HWJHE93x7ya5dgIsfuWV2TJDzjHPpC2z+bXZbmws\ngiSo7tyxq2bJyxY3fk/OLA2vdP//CSM8WZJHeohQvPK4lWmkrx3uuN97EGT0\nOufBqm8UiLb6Ra7G9NLNzMNpYTG2uXnWs3/PsqWuOZdxE/6nRUkLYzlWV3L8\nWHqDJCqXq4+AQAV36+CNTla/V7Oc1swPQweQjg+Wm6Ujr8E//VmAmztGPUEx\nmmM/iftneRjsCNo/gw107e69TP9+HqmzFtognrNdkpJ5Mh0TAOGAj1EvdXrX\nsW957sKtDOKEoOOrUg/dWL8bqf30Nr+H/D9nR1D+Cvgy9J40cWQbOOBKJZmY\ng7Qiu96tFY+FWiUMioFEoGyo4AWQGWcIg0LgxMnNEWVQkfFv8B0GtN7V3z92\nUlWCAeIjfEx34tX9A2iinEvhMHvBG2lBgbcz+fb/3ojN0zXlV2hD1eoyKbwv\nP2Hi\r\n=4cHC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"8a4cc583b692a30670d1893c01851259dbd70ce1","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.0.0","apollo-server-core":"^2.23.0","apollo-server-types":"^0.7.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.23.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.23.0_1618442610772_0.2197691657759493","host":"s3://npm-registry-packages"}},"2.23.1-unified.0":{"name":"apollo-server-cloud-functions","version":"2.23.1-unified.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.23.1-unified.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"aa292df253406e8c7c9bdaa4bebfa5377d64d353","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.23.1-unified.0.tgz","fileCount":20,"integrity":"sha512-TgZhYpIufKYPMfahVciQ8YqJunWeJgBHbDja9yX3GU3qQTUWNDH114QOSSMKweZOSGQ7HFgpniwoBoUk9tfPBg==","signatures":[{"sig":"MEQCIGfhv7yWyRC6liGgqBgTlWLG8AkxM8pMCN+u/u1o5AY3AiAhfIfEBsBi8jv/hEh+B8BiJ6anhaF4PFJRqex5pN2vrQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32451,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggfcuCRA9TVsSAnZWagAACyIP+wS80pe6vkZ+JUnhIzFK\nuXo2oLaN1q58qr3dziBeqhBLlUN+jWw4H6isE2qt0TQlK29LfPQsORHS+3u5\nFUmMdROsJ2z0Cakfca5NnCO0pyjH6ivCW8ifJxwHGR0dWWjLeWnuTGuKEhLW\n13BkOoZaT6bypUwvZwKdZvW+6eC19aP1zCLugCT3s3J/iixe8qqXB9nLNN6/\ngK71NtYR4+YCxRT1gndfghFOIo9KbNQP1P1Wst0y+8UBKQ2QGWBiyP6Orhcd\nPZQaniEgO6bvjfz4co5L/kP7qgloxtCTSXTLO9qZ0aBchwegCmqBvt+adKzD\nZd5QruhcnPqdeoG2bnexJ5YC6HAuz3oYStMcxDatGp6yWRVP+i9fuQYT4mqp\nvrglPloyMfZBbqe4aQ0PNOncb+/OQy8Pg9CsZEA3qVz+Iu3GkevgD/V8VP9t\nYywtXEG677ygKX3QfkG4T0+mhPnCiWH3HyJ6RmT7MBJ0DYoOreneZkEFdgzd\nLfZjeDGTkXqDtljCcklottMciUc+Vlk9/uTZntFqnsCYv7AKvuH4I2lPFnvR\nhNT71dbPYp6vcspepp1PHZgZ3lpNPp4szUx4/GZpdn6JK1C7ruTd7zJVFx3n\nYi4UDQza0cH+qSTigb5W8jcFD44puVuqHw68kyQ6OIaCIU6mYbw9kMm1KbbM\nc8aE\r\n=Jve1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"6972e2379e91b08ccc458a230c6a687099dbf108","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.0.1-unified.0","apollo-server-core":"^2.23.1-unified.0","apollo-server-types":"^0.7.1-unified.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.23.1-unified.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.23.1-unified.0_1619130157554_0.5595823039385188","host":"s3://npm-registry-packages"}},"2.23.1-unified.2":{"name":"apollo-server-cloud-functions","version":"2.23.1-unified.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.23.1-unified.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"a94695342caafe7374c4faaa535803e3557a4dd9","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.23.1-unified.2.tgz","fileCount":20,"integrity":"sha512-Ts/A4DZJQ5TnXrHsikjwQOJP+DI8SkzIni2bT26u2AnsNLavSRXuhqmb4nGpejzKogm7grivnbEWwABjBknK+A==","signatures":[{"sig":"MEYCIQCp9S6OlPtdLfpY/NAmVEnz083Ff2SbiWzqgaJnGDwicgIhAK0XOjABFpJTMNJ818UBqIbv2Pl4jEGvjs/5hBgOlJIs","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32451,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgggFLCRA9TVsSAnZWagAARWIP/3rcBT4WphMfWJo+Xqpg\nhnS55+mZC1UWBmA79CTQFK+/jPt/V7r227vsLX1YByMWVgdrUCJP2vgverSo\n2j93mdRw7lmaCYDxXSZzrQP6BHUQUtUmGTNnkHzvDytk6c5wm0AZb3D9GuQB\ndRDXBm/9slncQpmt1YwOq3ROugnHGdtaI3ozwFaZstzZj4GTChjQgAHi3rlB\nK7P2hS0blfi4J5FFnaAy/Qq2auy2rsL4HKMvLBwfhfhYML20ROs++VaOltu/\nnW2rpO5CdoTnM35PmBpm7UjyB9iCQpjQk1y9cJLQwgPMXFmpy0/qwmrHs70N\nJlTUUdPQ4n1Hzaw0O9j1Zofew5Kns7yKVgz/2svbBtd1B3lj8xT0EIH4oc0i\npv9CCe64agBahQL3F8mK/BdxcNwY4l9JNbLYuFV/hgXzbY1XSmwDXNAbfq/x\nRREArSgIB+44RZmVthpdJr7mfhOYiUx6Gflgjsv/4FbZn5Qu6u8PMbU2HHqq\nTwLUxTcNsDUa80NBGmcTVQ4bNrOhy+zV1SGWuCl61LqPgMbGAm7cN6y397rs\nWyGgj5wl4sxkscOaORmisoT4aTb0hbQWbYM6HIb8SEH0eefv3GlrYVZcCnIT\njMiJanp99EbF3Lu+rHCIlOWHjaJ4GnIsh/BB32Hk2mTqklE/6q3iaZQF6L9q\nj0oQ\r\n=Ti80\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"20ded004ddea79faea267addf88da76ad91f2dd8","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.0.1-unified.0","apollo-server-core":"^2.23.1-unified.2","apollo-server-types":"^0.7.1-unified.1","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.23.1-unified.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.23.1-unified.2_1619132747467_0.8671116794427609","host":"s3://npm-registry-packages"}},"2.23.1-unified2.0":{"name":"apollo-server-cloud-functions","version":"2.23.1-unified2.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.23.1-unified2.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"9c32d549f9eda71c6b353f2a541ea759db9b865b","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.23.1-unified2.0.tgz","fileCount":20,"integrity":"sha512-sMA8maAH2zfj2+hTsxEC1wL+WJPr+bKjKwvsIcn5SWQ9NUFBol71zRvOqlDE84T39/ImkrOdfQqJyof4ePM/hQ==","signatures":[{"sig":"MEUCIDdqysuTnyeet05xNiJZTMuABct7jBS+a8ZJC5EsrGr3AiEA1hofgFH7HUYZSDEJp7TECDVHDDd/xRYI3cnn4rxf2E8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32456,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgggNiCRA9TVsSAnZWagAAlUwQAJjfhDM3KspLZP963MYn\nyuOgnV7uK8bOUzW18Ro3tbAcaKNXloMLenzpWfhbK6z84jv9yZAQO4RDcnwL\n1jvXtKDCCAxfD/7AUznFaCJ8ZQRQapdOY8vNYiK6s0G3rYIt40AaPHRuCH/s\n+rVW0kKPxxQoLfza+os95VChJN8U1ICRB4xO9MRicgU1bVm/lrGALHpmZCAb\nYSjLiao02oHr2UVqRZ3CqF0mSvEH+9wc9AWi8G3qZ2ik0AUa+sMGJ9xg+1r5\n0kSSL5IATMwtco5ZpriPokgvi1aazNjn6rPEbDMeQ5X3EmXrAI7u27/WXo5O\nstxoOgi9csjgfJngVjo2ZkWJdVipNotCaeUQdxdWsA7ipn2kMCxddxyHH2ZA\nlWWOn2tALuL2E9N+tMbb4A5l50AvL0cpXMx+gUOKs48wXEydeo5bYSYGObqz\n6U8DA3Uyw5A27xODt4E994qA9UZc78nWJzfUv+V9jpLRFnY1cjSYCJJRfnei\nFxCHUKJGDQSVjopptnOnvKNLRaDM4H1r/pIq5IM0u2b63+LZ1dlKWY/ysruE\nsyVxnnuMOCFk49p/XdbmbnpyisMFFXCb5N7zQEgj8G3kRYluwVIJ9AbvIWyy\nNMpKgVwwej9i/7vxmM4y50SRKz1HS2uhEVLG0EsUEJvtDebPzrer+il34/Rx\nkBC+\r\n=h2It\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"9d2889bf59a781fc297672fe463ad4b88e0062af","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.0.1-unified2.0","apollo-server-core":"^2.23.1-unified2.0","apollo-server-types":"^0.7.1-unified2.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.23.1-unified2.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.23.1-unified2.0_1619133281847_0.2620093080974266","host":"s3://npm-registry-packages"}},"2.23.1-unified2.1":{"name":"apollo-server-cloud-functions","version":"2.23.1-unified2.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.23.1-unified2.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"2e6df6e3116f7221ed651763030cc35b928bdb28","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.23.1-unified2.1.tgz","fileCount":20,"integrity":"sha512-waWuk/u9RwaP4yeZW8I6kMuIo07INIkHtOz1+WUqaXfmFqKo3LETJHFrMQHwx5lt0/czkXESaZD2Ash1K+ax3w==","signatures":[{"sig":"MEQCIBAGplZKqYfMydffbCwcUOvlsH6r4klXnzleMAehJPQOAiB+ks6pd4wxCSTbLOZNlkKUHVb60k20k2FVoq0Jtgdf2A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32456,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggl8hCRA9TVsSAnZWagAAHugP/3fs1hfsn+jHpai+Q6We\njpOAC893R0qmIprGqms5Wxl+6uaYr8ESlh91L1h+5suhbCn9vT91OKQGE1OU\nPCgBb658i9bra7JZyYAeJs4DO+S0F4HN/PeznWgyZal8ym7jKTWIAOFrrrAC\nLa/YRX987l7Bi8KrfB1LwxHGw3e/sySavANXz2RGqQBfh6p5hn1Tj5yVs1SF\n/Vdk6AIV4xVw9MnvSCSAIxCOTOGFcsWtP66Eciic4Tj2cenRX42HzNm+Hi36\neS0F8PT45CRw65lp6+lAOXWMP9pATBRz4BS+tOEFpvjn7OVNQDW39T9IG/+n\nhDMrVzIgWbUA6pyMHfg+HlP/n7NHBawAzslBeZ4JYshUUKjoi3URvX9NBfA5\nF8o7E4IwzsyE8p9w7sXyIATN20VwTxMT830KxU8rt+RbqPCYh1c/CFNLR/GR\nVVpl7D9D97ZTEtbtZrjfkyyJY+JR70dkyjh1SamR3Hi6wn6Zh8jIUEwdN+5z\nP2lVTA22kWvpDJgV65AezJakR07/8Nd3qp7JRkUVdFHEwq6SkuPEKVkwa35r\non+TdYfmS6D8RRDoCBshaBiQMM+lAFX/5mzC0mVlkrRq9kEYG7m8081WTs0e\nlySqsV8FkeezA2esvLt1RCGBReRY9o0FIQlua2HyqjZTFusuCUAj3v10wipO\nj1sN\r\n=FKrW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"b17019065d5613198ccbd22f8fbc6e5e18863b3c","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.0.1-unified2.0","apollo-server-core":"^2.23.1-unified2.1","apollo-server-types":"^0.7.1-unified2.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.23.1-unified2.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.23.1-unified2.1_1619156768721_0.045057647527446676","host":"s3://npm-registry-packages"}},"2.23.1-unified2.2":{"name":"apollo-server-cloud-functions","version":"2.23.1-unified2.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.23.1-unified2.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"6830328ea46d2d0d875fac6119382e18e453a257","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.23.1-unified2.2.tgz","fileCount":20,"integrity":"sha512-vELTrFGNaR0YAd/iAs6kwhgj6u9J6QRC65vmZO65R7cxl5quOKtfAB87KzIufh4oBZxZMqEq0M+7LsYm1f3juA==","signatures":[{"sig":"MEUCIDK2zU8DuzT29KIVoqW2c9t523XS+8sAsneJCazfWSOEAiEAtBxUMizK1/uGeZi/LUuMMTBKZlaiPgdSjey3yKlD+mA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32456,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiI1kCRA9TVsSAnZWagAAlz8P/j4fhGEyDR7d6PZWtKnA\nEpmKANhDoMC83kBKUlzegESVSi2cdcIjEDWr3mfldU6z6hbh4W+j+p/JPyfg\n9srltR9kjPMZAE3sFwJkS4sca3/cF2RAxn3cy8Jrg6kpKSNnFi/g5erslNsu\nOVtVNL+4tPVP9d7PA/znHG8Vg3dcpK800zJJWkVBtL1s3+UUQFhkQEMGsCmd\nQ3RWmZw56MsYQdOEqvdQDfC8njar89uVkycOjlde1b3Z3486yPDwcw7CQ0k9\nBJLGyWpTYRiRH5e+DGgztd99oVT25HNOOjZt0DyaX+kuVuB69y9VZbrmKUz0\nxR9wxOFelo30kRcsU+F1VSWwH3SDYYxF7DTEQcl8PS/7p4pKXwR1h4wN6WBW\nfKqCKnEVQnuuwC/mheK/tn430OJP7TWZ5kb/YgqTA9tEMS4HXq5opJUiMrgH\nqbkv1bFHkXF1EK80bLRo/Xff2RGCdDh0lAv95+fK8SpKWOFfh0oeTikJgX3b\npxuu0hdl0XVIBYB6xzn6n80d9JU0ryJbYxGRJb2y0E3f8wTluaabyyH7784j\nogo/lhxGXVxUuZSc3fND6TvjE6z1FBgoKUjd6P4K0QQIIkNHiYsCV8ePFpW7\noF4gBnCga2x8XNaLk8FFXIemZt9bcyQO6X92TzCfeJFQXQvIW10UZ1+HVXRu\ndEHZ\r\n=9jYh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"414d1839ae9203ec4d7ea04af4eeb6fe11aea19c","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.0.1-unified2.0","apollo-server-core":"^2.23.1-unified2.2","apollo-server-types":"^0.7.1-unified2.1","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.23.1-unified2.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.23.1-unified2.2_1619561827930_0.6674882972746901","host":"s3://npm-registry-packages"}},"2.23.1-unified2.3":{"name":"apollo-server-cloud-functions","version":"2.23.1-unified2.3","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.23.1-unified2.3","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"fdb8083beff53f361cc9acb946c283c305fa4f11","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.23.1-unified2.3.tgz","fileCount":20,"integrity":"sha512-vBO6GswYc95GCC7ECEqRp33N4Ylfy954RIQcG/z1zfkreD9R58MM8uZaphCngHhYqHpZwHxQl2QFyVfmBwYnNA==","signatures":[{"sig":"MEUCIQDsLqcvVM5UASRgNM6ORlGXplaky/HVYMYpWwn0qmROEwIgJEAKGxmrerCGbY1N5NrxaRkrhHWInIg4lWOaYMkI/Vs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32456,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiJYVCRA9TVsSAnZWagAAh44P/jVTlFkWfJvsZo/3IP+p\nhuB4UuWc8eb4ONyWiuJRaWq433gNk9GMNMvo8+3R4zQO9m6u0xLc0gWg92fm\nVg7su1MdpETcvmEWZVL0uq8HB9jlRoEczBjylqj19y8xj6YGZi9yoZ4U0crb\nOzK30mZJNP9Pl1d3PPLj8mSRMubUu2Ad53FVsN3WbcDtzc9qcCMvxgv4xqRy\nsc5Sohofir2l3kRH5ppv1FVObwajBaT4XSXPeWW2OzQLSOg/4BxpC4RdG4OD\nSEGtjxmV+BLzfK9oyz0sV9wxWJwmyfGHvAPJp0z0AbHh1N3afibgphP3lzkf\nY+hIzqInqN3i9yRNekV7MPlr7tx0558+7szspkYIA+cNtVWdobhU7S0I1MYs\nEBSIAO29AqRbmJhEWtp2r/JT9HNhFbqpusc1C4ryShvH9Z27lR9LPUF6Y85l\nmmfGCzjbUnyenIOq0QefKdNJplJ0TOe+SWisEoAnp1vM5qnUzwXjXAWFhNLl\nxUyMxfPYMPlhwanMy5CPTbqqRBued9QmOFHWQLfCkFoiTzkH4RK/Yi+DYZQb\njCaqKB2rnmKBbFQZbv2hqn26L2GQ1WTL8Atv/VizbKcW53alX6UVTpylZKme\nSpYmq680tBBvWQLp8rdoIlZ9Kxq7yD4ddkwEg0YPGvSsweC6JSUKunrg1aGD\nmLYL\r\n=Gi2V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"667744f93502a480e7aa3e8c09e4c2c4d4f59e32","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.0.1-unified2.0","apollo-server-core":"^2.23.1-unified2.3","apollo-server-types":"^0.7.1-unified2.1","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.23.1-unified2.3"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.23.1-unified2.3_1619564053517_0.330817286305203","host":"s3://npm-registry-packages"}},"2.24.0-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.24.0-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.24.0-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"7b2a1c2765f3581fc95e1c5f1a591476643c864e","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.24.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-/neOaUpaazHBjChFy2mxn2w2jMe6UiJTrXYXwnvx7++uJ9Bk7cy2QpAOiMidvvdoSAYhvnD7bbnDyrO/l53jVw==","signatures":[{"sig":"MEUCIEOrKQLXH3VtwmcfafAghAvaZnweSJ2xwOgHU0aF/2nVAiEAx7ck3gxfO1AsmR6QxZmvVo6s3Au99fnTvXBfgMFhDvo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32441,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgic1BCRA9TVsSAnZWagAAPfUQAIATmXR67H3pM1QtQeQX\nDlM6rnN4gqFzrPYImIlPD4Cbdrd+DrY1vZ8He+MWTq6SENF9b8j3E6a5DzHg\nM4raZ3lkatoQQ63Rh3Mb5E6AbGjWe+S2vihHlBFNT4ONmmQ/02zXCTM8MxOE\n0ZODLdz73QNBB2eCxXQf2f7A9dveV2ywP/Jj/fbeB1zIk28877/yA7iTnEkh\n1ERGbdgpNmVYKH6xv/32aaSUR2ZT2uPDa30mZ5rl7G27wYWDceK0YQ0a0Rua\npsPF6DiD9Lyubj++cxXgyFOX+A0TL3cvFWQF7PxPIQckrcMHUINQ74SWLmSk\nOwt6VkPl3ZPN/HeVxpjDiY/c8UmD3OiQwJhCuohxIv2EoQrWN+cKfoMtBWSe\n2BGK/fwq4HHjZ3j+IRN5oDSoS2GXfL5gXmDlR41YwEBsfXczb7xCD8MStSXx\ndCRF/HvwojR7ac3iEFJOA6Dl0RrB6j9sB5Z371wFeV1Lj33w6pDfLu9MWGZS\nrWvqJT0DnldudO7J9oGIMSkkr7JqxbYKz4Gv4SYZvPwNdt/doFMGcwgGGJD4\nnDBInmaFb0AD+DNrULEfr05EAHbRIKF4Nm8BOreYESGdWw6oHT6lt7141hWt\niqMjxxIr8OyRJSkOJ+peDdaEMQy4GdIlnUZH7NRDYliG5Tmq6ya9K0oEjQXi\nwdgi\r\n=t7wx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"3415b0708fed87b393d9f34ef9df9340502d2b25","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.1.0-alpha.0","apollo-server-core":"^2.24.0-alpha.0","apollo-server-types":"^0.8.0-alpha.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.24.0-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.24.0-alpha.0_1619643712598_0.14311969353490306","host":"s3://npm-registry-packages"}},"2.24.0-alpha.1":{"name":"apollo-server-cloud-functions","version":"2.24.0-alpha.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.24.0-alpha.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"2e574d6d74930c952015d887e2e86459fefa9bf8","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.24.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-ODnXPz4khj/hKTH1riLpROmLsV+rfPrJgONomfaOuuedcEEKxYPGx7Vy0/K+NBWR7bnVzneNa378p/ut++mP/A==","signatures":[{"sig":"MEUCIQDi52U5vgNN3tz7pAt8FSjyD4JWq7uJ/OBZO9jiobuHUAIgdLmNO42xc0Fk2FtYzYdu3UEcvH4j/CLl0OY8Ll+CDpU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32441,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgizQwCRA9TVsSAnZWagAA55YP/3wvttpbY0pNiOI/lNA2\nu4K4M9K2Yaoa4uGMFplHuj9e3JmhE+bEc/0MPJ+AZMiiMospq6ley3iQAkMs\n9ZBSKoI1XjXAYWntObXubd+BAqDOncazE9dxNntsCakCrclJczIokIab99Ke\nUf8Gd0xY7rcJ2WVBv27bv9FuXybu3kDjadSIEDqCWLf5dUMHpQYxzsTdX/uK\nUO7pq2I+OclsIZnn7xtqTYV4cfCnoCQY/tieoLJzekko8I1/57XvSalWM+ws\nY783aqtOmPtdVVw4amqtyGCu3GMdZs1dmVKVYw8zPOKmr8Og9OAsGMx6A3aR\nsPT/RwtTykblXDVzwXWQfVVI0J28tUzWCPFQoFTdtNT1rGa3WwOyz+GjpZ1H\nEoq4VpA/R8l0g7+pF7sIqvN0uMtK2ajPAfmt7MX+qX+ACSuoXJrRX1rgQ/CA\nEiA4C2yj2Fbz+xUBbGSTM2ujlpSOQFyxvcewQvoc+2O06AuetMJ1bKoxSmVF\nBK/xEG09HPS2EEeAxOuBiLRpcR+W/5ybihyzPwDGsv6z3wXofjfJWyWPt+Wz\nEkb+sLzJuBPF7AotlKgg61FwwGKXoanhQbTR8bH5uAL8G77LOKrRkXzLFEfs\nqc6mzKkWoyzctYqGWF3F1unMb5AEpXDbS3NFVcKaq33kfxyPgpmmF3uya8ow\nunGm\r\n=Au/l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"27275564a9ebf9251ed4e990c4ff1900b6cb49e8","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.1.0-alpha.0","apollo-server-core":"^2.24.0-alpha.1","apollo-server-types":"^0.8.0-alpha.1","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.24.0-alpha.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.24.0-alpha.1_1619735600402_0.005934344750131437","host":"s3://npm-registry-packages"}},"2.24.0-alpha.2":{"name":"apollo-server-cloud-functions","version":"2.24.0-alpha.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.24.0-alpha.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"2e5585cab17f5384e31685b8657fb273e3af8b39","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.24.0-alpha.2.tgz","fileCount":20,"integrity":"sha512-pe5iYnHnuCS8Q6bQh0XsXLUpK7pBaRxv6y7PcZ8YC/0EuvGmrBhcRLa4yUugpfaASb9oUVyD4Zkj769udYoYEQ==","signatures":[{"sig":"MEUCIQCF1tfm7UxFBH3Z83lPns76j0/S/zfUCk+3ID7yKpvqOQIgSv+2cw455OVQan1oYRfe9dKyEgbdsot5I7jlFylZSt4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32441,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjA7kCRA9TVsSAnZWagAAj4gQAKFpYMwJt8vWomNpeW3/\nCrrNZpY2tfFhea1tToxhC3/2kkE4fUbCCB9WGqKps6Zp7O5ER0fMiTQL3OWC\ng1zCgT+k9OX9jQtt2jtN4F8fcntsAhbKzSkFfOrDqh75OPsnzB9VbBn4BY6Y\nG1HWVt9QIb9gA9+1srJkixknrKGc0Np+1+aCdcgc7fII0CIuWjZOB+N5ruO8\nAUGGQfithEslrQkD2damnFWsLGhTSqPbwUxbBUL7gb9SUMjmlS5vPYf0Lf0V\nfi2tNKfFIs4S1sZlsimDnJWF6dhVp5VE1MZSBx9KISmUoJZprqDSZLRgQtJ1\nY4MMMfMOQ2XEfd//BONSbj2MNBCa4tAIsaQNhOM4O39D2TKXsl6pBdZDUYvV\n08NKWLyacHGyhbnaMwyI+kvUz9rToY0GDg5mKgk/+FGFFLaOuPGVHlhCZfNJ\neLQf5tJHAWyiCD1+D2xWstu2xBidejRbe1mFKMtsir59Y1MsX91vlDJtEK4X\nIdCUnMAKQNpDBCS5JxbfRbguQBzRgHXgQMwszAk//0avBFInGpD5th3hD/us\niVflCtzWwyG6KmB7VRs3Iq5Klc/R/377FhilMWYM29MzmJDG0OyrhnZM33O8\nmR+5fJ65N/WxKUitDfl4aosPrpsnid2D1f2KRoi2TzC2yc+1h3q5FAoum1pE\nTROS\r\n=wGKJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"4e5f03e2b071c2a049836dd14f072f161a0ccd12","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.1.0-alpha.0","apollo-server-core":"^2.24.0-alpha.2","apollo-server-types":"^0.8.0-alpha.2","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.24.0-alpha.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.24.0-alpha.2_1619791587879_0.25584007037066114","host":"s3://npm-registry-packages"}},"2.24.0":{"name":"apollo-server-cloud-functions","version":"2.24.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.24.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"2165066a2bae43ffdbbd8f898c0bc721cf842787","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.24.0.tgz","fileCount":20,"integrity":"sha512-bE0DiX+4RVpZ/SUTB37DwMBUT+MiAU3EM72boKnL+3iFfhpNbUdIe6IEoz9hn80lFham9B9ZXLceRWPwnU+J2A==","signatures":[{"sig":"MEUCIQCStxBJ3n5hukFZ9X74xNKIEcOGSlEclTIY8VAZhrqCMwIgOCBBDlGO4TawdtDDAhI4hmhDignweAneSsjYYj2t7K0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjEgACRA9TVsSAnZWagAAP5oP/1ec1BlaIWv4aGzFG3t4\nFjQwtT3cpswx/YdIAPEDS6CuPt38hUAp0QcdbbAmVY1PxSmy2ZxpOqifo00K\naJI8iezZ+sdce7G9D/rA+NQ2MkvgDQO2Rm83SZexbf8FggvL9rfbZFkbVp9N\nd9wqUWZk5zAEo8vF8rDU/tMjztwLpi3G1XGH+WfIeBwJ5fAI/G1mJ5wzVhJN\nPEkJkjTo9Zy7DVg3uHZPtQbQWUQfV6X7sY2xaMqolydRVHv5yoxh5UzU6aSw\n+SoU83i8bUR58Z9RsgluE4FpX4khy32eX3XP+CidEyIyLrERuS932Jpn/Nnw\npM7J40Za+6QeSUQxogYUNqSCGbVaSELSEWsdPbANggUZ4gykQ12ZhBaOa9ZO\nnvDZtjXGdj8HZN15EiNKSlMkEhhhyRR/teRg9x6Ggo5I6ufT39zN/P+HAuW1\n0hEuwXsYQEOg3XDaL9JKpV84eFx2qadtOgb+FeLytfJwSO4m1i9alyPjKSJJ\nHXoC0UxiBjYhGCbmgPju1cu8bc0VV+v/5ZwD4E4JZojHtMFjgChGLB5acdrH\nQt9lOvkOY1IzNvXp5GA3/Mv2eb4FmG0HpA8yd7fmz1dmGAlB53U2z6s8xQMM\nEaFPiUT790dhU8wCoKRrEPxJjIEQnKSh6lbriWUP6SqmgMGS18wu10HZuFFT\nAcZE\r\n=WIKq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"f2349d0e10633ee79bed152f682e53730175d59b","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.1.0","apollo-server-core":"^2.24.0","apollo-server-types":"^0.8.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.24.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.24.0_1619806208384_0.588768995403381","host":"s3://npm-registry-packages"}},"3.0.0-alpha.4":{"name":"apollo-server-cloud-functions","version":"3.0.0-alpha.4","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.0.0-alpha.4","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"ea1e2f1c6ca08ee4db949daa8d224311660b3d4f","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.0.0-alpha.4.tgz","fileCount":21,"integrity":"sha512-/oidHDlARWwrG/fLMI4rRbEZ9MZkR9sWu/XgJKIqS5HB7vqvklUGQVYI7OC0hY8OksDts58LN9mYpNK7IWuhZQ==","signatures":[{"sig":"MEUCIQDsRnr/vPXHFTj44St0CQ6RNmjzVgAbgNxEWUwSAaAGpwIgQEq/Wxo5XDd2VCybFi3Zop49MNaB4iZ2Gp1P4fiNQxY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":465418,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglFAnCRA9TVsSAnZWagAA02kP/iExPsVgpE5pG5wQetzA\nNxiCn2MpD/yRwiNWY4+DcapdOqvilxRFprrg/R6U8mnhIzUOG5N2B0IoyP4i\nGAnqMXm4PLFxv90HfwYC+W9AG6GS/x9ugxFpWcmTZ/0m0Bs8E4jCzOiZj5Ou\n2Uf1cUMSjFYYi9bwI6wLgVEGL4SSvJCtM0770dsoDUHIfZAjRH3ftMgMTAsV\noLKKuMCoAodyx2uISjuK417fwivMnh9uB7tRjisVK84Ib1YgynvCc5BLqIVe\nWxkh5Qv5JQYIjxfvFC41MhZ2GPRXKFqz+qwBTOwnzGnBHnw4ONiwS6wvpAZP\n2nEGU5FkQlfzMfeeH0TF1o+w7qkSHys8zFi0/SHfqB5SDoYQ4KmjEq6ZmF0w\nP5VzTYyuH/d/tQgD5U3wfdceQzt1jz2fsUqVHmAQuurKqyuMyTqu7td6H8Sz\n+6r+IyLxQszvPrJHC2PcOIVqRuaqzQ7GckfjAdvZCE+9HuncfKzwmTuIeuAx\n9ZNm+e+lHokU0RusQfQ4nWQUCtpTOSuzyy5dSYYyiF4hrLHePlAuS7MlI7Wf\nboXCxZ0vcLxT0gqTZO4yQ5AGq2k//GFeflE3eopsqt3uyE8CYdsIpIrVlqg/\nJQ//OURsCvDfXcp25DpKI1XqH3iim4WdORQFH8+7nA7+vQbh1kMrVHUXkcwA\nfD0C\r\n=4NK+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=12.0"},"gitHead":"97073f33d30f2d682655eb0e4dce1d7d43721807","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"apollo-server-env":"^3.1.0-alpha.4","apollo-server-core":"^3.0.0-alpha.4","apollo-server-types":"^0.300.0-alpha.4","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.0.0-alpha.4"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.0.0-alpha.4_1620332583422_0.19772608398686597","host":"s3://npm-registry-packages"}},"3.0.0-lambda.0":{"name":"apollo-server-cloud-functions","version":"3.0.0-lambda.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.0.0-lambda.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"e6033888e740fe1f63a8b2038c705b5dc93b2d84","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.0.0-lambda.0.tgz","fileCount":21,"integrity":"sha512-zZX5tMxZPe78HhPoyRymNt/OIjtJ/MHuBlwjSwC3UWt06hfjsIwv/yDfMz46NgHwApmET53k9DqSAN3Ns6EdeA==","signatures":[{"sig":"MEQCIHSwPeqj+wUjNhmajXZ89H7pHRMmw8ehYZIoW3CLCXADAiBXxHQbIAAixaAD0yXDWPePujH6q5gHYlrw4xHrPgmYmQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":476032,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnYGxCRA9TVsSAnZWagAA0McP/AuPslXkM8fowWoWKafr\nWJZbYXHUY5R5e3kaZNak7+de3AcgWUr+3z0scIbjjYXy0xQl+NJiwFnmMswa\nNx2w1QP2BQPbgZd66dffOoatusrfwsVH8LCI0+LVRo3RRajXduOtRDN2LsoN\n+CP6Crw6fnuwZ+0WL7B3zuHgFY6N7oYVwpjrQwXc9JXC+UBunMWD/K2jUSeC\nVrcV0ih+CiEBjC+vbj6zbJ0IF85gHu+7H+i2cS9sGCcz/TjoX5d3eJ9IWRI5\n+trpElpww2ttpcC94omeSaLyDSD3NiOYXd093oAbX4UXVut0dcJ3KypPm3TK\nF7e98Hz4SwUT4HjqJPe1AuBp2ALqdp7woTLDj5rEts8RLtO4EqhOAib9vLFH\n4BHL+ZTlvuYPhzNv7pMXy3eAMcoH4Di+Me+XAr5dIwFCZ6Y0XI6g5aUCl3U6\n56BN90+cUA66aw8jUXwXmvmsMAhSjqFOS4Py84ek7n6dcVq7Jyd8r35qI3WN\nlwJUjuEhXjbbRPfk2iMaVPv5kKAvP8mmMujJjW2W+IUuGKO00ZBf1lXGTaRL\nqe/Z/H+yQX3OMQXUItsabkjOGf11uwE534viB6MlPzGbh0YTQ/9i7IxC1gBQ\n4yiJJ71C6KkJoOW/HCy22HWXFg/WRJ1+gzjGJf+co4oSfFf6yelBhR6gBKq7\nDTvW\r\n=VstK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=12.0"},"gitHead":"3a3d4984e7a7a31f9338f03d3c219d7da8b87f5a","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"apollo-server-env":"^3.1.0-alpha.4","apollo-server-core":"^3.0.0-lambda.0","apollo-server-types":"^0.300.0-lambda.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.0.0-lambda.0"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.0.0-lambda.0_1620935089250_0.3146537771715079","host":"s3://npm-registry-packages"}},"2.24.1":{"name":"apollo-server-cloud-functions","version":"2.24.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.24.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"c69bd53740a077c54f98b13685274db27b3d5309","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.24.1.tgz","fileCount":20,"integrity":"sha512-Z9OmzWEqald1xpZjM8MFVkjYLieOSyO1AVrTKq5DlHIYoRgveWhyg1cU/XP85rV/KFC0o6IKIMt3A5Mnk5K7Gw==","signatures":[{"sig":"MEUCIGjHhCM8PhX1y/TJBTCJSqAfMI6YsmBykVpc8cZzrHdBAiEA2IHItXzsh1AsRwMbuGB+MHprlGufQ8RYBK6lHILo4hs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpER4CRA9TVsSAnZWagAANjIQAJQtcEEQN1OaIsim6ZAN\nh9exowl2i12fNWKxWpjZiGDuBfN6I/Z5pbSvYoWgby7KIiCTbDaK05tDfkAY\nToEj+6crTdGOC2KxsAfjQWAok0O4iiPlTxt6rMntWPBlG6mOT8PaxwAuIkVP\nk9X5o4AQYb2Imbp7EYY9iPHitRUcVAoMQtlQVGVNCBnhnwq0jL8+LWjyxrNv\nRmm11f2CaY6y9/W8cuA/BOO2ecgjnseipknxb6I2jyH+5oSYYWg+iou3yUfe\nKNV6Xi+wKp2b5VE3/DaHO9S3WfOWwIC/8M3k8pxYDB1B6l0w0vjsMadL5BID\nct1qmemCxXX99/H13/M3zrwpXKzBl3CfFFdbGlnfJ8xvwPCXcJRDftN+kvyB\n0q84ZwSKfGQaLGIKgRIfkcss3YmxumjidD2GDurWTHipRywOrbYBR9io+4Q2\nOf1tuQb+HpQUaznpdpGvdwwLmMUtwzE/0Ydb6WnXhK2cWDsOe+H6YxCW/Kb+\nHYJfbvItftTDeqdWJtM+i+Rlvah8dfG+5R8xIpov57dDl06EuDoqvKl2frdz\no4HlJGCOH/6j+Ps/Qh1+WWy98By7SrbJmp92U4uTJqxL95OduLWxD5a+Q7MZ\n2svpPqvHuYiuh34HLUGCcLEca15Chb2BItPemYLSnh5kluyiiLde+NGobgK4\n6Ot5\r\n=YHeF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"9e1bf7df8ce856f62e851a9cf268508eb574e32c","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.1.0","apollo-server-core":"^2.24.1","apollo-server-types":"^0.8.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.24.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.24.1_1621378168390_0.40169441895650304","host":"s3://npm-registry-packages"}},"3.0.0-html.0":{"name":"apollo-server-cloud-functions","version":"3.0.0-html.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.0.0-html.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"7471ad215846355a10588517813645d3189f3b62","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.0.0-html.0.tgz","fileCount":21,"integrity":"sha512-avuIBumHZJ4521OpkL0+fdDInY1ixIYOPgcgaNy/XP0Y5ccqvY4FocZfWtrcRK9sIVwKnWgRO4Wx91QdaS85kA==","signatures":[{"sig":"MEUCIQC2Uye4UgtLXuAVXAK2Ikgi3RtVdHS19o5e5fMAXKa5vwIgSL9sS+D2iLGU+DfTpNSdLUEn7fX/2olUwZ8QDuH/60Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":476498,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrH6NCRA9TVsSAnZWagAARG8P/i64Hhtbvxjhb1jGHckf\neEsf36i1qCGl3ExfLlOqjqvhXSoTaWWpl8foA6eEA8MXCtvPZwHUzaPavoOJ\n5BQ9f3HStBPN9qarG79rfrnxjBBEXa/z5V+kRM9MpXiefB8BjMRSVImkFjbI\nNyKz2VMRzvE+kLYnayrgJsVXBAR5vAyaRp7osGI1oIJSrI4/ssWrBxFzDLMj\nToGiXbJ3XCjnCrJF5g1KyJeASXio0AssNCifvxz1AkmA4GQxQ4bdzMF5+eWB\nXAN3O/OLzhNiWUJVRxKb5f7Stq/s+FBtQS/xjIWfP2e8lPCOsEeSDciUU9gR\nskd85roRznZvXA1DuaunHjTzrnwJBr1dqapvRvQ+L19eW7TrkSygTbcYWp+Q\noIqsr1iGxy79JW3OBbx2Wil1vjDEvWEedgZJbt6476tcbAW11+NFJeDaFKan\nqI5sthhL1hWBL8qQzsmSugUaIyu7AT9Y53a4vAzO5Dz06YxhGgcIGV7g7zrz\nBQmSJVmcMHF9VTVFDK6YtDfuQghZrFgD1Ngsz+ziTl+nStNv+l9e1RskXZzg\nCO2jC8p39Ua0YuO7FSlvbCc5VWaBy+W3e+1GOmd4sgjQ9SGpCy8enzGvlxCb\nIHRfSkLCBF/8p8Y/4oAoFP2nSE76Pb4+dYMELFNmQMtE31kq3texeCSAsNYV\nqYRB\r\n=tWJv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", the **introspection**\noption needs to be explicitly set to `true` for the UI to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=12.0"},"gitHead":"ee3ff095c8818cbfd721639741481703fb4d62a0","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"apollo-server-env":"^3.1.0-alpha.4","apollo-server-core":"^3.0.0-html.0","apollo-server-types":"^0.300.0-html.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.0.0-html.0"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.0.0-html.0_1621917324987_0.21087660942878572","host":"s3://npm-registry-packages"}},"3.0.0-html.2":{"name":"apollo-server-cloud-functions","version":"3.0.0-html.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.0.0-html.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"05b97fe9d094dc1c7ff8bcf330aa65523e8caed7","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.0.0-html.2.tgz","fileCount":21,"integrity":"sha512-luEbYiAYcxqGZa7YDH3hbRDytLzH3t4eyxFXpNBC3TScROB68FSo3tu1ZW+vZHl1LVdfAdvIo+Li5Bboqpga2A==","signatures":[{"sig":"MEUCIQCvuHH3SXDYK66fUoNC1TRI1rbv6xlVdCtbfhMxaJSzlgIgC0Y6bl46dRG5aBvn/yStYM5vgRRhuzMd9Vi54irPGJA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":476494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrIj6CRA9TVsSAnZWagAAA4IQAJhk1qXivGoJ+Lyum+Ju\nwm5TghwRSfLMZpCmkL9XGc7cW5j4HeinX2wSFvjgwntm6hjVw+8bbPBbRWqa\nwQP7BpbBcFMpc2crZA4Qi75eGx/r0oHoWJmEKQqxM2VYKV0UUuAGmG+bnNl2\nmMIl3Z+icfbjKr4UT2yHMfnPCFSb6rqPlgyUfu5ZPLcha27Bbkk1XhfcArea\nqa1tjTduIqt9keVqLx4yeBsBGdgSksQNOuEa3aunJZqmqrQSf0aCcGkB2Lod\nhKXfqlKLzT+KwlyKFQR6p/J5R0RPrcP0WD4mGKwqcJgRrWgxlJJ6iTH0KwH3\nWDswWd9UmXVfFJKZLlmb0sShGKgqvblP46aNPqwKDqY3sEosBImr2CVwv37F\nEoRMFDOx8MU21dTwN8lEcY7l9L1nSWpB2KM+9jDW3nS+9C4bQ3pU7kJYRa9Z\nz3QJ9BBKfIWBIzZ6z49fDyI7r/Z/m72lx3UCScGR0WOKQHbESzOcgDW5NOj2\nOU4Uj4vZlT+O8n4XmmpAQBNKwPnpp26ydoKeSM4sBwAuci2HhTguvZc0c86K\neSnfzGGVQ+1FmbEI54WiOmW7LekA/FqLBq2Sn93CJv259i2/IQPJfSfNTZSl\n+KIWKn/Wkk1pR4fxKJGIEoUR3VvhDYkpWO2uJFhBitgQBt5JIUJ2ugdq2xWi\nfU0M\r\n=1fn0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", the **introspection**\noption needs to be explicitly set to `true` for the UI to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=12.0"},"gitHead":"f4056708a8291e4773e99d41cd8f95686d773964","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"apollo-server-env":"3.1.0-alpha.4","apollo-server-core":"3.0.0-html.2","apollo-server-types":"0.300.0-html.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"3.0.0-html.2"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.0.0-html.2_1621919993794_0.6982923645540826","host":"s3://npm-registry-packages"}},"2.25.0-alpha.0":{"name":"apollo-server-cloud-functions","version":"2.25.0-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.25.0-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"25df2891843b9d0ba42e0e98d8ed8b3cd499f375","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.25.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-hO4WCMgVIug6TNUbl81FZZ/aghBoOKavuHNvJm/EwBtdrYztrJskLI6z0a3ZyR6ldOx9lcjV91jLYYx6KHm8Qw==","signatures":[{"sig":"MEUCIFTM+4il24zokQwQjRrIPgdOUhr/jAeLMnX3jY9K8bzBAiEAjFhL25Cic8OFSSp1iMQFtyu2iRvOEMwVZD9hJ4lJUnA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32456,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrsxCCRA9TVsSAnZWagAAP/AQAJkNqHKx/uNeKuwPxusx\nKd0rQmcR8aaFnub1V/VBHNI3hFcZ83izNMZbOFqwX/YdGs875Gj0z/TSxMGL\n/3YGpVsyAZlkIEIIDxrrI9py0ILThyRSeuXtC3L2aMxdgULaDMt2mos8Srpx\nL4EH2B6L9kuvjANJtN5dDFNeZrYShfBTqHnJZjZ7pcfLrCDbH1D7JxUawL9j\n7QT81NYmsFp7oDt0kG8rMl0E5cEwXh0w+1A0kcZ1lz+w1GWkoAsODX10yVUk\nCvk8qQ7Ua+75kWoA2Hm4zO3NHNYIAuClakjexb0Ylw74OhRCHejgV3OgnTU4\nRT0uSPscKilZmGP9rrDnm2n3aReU23VgjjdxBBbSdXXrX+WGQ3vj/WvejVow\nZ9WgLi+cN6fNuUNDinaW+LyqKhG0NehUD3U80d2jmLI0N4hslOpTzU7L97CH\nrvdow3U8f93i016Zjdi/Fca0z0oLvg7ZQZuNjkFuaXd7n3BuWzZTTixTNTto\nAylWstCHBpy62N2aWOaGa0mLAS8whxais3v9SyKmnCLKyhjftCkapk8UAoE3\ndcP8xBeZ1dYDjXQo6oIHYnCZld57z06aXLbrMzzgBGK3KEZbd8bRAgO+dNOT\nr3pxqQYq+WOcVeJy+GE7LpfRaKp4GlUT82WuXOB/btLUt8TpAz6bUL40V0y8\ngyH7\r\n=UPAb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"c8c07483f914a18c07cce6435dcc8816fa795c34","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.1.0","apollo-server-core":"^2.25.0-alpha.0","apollo-server-types":"^0.9.0-alpha.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.25.0-alpha.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.25.0-alpha.0_1622068290469_0.922063122015462","host":"s3://npm-registry-packages"}},"2.25.0-alpha.1":{"name":"apollo-server-cloud-functions","version":"2.25.0-alpha.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.25.0-alpha.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"8ff50c251337971bd342dc181c444f45bb9972d2","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.25.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-HbDcjMEzBftjLQ4LRfLdFDFsu4SCyLQ/ToaTSu9oFLSATDpPLMIDWe4S4WZHmul/5JiGCIG5Y02xmeiCtwcwnQ==","signatures":[{"sig":"MEUCIQCrQZrd/NW8WQ/9vBh6SOteu+k6pzpPcuRRLmrdyHbCnQIgdu+XJlGEgo8n29GUAepMwd6QcIlJB+rszqHpa8++lBI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32456,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr6htCRA9TVsSAnZWagAAjpkP/2KD5V6Sk+fUf3cFHBHP\nQP2xQkezogXMnapVvd6pKdHWgi5JrsSiMnmHzavgxp5i+i7dnzZBFlOk4RNn\nhvUAqTYTdKADllJnEiK8GNz4sqRGMGjhSlsy6alYXkUyDPAVs6qWGnZS4+Xd\nXNfn2FKqCbCzt6BNxQ00+p/jcJlFPXirPqO/XbtECrP3YG0rhyOr3zrzOu92\nVI/khR9UtYCyZN1XH2tGR4yXc4qfSIqyEXfNXuv9IwKNxd3rQUH/YCgCNHGy\nApv2HJhmbBnRVORIjFTE8ITuDHC7eEtfCt+aHCEe5IQ2zvo/MDLgKZ5csasV\nhFX3k/Rtq0AZDNp6R4lD/3Z17mHhY5kgV23LkqMBw7FvzqTHgB0YA2N0oWZu\n0prIjSZ3oBLAG7QE9rPbvOX2WH9SkEsWW3H/2vbIdt2Q2vFnJywYAS38blD/\ne2BIGi30cv3zrQQsE8/Vwd/kiG3chB44VhK9Vo4rbKu4u6ra3q2ytD8Yhl48\n+/WTXkQ2oqket7wTrxmwFckcEH7b6WzSriB4bWJmH2hI+/gZWYsfmaRI1P9B\nQbYr6nBt3GKEbG39I/zjWB4Rx1allx3WAZWEl5qRDKU48ba3/2goiuz+Ziry\nfeNaOMIYh5o85olKEuQNYa6eK0ZVQCsFqqCLyeGED3buDWe13Ie6YaafsMMO\nTTc/\r\n=R5V9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", both the **playground** and **introspection**\noptions need to be explicitly set to `true` for the GraphQL Playground to work correctly.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=6"},"gitHead":"19572d7b36f01768faf2b2e9b1fbd18638ef7397","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.1.0","apollo-server-core":"^2.25.0-alpha.1","apollo-server-types":"^0.9.0-alpha.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.25.0-alpha.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.25.0-alpha.1_1622124652989_0.13163254976107241","host":"s3://npm-registry-packages"}},"2.25.0":{"name":"apollo-server-cloud-functions","version":"2.25.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.25.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"c0ace457b3531c2420d1e2e92580d79f859584a5","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.25.0.tgz","fileCount":20,"integrity":"sha512-7w19MklBQVIi7LrCeIiD+bltQium1U8iyTz/TEUliV+IFYYorVGjhMmab2wE/9QHFwvqBqQoTxSVRUg1gdRJbg==","signatures":[{"sig":"MEQCIBHiJD4FvKhwI3euYZjrFSdGcI9gscmK3yro5pAtRcy0AiA4z1x0HKqanxUAchd9B/n/S0IDRg3zzXF6/HeujgbpoA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr69eCRA9TVsSAnZWagAAYmYP/3iG7i2tUOlAp/qI4g8Y\n4Kd1Cfmg763abwhqCaF8M/SCpjLgWZtNSqw5ebsT9WKcXtsk3gmFS9WBIGbZ\ny/zm5cNiYbJIEkbRgz5j0+XBiK+tdX2VbTWj9nn4Jg3lyy+oZCWeE62pychV\n0nbcepUekohUWI9sj/JGH7x6/vubhRaVNNB41apmTKD3Adf7pLh4brAhIbv1\no6mCG9m/LnwmFU5hFtbN22XPTZJLMzqr5Vy1E7RawQsL/E2c1uEvjJTYmJBy\nRWRTDiMXZQJODi0AuB/995HocSzQbSkaGkHwrDvf4e6wOaaT2/bYK2EWMP47\n11PYoH4mnkZryj0vELw/CZ4i5ngg9Qhzf2lVLDSw9/h2e0zAU+1KbTg2D3xK\nIy8LgTiMn5mmKlLQ5YKQHOUOw8I/3B8Yd5MQ96eAsOQxA21P+mvRD7zNb7wT\nxk0wQtsFMqFJsE/c2ouyO15W+mRdS7dCSkHSlbTzwm3PwHCUYe1vwDj2jEvL\nbpG1J7Km3TCITM6PF604zUn6GNw/2I5JsdFoiIGP3FeZVxoQzXEfRdyqwte5\nAvwCsAxH5lq5C2aOJ4TWq8HpgVAo/nI2gmvO/pOzVQtVThyrblryhRYJKnoH\nAGMi8quTxwGtWWkkLHTKztQC3AUARP3KpS79ntNn86K6vtakXBN6MKoB003u\noULu\r\n=T16Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"42983b06a381aee6333fd11d5af7bd7fa0d549ec","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.1.0","apollo-server-core":"^2.25.0","apollo-server-types":"^0.9.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.25.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.25.0_1622126430378_0.8724730924914832","host":"s3://npm-registry-packages"}},"3.0.0-preview.0":{"name":"apollo-server-cloud-functions","version":"3.0.0-preview.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.0.0-preview.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"cd9b6f7e24f1e6ab35fc9342c48c49b13c2428d1","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.0.0-preview.0.tgz","fileCount":21,"integrity":"sha512-GxQaQI87JFaSiZ9HILkrNS7xQAvyYyDvsU9Ojle5DaFbzAMqpMJadHxIoROAVuFuWeE/07917MDGSrEyMp+UnQ==","signatures":[{"sig":"MEUCIA1eNFvgyNF9iSV0g/VA18Ib0UmnXs6ZxjjDL7rbksezAiEA/KqskNHGR4Np8mXXojXXbM5oachj1bEVMkdfAuYSFUs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":463032,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtcvrCRA9TVsSAnZWagAAnKQP/R5ZVM2RUDUrwmZcjrZs\nhYcLaYPdKEkyezoPulMBI8EW0jRlXlnzga/ipzLR2TQXH+QNXi/2T9dCFlbJ\n5LdSVe4QBF4EP/fzKzvFempnaO9EwOQ3pL8l5bYNGvxSBmOmlqYsIJr7C9jg\n4E7yBtP42b4PVMGC1W5rebG0uUzkI5K3w7ygra39pTiIQNvWM0cncI5tpwL0\nyjyv/G99CV3HeOUvWL29CO/SF2NYie6qMjuqnL085bXYl50P64m00jpMzf2k\n+CejxAY/HwVzNnp7+9h7Uhg3XpHZj//RHcTM7RUIPBQe5RrnpeuPnZ2SDJvh\nF4I4Aw+w8b1u5LqMu0/EoxlAJ0rZ2KU6VVzorp1OaGg/1g4tCIMvq2oEKUrt\nAxtZ5HmH0Y8G6rCxZ/JvcgCh2L7DjL7YNHbJSrXae2s9kJEd7Tp6vxruhcpm\nlFo0GEmW3J99HC36jWlAbYQIasJqkCMvUC0nZXc92cz/uy7Uande950zNL8Z\nrjIr18IV1Fus30+lTd2gSm0SQ95YcjcBrd/EZSzPAjjyOvIa/921AOUuCVLi\n9vudZpQRHD5tJfSQT5GuLP+zKeCwVIDVbWTQ237XMwbv1tNnAp+D2ZLrsxCg\n5MLnGagaYJrJWqth21NvWGgp0xJ74175dAYD7kkCTVFVZG8ABVmZ/gUwy8Tj\nBlQM\r\n=uJsO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n## Deploying with Google Cloud Function\n\n#### 1. Write the API handlers\n\nFirst, create a `package.json` file and include `apollo-server-cloud-functions` in your dependencies. Then in a file named `index.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Configure your Cloud Function and deploy\n\nOn the Create Function page, set _Trigger_ to `HTTP` and _Function to execute_ to the name of your exported handler, in this case `handler`.\n\nSince NODE_ENV is a reserved environment variable in GCF and it defaults to \"production\", the **introspection**\noption needs to be explicitly set to `true` for the UI to work correctly, since the experience depends on the result from introspection.\n\nAfter configuring your Function you can press **Create** and an http endpoint will be created a few seconds later.\n\nYou can refer to the [Cloud Functions documentation](https://cloud.google.com/functions/docs/quickstart-console) for more details\n\n## Getting request info\n\nTo read information about the currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, ...) use the context option. This way you can pass any request specific data to your schema resolvers.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use the `cors` option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, http authentication) the allow origin header must equal the request origin and the allow credential header must be set to true.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### Cors Options\n\nThe options correspond to the [express cors configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n- `origin`: boolean | string | string[]\n- `methods`: string | string[]\n- `allowedHeaders`: string | string[]\n- `exposedHeaders`: string | string[]\n- `credentials`: boolean\n- `maxAge`: number\n\n## Principles\n\nGraphQL Server is built with the following principles in mind:\n\n- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers\n- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure\n- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed\n\nAnyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!\n","engines":{"node":">=12.0"},"gitHead":"68b776f0a08d7361efecf40e0a9e344b19b3e4b8","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"apollo-server-env":"^3.1.0-preview.0","apollo-server-core":"^3.0.0-preview.0","apollo-server-types":"^0.300.0-preview.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.0.0-preview.0"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.0.0-preview.0_1622526954730_0.6530315745219935","host":"s3://npm-registry-packages"}},"2.25.1":{"name":"apollo-server-cloud-functions","version":"2.25.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.25.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"83e8afde37aec1f4150b1e8e8c9fea1d4c2560c9","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.25.1.tgz","fileCount":20,"integrity":"sha512-bhKVM9vTqush3cfa8pdcAJIHsaU2qlEF8km6qxKDIDTLQ1HNoQWwXXQhgH8VolwhPGYKKKl7CpTZM/dY0Brz3A==","signatures":[{"sig":"MEQCIAHoVBqgHy/3kNzZldHtu/atDMvGTHUbFxW4PTYKFiCSAiBIo0N7lyjLtYkPghp4iqyfME4EFua6+AAQYcwytxpC9Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgv9vHCRA9TVsSAnZWagAAyGoP/jnjyJgszVcTnrzUjdWW\n5OhQXyBPy7UiXIHKBA9iKfz62IPZDGqYN2cT/MYfNMVwvN+CQNQVaC1yhmV5\nKRSj2kIG9BUZkHyf51kwdt7FMltGh9IEPIPLVcKMdcTmblbprZcoMj6PngCw\nZ+PFazNnAols5jIn8xPFffhkZu47/adatmriqIsNGD7y94tvc4Cnb+AxRbt7\nt0JC1SSDV2wG8RI/uJmkO6FEK+/ozifCqtDVg92IcfbRGE6nVe0Yjym0UtA9\n9J8CBAxEf3cF13VIVVSdAnryDZCVuluyMyUEc0Ll5hb5woHyfe+YgX5EEsIG\ni65f5GcX+6+umH2rw6We1EG2oVBw8D7Aq4pxkj8C3a3uHEavx/Vrv1Gz5v91\nGlDquIXKo04c/66VhQ3a/qM/YkCAY18x7BkBqofAr4DDsSQEX6206QveNzH0\nuawhS9kf1eemi2aMxscQq5jQ7Bd1x+mhupNxaGPvB7zAgxcpsYDLXgYYbp7g\n+o1xrqWMWccGknc73bl+0l3SOHEZpR7uO18B1pd/Vl8HIZOeImIsIe0NQ+v6\ns3PVkTq5sHf2RhBWi04ebHLoup0PrDOOGj21dJY6mMDKH3pG9vT8OepNwpfn\nAAgASYBoAMQdYRTDirz3p5oGc0yOadbWAKFAj01nSLb3miMQ3LI0BpqWKUfF\n4ela\r\n=F4ov\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"f47c11d3f40f87797c5a615af0bd0225fb18fda8","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.1.0","apollo-server-core":"^2.25.1","apollo-server-types":"^0.9.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.25.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.25.1_1623186374789_0.346301177294978","host":"s3://npm-registry-packages"}},"3.0.0-preview.1":{"name":"apollo-server-cloud-functions","version":"3.0.0-preview.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.0.0-preview.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"83f6510691a9b7b12d38311120c956539467d4a6","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.0.0-preview.1.tgz","fileCount":16,"integrity":"sha512-G+FFGcf8aKdV2yquAcFjyC71Y9k2iXwjcHymmSwzqJ11lrkinczCjrbuFvca7tPM0UwfLqbSUYrvqbB9fPX/gw==","signatures":[{"sig":"MEQCIA2moaoEBO6AKgcOEOGtBdjE3YUAjL56FC7K61g079ngAiAk1UUMm6BNfT3vzeqAeMH2smzJPN/ycPDRqg4wyal6ig==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyZM9CRA9TVsSAnZWagAAbNwQAJpTzpTQXgrAZyROniEL\ne53afhdakc1uNpnIwoZ7Z7f6hRsgmN/F0P2OLtmkfkDi1AN6nnOI2xmELCJD\nrnrgMJRr6m7BP6w7rKMHEu9RM7djtKoyIDOL9utyNg+xNtVnJ3nVFrQoUof1\nb68RZGfELiuKjRmNPPP7xAiUyvNbOyIsdLDfoBfHSiJniClrvlErVVWUmaWe\nZv6FmZy25E4z6Tse++mVW+yR/mS354+gsKtd2yrCdEWojORXev1ls7HMVQMq\n/YWbXBgqNFhbaABdY2/MmtdmaeAERtlqMY8AkVVSVC2K983JVc57XRjdkC71\nXDsVyUZhK4oL2zLoFsDm8fm5p8mJZ1lRvh+L4Lc6v4XGPUh3Op+Y3aQi56nI\n8se6AEls5o+gu5ryLhPaTXLKUCf8K1Z2/zuv3y1+N2nhf1BCfi9lARBdm6Y0\n4LaWfNtXSRhxViVOztZGrN9CSdFjBqfDWYGuhk/nG984x7vnkfc35oX2ak+s\ni6I9e2DeOANTd2Rm1NYb6SXtYajdirYuGhYS+Tx7VZ040LGN0tKq6TlrpYlx\noMCRhjb5Y0vCMRYFD3CmshPxTOglSO7gcMHc+QGNwLyya2yAuUJvuJwKRrLO\njE+tZh6APEjSSKcEykKUNqrazQZHrKVxAWKB79//C1jg/Dze09+ocHJqEKly\nil0m\r\n=17dP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n# Deploying with Google Cloud Functions\n\nThis tutorial helps you deploy Apollo Server to Google Cloud Functions. It uses the following example function handler:\n\n```javascript:title=index.js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\n// Because `NODE_ENV` is a reserved environment variable in Google Cloud\n// Functions and it defaults to \"production\", you need to set the\n// `introspection` option to `true` for a UI like Apollo Sandbox or GraphQL\n// Playground to work correctly.\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n## Deploying from the Google Cloud Console\n\n### 1. Configure the function\n\nFrom your Google Cloud Console, go to the [Cloud Functions page](https://console.cloud.google.com/functions/list).\n\nClick **Create Function**. Give the function a name and set the **Trigger type** to `HTTP`.\n\nFor quick setup and access to the GraphQL endpoint/landing page, choose to **Allow unauthenticated invocations**. To require authentication for this endpoint, you can manage authorized users via [Cloud IAM](https://console.cloud.google.com/iam-admin/iam).\n\nSave your configuration changes in the Trigger section. Copy the trigger's URL for later and click **Next**.\n\n### 2. Write the API handlers and deploy\n\nNow on the Code page, set the runtime to a currently supported version of Node.js (such as `Node.js 14`), and set the Entry point to `handler`.\n\nPaste the example code at the top of this page into the contents of `index.js` in the code editor.\n\nEdit `package.json` so that it lists `apollo-server-cloud-functions` and `graphql` in its dependencies:\n\n```json:title=package.json\n\"dependencies\": {\n  \"apollo-server-cloud-functions\": \"^2.24.0\",\n  \"graphql\": \"^15.5.0\"\n}\n```\n\nClick **Deploy** to initiate deployment. Then, proceed to [Testing the function](#testing-the-function).\n\n\n## Deploying from your local machine\n\nBefore proceeding, you need to set up the gcloud SDK:\n\n1. [Install the gcloud SDK](https://cloud.google.com/sdk/docs/install)\n\n2. [Initialize the gcloud SDK and authenticate your Google account](https://cloud.google.com/sdk/docs/initializing)\n\nNext, initialize a new Node.js project by running `npm init` in an empty directory.\n\nRun `npm install apollo-server-cloud-functions graphql` to install the necessary dependencies and to include them in the `package.json` file.\n\nAt this point, your `package.json` should resemble the following:\n\n```json\n{\n  \"name\": \"apollo-gcloud\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"apollo-server-cloud-functions\": \"^2.24.0\",\n    \"graphql\": \"^15.5.0\"\n  }\n}\n```\n\nCreate a new file named `index.js` and paste the sample code at the top of this page into it.\n\nRun the following command to create and deploy the function to Cloud Functions:\n\n```bash\ngcloud functions deploy apollo-graphql-example --entry-point handler --runtime nodejs14 --trigger-http\n```\n\nThis creates a function named `apollo-graphql-example` that you can view from your console's [Cloud Functions page](https://console.cloud.google.com/functions/list)\n\nThe command asks some configuration questions and prints metadata about your newly created function, which includes the function's trigger URL.\n\nFor more information, see the official [Cloud Functions docs](https://cloud.google.com/functions/docs/deploying/filesystem).\n\n## Testing the function\n\nAfter deployment completes, navigate to your function's trigger URL. If deployment succeeded, you should see your server's landing page.\n\n> If you can't access your trigger URL, you might need to [add `allAuthenticatedUsers` or `allUsers` permissions](https://cloud.google.com/iam/docs/overview#all-authenticated-users) to your function.\n\nClick <q>Query your Server</q> and use Apollo Sandbox to test the following query:\n\n```graphql\nquery TestQuery {\n  hello\n}\n```\n\nAnd verify that the following response appears:\n\n```json\n{\n  \"data\": {\n    \"hello\": \"Hello world!\"\n  }\n}\n```\n\n## Getting request details\n\nTo obtain information about a currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, etc.) use the `context` option. This enables you to pass any request-specific data to your server's resolvers.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (CORS)\n\nTo enable CORS, you need to modify your HTTP response headers. To do so, use the `cors` option:\n\n```javascript{23-26}\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, HTTP authentication) the allow origin header must equal the request origin and the allow credential header must be set to `true`.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### CORS Options\n\nThe options correspond to the [express `cors` configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n| Option | Type(s) |\n|--------|---------|\n| `origin` | boolean \\| string \\| string[] |\n| `methods` | string \\| string[] |\n| `allowedHeaders` | string \\| string[] |\n| `exposedHeaders` | string \\| string[] |\n| `credentials` | boolean |\n| `maxAge` | number |\n","engines":{"node":">=12.0"},"gitHead":"f23a4eb1aa5c5ae8cf83a1f41bd9bae3a03d3360","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.0.0-preview.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.0.0-preview.1"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.0.0-preview.1_1623823164982_0.8964524549809998","host":"s3://npm-registry-packages"}},"3.0.0-preview.2":{"name":"apollo-server-cloud-functions","version":"3.0.0-preview.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.0.0-preview.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"210dfad8562066e58f889071f2c8776902a45436","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.0.0-preview.2.tgz","fileCount":16,"integrity":"sha512-5p8njEDHl+TZykDYum15PbYe9kczv8K4tsVR+2Pjm0t+VJx0QATl5wEE6W1vSNKELxOH/RK0rwqlzdJco+aFBA==","signatures":[{"sig":"MEQCIDRUwVPuoBr3rXAr+0Tbmo6u83/YSkorqP63wxwXKGRcAiA4fqi9TFpxOzLrjfjMbC3wLQI4DHImBfNEdLLZE6rvZw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyZcPCRA9TVsSAnZWagAAuTwP/0bdc/TE3Dflrk3hhqyL\n7rl1ppINHRLmn+zoXHdmQVgq5WQxR8qoJZmUs62251GghhAskNbsRTVz/vpk\nJnafC4EOeh7TfmjaeyKd0aCxVB2flIhd0k800WQCJbJSBPOuf571oCV4fNHu\nXtTKWEb0gLNXWPACiKKqKGd2PyZtsRST59snUxohe84cl2KS9DePohZqceSl\nYfa9PFF8X9TTLvoXXid7y6M8qv7s0ZWQnHbEjbhEEX3f7iLmkqd1M61OLL5+\nO5fcWBbRHf7wJggu6FKhQ9igheU9neNiYBhj6OHdpSBMKzIURE3UWV/DgQQr\nEwZKM9AfGMC60VZqvsSzEh2KyNetrbga/k0GVTOu4JEsZKcda91H8oeqPqEq\nNzatvj0V9yFym3m0fIRMkJwQHDrCwySTAcA4oc18HZhl514Hl6P8hfeVAtmB\nmgGShsWoVZtom9wEqAFAZxEpppGY3eg6pMvq/AVoJxEgdhFPNDnEFhmJvGlM\neArd5gPdY2aLnhGughPNvqZpey9MiAo3Zqs+2EEpUbAj5jtSFMkJf2CpT8uB\naihO/l5YXlLZn7P3M8h07lzpj340WB60u+CTV3qacRU+4dTx4SbdCGICd006\nrUyZdfVx6VQ3GGuPo124aEACJSXhNrZaUzx8YJoVGZ1hopQgxoOM0dB9+DSO\nqVqg\r\n=/thR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n# Deploying with Google Cloud Functions\n\nThis tutorial helps you deploy Apollo Server to Google Cloud Functions. It uses the following example function handler:\n\n```javascript:title=index.js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\n// Because `NODE_ENV` is a reserved environment variable in Google Cloud\n// Functions and it defaults to \"production\", you need to set the\n// `introspection` option to `true` for a UI like Apollo Sandbox or GraphQL\n// Playground to work correctly.\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n## Deploying from the Google Cloud Console\n\n### 1. Configure the function\n\nFrom your Google Cloud Console, go to the [Cloud Functions page](https://console.cloud.google.com/functions/list).\n\nClick **Create Function**. Give the function a name and set the **Trigger type** to `HTTP`.\n\nFor quick setup and access to the GraphQL endpoint/landing page, choose to **Allow unauthenticated invocations**. To require authentication for this endpoint, you can manage authorized users via [Cloud IAM](https://console.cloud.google.com/iam-admin/iam).\n\nSave your configuration changes in the Trigger section. Copy the trigger's URL for later and click **Next**.\n\n### 2. Write the API handlers and deploy\n\nNow on the Code page, set the runtime to a currently supported version of Node.js (such as `Node.js 14`), and set the Entry point to `handler`.\n\nPaste the example code at the top of this page into the contents of `index.js` in the code editor.\n\nEdit `package.json` so that it lists `apollo-server-cloud-functions` and `graphql` in its dependencies:\n\n```json:title=package.json\n\"dependencies\": {\n  \"apollo-server-cloud-functions\": \"^2.24.0\",\n  \"graphql\": \"^15.5.0\"\n}\n```\n\nClick **Deploy** to initiate deployment. Then, proceed to [Testing the function](#testing-the-function).\n\n\n## Deploying from your local machine\n\nBefore proceeding, you need to set up the gcloud SDK:\n\n1. [Install the gcloud SDK](https://cloud.google.com/sdk/docs/install)\n\n2. [Initialize the gcloud SDK and authenticate your Google account](https://cloud.google.com/sdk/docs/initializing)\n\nNext, initialize a new Node.js project by running `npm init` in an empty directory.\n\nRun `npm install apollo-server-cloud-functions graphql` to install the necessary dependencies and to include them in the `package.json` file.\n\nAt this point, your `package.json` should resemble the following:\n\n```json\n{\n  \"name\": \"apollo-gcloud\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"apollo-server-cloud-functions\": \"^2.24.0\",\n    \"graphql\": \"^15.5.0\"\n  }\n}\n```\n\nCreate a new file named `index.js` and paste the sample code at the top of this page into it.\n\nRun the following command to create and deploy the function to Cloud Functions:\n\n```bash\ngcloud functions deploy apollo-graphql-example --entry-point handler --runtime nodejs14 --trigger-http\n```\n\nThis creates a function named `apollo-graphql-example` that you can view from your console's [Cloud Functions page](https://console.cloud.google.com/functions/list)\n\nThe command asks some configuration questions and prints metadata about your newly created function, which includes the function's trigger URL.\n\nFor more information, see the official [Cloud Functions docs](https://cloud.google.com/functions/docs/deploying/filesystem).\n\n## Testing the function\n\nAfter deployment completes, navigate to your function's trigger URL. If deployment succeeded, you should see your server's landing page.\n\n> If you can't access your trigger URL, you might need to [add `allAuthenticatedUsers` or `allUsers` permissions](https://cloud.google.com/iam/docs/overview#all-authenticated-users) to your function.\n\nClick <q>Query your Server</q> and use Apollo Sandbox to test the following query:\n\n```graphql\nquery TestQuery {\n  hello\n}\n```\n\nAnd verify that the following response appears:\n\n```json\n{\n  \"data\": {\n    \"hello\": \"Hello world!\"\n  }\n}\n```\n\n## Getting request details\n\nTo obtain information about a currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, etc.) use the `context` option. This enables you to pass any request-specific data to your server's resolvers.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (CORS)\n\nTo enable CORS, you need to modify your HTTP response headers. To do so, use the `cors` option:\n\n```javascript{23-26}\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, HTTP authentication) the allow origin header must equal the request origin and the allow credential header must be set to `true`.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### CORS Options\n\nThe options correspond to the [express `cors` configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n| Option | Type(s) |\n|--------|---------|\n| `origin` | boolean \\| string \\| string[] |\n| `methods` | string \\| string[] |\n| `allowedHeaders` | string \\| string[] |\n| `exposedHeaders` | string \\| string[] |\n| `credentials` | boolean |\n| `maxAge` | number |\n","engines":{"node":">=12.0"},"gitHead":"09dbe3e7029ea3ccdf16538699848f08bbed3904","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.0.0-preview.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.0.0-preview.2"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.0.0-preview.2_1623824143127_0.19352765169878072","host":"s3://npm-registry-packages"}},"2.25.2":{"name":"apollo-server-cloud-functions","version":"2.25.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.25.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"66cf765de04aab485c208ebe17950bec670666fb","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.25.2.tgz","fileCount":20,"integrity":"sha512-DzHPjFabYrsHG8XCBnZfD2Y1hUc6IO4WqaLsVv8zyaMZClaav7Z465ZIDUycdHuSyQAF4T2+0qr73gdjZRDL/w==","signatures":[{"sig":"MEUCIQDm6DLlszp4Lf8i8wYM4HhvDYm6uGDYzCbecEkmVK9yKwIgM/tp6lufFZlF/io6b1JxZbKwIBcCXjZzXqsDutI9q5A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0j/YCRA9TVsSAnZWagAAyzIP/AzEnU8w2/vR479puAWQ\nHDbKKK6ol56Mv2+KA50M+cI54LmLnt3+N9wQWlikgrzEL4pNIXrIC67Y50CH\nN55TbzwUtL4lxaIuixQsruHBO7DdCbfXPd+kUeVbcKJ9f3Fykz05UqaKGCbD\n/04V6RhGPL4V5kqpA74R9JfIR5JyYqyA8VVJNhTvgNlDnCvogpnLU4NflN5Y\nXHyxokg0lKLArd9OcsKX7rtqSOeVYwan2LR3P7mAXLTjN5uZhJRi/0Iqx5TQ\n/JH0SL0tpCNyWsuWvNULSYJ8NPSKNk9JE3Q7MwJt573L5zwgnF1q0zoT8NNH\n7g/qszvaAVGJfzbbud18q913LOS14D/vuQfXa0Zrh6/jG4RjIlq1h8yMxWVd\nqNXVpL+r59PiHUzyYgZjHNhoERnLpC9XfHfuFHizKu2nBkO8sT7egnyCERYx\nPiurldxTVxlev7iXWkVlzgQKQitSy3ASAIv5OWawneZfv4EEQCTyeOqhxoC4\nFq2cWEAhXpMhF60KMFxXk6qkfvZIsC+/BuPTcA3RsKMaSQW2+NPOJ2uRBLIw\nXrBxV9duI9cEA9iqj5CitEqHNHmP/jWDhlc0e3WOHRx3UZuHED9GEeq+0eWB\nIAeM/E8IOSe5P5A06XIMynaQI+gwbjpjFnVhW3JAQ8pxrtDEGD0dJFDk8fUy\n1Dga\r\n=uHPo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"70a431212bd2d07d68c962cb5ded63ecc6a21963","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.1.0","apollo-server-core":"^2.25.2","apollo-server-types":"^0.9.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.25.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.25.2_1624391640445_0.9478575351746086","host":"s3://npm-registry-packages"}},"3.0.0-preview.3":{"name":"apollo-server-cloud-functions","version":"3.0.0-preview.3","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.0.0-preview.3","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"5760b91ec8ebd071347515c2002e9bed9da1432f","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.0.0-preview.3.tgz","fileCount":16,"integrity":"sha512-XSsIRdg65r/gLQF3JMgRlk9jMEFi0lB4/PzqXKpIEuWUDwSEutj9EXk4i/bpHMbs2lG97s9KqTi7kG6bKrToTg==","signatures":[{"sig":"MEUCIEDA+QO9wNeVWg68xXS8zw8Rz4XOnOlwk+3NQzxMnpJiAiEAsQO83OsE/BrUPFCApFvPI3BEmvrRBo5Zm0hVC8c+0iY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70328,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1r57CRA9TVsSAnZWagAA1tQQAIaKqUhzwYaMgVCCbabR\nSThrbWCmkAAdd3gt4aE/xDEy0DXhIgl7RwEEPRXKoT/TFpeFOAYO7AmDJ78R\nPrZQ2eqPTkGznSJEHRM6IaxtTJxcxoE0YRrWAndrC2LBWIkNPN0lircGRhRM\n/THqSJSKzsILeI0fw/+ZVWCESO5gq1GpraxL4WbJlbsWIPG9Ji1EZOCRzOqP\nYExNhU742WIL/CX8WXIld2bBtieTmf+k6XVAu35ATZ9HaHbSua5ft+gxG604\nXOZSFs9JwbrES25ugi3iPntqfnqFmW9Gz/TT3M24/bThx+ftbZ1rhk2tA/D1\n4Xe/yli2GrAD3DJr1yjlEfeYMuV+hnqpq9dtuHlVWPphICY7nT3XLEO9RdCm\nNoPDKh0QnWWM14mQsSOI5uqW/InIuXzhNoDCUksoKKYmmAEgu5GXOtpVJ0en\nKFTTyBZlDoruXlNdtOAFQE7SCS6EGv1L3xuHLq897vBjWurpFmwxCOYRqFPX\nBmhI5YGxXa8QitfYDBAsQ9ehPaEn0WmuoQa4DFuQhzguBvGDKiot9WXWY/sF\nFMnep6a1sP0wrOJo7kFDu2L7XsdnSJt3/tvjB14FvdQZS7CVXv3MPaABybaU\nS+scyy1ZlEUBUBaZVSgElNXrFn2UDkXEV6dyjHi9VMjAVyurnFNw+flFVfJJ\n3vk2\r\n=90jr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n# Deploying with Google Cloud Functions\n\nThis tutorial helps you deploy Apollo Server to Google Cloud Functions. It uses the following example function handler:\n\n```javascript:title=index.js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\n// Because `NODE_ENV` is a reserved environment variable in Google Cloud\n// Functions and it defaults to \"production\", you need to set the\n// `introspection` option to `true` for a UI like Apollo Sandbox or GraphQL\n// Playground to work correctly.\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n## Deploying from the Google Cloud Console\n\n### 1. Configure the function\n\nFrom your Google Cloud Console, go to the [Cloud Functions page](https://console.cloud.google.com/functions/list).\n\nClick **Create Function**. Give the function a name and set the **Trigger type** to `HTTP`.\n\nFor quick setup and access to the GraphQL endpoint/landing page, choose to **Allow unauthenticated invocations**. To require authentication for this endpoint, you can manage authorized users via [Cloud IAM](https://console.cloud.google.com/iam-admin/iam).\n\nSave your configuration changes in the Trigger section. Copy the trigger's URL for later and click **Next**.\n\n### 2. Write the API handlers and deploy\n\nNow on the Code page, set the runtime to a currently supported version of Node.js (such as `Node.js 14`), and set the Entry point to `handler`.\n\nPaste the example code at the top of this page into the contents of `index.js` in the code editor.\n\nEdit `package.json` so that it lists `apollo-server-cloud-functions` and `graphql` in its dependencies:\n\n```json:title=package.json\n\"dependencies\": {\n  \"apollo-server-cloud-functions\": \"^2.24.0\",\n  \"graphql\": \"^15.5.0\"\n}\n```\n\nClick **Deploy** to initiate deployment. Then, proceed to [Testing the function](#testing-the-function).\n\n\n## Deploying from your local machine\n\nBefore proceeding, you need to set up the gcloud SDK:\n\n1. [Install the gcloud SDK](https://cloud.google.com/sdk/docs/install)\n\n2. [Initialize the gcloud SDK and authenticate your Google account](https://cloud.google.com/sdk/docs/initializing)\n\nNext, initialize a new Node.js project by running `npm init` in an empty directory.\n\nRun `npm install apollo-server-cloud-functions graphql` to install the necessary dependencies and to include them in the `package.json` file.\n\nAt this point, your `package.json` should resemble the following:\n\n```json\n{\n  \"name\": \"apollo-gcloud\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"apollo-server-cloud-functions\": \"^2.24.0\",\n    \"graphql\": \"^15.5.0\"\n  }\n}\n```\n\nCreate a new file named `index.js` and paste the sample code at the top of this page into it.\n\nRun the following command to create and deploy the function to Cloud Functions:\n\n```bash\ngcloud functions deploy apollo-graphql-example --entry-point handler --runtime nodejs14 --trigger-http\n```\n\nThis creates a function named `apollo-graphql-example` that you can view from your console's [Cloud Functions page](https://console.cloud.google.com/functions/list)\n\nThe command asks some configuration questions and prints metadata about your newly created function, which includes the function's trigger URL.\n\nFor more information, see the official [Cloud Functions docs](https://cloud.google.com/functions/docs/deploying/filesystem).\n\n## Testing the function\n\nAfter deployment completes, navigate to your function's trigger URL. If deployment succeeded, you should see your server's landing page.\n\n> If you can't access your trigger URL, you might need to [add `allAuthenticatedUsers` or `allUsers` permissions](https://cloud.google.com/iam/docs/overview#all-authenticated-users) to your function.\n\nClick <q>Query your Server</q> and use Apollo Sandbox to test the following query:\n\n```graphql\nquery TestQuery {\n  hello\n}\n```\n\nAnd verify that the following response appears:\n\n```json\n{\n  \"data\": {\n    \"hello\": \"Hello world!\"\n  }\n}\n```\n\n## Getting request details\n\nTo obtain information about a currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, etc.) use the `context` option. This enables you to pass any request-specific data to your server's resolvers.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (CORS)\n\nTo enable CORS, you need to modify your HTTP response headers. To do so, use the `cors` option:\n\n```javascript{23-26}\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, HTTP authentication) the allow origin header must equal the request origin and the allow credential header must be set to `true`.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### CORS Options\n\nThe options correspond to the [express `cors` configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n| Option | Type(s) |\n|--------|---------|\n| `origin` | boolean \\| string \\| string[] |\n| `methods` | string \\| string[] |\n| `allowedHeaders` | string \\| string[] |\n| `exposedHeaders` | string \\| string[] |\n| `credentials` | boolean |\n| `maxAge` | number |\n","engines":{"node":">=12.0"},"gitHead":"16c00c982b11cf91ab8f208f88cf587622fc5dd7","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.0.0-preview.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.0.0-preview.3"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.0.0-preview.3_1624686203252_0.2085738614538455","host":"s3://npm-registry-packages"}},"3.0.0-preview.4":{"name":"apollo-server-cloud-functions","version":"3.0.0-preview.4","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.0.0-preview.4","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"3541e86b4e156b49498235acf113ea23f81eb446","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.0.0-preview.4.tgz","fileCount":16,"integrity":"sha512-lvDUP0BGZ3FLO4RSsLuCuMJg/JQd4DolOuomMqydbZa3zMzS5eZ7lfbH4J/OBXADidT4ix0CsjKFxnNPzwmAbw==","signatures":[{"sig":"MEYCIQDvuKTmIudPV6gl5lzr3+3HMdnm4XlEey8oC4bPQ6Z94AIhAL3akehPIdoEXi/FO1JKAG6Bo2prg5g6MUNguGoLjF8t","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70328,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3NzDCRA9TVsSAnZWagAA0OsP/jyMWL2uJOpnGMODfr1Y\neg2NFpQpmBp6G9C6c49ZgWpvvAZ9wFa1H9xZDd+Tn3RMUDXDZ2Od3R5fh7eb\n6C52NJpdceaDPtrTBDotYzflGsMOlETtjI/1GW2GNzFgTATqfUA9K3z/jSyH\np5+7+JSlvscQMJ/jk7LNfpufU4NJBhxiXf2Tjo6Xo+llEKjCzkZBdTZTGSG7\ncrcdHtCnW/Nr+YaftNJUucDbkxITF3hGrr5PmYH/HKT0TyUzJCpwYNLkJUFq\nupoIo6wHoUExLvqm8F+lnoW4OygbyT+OcS7ERiLFi9wGTRhwsaTZGG4RTrkR\nrnbrkwRxxDHWdYR5mYE77kzOnckEtp//0P2Wjygi+7T9QEn+9/3Z99PNfXvW\nsv/bx26lap/kxafwFXPLn+T1tJNWoUod0WPnQDyNXKgt8sH1zBOidFcLaVjo\nMhyhBqQR7aCJkFcIq3EY7MdJrfS5t0fmo7i7bDufNIZ3LdeVSycHEMHUNEkq\nWi1M5NYDyp34NlYt6WpS6t1NbQSMWZ+ZaaooXCqnuUtaeOfsFSTsW2fIIxY4\ne6LAldroEUtIgoJ5CQ5DTxeL0/hw6mxuQaXnrzCsdjtjXGqZG+UKGbKXQTgZ\nJ8UaUCaIp461l87F+DaJESiC3gbdvwlcKgDUMdWKhGdMr5jrHbLiqcZWr/7g\nACQg\r\n=rx6X\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n# Deploying with Google Cloud Functions\n\nThis tutorial helps you deploy Apollo Server to Google Cloud Functions. It uses the following example function handler:\n\n```javascript:title=index.js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\n// Because `NODE_ENV` is a reserved environment variable in Google Cloud\n// Functions and it defaults to \"production\", you need to set the\n// `introspection` option to `true` for a UI like Apollo Sandbox or GraphQL\n// Playground to work correctly.\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n## Deploying from the Google Cloud Console\n\n### 1. Configure the function\n\nFrom your Google Cloud Console, go to the [Cloud Functions page](https://console.cloud.google.com/functions/list).\n\nClick **Create Function**. Give the function a name and set the **Trigger type** to `HTTP`.\n\nFor quick setup and access to the GraphQL endpoint/landing page, choose to **Allow unauthenticated invocations**. To require authentication for this endpoint, you can manage authorized users via [Cloud IAM](https://console.cloud.google.com/iam-admin/iam).\n\nSave your configuration changes in the Trigger section. Copy the trigger's URL for later and click **Next**.\n\n### 2. Write the API handlers and deploy\n\nNow on the Code page, set the runtime to a currently supported version of Node.js (such as `Node.js 14`), and set the Entry point to `handler`.\n\nPaste the example code at the top of this page into the contents of `index.js` in the code editor.\n\nEdit `package.json` so that it lists `apollo-server-cloud-functions` and `graphql` in its dependencies:\n\n```json:title=package.json\n\"dependencies\": {\n  \"apollo-server-cloud-functions\": \"^2.24.0\",\n  \"graphql\": \"^15.5.0\"\n}\n```\n\nClick **Deploy** to initiate deployment. Then, proceed to [Testing the function](#testing-the-function).\n\n\n## Deploying from your local machine\n\nBefore proceeding, you need to set up the gcloud SDK:\n\n1. [Install the gcloud SDK](https://cloud.google.com/sdk/docs/install)\n\n2. [Initialize the gcloud SDK and authenticate your Google account](https://cloud.google.com/sdk/docs/initializing)\n\nNext, initialize a new Node.js project by running `npm init` in an empty directory.\n\nRun `npm install apollo-server-cloud-functions graphql` to install the necessary dependencies and to include them in the `package.json` file.\n\nAt this point, your `package.json` should resemble the following:\n\n```json\n{\n  \"name\": \"apollo-gcloud\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"apollo-server-cloud-functions\": \"^2.24.0\",\n    \"graphql\": \"^15.5.0\"\n  }\n}\n```\n\nCreate a new file named `index.js` and paste the sample code at the top of this page into it.\n\nRun the following command to create and deploy the function to Cloud Functions:\n\n```bash\ngcloud functions deploy apollo-graphql-example --entry-point handler --runtime nodejs14 --trigger-http\n```\n\nThis creates a function named `apollo-graphql-example` that you can view from your console's [Cloud Functions page](https://console.cloud.google.com/functions/list)\n\nThe command asks some configuration questions and prints metadata about your newly created function, which includes the function's trigger URL.\n\nFor more information, see the official [Cloud Functions docs](https://cloud.google.com/functions/docs/deploying/filesystem).\n\n## Testing the function\n\nAfter deployment completes, navigate to your function's trigger URL. If deployment succeeded, you should see your server's landing page.\n\n> If you can't access your trigger URL, you might need to [add `allAuthenticatedUsers` or `allUsers` permissions](https://cloud.google.com/iam/docs/overview#all-authenticated-users) to your function.\n\nClick <q>Query your Server</q> and use Apollo Sandbox to test the following query:\n\n```graphql\nquery TestQuery {\n  hello\n}\n```\n\nAnd verify that the following response appears:\n\n```json\n{\n  \"data\": {\n    \"hello\": \"Hello world!\"\n  }\n}\n```\n\n## Getting request details\n\nTo obtain information about a currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, etc.) use the `context` option. This enables you to pass any request-specific data to your server's resolvers.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (CORS)\n\nTo enable CORS, you need to modify your HTTP response headers. To do so, use the `cors` option:\n\n```javascript{23-26}\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, HTTP authentication) the allow origin header must equal the request origin and the allow credential header must be set to `true`.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### CORS Options\n\nThe options correspond to the [express `cors` configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n| Option | Type(s) |\n|--------|---------|\n| `origin` | boolean \\| string \\| string[] |\n| `methods` | string \\| string[] |\n| `allowedHeaders` | string \\| string[] |\n| `exposedHeaders` | string \\| string[] |\n| `credentials` | boolean |\n| `maxAge` | number |\n","engines":{"node":">=12.0"},"gitHead":"4669d1aafb6fb6571de1d5789ee4375aa25eacf5","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.0.0-preview.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.0.0-preview.4"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.0.0-preview.4_1625087170883_0.9626955977705218","host":"s3://npm-registry-packages"}},"3.0.0-rc.0":{"name":"apollo-server-cloud-functions","version":"3.0.0-rc.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.0.0-rc.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"825f819253bc7d34959428e3e898d4107478ec24","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.0.0-rc.0.tgz","fileCount":16,"integrity":"sha512-FgOf/5f11Ei9Ieyb9r+Axlf++5HXkXuxBvmFnmbuunQjPqKfGEbcLdXwKBwzeFGq/V47UTKg0r7HjVSgnSpbMw==","signatures":[{"sig":"MEYCIQCwJIY9LoXugrq3TYKRFUlHxZwaNfoXHWTLcH6Jg9siHwIhAKJfG4mBP9LEEmI0ScGAnfqZAmchNIYyiibg6131R8h2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3lLbCRA9TVsSAnZWagAASqoP/2hE98zVDYUW7rJcf5Co\nsrVKCHg4EppEPZXqk6gxDlSukS86z+uFhJner4Sgf3SmpzPj+yccm2Spj7gG\ne3PbcShom6UbJNIM1wne5wFiYF/iqM1icmrlLXZHscpnK6ncabjHTIMvpmsz\nS4yteCmCRHII5vu+G8ZvBi9kwO/a64gBQI26KZxDC+r81KE4qM4hs5L2vWw1\nkwUqJpJSInxt8T7OcbhNxuOojr9RLbb7QtjRtMdJcsmzDjX/eNo9UC5sisKM\nSZNmo27/9sV/GzJTQ4bkjuxMfDShM0Xm2g7P/J+zzoUISSahBSgTrhkCBB1E\nt8zDD41X+d/JKqiPrTHCGZbtE+CAeFmdMC5PJ3ely5eTQiHyayoRHVxytbaS\nH6oVE/bEUv9v8ct4oiHlX8akr7vRheHzW+KJtjHJU6KCye332WENH9TTOw5u\nagekgWr74Boev7NKT1lnuOxfF0IT8ZdGqp7zIEilFezzRLzxzOnywV/5B2fp\nnKlOo1EJSerahX+7SBK9qg+hgz48aU+AXtn6A7913/3cmjYnOdsUzwqoy8hJ\nsWwe9jiD9hrZxMUwpU2fhgS1IHI6Yjlvu5uJkOR1WDo+ZIu4dmT2q6XrqcaR\nCiNTWZU/TKgUH/Us5F/XaGnwd0Zese4mDvmW15j/6ZNQHmZ+IoLonydVxfis\nHDPS\r\n=VGec\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n# Deploying with Google Cloud Functions\n\nThis tutorial helps you deploy Apollo Server to Google Cloud Functions. It uses the following example function handler:\n\n```javascript:title=index.js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\n// Because `NODE_ENV` is a reserved environment variable in Google Cloud\n// Functions and it defaults to \"production\", you need to set the\n// `introspection` option to `true` for a UI like Apollo Sandbox or GraphQL\n// Playground to work correctly.\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n## Deploying from the Google Cloud Console\n\n### 1. Configure the function\n\nFrom your Google Cloud Console, go to the [Cloud Functions page](https://console.cloud.google.com/functions/list).\n\nClick **Create Function**. Give the function a name and set the **Trigger type** to `HTTP`.\n\nFor quick setup and access to the GraphQL endpoint/landing page, choose to **Allow unauthenticated invocations**. To require authentication for this endpoint, you can manage authorized users via [Cloud IAM](https://console.cloud.google.com/iam-admin/iam).\n\nSave your configuration changes in the Trigger section. Copy the trigger's URL for later and click **Next**.\n\n### 2. Write the API handlers and deploy\n\nNow on the Code page, set the runtime to a currently supported version of Node.js (such as `Node.js 14`), and set the Entry point to `handler`.\n\nPaste the example code at the top of this page into the contents of `index.js` in the code editor.\n\nEdit `package.json` so that it lists `apollo-server-cloud-functions` and `graphql` in its dependencies:\n\n```json:title=package.json\n\"dependencies\": {\n  \"apollo-server-cloud-functions\": \"^2.24.0\",\n  \"graphql\": \"^15.5.0\"\n}\n```\n\nClick **Deploy** to initiate deployment. Then, proceed to [Testing the function](#testing-the-function).\n\n\n## Deploying from your local machine\n\nBefore proceeding, you need to set up the gcloud SDK:\n\n1. [Install the gcloud SDK](https://cloud.google.com/sdk/docs/install)\n\n2. [Initialize the gcloud SDK and authenticate your Google account](https://cloud.google.com/sdk/docs/initializing)\n\nNext, initialize a new Node.js project by running `npm init` in an empty directory.\n\nRun `npm install apollo-server-cloud-functions graphql` to install the necessary dependencies and to include them in the `package.json` file.\n\nAt this point, your `package.json` should resemble the following:\n\n```json\n{\n  \"name\": \"apollo-gcloud\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"apollo-server-cloud-functions\": \"^2.24.0\",\n    \"graphql\": \"^15.5.0\"\n  }\n}\n```\n\nCreate a new file named `index.js` and paste the sample code at the top of this page into it.\n\nRun the following command to create and deploy the function to Cloud Functions:\n\n```bash\ngcloud functions deploy apollo-graphql-example --entry-point handler --runtime nodejs14 --trigger-http\n```\n\nThis creates a function named `apollo-graphql-example` that you can view from your console's [Cloud Functions page](https://console.cloud.google.com/functions/list)\n\nThe command asks some configuration questions and prints metadata about your newly created function, which includes the function's trigger URL.\n\nFor more information, see the official [Cloud Functions docs](https://cloud.google.com/functions/docs/deploying/filesystem).\n\n## Testing the function\n\nAfter deployment completes, navigate to your function's trigger URL. If deployment succeeded, you should see your server's landing page.\n\n> If you can't access your trigger URL, you might need to [add `allAuthenticatedUsers` or `allUsers` permissions](https://cloud.google.com/iam/docs/overview#all-authenticated-users) to your function.\n\nClick <q>Query your Server</q> and use Apollo Sandbox to test the following query:\n\n```graphql\nquery TestQuery {\n  hello\n}\n```\n\nAnd verify that the following response appears:\n\n```json\n{\n  \"data\": {\n    \"hello\": \"Hello world!\"\n  }\n}\n```\n\n## Getting request details\n\nTo obtain information about a currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, etc.) use the `context` option. This enables you to pass any request-specific data to your server's resolvers.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (CORS)\n\nTo enable CORS, you need to modify your HTTP response headers. To do so, use the `cors` option:\n\n```javascript{23-26}\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, HTTP authentication) the allow origin header must equal the request origin and the allow credential header must be set to `true`.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### CORS Options\n\nThe options correspond to the [express `cors` configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n| Option | Type(s) |\n|--------|---------|\n| `origin` | boolean \\| string \\| string[] |\n| `methods` | string \\| string[] |\n| `allowedHeaders` | string \\| string[] |\n| `exposedHeaders` | string \\| string[] |\n| `credentials` | boolean |\n| `maxAge` | number |\n","engines":{"node":">=12.0"},"gitHead":"b2c2097ddd58623815112c0e084761f426d2e435","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.0.0-rc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.0.0-rc.0"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.0.0-rc.0_1625182938896_0.6184051968420978","host":"s3://npm-registry-packages"}},"3.0.0-rc.1":{"name":"apollo-server-cloud-functions","version":"3.0.0-rc.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.0.0-rc.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"e9faf4fe9f0be1533ce6df3be285677fca11b912","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.0.0-rc.1.tgz","fileCount":16,"integrity":"sha512-nxScGJtoHpy03+J7AsX58fkNhUvw9iX/BnWTMJtDVmQwlAH5rZYRbtKffeNKYrTofn0nxMn2blzFsl9QVPxmSA==","signatures":[{"sig":"MEQCIGVL19U9Jif8hue+2Ko6X2eU7FrQ8MsBAAqrA4hJr/YqAiAdLeZvon/7gLa45osdCuoQJWNWvlav2b/loplRWXq60w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg34m9CRA9TVsSAnZWagAAHtkP/3kalL6WjR/5XJsW1BP6\npQn4OGM/OUBvoSa/41GGfmjJZmiNesW38gEskqPJM711aVrjPWzBSP7YaXaX\nJMToYOwcFzPI2AQnvt/RJUnkWK0CL/WfnTwQaY0OQl0gDnzGuBQ7z7qmdVnJ\nsvbs91Sv4LMeqXUskviOaq7epI9R9SGFVFm8bs5MOBy1UUvMWEAzARdQJII1\n190CPqCDPJcy2s+brS412GNoT0IkKZ8nXgELJl0Upf4QyuZZkVu35iJVkYNv\nzs311xf7FZw/1a4sZIuttIg2mjUk0a5m8dAJ0dcqM2z2JkHQ/TjRSGb4ts9n\nZvblOUyCTqrNcaGVteM4fI0IbgID2Vksa2KedQKP3MftnN4DdE6HQEAWGO5t\nlbdSkzEp8ErxALMijG8rM7bUAs9VNF6luqEk+fpDZ2P5cd4ClmwalQjNc5Tw\nJxR2AAc3bEP+EnStXrC1SqELi+I/0r850BAtg2LKFOupBocBgGRhFhmOWdPo\nc7gJtLlH98JsvT7+p94tejUR57IEaaNMohTrm/dUUtNgBwHyKt4dbhF+0i4L\np47sOiEhysg0PmfV6QZKfBvJemLHjOlni4fcR58BfV8N00QAbq80t0yvhwIr\nMqGcZd3pesOwKn/6LCSMx/p4QLHMWZah/wjh1F0GM9jpBHy8TxwvxQbr9A0Y\nU/Eq\r\n=DLdU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n# Deploying with Google Cloud Functions\n\nThis tutorial helps you deploy Apollo Server to Google Cloud Functions. It uses the following example function handler:\n\n```javascript:title=index.js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\n// Because `NODE_ENV` is a reserved environment variable in Google Cloud\n// Functions and it defaults to \"production\", you need to set the\n// `introspection` option to `true` for a UI like Apollo Sandbox or GraphQL\n// Playground to work correctly.\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n## Deploying from the Google Cloud Console\n\n### 1. Configure the function\n\nFrom your Google Cloud Console, go to the [Cloud Functions page](https://console.cloud.google.com/functions/list).\n\nClick **Create Function**. Give the function a name and set the **Trigger type** to `HTTP`.\n\nFor quick setup and access to the GraphQL endpoint/landing page, choose to **Allow unauthenticated invocations**. To require authentication for this endpoint, you can manage authorized users via [Cloud IAM](https://console.cloud.google.com/iam-admin/iam).\n\nSave your configuration changes in the Trigger section. Copy the trigger's URL for later and click **Next**.\n\n### 2. Write the API handlers and deploy\n\nNow on the Code page, set the runtime to a currently supported version of Node.js (such as `Node.js 14`), and set the Entry point to `handler`.\n\nPaste the example code at the top of this page into the contents of `index.js` in the code editor.\n\nEdit `package.json` so that it lists `apollo-server-cloud-functions` and `graphql` in its dependencies:\n\n```json:title=package.json\n\"dependencies\": {\n  \"apollo-server-cloud-functions\": \"^2.24.0\",\n  \"graphql\": \"^15.5.0\"\n}\n```\n\nClick **Deploy** to initiate deployment. Then, proceed to [Testing the function](#testing-the-function).\n\n\n## Deploying from your local machine\n\nBefore proceeding, you need to set up the gcloud SDK:\n\n1. [Install the gcloud SDK](https://cloud.google.com/sdk/docs/install)\n\n2. [Initialize the gcloud SDK and authenticate your Google account](https://cloud.google.com/sdk/docs/initializing)\n\nNext, initialize a new Node.js project by running `npm init` in an empty directory.\n\nRun `npm install apollo-server-cloud-functions graphql` to install the necessary dependencies and to include them in the `package.json` file.\n\nAt this point, your `package.json` should resemble the following:\n\n```json\n{\n  \"name\": \"apollo-gcloud\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"apollo-server-cloud-functions\": \"^2.24.0\",\n    \"graphql\": \"^15.5.0\"\n  }\n}\n```\n\nCreate a new file named `index.js` and paste the sample code at the top of this page into it.\n\nRun the following command to create and deploy the function to Cloud Functions:\n\n```bash\ngcloud functions deploy apollo-graphql-example --entry-point handler --runtime nodejs14 --trigger-http\n```\n\nThis creates a function named `apollo-graphql-example` that you can view from your console's [Cloud Functions page](https://console.cloud.google.com/functions/list)\n\nThe command asks some configuration questions and prints metadata about your newly created function, which includes the function's trigger URL.\n\nFor more information, see the official [Cloud Functions docs](https://cloud.google.com/functions/docs/deploying/filesystem).\n\n## Testing the function\n\nAfter deployment completes, navigate to your function's trigger URL. If deployment succeeded, you should see your server's landing page.\n\n> If you can't access your trigger URL, you might need to [add `allAuthenticatedUsers` or `allUsers` permissions](https://cloud.google.com/iam/docs/overview#all-authenticated-users) to your function.\n\nClick <q>Query your Server</q> and use Apollo Sandbox to test the following query:\n\n```graphql\nquery TestQuery {\n  hello\n}\n```\n\nAnd verify that the following response appears:\n\n```json\n{\n  \"data\": {\n    \"hello\": \"Hello world!\"\n  }\n}\n```\n\n## Getting request details\n\nTo obtain information about a currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, etc.) use the `context` option. This enables you to pass any request-specific data to your server's resolvers.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (CORS)\n\nTo enable CORS, you need to modify your HTTP response headers. To do so, use the `cors` option:\n\n```javascript{23-26}\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, HTTP authentication) the allow origin header must equal the request origin and the allow credential header must be set to `true`.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### CORS Options\n\nThe options correspond to the [express `cors` configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n| Option | Type(s) |\n|--------|---------|\n| `origin` | boolean \\| string \\| string[] |\n| `methods` | string \\| string[] |\n| `allowedHeaders` | string \\| string[] |\n| `exposedHeaders` | string \\| string[] |\n| `credentials` | boolean |\n| `maxAge` | number |\n","engines":{"node":">=12.0"},"gitHead":"ad2cdb557da704acbb42bcbb36086e35264074db","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.0.0-rc.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.0.0-rc.1"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.0.0-rc.1_1625262524660_0.4541089201877442","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"apollo-server-cloud-functions","version":"3.0.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.0.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"0f04135ecbadc82a8207b3f5d19da4c2d597fb48","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.0.0.tgz","fileCount":16,"integrity":"sha512-oLWftjSKs3/yCL7E8NIGpzn+v0tslImN3HbKTl8ksp7HwegjdPdkhSQIjZe8P7h8+N6xMhIp+kMWpDi334VGfQ==","signatures":[{"sig":"MEUCICzpOaMDiNwNdBC/z8nEJmr/bDv/rqjmr/4bOYDc2Vz6AiEAhqUKwNSt0s1clGF1RyT1XmBdFCDaXcY5pgqKlg2j0m8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70306,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5e/XCRA9TVsSAnZWagAANnQP/jK6OQZDq07YLa8ZmwrG\np+aCfaeYZNHlLJSdmXlweea1EF3bAAIjSammna5hKaRJdzuPY58OdZXHzLHm\nbOekocW3JijKmPKQDc/egL+YBRZHsas/SYbrHdTflC6lp9Nh6jXq8AuGIHr2\n7JVPDcQgVVkCJvGlJulBrq1pJamhhh9NHwn7Qg1rBWn519XraCuZTsTsuhy2\n4t7xrScOpYTLW8nFA08PmXBCP/epjQkNDyzVrxU7Do8e8Kc1KD3pr2mGMhk6\n1uAD5Q4rH0oolQPILVygiMeL69EGrNPZOWuyNsf8Tz/yW14YpGyXCygra3Ka\nD5gmOeZG/DM6ZaF6kJ5Gss9xA+HqBJGpG6YEWmcZdRI4/5zX+tOe9QKT6aFi\nfjvANXnvIbTM+aakE8CMhD2vc9R2vTD6q33H/rgDw0BbdzMRDjnMI1v5sTe8\naSA79s+Mod7vSff/Gtw/O0+/gdo98tQJeKyJgP1lJPMRI++28N6IpBWs2itB\nl2qMZwiQoSxD9OsiaDC0d3QCFVNkZepPTNJlt/zfXLC2wxoEEA+L2srq1Pac\nsTm1QjylpU+RarRvJZaKMT6JGBflqTnRyVo+wKG9dDXcaFkVFP/3vuzBBLs9\nGQH6fU0qDsWaTIJsQbQayYPOquEZKMJaY6vUyEMZMqdXqrqeXT5KdaSN2YpA\nQOWQ\r\n=weiZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions@3.x graphql\n```\n\n# Deploying with Google Cloud Functions\n\nThis tutorial helps you deploy Apollo Server to Google Cloud Functions. It uses the following example function handler:\n\n```javascript:title=index.js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\n// Because `NODE_ENV` is a reserved environment variable in Google Cloud\n// Functions and it defaults to \"production\", you need to set the\n// `introspection` option to `true` for a UI like Apollo Sandbox or GraphQL\n// Playground to work correctly.\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n## Deploying from the Google Cloud Console\n\n### 1. Configure the function\n\nFrom your Google Cloud Console, go to the [Cloud Functions page](https://console.cloud.google.com/functions/list).\n\nClick **Create Function**. Give the function a name and set the **Trigger type** to `HTTP`.\n\nFor quick setup and access to the GraphQL endpoint/landing page, choose to **Allow unauthenticated invocations**. To require authentication for this endpoint, you can manage authorized users via [Cloud IAM](https://console.cloud.google.com/iam-admin/iam).\n\nSave your configuration changes in the Trigger section. Copy the trigger's URL for later and click **Next**.\n\n### 2. Write the API handlers and deploy\n\nNow on the Code page, set the runtime to a currently supported version of Node.js (such as `Node.js 14`), and set the Entry point to `handler`.\n\nPaste the example code at the top of this page into the contents of `index.js` in the code editor.\n\nEdit `package.json` so that it lists `apollo-server-cloud-functions` and `graphql` in its dependencies:\n\n```json:title=package.json\n\"dependencies\": {\n  \"apollo-server-cloud-functions\": \"^2.24.0\",\n  \"graphql\": \"^15.5.0\"\n}\n```\n\nClick **Deploy** to initiate deployment. Then, proceed to [Testing the function](#testing-the-function).\n\n\n## Deploying from your local machine\n\nBefore proceeding, you need to set up the gcloud SDK:\n\n1. [Install the gcloud SDK](https://cloud.google.com/sdk/docs/install)\n\n2. [Initialize the gcloud SDK and authenticate your Google account](https://cloud.google.com/sdk/docs/initializing)\n\nNext, initialize a new Node.js project by running `npm init` in an empty directory.\n\nRun `npm install apollo-server-cloud-functions@3.x graphql` to install the necessary dependencies and to include them in the `package.json` file.\n\nAt this point, your `package.json` should resemble the following:\n\n```json\n{\n  \"name\": \"apollo-gcloud\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"apollo-server-cloud-functions\": \"^2.24.0\",\n    \"graphql\": \"^15.5.0\"\n  }\n}\n```\n\nCreate a new file named `index.js` and paste the sample code at the top of this page into it.\n\nRun the following command to create and deploy the function to Cloud Functions:\n\n```bash\ngcloud functions deploy apollo-graphql-example --entry-point handler --runtime nodejs14 --trigger-http\n```\n\nThis creates a function named `apollo-graphql-example` that you can view from your console's [Cloud Functions page](https://console.cloud.google.com/functions/list)\n\nThe command asks some configuration questions and prints metadata about your newly created function, which includes the function's trigger URL.\n\nFor more information, see the official [Cloud Functions docs](https://cloud.google.com/functions/docs/deploying/filesystem).\n\n## Testing the function\n\nAfter deployment completes, navigate to your function's trigger URL. If deployment succeeded, you should see your server's landing page.\n\n> If you can't access your trigger URL, you might need to [add `allAuthenticatedUsers` or `allUsers` permissions](https://cloud.google.com/iam/docs/overview#all-authenticated-users) to your function.\n\nClick <q>Query your Server</q> and use Apollo Sandbox to test the following query:\n\n```graphql\nquery TestQuery {\n  hello\n}\n```\n\nAnd verify that the following response appears:\n\n```json\n{\n  \"data\": {\n    \"hello\": \"Hello world!\"\n  }\n}\n```\n\n## Getting request details\n\nTo obtain information about a currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, etc.) use the `context` option. This enables you to pass any request-specific data to your server's resolvers.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (CORS)\n\nTo enable CORS, you need to modify your HTTP response headers. To do so, use the `cors` option:\n\n```javascript{23-26}\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, HTTP authentication) the allow origin header must equal the request origin and the allow credential header must be set to `true`.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### CORS Options\n\nThe options correspond to the [express `cors` configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n| Option | Type(s) |\n|--------|---------|\n| `origin` | boolean \\| string \\| string[] |\n| `methods` | string \\| string[] |\n| `allowedHeaders` | string \\| string[] |\n| `exposedHeaders` | string \\| string[] |\n| `credentials` | boolean |\n| `maxAge` | number |\n","engines":{"node":">=12.0"},"gitHead":"bcfd36cdd01f9d26d0a225aa62a79c6642cd743f","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.1","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.0.0"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.0.0_1625681878983_0.9535020098143012","host":"s3://npm-registry-packages"}},"3.0.1":{"name":"apollo-server-cloud-functions","version":"3.0.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.0.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"cdfade3d932bb7012f55fe9f288794312c679648","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.0.1.tgz","fileCount":16,"integrity":"sha512-cBHV4Iew4FKZVBR+spem3BazjfxokN2sksBPRWRlTA4+pL9QqQxO02tJitt/KAYinv4NfvDIoYyzM4aBjrbcww==","signatures":[{"sig":"MEYCIQCoRz/O2OEA4sPIVPJ04RFwc9eDT1+lsIrg9bX3fOrAEgIhAO14av2B5fMppbvBY2FBq45Orn/pzvYgvFxUTKwAPKb+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8gv1CRA9TVsSAnZWagAAckcP/RHurf2gjy2MnS6eeAfn\ngBevMkTLiCtXVV3lYHMo+EjLaLZ/TNAZGgxsn9lEeOTJ4nfyaiBoRzj11Tq5\nHJKJladlfrncZKM/BVG7seXOS6lCxbOrke8kCChvI1DaoS9N77NvL6Am5+uZ\nmDtOFs0Akx8mOPLSCPg46RtzNBO+CWFyrdQQfOV2FoR1YMWwpDcVnpv3ldWJ\nGEyFiqwOAYZXUxOEuGeb1f1x/Xl6ZQcFy3w7tVqQBMP/A8JElk04TX3QwZWv\n1r79tccPIyEcfUQiTOYmnP5TeVgmc5uS3UwAunUg8yGS21nnLvEYZNyXci9z\njYAB+BiVRewGTLXkzJebjOg9jG5EScSZodJKRHbrSrVDXAoX+4G8umFTdVrz\nG+HbH+pF1w2tBou6+yxMFD/ohHVGtrFxjHcp85zIS4QFUnRVuOt5U6er9LRs\nR6+raJ9b5F9UrBZRx19LK5kMWq0rsoS691AJZk3ZFHAxfXxwwlSOBwIrYQxE\n/JhI2uf8gwaCtEF/Y1Oh1aT0CNPiPfRDMFEzpPXhwKvthTBROnu7s8rJsOFb\nKRXiQpCV3IyQffrwCztuqU4fGeY9pZPEbpBYseiKa/4hTMkIT+HWVAR8eOqC\nTPp9w1iBbPSk5PuI9M/nP+zLPSxqGA3/QQiwIVEpSvr39ZZ70gDzHzZ0ww4g\nk4ZW\r\n=0vgl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"856f7fbc151ebef4d6ca8a9efe801ecca3d4f9c3","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.3+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.3","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.0.1"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.0.1"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.0.1_1626475509752_0.0325413883408483","host":"s3://npm-registry-packages"}},"3.0.2":{"name":"apollo-server-cloud-functions","version":"3.0.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.0.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"24678f2c85b2281edc7b4f375f1a359b7a8ad71c","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.0.2.tgz","fileCount":16,"integrity":"sha512-vDxoVgYjPkGQNg4T2GxDv8EOfn5N8HFaXJxAGLqtgDpd8jYf6JSmr2DwktXsjz66tPI99WxQ0boC5+zyKTkdBg==","signatures":[{"sig":"MEUCIQCTlC9Tcytp6q3llmE4jWdwDQNtnnb7ddm0auNO/7snTAIgX9R+B3darYIY3EQKE870TSwOgeJoiEQSne0NcmqTDI0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70529,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9wepCRA9TVsSAnZWagAA84QP/3aYYVgb2PDtaUB3kgYX\nTIzLukEDeeFs8enltr0W9Sfjq4x/Ay0tLJuPOH0RN2nGv9f7C1NiSfyiQOx2\nxl4yMmIVrrdIKaVFPedt6p66jZGL8MbTHAO7jhynl2ZqKep1k9t4Qll2/FOz\nEv/ueQW+5uHfWcvjiV4qtwTyXkN+4/tcIus3bRO4SOek2qjk2ujC7R2UrAmR\nVvKUEu0BSpiSL8rkBSeMd377KjbS0L21bDDOCgehcd6gv3EQuQqfxNjIIC7C\nM+NQsnpKeNWRkmtALOILL6V6FkFUg3eU5oJSjbGaL2IWTA1IBAnXQDNYhwSQ\no/Beb5oelGh8Vyf5ugeahw4PqODZbwxsjNdRDj/Ky5c3htF1PvkT/zRaTaLs\nEdesjhZx+hdPn1PZ4/GxSL9yI6id12fGMkqXywmBRoTneHhpdyARh6SKtpIZ\nFi0b/qeI05Pt3f5lft6amv2SH0DrvJGNDfbo8W0UWm/5oa7R8ZUjxXiQ5FVF\nie+wQzr32mwj+Z76w/y8N4hs7HkFOEr+WsfGZzUPTM3OTRGDSCsyq5/dYM2d\nI6mGYjYWfY7D3/2samXY/QRFfSRKwE0V3qsxabZ4UyZ+yJVwWMVF6CDw+bmB\n7b/HxFQ2WvSyNjhSepSAFEAh1nklBH3j7Aa1KA9/FcG5MW+38+DPr40rDYct\naBUw\r\n=0+J+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"69577df0b08d392e99d65644a27d48b9b925dd94","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.3+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.3","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.0.2"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.0.2"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.0.2_1626802089144_0.690422978496888","host":"s3://npm-registry-packages"}},"3.1.0-alpha.0":{"name":"apollo-server-cloud-functions","version":"3.1.0-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.1.0-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"263891dac28f80c45f04eff48a5c0f0afd6bf688","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.1.0-alpha.0.tgz","fileCount":16,"integrity":"sha512-8dQaWUEBdyqXoaKnNG94VnZZXJLnuvfPw1paITtAQ4MsyewWQfDEOMteM6L1TMbfCuClmTkx+/olk8rcdWCn7A==","signatures":[{"sig":"MEYCIQCm7huyKajlMCp+t5omuZJTnyKU2OCpCPuE+qiNUu7jKAIhAJGkCCLGe6nRmd6aSg54TeACFi3IObwCzBNzqUw8kOJA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+dO2CRA9TVsSAnZWagAAE60P/01hgRUJg0LAtI1hHssl\nwO8x1kqUkz2EGxpE4gWKAvmOiOzHN1xsx/61fZeAE1O+AiqFtOGDIDhi/o4f\ns0O1Li+xjRdSFyZTXMv5/0qiVQZHwYMz1c3pYHYPC/I+rPSYRojsft44tj1N\ncOJITOMyfFYRoUIz11rXbNbGMzm35OZ0KdBrcqHKyqx2BIypU8TsGUByEt/u\nDrEwT0S1FRIDx/znw09271GyvRkJQQxqZ/dER4GCaxRXjCwgA6WhZAsjqk4y\nstn8iS54xrNeV7KBl8GrZh6nPb6ALd4k+2YNVAmLLBhqoPDwA6ayXemE3vB3\nO+VcXrFz+cvYo9coLQl/CCnVuGvenw6Z0cadApdZd2VEQBZ1Vh4vOrfkX/5w\n0djIfipQ/RSnwRrziGegbuN0/VhMx+sO/eBMVwCQW8xOiHmashS3Y3OVrOL/\n0erDCYXppMUUSVn16QwMEyaWi45+/WAvQWX5IGZoYWp0MzRDY4Cy+TRTY8AW\n3x9P8EQwiYjXyQn+dcgN5fM10hMK9Bw2IjdSCOe63fsitHWLJI+URMg2R8Fv\nYu2DaKnXZ61GtRzYAEjpz+/KGKL2Xth1korbKFRzcwSiSFrCpSG7zyQVXgay\nweI8UoiFKt1UzXGr4kZ1qap7zHjZT0zRmlhPmjCTUvgO7BASFOX3JBcTOL+X\nBtTT\r\n=tjmA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n# Deploying with Google Cloud Functions\n\nThis tutorial helps you deploy Apollo Server to Google Cloud Functions. It uses the following example function handler:\n\n```javascript:title=index.js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\n// Because `NODE_ENV` is a reserved environment variable in Google Cloud\n// Functions and it defaults to \"production\", you need to set the\n// `introspection` option to `true` for a UI like Apollo Sandbox or GraphQL\n// Playground to work correctly.\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n## Deploying from the Google Cloud Console\n\n### 1. Configure the function\n\nFrom your Google Cloud Console, go to the [Cloud Functions page](https://console.cloud.google.com/functions/list).\n\nClick **Create Function**. Give the function a name and set the **Trigger type** to `HTTP`.\n\nFor quick setup and access to the GraphQL endpoint/landing page, choose to **Allow unauthenticated invocations**. To require authentication for this endpoint, you can manage authorized users via [Cloud IAM](https://console.cloud.google.com/iam-admin/iam).\n\nSave your configuration changes in the Trigger section. Copy the trigger's URL for later and click **Next**.\n\n### 2. Write the API handlers and deploy\n\nNow on the Code page, set the runtime to a currently supported version of Node.js (such as `Node.js 14`), and set the Entry point to `handler`.\n\nPaste the example code at the top of this page into the contents of `index.js` in the code editor.\n\nEdit `package.json` so that it lists `apollo-server-cloud-functions` and `graphql` in its dependencies:\n\n```json:title=package.json\n\"dependencies\": {\n  \"apollo-server-cloud-functions\": \"^2.24.0\",\n  \"graphql\": \"^15.5.0\"\n}\n```\n\nClick **Deploy** to initiate deployment. Then, proceed to [Testing the function](#testing-the-function).\n\n\n## Deploying from your local machine\n\nBefore proceeding, you need to set up the gcloud SDK:\n\n1. [Install the gcloud SDK](https://cloud.google.com/sdk/docs/install)\n\n2. [Initialize the gcloud SDK and authenticate your Google account](https://cloud.google.com/sdk/docs/initializing)\n\nNext, initialize a new Node.js project by running `npm init` in an empty directory.\n\nRun `npm install apollo-server-cloud-functions graphql` to install the necessary dependencies and to include them in the `package.json` file.\n\nAt this point, your `package.json` should resemble the following:\n\n```json\n{\n  \"name\": \"apollo-gcloud\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"apollo-server-cloud-functions\": \"^2.24.0\",\n    \"graphql\": \"^15.5.0\"\n  }\n}\n```\n\nCreate a new file named `index.js` and paste the sample code at the top of this page into it.\n\nRun the following command to create and deploy the function to Cloud Functions:\n\n```bash\ngcloud functions deploy apollo-graphql-example --entry-point handler --runtime nodejs14 --trigger-http\n```\n\nThis creates a function named `apollo-graphql-example` that you can view from your console's [Cloud Functions page](https://console.cloud.google.com/functions/list)\n\nThe command asks some configuration questions and prints metadata about your newly created function, which includes the function's trigger URL.\n\nFor more information, see the official [Cloud Functions docs](https://cloud.google.com/functions/docs/deploying/filesystem).\n\n## Testing the function\n\nAfter deployment completes, navigate to your function's trigger URL. If deployment succeeded, you should see your server's landing page.\n\n> If you can't access your trigger URL, you might need to [add `allAuthenticatedUsers` or `allUsers` permissions](https://cloud.google.com/iam/docs/overview#all-authenticated-users) to your function.\n\nClick <q>Query your Server</q> and use Apollo Sandbox to test the following query:\n\n```graphql\nquery TestQuery {\n  hello\n}\n```\n\nAnd verify that the following response appears:\n\n```json\n{\n  \"data\": {\n    \"hello\": \"Hello world!\"\n  }\n}\n```\n\n## Getting request details\n\nTo obtain information about a currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, etc.) use the `context` option. This enables you to pass any request-specific data to your server's resolvers.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (CORS)\n\nTo enable CORS, you need to modify your HTTP response headers. To do so, use the `cors` option:\n\n```javascript{23-26}\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, HTTP authentication) the allow origin header must equal the request origin and the allow credential header must be set to `true`.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### CORS Options\n\nThe options correspond to the [express `cors` configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n| Option | Type(s) |\n|--------|---------|\n| `origin` | boolean \\| string \\| string[] |\n| `methods` | string \\| string[] |\n| `allowedHeaders` | string \\| string[] |\n| `exposedHeaders` | string \\| string[] |\n| `credentials` | boolean |\n| `maxAge` | number |\n","engines":{"node":">=12.0"},"gitHead":"4b0722e23503f776dab3e98088a0dc77436fe474","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.3+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.3","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.1.0-alpha.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.1.0-alpha.0"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.1.0-alpha.0_1626985398287_0.011191420840179989","host":"s3://npm-registry-packages"}},"3.1.0-alpha.1":{"name":"apollo-server-cloud-functions","version":"3.1.0-alpha.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.1.0-alpha.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"ebfe0d2e0f11e94903ce23cf8416cf8edaf5123d","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.1.0-alpha.1.tgz","fileCount":16,"integrity":"sha512-I+2IxsSolTxlxrrnEmwu90F/TxmE67rfcZ1V9+0ZVek3HzET8u37AtTyMJIR+fWlSu4WgBkeMayZiScMwc0aTg==","signatures":[{"sig":"MEQCIGVKWlTjvAv5AvKXSfcIwj6EkvzYyr14NFkEyd5DMzT4AiAkMishkLMUs0wA9o3vAPXBhVnonLBby9+YSFy/P+xduQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+l5RCRA9TVsSAnZWagAAIyIP/3v3I0oEWKOUsyM6zaOE\nWuxJEUnGRi+MH8UHUldYuCk4vpXPHSc6EMubjx4djXXN6Kt9q/TC94aErciF\nJoodkdGgVVT95i4bJsi2gsehKWUmINDHOo3RMxQ4cUE/sf7VT86vOclg1pTX\no2Qv9e93DnJ+Vhj4OcORA5RPO46KNS9K82z53kwEu8HmCerkRHKT2e59dMia\nvaRms6bGEzlqPOLBvHUU3Qu3ZC/mft+3AlXkue4hC7g+hCmnA659YyXH7UkE\n9pY1FN8ybNXR1rEzPx+xQsDlbf6gfW0Dg+2ZK4g9EbMDEz9Z+gC8go2mB9WI\nPCKk0y5KcVrIxkGQ9SA6MRlTXxdEHJcepl5GN1IxpKje20AGbG47yYdQNGC7\n2n0oeZgMLdbN0PkyU6PJ8+MIDdFCa6azoC3aUWCIwkYypF8YGSIP1z49XTht\nSWZGyFZPyTbEfppznVGnXG2dgGsrZ2pTmgN3mJ22Us6EFzG79w6KzXB94f/z\nPQl0AYAFHIEji8V2MwBDp/RM/NeIcYDwncn7eGb2XGefgw87nNurFCXs8EYb\n1WwoJLxVuS7jRn55n1mApg7GusfevXFRv0AcPkzrcoo8OGQipD/YieJpvlNG\naNaPvJSjo+GUsVXyOvyHHc8XUubsCeV5I7NpPBZHrk/yQCdQON2COxzRzTML\nWmQC\r\n=n/7x\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n# Deploying with Google Cloud Functions\n\nThis tutorial helps you deploy Apollo Server to Google Cloud Functions. It uses the following example function handler:\n\n```javascript:title=index.js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\n// Because `NODE_ENV` is a reserved environment variable in Google Cloud\n// Functions and it defaults to \"production\", you need to set the\n// `introspection` option to `true` for a UI like Apollo Sandbox or GraphQL\n// Playground to work correctly.\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n## Deploying from the Google Cloud Console\n\n### 1. Configure the function\n\nFrom your Google Cloud Console, go to the [Cloud Functions page](https://console.cloud.google.com/functions/list).\n\nClick **Create Function**. Give the function a name and set the **Trigger type** to `HTTP`.\n\nFor quick setup and access to the GraphQL endpoint/landing page, choose to **Allow unauthenticated invocations**. To require authentication for this endpoint, you can manage authorized users via [Cloud IAM](https://console.cloud.google.com/iam-admin/iam).\n\nSave your configuration changes in the Trigger section. Copy the trigger's URL for later and click **Next**.\n\n### 2. Write the API handlers and deploy\n\nNow on the Code page, set the runtime to a currently supported version of Node.js (such as `Node.js 14`), and set the Entry point to `handler`.\n\nPaste the example code at the top of this page into the contents of `index.js` in the code editor.\n\nEdit `package.json` so that it lists `apollo-server-cloud-functions` and `graphql` in its dependencies:\n\n```json:title=package.json\n\"dependencies\": {\n  \"apollo-server-cloud-functions\": \"^2.24.0\",\n  \"graphql\": \"^15.5.0\"\n}\n```\n\nClick **Deploy** to initiate deployment. Then, proceed to [Testing the function](#testing-the-function).\n\n\n## Deploying from your local machine\n\nBefore proceeding, you need to set up the gcloud SDK:\n\n1. [Install the gcloud SDK](https://cloud.google.com/sdk/docs/install)\n\n2. [Initialize the gcloud SDK and authenticate your Google account](https://cloud.google.com/sdk/docs/initializing)\n\nNext, initialize a new Node.js project by running `npm init` in an empty directory.\n\nRun `npm install apollo-server-cloud-functions graphql` to install the necessary dependencies and to include them in the `package.json` file.\n\nAt this point, your `package.json` should resemble the following:\n\n```json\n{\n  \"name\": \"apollo-gcloud\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"apollo-server-cloud-functions\": \"^2.24.0\",\n    \"graphql\": \"^15.5.0\"\n  }\n}\n```\n\nCreate a new file named `index.js` and paste the sample code at the top of this page into it.\n\nRun the following command to create and deploy the function to Cloud Functions:\n\n```bash\ngcloud functions deploy apollo-graphql-example --entry-point handler --runtime nodejs14 --trigger-http\n```\n\nThis creates a function named `apollo-graphql-example` that you can view from your console's [Cloud Functions page](https://console.cloud.google.com/functions/list)\n\nThe command asks some configuration questions and prints metadata about your newly created function, which includes the function's trigger URL.\n\nFor more information, see the official [Cloud Functions docs](https://cloud.google.com/functions/docs/deploying/filesystem).\n\n## Testing the function\n\nAfter deployment completes, navigate to your function's trigger URL. If deployment succeeded, you should see your server's landing page.\n\n> If you can't access your trigger URL, you might need to [add `allAuthenticatedUsers` or `allUsers` permissions](https://cloud.google.com/iam/docs/overview#all-authenticated-users) to your function.\n\nClick <q>Query your Server</q> and use Apollo Sandbox to test the following query:\n\n```graphql\nquery TestQuery {\n  hello\n}\n```\n\nAnd verify that the following response appears:\n\n```json\n{\n  \"data\": {\n    \"hello\": \"Hello world!\"\n  }\n}\n```\n\n## Getting request details\n\nTo obtain information about a currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, etc.) use the `context` option. This enables you to pass any request-specific data to your server's resolvers.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (CORS)\n\nTo enable CORS, you need to modify your HTTP response headers. To do so, use the `cors` option:\n\n```javascript{23-26}\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, HTTP authentication) the allow origin header must equal the request origin and the allow credential header must be set to `true`.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### CORS Options\n\nThe options correspond to the [express `cors` configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n| Option | Type(s) |\n|--------|---------|\n| `origin` | boolean \\| string \\| string[] |\n| `methods` | string \\| string[] |\n| `allowedHeaders` | string \\| string[] |\n| `exposedHeaders` | string \\| string[] |\n| `credentials` | boolean |\n| `maxAge` | number |\n","engines":{"node":">=12.0"},"gitHead":"a383a6d546e69027ce6f0e976f8e6dfffde51dce","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.3+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.3","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.1.0-alpha.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.1.0-alpha.1"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.1.0-alpha.1_1627020881517_0.4326838407439024","host":"s3://npm-registry-packages"}},"3.1.0":{"name":"apollo-server-cloud-functions","version":"3.1.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.1.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"8dfc4da5434aa37736172aa41471d6c640459ff0","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.1.0.tgz","fileCount":16,"integrity":"sha512-VYabSZ438qTO77CN6GeTY/g9pelney8UFt0PiH0eUBkTPZjZohh8IFv18G9xjWQVUxPJdm0qq7V3kg8tzdHOOA==","signatures":[{"sig":"MEUCIQDY3/UwufabYhm2hsoaaTUZH2oaR9WJtgBol6D+GkiJkAIgG37w2lZMh4EWlUmGzg/dVkXLXkOYJxPLD/x0pWFGae0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70533,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/wjLCRA9TVsSAnZWagAAKsgP/0wZoa4XgAYhlUGyKdLx\nqHf8MBgsxT6hC6ce8ameSWE4LnS/pP0CRAZkaCY1SvivgSFxB+XaosZTYazz\nqFYSYR33HjkB1be17UJNeb+0NaTGRXPh37/DUn0tjFqgRRiv4B4761edAbe9\nwRnQlkFIoZw/6Dkgbh+4mN7Uxp0f5a511feMkvdm/hjVTjyBqA+S6r85s9Bb\nt5ZTZqmY3Kj6FnotOb0MwGuBd73L4AWkIGG+yNRIBsl1kkBAPy+DrEekYgJK\nMcbSbuk0Zuu6XUOmZDJDWDIbYCOYcJP6u4+EX1LjfWroQc1Rlf/ZsyFqmZ5I\nCwWraeIjpKtdsRZtTx08fM19sGLUdaTEa5wtFZA/4SN1EolB0KCNbPtLXP+F\nU92C2bpbNHu+VoAo1Rdu+qGMyxnWmYHt5qmDwoyosZxneVixsaPhKX7cf7lI\njYhJH8JI4sqANX4aGx7be8jbK11UHXkQybjEduLVztfUgC4ezYpT+l/qv3Lg\nrxnFitqqpwU9X+W9xTOdIBhdybVU8LxCzjMZzk14eY3CJEVUK7h7YAZtKib+\n/QGnaOwVrukD5fNCnpsWijzi67ChOhCXV/wZURHQXZEODe9RkY5AQOsqv8Dk\nPXhT2LJCckCItLR0Ld56jbVKugPLenOE5TJRVANOlr5s6F8gGi1ZjRQZyNUv\nv8HK\r\n=QOsO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n# Deploying with Google Cloud Functions\n\nThis tutorial helps you deploy Apollo Server to Google Cloud Functions. It uses the following example function handler:\n\n```javascript:title=index.js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\n// Because `NODE_ENV` is a reserved environment variable in Google Cloud\n// Functions and it defaults to \"production\", you need to set the\n// `introspection` option to `true` for a UI like Apollo Sandbox or GraphQL\n// Playground to work correctly.\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n## Deploying from the Google Cloud Console\n\n### 1. Configure the function\n\nFrom your Google Cloud Console, go to the [Cloud Functions page](https://console.cloud.google.com/functions/list).\n\nClick **Create Function**. Give the function a name and set the **Trigger type** to `HTTP`.\n\nFor quick setup and access to the GraphQL endpoint/landing page, choose to **Allow unauthenticated invocations**. To require authentication for this endpoint, you can manage authorized users via [Cloud IAM](https://console.cloud.google.com/iam-admin/iam).\n\nSave your configuration changes in the Trigger section. Copy the trigger's URL for later and click **Next**.\n\n### 2. Write the API handlers and deploy\n\nNow on the Code page, set the runtime to a currently supported version of Node.js (such as `Node.js 14`), and set the Entry point to `handler`.\n\nPaste the example code at the top of this page into the contents of `index.js` in the code editor.\n\nEdit `package.json` so that it lists `apollo-server-cloud-functions` and `graphql` in its dependencies:\n\n```json:title=package.json\n\"dependencies\": {\n  \"apollo-server-cloud-functions\": \"^2.24.0\",\n  \"graphql\": \"^15.5.0\"\n}\n```\n\nClick **Deploy** to initiate deployment. Then, proceed to [Testing the function](#testing-the-function).\n\n\n## Deploying from your local machine\n\nBefore proceeding, you need to set up the gcloud SDK:\n\n1. [Install the gcloud SDK](https://cloud.google.com/sdk/docs/install)\n\n2. [Initialize the gcloud SDK and authenticate your Google account](https://cloud.google.com/sdk/docs/initializing)\n\nNext, initialize a new Node.js project by running `npm init` in an empty directory.\n\nRun `npm install apollo-server-cloud-functions graphql` to install the necessary dependencies and to include them in the `package.json` file.\n\nAt this point, your `package.json` should resemble the following:\n\n```json\n{\n  \"name\": \"apollo-gcloud\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"apollo-server-cloud-functions\": \"^2.24.0\",\n    \"graphql\": \"^15.5.0\"\n  }\n}\n```\n\nCreate a new file named `index.js` and paste the sample code at the top of this page into it.\n\nRun the following command to create and deploy the function to Cloud Functions:\n\n```bash\ngcloud functions deploy apollo-graphql-example --entry-point handler --runtime nodejs14 --trigger-http\n```\n\nThis creates a function named `apollo-graphql-example` that you can view from your console's [Cloud Functions page](https://console.cloud.google.com/functions/list)\n\nThe command asks some configuration questions and prints metadata about your newly created function, which includes the function's trigger URL.\n\nFor more information, see the official [Cloud Functions docs](https://cloud.google.com/functions/docs/deploying/filesystem).\n\n## Testing the function\n\nAfter deployment completes, navigate to your function's trigger URL. If deployment succeeded, you should see your server's landing page.\n\n> If you can't access your trigger URL, you might need to [add `allAuthenticatedUsers` or `allUsers` permissions](https://cloud.google.com/iam/docs/overview#all-authenticated-users) to your function.\n\nClick <q>Query your Server</q> and use Apollo Sandbox to test the following query:\n\n```graphql\nquery TestQuery {\n  hello\n}\n```\n\nAnd verify that the following response appears:\n\n```json\n{\n  \"data\": {\n    \"hello\": \"Hello world!\"\n  }\n}\n```\n\n## Getting request details\n\nTo obtain information about a currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, etc.) use the `context` option. This enables you to pass any request-specific data to your server's resolvers.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (CORS)\n\nTo enable CORS, you need to modify your HTTP response headers. To do so, use the `cors` option:\n\n```javascript{23-26}\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, HTTP authentication) the allow origin header must equal the request origin and the allow credential header must be set to `true`.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### CORS Options\n\nThe options correspond to the [express `cors` configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n| Option | Type(s) |\n|--------|---------|\n| `origin` | boolean \\| string \\| string[] |\n| `methods` | string \\| string[] |\n| `allowedHeaders` | string \\| string[] |\n| `exposedHeaders` | string \\| string[] |\n| `credentials` | boolean |\n| `maxAge` | number |\n","engines":{"node":">=12.0"},"gitHead":"d22ffd33da9fa2972e6d055ebc4b346ad329edff","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.3+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.3","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.1.0"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.1.0_1627326667604_0.4130087838026568","host":"s3://npm-registry-packages"}},"3.1.1":{"name":"apollo-server-cloud-functions","version":"3.1.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.1.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"04f3c91f3a3573641cbf5b799c3660464818fdb9","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.1.1.tgz","fileCount":16,"integrity":"sha512-Iqys708ADEqmwqMj5i4Zr0un4CWJ9TiiXq1qCCo6S7pNs8UEDsbbA/Ob9SAvndOXcITo8hWGBBl0jCtwbxXskQ==","signatures":[{"sig":"MEUCIFrbn3fjdAFoIidvdGp6Jv2OlazKmU23dMwrD3OLTIcHAiEAlHAZ9Appajn4lFWwHqiUHtMu9r7SJki6034QP9mBbXk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70533,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/xJICRA9TVsSAnZWagAA0y0P/ivmm4NarbgPmVL6Xnu9\nI/WJSpJpZz3zqbIArl0hLLUPE8Bpp+bhw4Mz+G+zOjyut6zn2bkasJS+aI63\nBmr4ZqYdNrG4zRCNxM8a/Yuamo3dG7Em9RZy7ZzmdNlkpuapBMcvJO3XdknB\nU/ixbLOTebJhq1aMawavFNMXqXKPrZsEZXdxj9mR8fvC5FbpDVMerLJPmP54\nRyoUZDoSH5uQdQ58DlCnDYUmyLgSFh8ISq7StR1TOzgbEtwwes96rYZYJIj+\ny7kHsN1PTrNXNm89F1GuA62WI6MGW4fUcqvVOEr3UmVLCatc+CRzLMLg50na\n8SoAeX64bAT/7RbumN4G1yNC/byR8/CYm1lpagucbJOtIUOCLVAOwnxV8R2A\nfrmlS/y/EJfqyO1SkFHKNUukRQ20IYw0NzBH0pOqesrtmX/qMY2vaHYnKfaC\nXaKJfHCKAUFJGHJv6RQF0AUHir/SyYe50hcXf/egkdJ941X3H0DF5+RInpns\nHJFwZHV4yw7JJnWKfksjXW+MX1iGgubtiyjMV1XZrW4vYgoy36FXdK3WHXPT\niKqbVO4Et5xdBy+GdVUDiPFS/sLvpOCuws6BAPErJEFXhtV6BXl1ZHuZJ8wl\nIW2EpQedKumJ7CczFFdlNHN+TvDa3/nrEFNQayZgpJ1nJPUL74+6GF0FckHA\n5uIA\r\n=EvQP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n# Deploying with Google Cloud Functions\n\nThis tutorial helps you deploy Apollo Server to Google Cloud Functions. It uses the following example function handler:\n\n```javascript:title=index.js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\n// Because `NODE_ENV` is a reserved environment variable in Google Cloud\n// Functions and it defaults to \"production\", you need to set the\n// `introspection` option to `true` for a UI like Apollo Sandbox or GraphQL\n// Playground to work correctly.\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n## Deploying from the Google Cloud Console\n\n### 1. Configure the function\n\nFrom your Google Cloud Console, go to the [Cloud Functions page](https://console.cloud.google.com/functions/list).\n\nClick **Create Function**. Give the function a name and set the **Trigger type** to `HTTP`.\n\nFor quick setup and access to the GraphQL endpoint/landing page, choose to **Allow unauthenticated invocations**. To require authentication for this endpoint, you can manage authorized users via [Cloud IAM](https://console.cloud.google.com/iam-admin/iam).\n\nSave your configuration changes in the Trigger section. Copy the trigger's URL for later and click **Next**.\n\n### 2. Write the API handlers and deploy\n\nNow on the Code page, set the runtime to a currently supported version of Node.js (such as `Node.js 14`), and set the Entry point to `handler`.\n\nPaste the example code at the top of this page into the contents of `index.js` in the code editor.\n\nEdit `package.json` so that it lists `apollo-server-cloud-functions` and `graphql` in its dependencies:\n\n```json:title=package.json\n\"dependencies\": {\n  \"apollo-server-cloud-functions\": \"^2.24.0\",\n  \"graphql\": \"^15.5.0\"\n}\n```\n\nClick **Deploy** to initiate deployment. Then, proceed to [Testing the function](#testing-the-function).\n\n\n## Deploying from your local machine\n\nBefore proceeding, you need to set up the gcloud SDK:\n\n1. [Install the gcloud SDK](https://cloud.google.com/sdk/docs/install)\n\n2. [Initialize the gcloud SDK and authenticate your Google account](https://cloud.google.com/sdk/docs/initializing)\n\nNext, initialize a new Node.js project by running `npm init` in an empty directory.\n\nRun `npm install apollo-server-cloud-functions graphql` to install the necessary dependencies and to include them in the `package.json` file.\n\nAt this point, your `package.json` should resemble the following:\n\n```json\n{\n  \"name\": \"apollo-gcloud\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"apollo-server-cloud-functions\": \"^2.24.0\",\n    \"graphql\": \"^15.5.0\"\n  }\n}\n```\n\nCreate a new file named `index.js` and paste the sample code at the top of this page into it.\n\nRun the following command to create and deploy the function to Cloud Functions:\n\n```bash\ngcloud functions deploy apollo-graphql-example --entry-point handler --runtime nodejs14 --trigger-http\n```\n\nThis creates a function named `apollo-graphql-example` that you can view from your console's [Cloud Functions page](https://console.cloud.google.com/functions/list)\n\nThe command asks some configuration questions and prints metadata about your newly created function, which includes the function's trigger URL.\n\nFor more information, see the official [Cloud Functions docs](https://cloud.google.com/functions/docs/deploying/filesystem).\n\n## Testing the function\n\nAfter deployment completes, navigate to your function's trigger URL. If deployment succeeded, you should see your server's landing page.\n\n> If you can't access your trigger URL, you might need to [add `allAuthenticatedUsers` or `allUsers` permissions](https://cloud.google.com/iam/docs/overview#all-authenticated-users) to your function.\n\nClick <q>Query your Server</q> and use Apollo Sandbox to test the following query:\n\n```graphql\nquery TestQuery {\n  hello\n}\n```\n\nAnd verify that the following response appears:\n\n```json\n{\n  \"data\": {\n    \"hello\": \"Hello world!\"\n  }\n}\n```\n\n## Getting request details\n\nTo obtain information about a currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, etc.) use the `context` option. This enables you to pass any request-specific data to your server's resolvers.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (CORS)\n\nTo enable CORS, you need to modify your HTTP response headers. To do so, use the `cors` option:\n\n```javascript{23-26}\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, HTTP authentication) the allow origin header must equal the request origin and the allow credential header must be set to `true`.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### CORS Options\n\nThe options correspond to the [express `cors` configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n| Option | Type(s) |\n|--------|---------|\n| `origin` | boolean \\| string \\| string[] |\n| `methods` | string \\| string[] |\n| `allowedHeaders` | string \\| string[] |\n| `exposedHeaders` | string \\| string[] |\n| `credentials` | boolean |\n| `maxAge` | number |\n","engines":{"node":">=12.0"},"gitHead":"eb06724ca43042fcbf6e04e1de1dc2e5acfadf33","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.3+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.3","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.1.1"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.1.1_1627329096193_0.34115070143849424","host":"s3://npm-registry-packages"}},"3.1.2":{"name":"apollo-server-cloud-functions","version":"3.1.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.1.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"6704959826e8dde80071d9f21b21afc58c724a23","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.1.2.tgz","fileCount":16,"integrity":"sha512-raaOvfqp2NQNJzGj4ZmFaRcECTVAJXJl0Fj3fQl490ABba5m9AuDkxjD07ixNb3fCfEYWfkfL9yvNBpjFDLQVw==","signatures":[{"sig":"MEQCIB8PaLRIlFk6jCrvhZMIhJEjAip5u4WkSc66VGF7gz4PAiBm9hIGVVqB3SpUYzBBjPKcHI+906oCCy0GWTgUocgv5Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":69577,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCI8BCRA9TVsSAnZWagAAkRwQAJZUY2kbk8zP4OpbjM4W\nxzA6iFSX6ZUugQpFXzH8EP7MZgBXPytmQtnvyJNMLMqRpyepnyEDQpr6AnZV\nJZp/X0D9TdllZ49F83r4x1qemGPGWp0hRKvkPcuFbE9BCxsQ+8GcvtwsKyp5\nydtx8/yomLT0Kgefsxxmocd3W6NcI5/RP+e07hyKtA7NH4NxpglhlAxS3hFm\nUx3SCf+xexiQK5yD0cYh7DYWkttxn+z2YmZ86YfxSf/ckaN5VSODPGgzGmak\nIPHbPuJSb4Oc3nwFiM5ZpFE/qs3wIZ5xxFk7fliJiZFJ37kmB8OHVE9Zh/DQ\ng47Ju3rGt594b9ZfUY4zenJrnP66clF44bJ3X0vU6o/DCdh4t8lCx/ESL/cy\nrQaJ1e+x/2yp9X+S8IQA5mDXk0LcWaTlrD8pgm2Jv6ws9eQT92MaAVPXwSNM\nPdDAIsYmD/AQdyUtV6xYavbqz2sLbyaLMbzbITljeqvKTBYuRbDuketJsnDl\nCUUymzfQHURa7qf2haM/n5TordNp8/FGoUImkvHIJl6xukbsYVQpRi/OpHny\njVGokVTszmMlMZetP9ho43vRc8k8Az8zmivpHLCG1+9ckl7XfxIyYQVtDKtC\nYrkOnP+VCG3TIzFBdxlTP3E01lms/ARmHTXV1w2OVilDGDH2oGOVy5gX7EE1\nLKib\r\n=O/CV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"65c88f171864ee5bffb95f36aec93120b77bd56b","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.4+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.4","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.1.2"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.1.2"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.1.2_1627950849615_0.548497532007806","host":"s3://npm-registry-packages"}},"3.2.0-alpha.0":{"name":"apollo-server-cloud-functions","version":"3.2.0-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.2.0-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"b2104ba01692363b3b1c001dbdc54ecc8a60f66c","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.2.0-alpha.0.tgz","fileCount":16,"integrity":"sha512-BinwT6ZOVHcUEhDUiVuNXNFGtqselBMKCd7WZuFZSG34FcKt7cl3sb+a55OynA7EbbxHWiNIZgVhqnNQ2lUq0A==","signatures":[{"sig":"MEUCIQDU+qSo6Wn63dbJRG7mllSKJSEgVhzZNxnKx8L+hkaIjAIgb3yIzxqZho+wT293cp+gPpfoe0KmHXadBOu6bTamtB4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":69769,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhIEENCRA9TVsSAnZWagAA9ksP/RytdaYyu/pRLn2GlmkR\nJW31UzlBqgYfVaXeuW/gX51/emIIY0Ld4df3Si8bhWbrxTvKvmb3uT1ghJy3\noNXi/5WrxnnEDVPt3WAO78MBMKOSLK51Cz+Pi2rg+HSyJlrR9+TOMi3wfU1G\nK0OirYFkxDBAWn/TY6uBIyu0D7y4MEEWkcSoyCH+GQAF+NEAhcM2bZlDBlsi\nQc4vLRjHBAzfefkUag6CbQwijp10j8tSLGzVV2INrpZZa4LYDY7ujza0kaGd\nCOKtBrH4tT5wRVFPWAnr6AwRfuiNCZU3EO9KFu4MWJiasNegcgICj4dHUitJ\ncYB9Re96VPe13aDSd0IfcsoD901MUOfNMz/0xX1nRYjdr5gvFCKC4wQb+5kH\nN1JEQCSzvIlSlXCJBKCk6b6uQH2y4xFHI5AV64lC21KECEXPqmAYervs8EOb\n3D1+Gli9ReSDJll0tucju3kB41QnkDmCcEUDDESlSGKc12bjnNXc1CUzhoAu\n2o5Iq1IUYrAmm8XvTY5qxHcdO0bVberab8OBeh4iiS64hNHvgWO8ALNSUi6M\n2lQv3IkIaZO2sClvLZeHIDFIn1RnbqzajeD8frIw4kudufPnAVnTJdbQp46Y\nFE4oXlvJn1uWZec5pQ7mbu5jYvjmSo6lsf2lSVZyvSfl+N6QNFNYb79+7kpG\noRxE\r\n=9pts\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n# Deploying with Google Cloud Functions\n\nThis tutorial helps you deploy Apollo Server to Google Cloud Functions. It uses the following example function handler:\n\n```javascript:title=index.js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\n// Because `NODE_ENV` is a reserved environment variable in Google Cloud\n// Functions and it defaults to \"production\", you need to set the\n// `introspection` option to `true` for a UI like Apollo Sandbox or GraphQL\n// Playground to work correctly.\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n## Deploying from the Google Cloud Console\n\n### 1. Configure the function\n\nFrom your Google Cloud Console, go to the [Cloud Functions page](https://console.cloud.google.com/functions/list).\n\nClick **Create Function**. Give the function a name and set the **Trigger type** to `HTTP`.\n\nFor quick setup and access to the GraphQL endpoint/landing page, choose to **Allow unauthenticated invocations**. To require authentication for this endpoint, you can manage authorized users via [Cloud IAM](https://console.cloud.google.com/iam-admin/iam).\n\nSave your configuration changes in the Trigger section. Copy the trigger's URL for later and click **Next**.\n\n### 2. Write the API handlers and deploy\n\nNow on the Code page, set the runtime to a currently supported version of Node.js (such as `Node.js 14`), and set the Entry point to `handler`.\n\nPaste the example code at the top of this page into the contents of `index.js` in the code editor.\n\nEdit `package.json` so that it lists `apollo-server-cloud-functions` and `graphql` in its dependencies:\n\n```json:title=package.json\n\"dependencies\": {\n  \"apollo-server-cloud-functions\": \"^2.24.0\",\n  \"graphql\": \"^15.5.0\"\n}\n```\n\nClick **Deploy** to initiate deployment. Then, proceed to [Testing the function](#testing-the-function).\n\n\n## Deploying from your local machine\n\nBefore proceeding, you need to set up the gcloud SDK:\n\n1. [Install the gcloud SDK](https://cloud.google.com/sdk/docs/install)\n\n2. [Initialize the gcloud SDK and authenticate your Google account](https://cloud.google.com/sdk/docs/initializing)\n\nNext, initialize a new Node.js project by running `npm init` in an empty directory.\n\nRun `npm install apollo-server-cloud-functions graphql` to install the necessary dependencies and to include them in the `package.json` file.\n\nAt this point, your `package.json` should resemble the following:\n\n```json\n{\n  \"name\": \"apollo-gcloud\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"apollo-server-cloud-functions\": \"^2.24.0\",\n    \"graphql\": \"^15.5.0\"\n  }\n}\n```\n\nCreate a new file named `index.js` and paste the sample code at the top of this page into it.\n\nRun the following command to create and deploy the function to Cloud Functions:\n\n```bash\ngcloud functions deploy apollo-graphql-example --entry-point handler --runtime nodejs14 --trigger-http\n```\n\nThis creates a function named `apollo-graphql-example` that you can view from your console's [Cloud Functions page](https://console.cloud.google.com/functions/list)\n\nThe command asks some configuration questions and prints metadata about your newly created function, which includes the function's trigger URL.\n\nFor more information, see the official [Cloud Functions docs](https://cloud.google.com/functions/docs/deploying/filesystem).\n\n## Testing the function\n\nAfter deployment completes, navigate to your function's trigger URL. If deployment succeeded, you should see your server's landing page.\n\n> If you can't access your trigger URL, you might need to [add `allAuthenticatedUsers` or `allUsers` permissions](https://cloud.google.com/iam/docs/overview#all-authenticated-users) to your function.\n\nClick <q>Query your Server</q> and use Apollo Sandbox to test the following query:\n\n```graphql\nquery TestQuery {\n  hello\n}\n```\n\nAnd verify that the following response appears:\n\n```json\n{\n  \"data\": {\n    \"hello\": \"Hello world!\"\n  }\n}\n```\n\n## Getting request details\n\nTo obtain information about a currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, etc.) use the `context` option. This enables you to pass any request-specific data to your server's resolvers.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (CORS)\n\nTo enable CORS, you need to modify your HTTP response headers. To do so, use the `cors` option:\n\n```javascript{23-26}\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, HTTP authentication) the allow origin header must equal the request origin and the allow credential header must be set to `true`.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### CORS Options\n\nThe options correspond to the [express `cors` configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n| Option | Type(s) |\n|--------|---------|\n| `origin` | boolean \\| string \\| string[] |\n| `methods` | string \\| string[] |\n| `allowedHeaders` | string \\| string[] |\n| `exposedHeaders` | string \\| string[] |\n| `credentials` | boolean |\n| `maxAge` | number |\n","engines":{"node":">=12.0"},"gitHead":"211cd84ce3d2c9be90248e6a69c8c26bf8d1cc17","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.5+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.5","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.2.0-alpha.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.2.0-alpha.0"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.2.0-alpha.0_1629503757104_0.9590683497796859","host":"s3://npm-registry-packages"}},"3.2.0":{"name":"apollo-server-cloud-functions","version":"3.2.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.2.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"3cea5d44607e9e4a375f90f7e168c968f0f0b12c","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.2.0.tgz","fileCount":16,"integrity":"sha512-Jcqcf+e684yUIXtX4J7MhWZMl7ndInbUY/ABHoxqs25OHyFtBrUBXNld/D5V6pZLlV/ski5W7cGYfcGN9Eow7w==","signatures":[{"sig":"MEYCIQCXXG0LKO402iU1Vn5kz8kssjkMioCbKH7l89gCZgumyQIhAPZ0RkkjlsN/RBRTNV24Z5h/MlfKw1ZAvFn2iBAB91/0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":69745,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJDRVCRA9TVsSAnZWagAA9NgP/jkhiUaBfz+wckp9VbA2\nwaOGzSJGWUdhLGatu5bBkWPEQjq2P1AM1UEDntwqERdyvv13IhSLadoDpoH6\n1em4zKfhbUgRZlljZe0TY46dxG8wIrdiYjeT/7dlKAayXbwjUYb+GZ5gzktE\nrP0FSPRo4YmrmM1qC28nAD5iGi3iD8r1fpt08mqPTnuvO7ymEgb1S7wSUzDv\nC5f+LRNuFjQEbst9kxaKZTZznUPVi7fjq+6YcJGvUUs+Yy8t6li9er0pocyH\nxaJEHLsFs9XyJplwIhqwEWCXRxBpMMyXG34il7PxJJcwQUxfXpZnYHW/J4z1\ne9TY+ZA6rajhyuTwMAOHWDHU36YT2wKjh/sv0fwzsDQV7SzB8/ZrDQJTwyAL\ni7MXOOxacgG8ROnHlX3DOwGUEZ4iIxbS2+NLZ0K3s5wvb12GPm6ITNcI+Z3d\nEoR9zFG62DJ2txJDxegnxkaoIbXaW+oXatgRrqiI+z5ceMjVdbHtJabwrkUo\naOIj0k1bXGFIP5tjZ3xcVHKKevb+KdKUNbovOELb6Y3ktApVmQf0OtiymN1s\nahE/87+9/ztvxeP0Tp89rMBLSAqereffQ05mgB4fwTthhDO+Xsc0GTgx8xvu\nBdFiT9oFY9t6wg+hBa5X5MfX2QrwpCcM1EbfwTExBS7C6wyv9OssZN0eliWV\n6OKp\r\n=WzV+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n# Deploying with Google Cloud Functions\n\nThis tutorial helps you deploy Apollo Server to Google Cloud Functions. It uses the following example function handler:\n\n```javascript:title=index.js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\n// Because `NODE_ENV` is a reserved environment variable in Google Cloud\n// Functions and it defaults to \"production\", you need to set the\n// `introspection` option to `true` for a UI like Apollo Sandbox or GraphQL\n// Playground to work correctly.\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n## Deploying from the Google Cloud Console\n\n### 1. Configure the function\n\nFrom your Google Cloud Console, go to the [Cloud Functions page](https://console.cloud.google.com/functions/list).\n\nClick **Create Function**. Give the function a name and set the **Trigger type** to `HTTP`.\n\nFor quick setup and access to the GraphQL endpoint/landing page, choose to **Allow unauthenticated invocations**. To require authentication for this endpoint, you can manage authorized users via [Cloud IAM](https://console.cloud.google.com/iam-admin/iam).\n\nSave your configuration changes in the Trigger section. Copy the trigger's URL for later and click **Next**.\n\n### 2. Write the API handlers and deploy\n\nNow on the Code page, set the runtime to a currently supported version of Node.js (such as `Node.js 14`), and set the Entry point to `handler`.\n\nPaste the example code at the top of this page into the contents of `index.js` in the code editor.\n\nEdit `package.json` so that it lists `apollo-server-cloud-functions` and `graphql` in its dependencies:\n\n```json:title=package.json\n\"dependencies\": {\n  \"apollo-server-cloud-functions\": \"^2.24.0\",\n  \"graphql\": \"^15.5.0\"\n}\n```\n\nClick **Deploy** to initiate deployment. Then, proceed to [Testing the function](#testing-the-function).\n\n\n## Deploying from your local machine\n\nBefore proceeding, you need to set up the gcloud SDK:\n\n1. [Install the gcloud SDK](https://cloud.google.com/sdk/docs/install)\n\n2. [Initialize the gcloud SDK and authenticate your Google account](https://cloud.google.com/sdk/docs/initializing)\n\nNext, initialize a new Node.js project by running `npm init` in an empty directory.\n\nRun `npm install apollo-server-cloud-functions graphql` to install the necessary dependencies and to include them in the `package.json` file.\n\nAt this point, your `package.json` should resemble the following:\n\n```json\n{\n  \"name\": \"apollo-gcloud\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"apollo-server-cloud-functions\": \"^2.24.0\",\n    \"graphql\": \"^15.5.0\"\n  }\n}\n```\n\nCreate a new file named `index.js` and paste the sample code at the top of this page into it.\n\nRun the following command to create and deploy the function to Cloud Functions:\n\n```bash\ngcloud functions deploy apollo-graphql-example --entry-point handler --runtime nodejs14 --trigger-http\n```\n\nThis creates a function named `apollo-graphql-example` that you can view from your console's [Cloud Functions page](https://console.cloud.google.com/functions/list)\n\nThe command asks some configuration questions and prints metadata about your newly created function, which includes the function's trigger URL.\n\nFor more information, see the official [Cloud Functions docs](https://cloud.google.com/functions/docs/deploying/filesystem).\n\n## Testing the function\n\nAfter deployment completes, navigate to your function's trigger URL. If deployment succeeded, you should see your server's landing page.\n\n> If you can't access your trigger URL, you might need to [add `allAuthenticatedUsers` or `allUsers` permissions](https://cloud.google.com/iam/docs/overview#all-authenticated-users) to your function.\n\nClick <q>Query your Server</q> and use Apollo Sandbox to test the following query:\n\n```graphql\nquery TestQuery {\n  hello\n}\n```\n\nAnd verify that the following response appears:\n\n```json\n{\n  \"data\": {\n    \"hello\": \"Hello world!\"\n  }\n}\n```\n\n## Getting request details\n\nTo obtain information about a currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, etc.) use the `context` option. This enables you to pass any request-specific data to your server's resolvers.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (CORS)\n\nTo enable CORS, you need to modify your HTTP response headers. To do so, use the `cors` option:\n\n```javascript{23-26}\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, HTTP authentication) the allow origin header must equal the request origin and the allow credential header must be set to `true`.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### CORS Options\n\nThe options correspond to the [express `cors` configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n| Option | Type(s) |\n|--------|---------|\n| `origin` | boolean \\| string \\| string[] |\n| `methods` | string \\| string[] |\n| `allowedHeaders` | string \\| string[] |\n| `exposedHeaders` | string \\| string[] |\n| `credentials` | boolean |\n| `maxAge` | number |\n","engines":{"node":">=12.0"},"gitHead":"4dc19131aaea2416b5b2ccab295b06272f94c996","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.5+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.5","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.2.0"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.2.0_1629762645662_0.5288555693927672","host":"s3://npm-registry-packages"}},"3.3.0":{"name":"apollo-server-cloud-functions","version":"3.3.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.3.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"c437c77a3dd839cccf7079b7ddee7da56d8ad2a2","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.3.0.tgz","fileCount":16,"integrity":"sha512-IRWS+G8UAsbvP2LUMg1cOsHQRBJWg9yMO3696ApuWvTxaIasb9WQ2yfCo5+ahCv6zHNKBBRFKO4zRZG3KMz0EA==","signatures":[{"sig":"MEUCIA/B+Wn2RBSPrtPYeob/jtJRh1Ei7ZakMnr0+4FVV+kgAiEA7W+53nB7E5GgVATN8leB8R4q1CJacrGiiRgXAwoGWx4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":69732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJs7oCRA9TVsSAnZWagAA5NUQAIEYUAHo6mwHWnL8Tsgf\nfdAv5yEyD8zUUQVNVoGx7gf7XfQdIJR4FIXoqWXeUt3CzGCGMf3ga1q+sJww\nx/WAlB2xjBGslMwhEEpZ3lK7SLDO6xWiwe7Gae+7CMxnaHunLL6CNLAXGtLu\ngmKn7cYdQQHwkO/D7oZrCA2Q0M9fjs4dJs7BN6LYnoMjVGPxZUwswM1V0f49\nB7NzleNu/l+Gbg/y0uNnQ66NNMGyHH5viuAUjIFVQ14QjFIHBGZ2mFD55Usw\nxJe9NlGvUtTLnXFNMNzooXJ3knhTp+DdjW7iWLCa9p6/CmXQZehUrSb6QqmW\n6sgXm6Cq66X/tw3lMKoE1KWaJftnzfGRn97GwL9BYYkyZysoqnUXRWBgfJLR\niRzRSUNM19H7dfy5MusA8vpA3TfpUQXe2bbKYKJauA361BTPlHOYhoeW4loL\npwfIKQg2Oy77mld467Ub+gvI5y4fYqNkHV+qjeJRQi12DPJCcuDZ/ZeoMJQh\nZU7G9Jk+l6RLIlhJ7gma0Xeu80nff+q1reOgXtL/2UfaWRMAsLE7NVM0+1L4\nOyGDyz6V4W9HK652idTDC3/LYuOXjmgnbwdM3+TmxbMFkqAT9sIXvhzFgXD0\n+vyVhvD+hT6fn2l6Xfj0vvsjTAjAA9kok4sR0rqeoNAz+ROIvMBZeYvt4ru9\nPr0L\r\n=r0v9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"8524df3d3fe98b7ad625c48cb393cd4a59ec1476","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.5+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.5","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.3.0"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.3.0"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.3.0_1629933288846_0.29473665516574354","host":"s3://npm-registry-packages"}},"3.4.0-alpha.0":{"name":"apollo-server-cloud-functions","version":"3.4.0-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.4.0-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"37fd9157bbb8177c5ca7aa391a8e42fb7185949e","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.4.0-alpha.0.tgz","fileCount":13,"integrity":"sha512-BkbciaECkh5MEnLj4biXOW+UxLSKbENvFMXV9gac3JlZ6HWvEdv8W9IHYwPOr64mzOPfJ2LpBkhw2OpsH6J3zA==","signatures":[{"sig":"MEYCIQD/uVloU8sbRXkICw4+5DoHGhKigru7cwP45x8KemKcYgIhAN+/mXNAS90/RddIUBbTObuzev9OpfGCOz90532sQhmx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17616},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n# Deploying with Google Cloud Functions\n\nThis tutorial helps you deploy Apollo Server to Google Cloud Functions. It uses the following example function handler:\n\n```javascript:title=index.js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\n// Because `NODE_ENV` is a reserved environment variable in Google Cloud\n// Functions and it defaults to \"production\", you need to set the\n// `introspection` option to `true` for a UI like Apollo Sandbox or GraphQL\n// Playground to work correctly.\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n## Deploying from the Google Cloud Console\n\n### 1. Configure the function\n\nFrom your Google Cloud Console, go to the [Cloud Functions page](https://console.cloud.google.com/functions/list).\n\nClick **Create Function**. Give the function a name and set the **Trigger type** to `HTTP`.\n\nFor quick setup and access to the GraphQL endpoint/landing page, choose to **Allow unauthenticated invocations**. To require authentication for this endpoint, you can manage authorized users via [Cloud IAM](https://console.cloud.google.com/iam-admin/iam).\n\nSave your configuration changes in the Trigger section. Copy the trigger's URL for later and click **Next**.\n\n### 2. Write the API handlers and deploy\n\nNow on the Code page, set the runtime to a currently supported version of Node.js (such as `Node.js 14`), and set the Entry point to `handler`.\n\nPaste the example code at the top of this page into the contents of `index.js` in the code editor.\n\nEdit `package.json` so that it lists `apollo-server-cloud-functions` and `graphql` in its dependencies:\n\n```json:title=package.json\n\"dependencies\": {\n  \"apollo-server-cloud-functions\": \"^2.24.0\",\n  \"graphql\": \"^15.5.0\"\n}\n```\n\nClick **Deploy** to initiate deployment. Then, proceed to [Testing the function](#testing-the-function).\n\n\n## Deploying from your local machine\n\nBefore proceeding, you need to set up the gcloud SDK:\n\n1. [Install the gcloud SDK](https://cloud.google.com/sdk/docs/install)\n\n2. [Initialize the gcloud SDK and authenticate your Google account](https://cloud.google.com/sdk/docs/initializing)\n\nNext, initialize a new Node.js project by running `npm init` in an empty directory.\n\nRun `npm install apollo-server-cloud-functions graphql` to install the necessary dependencies and to include them in the `package.json` file.\n\nAt this point, your `package.json` should resemble the following:\n\n```json\n{\n  \"name\": \"apollo-gcloud\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"apollo-server-cloud-functions\": \"^2.24.0\",\n    \"graphql\": \"^15.5.0\"\n  }\n}\n```\n\nCreate a new file named `index.js` and paste the sample code at the top of this page into it.\n\nRun the following command to create and deploy the function to Cloud Functions:\n\n```bash\ngcloud functions deploy apollo-graphql-example --entry-point handler --runtime nodejs14 --trigger-http\n```\n\nThis creates a function named `apollo-graphql-example` that you can view from your console's [Cloud Functions page](https://console.cloud.google.com/functions/list)\n\nThe command asks some configuration questions and prints metadata about your newly created function, which includes the function's trigger URL.\n\nFor more information, see the official [Cloud Functions docs](https://cloud.google.com/functions/docs/deploying/filesystem).\n\n## Testing the function\n\nAfter deployment completes, navigate to your function's trigger URL. If deployment succeeded, you should see your server's landing page.\n\n> If you can't access your trigger URL, you might need to [add `allAuthenticatedUsers` or `allUsers` permissions](https://cloud.google.com/iam/docs/overview#all-authenticated-users) to your function.\n\nClick <q>Query your Server</q> and use Apollo Sandbox to test the following query:\n\n```graphql\nquery TestQuery {\n  hello\n}\n```\n\nAnd verify that the following response appears:\n\n```json\n{\n  \"data\": {\n    \"hello\": \"Hello world!\"\n  }\n}\n```\n\n## Getting request details\n\nTo obtain information about a currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, etc.) use the `context` option. This enables you to pass any request-specific data to your server's resolvers.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (CORS)\n\nTo enable CORS, you need to modify your HTTP response headers. To do so, use the `cors` option:\n\n```javascript{23-26}\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, HTTP authentication) the allow origin header must equal the request origin and the allow credential header must be set to `true`.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### CORS Options\n\nThe options correspond to the [express `cors` configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n| Option | Type(s) |\n|--------|---------|\n| `origin` | boolean \\| string \\| string[] |\n| `methods` | string \\| string[] |\n| `allowedHeaders` | string \\| string[] |\n| `exposedHeaders` | string \\| string[] |\n| `credentials` | boolean |\n| `maxAge` | number |\n","engines":{"node":">=12.0"},"gitHead":"119dac4fbe357661cad7163dfa643b02ab479b96","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.6+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.6","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.4.0-alpha.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.4.0-alpha.0"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.4.0-alpha.0_1633739903156_0.7410863237176519","host":"s3://npm-registry-packages"}},"3.4.0":{"name":"apollo-server-cloud-functions","version":"3.4.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.4.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"95e93730ae2a168167f43e91c3d34962ade6339d","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.4.0.tgz","fileCount":13,"integrity":"sha512-KhrMhEP17scJiYD+jluvrn0JUZM2IxCVkUNvlkFMG2+nrlVpnGCaGtJwmc1gnTExsqQh9OAyOxZrWM0iYzJ7CA==","signatures":[{"sig":"MEQCIC9RW7w+Yjk9Bt6hYnfpSjYvs1uAzF39p7BXwRFmuaAZAiAEL3CjKqqsa1XqFeRpQL8hofOI1Sl7RZF1oQKrQMzWZQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17592},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"7861ba22c9e4caf037e7a1cec71191b9b0deb71b","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.6+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.6","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.4.0"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.4.0"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.4.0_1633985920115_0.0693247706439577","host":"s3://npm-registry-packages"}},"2.25.3":{"name":"apollo-server-cloud-functions","version":"2.25.3","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.25.3","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"aaf2e25308996a3419c21bf162e72fdbcc982c58","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.25.3.tgz","fileCount":20,"integrity":"sha512-n7EVh9smnGXlJOTntzi4C6Ras9/phAaezQt2xPPQo/OULbOYqkw9hsMGytUSDZIY7lxsu/HZNZzTp232C1/Chg==","signatures":[{"sig":"MEQCIEx6t86fFsFjdkIANnl+G38NpZ4hsLKZGf7wxJJ9xurkAiBxYnPQC8lt3HY/xKQMioM1QJgumnFO18OjaCb8I97R9g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34819},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"a725306525a99650af46effb72ae9afe780ed88b","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.1.0","apollo-server-core":"^2.25.3","apollo-server-types":"^0.9.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^2.25.3"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.25.3_1636049067472_0.02530799153438834","host":"s3://npm-registry-packages"}},"3.4.1":{"name":"apollo-server-cloud-functions","version":"3.4.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.4.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"978cef833eb0a4c9fac99f163d467df631215247","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.4.1.tgz","fileCount":13,"integrity":"sha512-ciwYc6OeQMlYLzbNEZsPqKV1CQYYdXna68EpB112dh2ag73uUQpjePgg5Dk2qf3HGcoDu+cIg8m7kHSQ67DfzA==","signatures":[{"sig":"MEUCIQC38rQfEcvQgsVG6Tldes+3M3TYlS75NYVHJftTPp69dgIgI5AJp9Nmrs86kxSJ2qlGo28mOcGgnApduc+K/35aKuY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17592},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"f3fcbfe09957806df06f8de431877dd39d8b97c0","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.4.1"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.4.1"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.4.1_1636049200931_0.20654917933804673","host":"s3://npm-registry-packages"}},"3.5.0":{"name":"apollo-server-cloud-functions","version":"3.5.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.5.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"a55ef740553e9087e5f79023fb2d84a316486ea5","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.5.0.tgz","fileCount":13,"integrity":"sha512-zpPODHi75/41V7fJPV3mbyHDVt4BuEpqaRrHo1nSpx3bZLNGTEKg5a/18+Q7DWRq+r05Z86SBT9Z9DfxQLhWZA==","signatures":[{"sig":"MEUCIGy/z+jCWtg3J+lFEcxXSyZwuFrU7H0O97f5jw7iKGqYAiEAtMpqNme5NDPrbP+LOJr+SUZU1U7VA/ziDfFE4mm71ec=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17601},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"e6c3cbbf820b3ffff1e7e98d41b3bfc08f99b9b0","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.5.0"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.5.0"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.5.0_1636134883410_0.5597595080999915","host":"s3://npm-registry-packages"}},"3.6.0-alpha.0":{"name":"apollo-server-cloud-functions","version":"3.6.0-alpha.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.6.0-alpha.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"110dbd47b55beb2df766b31f5ac5a91fa21067df","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.6.0-alpha.0.tgz","fileCount":13,"integrity":"sha512-UIRAD0Jxgk1zJgQ0Uooq62S23mB59L1tiHTdGinjcecUbpnw/YuViZrdcawpYKJ/trpNqZJFhrDtMaH8i5oXWg==","signatures":[{"sig":"MEUCIQCcO/U/yyhTpoDi8tmrr6wtby914c8ABjSEFYBjPLT5AAIgbPYyM0ZL/BtiWzT4XUEVGqZgCnQVaKuEWCo96vu5yS4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17625,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhvQfrCRA9TVsSAnZWagAATe0P+QH7kVWTdChvVHWDZeSf\nHNbZu+GDa6NBj2Bu2eDmNsw41qrbP9li9pxTpjAdw8n5iEWDHqB0NcTt0PLT\nu9h7A4RQc1bhavSDHk437+2nSWdCih9Whc9UfT58h2LR8ZjFhrf1NFoYc6lu\nufKYw0co01K1inNZeQuCESjRk1tHmgAEatKxTGXPdEUZl44OBlNvVvLcqAhn\ngGm6od78/TMFLYzCJGzzokA95jxeiM+ngKZbYQrIlNArijRcc7iRBCnM5Hw3\nkKfOgTpF2uOFTDcKXow32NuAvVB4vBA1DEsJMMhgr+VnnaX4a+vKmW4b6oJ+\njSQTDdJb88M847xvY/4NzgQcNdsJjpRx2tVdrI9ZafyHbf1x9MypGyRVMCM6\nTkx9hrMCZ3GvGE8coP6R79n/7CuTiBkEqqPAIZq7xbHRoSM2dYz5GMMYXkYW\nLSpkO5sXeorAtyMUQwqUpiP/DIP423W96F8xu2DoeZbp5PxE7ViG0vdwfPGt\nBKxDIl8fJdL2Ch1MV7yWCqHafJLQPq+9eOZ7NZ5rbEL3gd+fczEl923ZRaDg\noRxWQCARcfz5nuI7zePOTx4rFg3XdclOn+6ZAmxomB+p/qOVnYDXfjFiGOYf\nkLGKUOcL2qKnjbU6TsuhDOh8pLrFPv2ROjHdVeQn71+BCRHEkA6pp9KIwj+3\nEyQt\r\n=N4oR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n# Deploying with Google Cloud Functions\n\nThis tutorial helps you deploy Apollo Server to Google Cloud Functions. It uses the following example function handler:\n\n```javascript:title=index.js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\n// Because `NODE_ENV` is a reserved environment variable in Google Cloud\n// Functions and it defaults to \"production\", you need to set the\n// `introspection` option to `true` for a UI like Apollo Sandbox or GraphQL\n// Playground to work correctly.\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n## Deploying from the Google Cloud Console\n\n### 1. Configure the function\n\nFrom your Google Cloud Console, go to the [Cloud Functions page](https://console.cloud.google.com/functions/list).\n\nClick **Create Function**. Give the function a name and set the **Trigger type** to `HTTP`.\n\nFor quick setup and access to the GraphQL endpoint/landing page, choose to **Allow unauthenticated invocations**. To require authentication for this endpoint, you can manage authorized users via [Cloud IAM](https://console.cloud.google.com/iam-admin/iam).\n\nSave your configuration changes in the Trigger section. Copy the trigger's URL for later and click **Next**.\n\n### 2. Write the API handlers and deploy\n\nNow on the Code page, set the runtime to a currently supported version of Node.js (such as `Node.js 14`), and set the Entry point to `handler`.\n\nPaste the example code at the top of this page into the contents of `index.js` in the code editor.\n\nEdit `package.json` so that it lists `apollo-server-cloud-functions` and `graphql` in its dependencies:\n\n```json:title=package.json\n\"dependencies\": {\n  \"apollo-server-cloud-functions\": \"^2.24.0\",\n  \"graphql\": \"^15.5.0\"\n}\n```\n\nClick **Deploy** to initiate deployment. Then, proceed to [Testing the function](#testing-the-function).\n\n\n## Deploying from your local machine\n\nBefore proceeding, you need to set up the gcloud SDK:\n\n1. [Install the gcloud SDK](https://cloud.google.com/sdk/docs/install)\n\n2. [Initialize the gcloud SDK and authenticate your Google account](https://cloud.google.com/sdk/docs/initializing)\n\nNext, initialize a new Node.js project by running `npm init` in an empty directory.\n\nRun `npm install apollo-server-cloud-functions graphql` to install the necessary dependencies and to include them in the `package.json` file.\n\nAt this point, your `package.json` should resemble the following:\n\n```json\n{\n  \"name\": \"apollo-gcloud\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"apollo-server-cloud-functions\": \"^2.24.0\",\n    \"graphql\": \"^15.5.0\"\n  }\n}\n```\n\nCreate a new file named `index.js` and paste the sample code at the top of this page into it.\n\nRun the following command to create and deploy the function to Cloud Functions:\n\n```bash\ngcloud functions deploy apollo-graphql-example --entry-point handler --runtime nodejs14 --trigger-http\n```\n\nThis creates a function named `apollo-graphql-example` that you can view from your console's [Cloud Functions page](https://console.cloud.google.com/functions/list)\n\nThe command asks some configuration questions and prints metadata about your newly created function, which includes the function's trigger URL.\n\nFor more information, see the official [Cloud Functions docs](https://cloud.google.com/functions/docs/deploying/filesystem).\n\n## Testing the function\n\nAfter deployment completes, navigate to your function's trigger URL. If deployment succeeded, you should see your server's landing page.\n\n> If you can't access your trigger URL, you might need to [add `allAuthenticatedUsers` or `allUsers` permissions](https://cloud.google.com/iam/docs/overview#all-authenticated-users) to your function.\n\nClick <q>Query your Server</q> and use Apollo Sandbox to test the following query:\n\n```graphql\nquery TestQuery {\n  hello\n}\n```\n\nAnd verify that the following response appears:\n\n```json\n{\n  \"data\": {\n    \"hello\": \"Hello world!\"\n  }\n}\n```\n\n## Getting request details\n\nTo obtain information about a currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, etc.) use the `context` option. This enables you to pass any request-specific data to your server's resolvers.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (CORS)\n\nTo enable CORS, you need to modify your HTTP response headers. To do so, use the `cors` option:\n\n```javascript{23-26}\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, HTTP authentication) the allow origin header must equal the request origin and the allow credential header must be set to `true`.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### CORS Options\n\nThe options correspond to the [express `cors` configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n| Option | Type(s) |\n|--------|---------|\n| `origin` | boolean \\| string \\| string[] |\n| `methods` | string \\| string[] |\n| `allowedHeaders` | string \\| string[] |\n| `exposedHeaders` | string \\| string[] |\n| `credentials` | boolean |\n| `maxAge` | number |\n","engines":{"node":">=12.0"},"gitHead":"2c352a9e0c5a48b8cfec145bec52cad2f0a73fa4","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.6.0-alpha.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.6.0-alpha.0"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.6.0-alpha.0_1639778283380_0.6223477389530392","host":"s3://npm-registry-packages"}},"3.6.0-alpha.1":{"name":"apollo-server-cloud-functions","version":"3.6.0-alpha.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.6.0-alpha.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"fc91824c2b79071589da92381c23b9fbaea9e546","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.6.0-alpha.1.tgz","fileCount":13,"integrity":"sha512-GeJyIA2c3kuuAKXeOl1ZIMnHV8A3i3cbymP4V5GyZegzUOgUQ5IrIi9jeuYTKnmSMnj0MRsqMlsLBTTocuDCKA==","signatures":[{"sig":"MEQCIHYN4Qf+FwIYZYE/oNzWZ7TbnUTgaRUklpZq09xzThPRAiBIGbc/T5Ctk8rtd64ETKP6XxU6xr8yCmEuNOa+nBDQ0Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17625,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhyoBTCRA9TVsSAnZWagAA6n8P/2r/KrlWtdFqWqR3t+65\nAGEywZAAtoo1y6ivnOS0/JUsTSpojTuvrMAjIvWGw5/54BhFdTjZeTlzJAeD\nuKhSkuVEH4b32+arqQpe0ulVvnIWFkem/aGGf2JA89Gb8UqrlPdU9dOrDQ6S\nvzobIiECCM/Xj1ufcbZRSG3cZzoxjyFzOWhsyjDJktarVLhdgjC8Bu9YkzCV\nmMBXNOwGEy5fYUcKJpkrB1X+9Eq5zlJKIWwp6kusgX5qJp8c8dufdfYu6KkI\ngr3FnQJLn8+pl/h2KNAAB7xPKYLoemh4sM5g6Hoz1XpvFGUz9xYjuEHUtyf+\n5+MM2iNKSgRv6Ro0MtOF6TqBNQm6GAXmXWqCf426E8Jg/s8DWOGdAPC3KOAF\nbvsxMMczUXlU/izKMB37NFvChCccp/Ce6Ps6quwcYaVsBVOn4XP2Y4YjPoOi\n/TQ5mL1+ZW9JlLqRz1Ohmoa2NzuHUMYwhljvk+L+//QYPyzzsBPj1sr3djDK\nSH7DppxGKmeuRvkWV/Lzg4DftQAPWLjiYq2XLL9rSgut8DOenUfy0La871Cp\nHU9qJq+6xzYFyKaN9NHCUa4sGFWz2NcGr234uLOwj23M9Hr0wcGKWr4PGYkj\nmZDAksZM6y7bJ/XtLbVMYlGpxFSLIT9opyTjI45C6b4I+lY7oB5Gk/0wh8yA\nzt+7\r\n=0HtM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n# Deploying with Google Cloud Functions\n\nThis tutorial helps you deploy Apollo Server to Google Cloud Functions. It uses the following example function handler:\n\n```javascript:title=index.js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\n// Because `NODE_ENV` is a reserved environment variable in Google Cloud\n// Functions and it defaults to \"production\", you need to set the\n// `introspection` option to `true` for a UI like Apollo Sandbox or GraphQL\n// Playground to work correctly.\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n## Deploying from the Google Cloud Console\n\n### 1. Configure the function\n\nFrom your Google Cloud Console, go to the [Cloud Functions page](https://console.cloud.google.com/functions/list).\n\nClick **Create Function**. Give the function a name and set the **Trigger type** to `HTTP`.\n\nFor quick setup and access to the GraphQL endpoint/landing page, choose to **Allow unauthenticated invocations**. To require authentication for this endpoint, you can manage authorized users via [Cloud IAM](https://console.cloud.google.com/iam-admin/iam).\n\nSave your configuration changes in the Trigger section. Copy the trigger's URL for later and click **Next**.\n\n### 2. Write the API handlers and deploy\n\nNow on the Code page, set the runtime to a currently supported version of Node.js (such as `Node.js 14`), and set the Entry point to `handler`.\n\nPaste the example code at the top of this page into the contents of `index.js` in the code editor.\n\nEdit `package.json` so that it lists `apollo-server-cloud-functions` and `graphql` in its dependencies:\n\n```json:title=package.json\n\"dependencies\": {\n  \"apollo-server-cloud-functions\": \"^2.24.0\",\n  \"graphql\": \"^15.5.0\"\n}\n```\n\nClick **Deploy** to initiate deployment. Then, proceed to [Testing the function](#testing-the-function).\n\n\n## Deploying from your local machine\n\nBefore proceeding, you need to set up the gcloud SDK:\n\n1. [Install the gcloud SDK](https://cloud.google.com/sdk/docs/install)\n\n2. [Initialize the gcloud SDK and authenticate your Google account](https://cloud.google.com/sdk/docs/initializing)\n\nNext, initialize a new Node.js project by running `npm init` in an empty directory.\n\nRun `npm install apollo-server-cloud-functions graphql` to install the necessary dependencies and to include them in the `package.json` file.\n\nAt this point, your `package.json` should resemble the following:\n\n```json\n{\n  \"name\": \"apollo-gcloud\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"apollo-server-cloud-functions\": \"^2.24.0\",\n    \"graphql\": \"^15.5.0\"\n  }\n}\n```\n\nCreate a new file named `index.js` and paste the sample code at the top of this page into it.\n\nRun the following command to create and deploy the function to Cloud Functions:\n\n```bash\ngcloud functions deploy apollo-graphql-example --entry-point handler --runtime nodejs14 --trigger-http\n```\n\nThis creates a function named `apollo-graphql-example` that you can view from your console's [Cloud Functions page](https://console.cloud.google.com/functions/list)\n\nThe command asks some configuration questions and prints metadata about your newly created function, which includes the function's trigger URL.\n\nFor more information, see the official [Cloud Functions docs](https://cloud.google.com/functions/docs/deploying/filesystem).\n\n## Testing the function\n\nAfter deployment completes, navigate to your function's trigger URL. If deployment succeeded, you should see your server's landing page.\n\n> If you can't access your trigger URL, you might need to [add `allAuthenticatedUsers` or `allUsers` permissions](https://cloud.google.com/iam/docs/overview#all-authenticated-users) to your function.\n\nClick <q>Query your Server</q> and use Apollo Sandbox to test the following query:\n\n```graphql\nquery TestQuery {\n  hello\n}\n```\n\nAnd verify that the following response appears:\n\n```json\n{\n  \"data\": {\n    \"hello\": \"Hello world!\"\n  }\n}\n```\n\n## Getting request details\n\nTo obtain information about a currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, etc.) use the `context` option. This enables you to pass any request-specific data to your server's resolvers.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (CORS)\n\nTo enable CORS, you need to modify your HTTP response headers. To do so, use the `cors` option:\n\n```javascript{23-26}\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, HTTP authentication) the allow origin header must equal the request origin and the allow credential header must be set to `true`.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### CORS Options\n\nThe options correspond to the [express `cors` configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n| Option | Type(s) |\n|--------|---------|\n| `origin` | boolean \\| string \\| string[] |\n| `methods` | string \\| string[] |\n| `allowedHeaders` | string \\| string[] |\n| `exposedHeaders` | string \\| string[] |\n| `credentials` | boolean |\n| `maxAge` | number |\n","engines":{"node":">=12.0"},"gitHead":"1361265ba3d573b7e7cac348c81f923ab32fbc6b","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.6.0-alpha.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.6.0-alpha.1"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.6.0-alpha.1_1640661075739_0.7630248538855939","host":"s3://npm-registry-packages"}},"3.6.0":{"name":"apollo-server-cloud-functions","version":"3.6.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.6.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"5edc0b718a53f3e4e861bcd7f64d4c9e17a25335","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.6.0.tgz","fileCount":13,"integrity":"sha512-T5f3qlwSEQO9wNXA1Hw7yanlFWi0VVZtYGbQ5ePmlrOfyBmyJ8iZVuW2+UosOmLCcv+2eeIvoUBxxBG6vwVQww==","signatures":[{"sig":"MEUCIEiIG3jzXDXwdvr46R1UcAcGmDVOFJaG5ZurCX6wuE5TAiEAwUQ3WqtoZQDlt5NyyOBLL1iD/pSbuEMPr7T1aPLfyvA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzfm3CRA9TVsSAnZWagAAKTIP/0yFM0nZJo9kmIXg1sij\n2ascqtnourO5QfGOUvmr2d/soSIWIi8OE5TvCPCRT9wnZ/0ZkFmC7vXjhSz+\ndocmGRgSXMDvMlq1aI5miyqqVmiFoLiP2xQmwSMjQPAsLTlCLvJjiIxSu1Gs\n4dfBIgunlI+xnkwSty9y4knlRh8yoXiIh513SqJekjx4Ju2IbiDAs10VPklZ\n8x8Mqmhp+p9kZDMbybD1vyK+BasEBezyJvYSPmsmTpa0ILNgqUpGy6Lsispl\nZlnm/C8IAXMdNVa4i7a42g7AHyo8jafOXEo3EyUHVUpGxBfhpjydViO6dnV3\niimBsGiHUE+Yafcm1D0HiSPeLfT9az6U9j2MH0oi1PVNZzzE1XOMqUQterhz\nOlur5eDlaXVPZZpl/nFvFeRJOTDfG4GCIyLpbaQ1WF0uLdU5sfQM+ZYYg5iS\n8V6K+H/R0yuEesLAFFHWpensCnurrHgW2KDdIDamZSucczPQgzzX43llzo+8\nIqLdbHRZJbMzvyff3zQfp1RvBLmkaLQprHObPXSVEFye7f2yzSo6s45MsvW1\ny1Ij88Dc1eYTpdpawKNVar2nCXK3xzDkVMZOIu836fq0e7fhqu504bfDHaeT\nnnpQr2G5874gX5pe1MXN9djvnUm/2f/7E23UrC+M52Mtr6zJ0JueGsg3NgTV\n4bqE\r\n=zu/g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"8b2c1360c224d23ff64fa49adbee1e62dbdaa917","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.6.0"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.6.0"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.6.0_1640888759399_0.9747900110052075","host":"s3://npm-registry-packages"}},"3.6.1":{"name":"apollo-server-cloud-functions","version":"3.6.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.6.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"bc52d1068485c5814ee54361d4af7355dfcfbc5c","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.6.1.tgz","fileCount":13,"integrity":"sha512-3Gvu09eDG7K//1E9dZrvWzj7UNbfoXcYaQCvK3H1DE0CU+Eweak49lraAWhSrvjKVfNi6gl5GjlZV3WeXCsQJA==","signatures":[{"sig":"MEUCIQDmZ9zrBqVIR/KuTesPLV1pLGUtl2+IQJ5jGoC84uaquAIgfRcGPpvACImLbCFAqj2x1QQEDubyLA4+O7bDdUhCwUU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzyh+CRA9TVsSAnZWagAAej0P/2QkWHFBYpZ5P0RPoy7W\nZm/E98A6gfmi1hOPflXHPmp6zt0XaKlWFBVeJcPWZmrbmZ0foOTQFQ91aJUW\n62k3qm+dFtj5nI2JP427r9dq0TeRmHMnOIXdGZZd4zJG3pGiHEUaZhv/Nlnx\nTJQ/m9pnaBysU9hRsr/vrr546qNG6tYmzKF4QH+GHvnwmRg+XC87HX6Eexa+\nlId1vQdjNr58GWFcQMuPhhQUMHADoEWyX17hBdrDTnP8ItxfF/sPmpcr5eig\nYVMeV/VcMX1+JexWKM+fakI56zV0UfiT3eYjgHp6Ph929i6v3ho/a7GSkAFu\n/OEHvNVPgu7dmzQI57/ntgR5PiPXn4s3BRuIsXlwe57BTpeBPdS9HkLi0NJj\ny68wlFSQTUBYKfLtXnMdhqjAHqGd9hQBtrIZu9S+lYA7BTEcze01H3jANJeW\nw20vPRGLc6Zeln/+Ixhub4QFo6IZBDw5JjBmtkafzwFmm99vH18hP9W/PRnw\nb5BsoLcrYU21IhZSA9xVasg5RR2FFQUPSJljKF4U1OZAfyksp8bBW7kz+b97\nZOrNBW/spKeCwf5xcfm11bn8yKgxNkv39ZbLKjgyhwZMhwgoHC8duOUh1RgJ\nqyG1EsbJDUeJ8yeQwtZ9qXGU9FMC9lDcM1tpW+HO3SmYQWy8qNs6ZzIBWCFs\n25Mp\r\n=Yaj4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"f3fc7d147a3bc3446f4f3452acfa5f598099b08f","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.6.1"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.6.1"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.6.1_1640966270231_0.3435517088479145","host":"s3://npm-registry-packages"}},"3.6.2":{"name":"apollo-server-cloud-functions","version":"3.6.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.6.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"0501f33b9d5f7b6c94e1255112ab2da34bc1a138","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.6.2.tgz","fileCount":13,"integrity":"sha512-7ZQz2c9ezM163UcPqVcBPbdblWcdA9Egh6MQLTH0MMxadmSZLLiY4Db1wEhRKpeQfy9FnCFypU0LUugPpgJeHQ==","signatures":[{"sig":"MEYCIQDyS2yOI41NCPFqCvzvKbne1wo6hl751EykPcHC9M+eQwIhALE6SfKDVFWQsb14f0EU6Pe0BRi0V5olwCSgHyEwPluz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5yy2CRA9TVsSAnZWagAAeBMP/0c9QO4hEa6JZ61BaFvu\nkMISkmc7ucdxu2vwKOKBEkegYeGbxji1k2gQI9lR3pV3V6i6XtxIgx3UiZid\n8hznJb2lMWy+nwqZY3PK6tV48KR1VRFOMUiV5OpgeUS3FpiV/wRwU2yGRVpt\nHOeUGERcQmbbFaz4f0GoyIz/BUMgwzCZnu6khPuhjkfsS73vEeon/MMpyes0\nysITmAhRjsXcdcaqg6XblIvkcreXraaP6WiEdOkcm5QS/fuWiPSHArEpDOEm\n8XvpVMDbzmQSxxMk4uaSp2QQZ5e5sLSZwyiohs4cT5Y929719T9bTq0jM54w\neOtqotdQg7f3uCnNmWJT8XGVk8H4vCRyP7mIcjtosO7bHV0ez2EDpFIfn4Us\nmVQV3TeBYownFWqYcXZERZHrMmC3+8quv1i00Qv102xASsqnX43W4cNneftZ\nAU2IkmNCGEElKcmvo1wekWj1zg0GaUS3QJiJ+cDlXc6yQs8xSl7L8GJ7c0DG\nrJoY+F/YyL6hEzdKyp8RxyBE0YgArBLXt9leZwkD4Ap+U0tC374LYrKdqVOA\nm/nF9bR4v+moOpqc1Oo2fmnuFatC5lcq+xzQ9YuckeGTe/pO+QzG8ngdAtAQ\ny7+UhqxPwErvGe/xmRWgAOcZ6PjodTaqD6/6xK/oeyrcpZ00Ii/jik2eTkea\n3Vkc\r\n=rU0k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"022184a4d01d4452ebbcfeeef6e8ee1aae7a5db7","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.6.2"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.6.2"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.6.2_1642540214739_0.7204716466240177","host":"s3://npm-registry-packages"}},"3.6.3":{"name":"apollo-server-cloud-functions","version":"3.6.3","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.6.3","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"ead1d2c38a44768f087649ce348d16859474d405","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.6.3.tgz","fileCount":13,"integrity":"sha512-2Q+LgvWyvtz73JKHE7whjTT3xKZlhKfjBsUJjmhAWMBKGmXOuZAlPQOJR6benS1zqOzo40Nj6xgGPGZKAhCGCg==","signatures":[{"sig":"MEUCIBbbduSkleR2FC4NpOsMHe/afvCCy4Ay0xxjkOg5mhk0AiEAvddm/dgSdna5rY8ztOArXi8EHZSJjasbS3Jiapk+zh4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiAsFXCRA9TVsSAnZWagAAcQQP/jOFT8LpRCvPnbKzGxSc\nV+E1jqTWsI8QHX/Dg0gxXDbniImIFj4zriMWkqqYg3ZVREYBp5IYcbU7WX6t\nWFkDnvSTRUZ5iT2IOF9wyRH4N/jkmUZqZVIeC5jgHVHy1k5zE2LoJHg8ajLO\nyaBVYx2aaU7tiTaxFqgmdnpvflZ6LwRHkKHDoKID30JvgG2c99tPmJXiX3vk\n2wdmSwn5ONXHrpXydNLow0IcmEKQPJogOgBrXFd9p6nBUXk60Z+J4lZxzYVF\n2QiuqJmxObazD9BnxeaEtxg6UxH40iXrH/3XqhCqbHpZB4QMGxVQ13oHgSUY\n8mMwQAS4/IpPknBGKyFRyLPhOBVz8hUDgv5EC8yx/ryeGAthoApX0PpDs9+s\nY1Dxw+SbIIorHT5hsACUPJw6Rq/R/uoY/t08yyx+CECLoJRMFlOMus0KOQnc\neWKcghYSyHbGR45B8Jv/qxsYZBZ3tJeaSNO2YvjIMMyt4cdR/d4AAd61mHNm\nt8b7KdunpmQhIJ9YmlfeVbqhwT5CEL8LzkM+J220c1Q9SrVESsPWxA+or4ZC\n2ON796EK+QWfnMX8Yzh1WecffJ/sm6u+QiLrFhMXOJe8sKh8NTDqB4PuHwA+\nzqOMpXK2AvtU9h6HhgBVI/2Bg+SQIO4Yp9N4pFZSMFnWFabm7qW/hYyob6FZ\nNovn\r\n=RThF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"289acad0e3777bd0010506763c3fd6e4c0289813","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.6.3"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.6.3"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.6.3_1644347734851_0.30590177895815773","host":"s3://npm-registry-packages"}},"3.6.4":{"name":"apollo-server-cloud-functions","version":"3.6.4","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.6.4","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"d9b65f4e13dba321346f4c78a182b19851e2e430","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.6.4.tgz","fileCount":13,"integrity":"sha512-ZzE/WSTQK2yXYt14FwtbktCbQjZ9f8SvOfSeNKBxXpKorC24HiZd8qmAEH2R6C+R2FomiY3bpBnySDCocnUgGA==","signatures":[{"sig":"MEUCIQDfUpmnjTwQPw+QoxnI+e6TFVIhrdyJsoINXtd+0J9bZAIgesI5CCZ/o505lgZjFL37oySA8p4hF/0tS63qcHb7uuc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKkidACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpNhQ//e7Saxeydh4r1F7XNsM/hhMCQRj4BhOO4sswI39MBO6GKkNhq\r\ngaJspO0SVghT48iVjK+ZjrCKwEV+jwqUjyzcC3IZnxJAxvSCKA74e0CZ4GmK\r\nDnYCd+x/sqk752SgpB9uuCRxam7vGaodHn2lc9mtazCqu1ncePKR+/w1dbXR\r\new2KmOyfakQfaldu6xBCghxLtvCq8edsoidalMPZiiehjKORkk7oLgdMWfZy\r\ncWcDAT5Eh1uudSHJkp29JHB0y3ywAMko/uLGBXbEqouIaiFnHN3gzHalIJM1\r\nccJ2fwVd4r3dRa7xKdvoBTvmubA9Jes0dHy+sy+tLLx0AsdHAkuGT02jil8I\r\n/C/lSzZ9buxogNRt0Eh1rivXRW/ZwieHvRGMLXl/RW/gzDzNoCP3Gm8yWsmB\r\nKf8deh5Phbz/dY5EXJYadb2pbv/yRiZEv62Svfo6w6EdJ9Vw0lxCdyVq1+yv\r\nTulzTAEGaBKXF1xVkNmoGcr9N1xIBYrk5GHcSz1xyP4gGBOwPyjjRS53j8b2\r\nLUo36lJVBGVwkCrzZ+XYKZtiR15GniCvh3JRaG0avO8wOf8MeWlrOJGTEAQr\r\nM6UDTTV6H7/DyWzeYtyMON404x0LY2EQV1Q5myggcQRWmLrYSYk7TtickgB9\r\nyfX4hsnxOsDGTtBZsdS/KZw0on77n+Hc35M=\r\n=LUCs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"dfa9fef87b75513ff32391fb6d8dea4bf5c7d889","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.6.4"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.6.4"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.6.4_1646938268900_0.14425060456751848","host":"s3://npm-registry-packages"}},"3.6.5":{"name":"apollo-server-cloud-functions","version":"3.6.5","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.6.5","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"1756639306f121879532433775a2af4334f3b7ed","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.6.5.tgz","fileCount":13,"integrity":"sha512-WgnGJ8CMzeRoy5yW9NG7cZOYP2PgNR6FCgVrgZfaccgc9s98JHHikQ/3Yx5eYKvq1KWx3TU51sLiMgVW3KUrTQ==","signatures":[{"sig":"MEUCIQDub9l2tEzoQi7sL3VPfTVhCFbRaWidD9ZG98z6scCqFwIgM252abnPkqoMu2xigb1s4q7i8FGJuBWFIjlLAYrl84g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOM6SACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqhNQ//eGJMUDS/7tF6voQs6jpUDIWmUfYKpcfC4b00D+RdncL+bSIa\r\njfAZm+Ti1veDpuT4zUBCnWm6xDUP2vItmyknfn5G0XREnxht+Sf5ddwDHg//\r\nDWpZUmsXPHfq6iRglGyMpsb0+otnxu2K//SQl3NgPN6FXQpFWoQEU8b3NN1b\r\nsKT5wtpYa19K8eeQEDRRibGEzEhT17YZTi3XIK+mz0EDZPouOgwqVEPk1UbB\r\n3/WmbEAnqdNjXZ6h/89fA/yCszCJxDYwKSVyIVz6s29yXdAGkru/fb38cWVf\r\nAAsrFYmrstAV5o011Td19Lb8To+h+nPjYbQae3sFUnNmaax7EmRY4//Jgs4Z\r\nzvfNQr5o0rpIzss15Sj9IR3RLuRTBeY+1x5EztcgEjFjComAEUGmvqgLjZI1\r\n3/8Q23NhapC+ZOOLX0xsmiIITNNJ92dsmsid4tdGwqk10H3ERsH3LsNHaTMQ\r\nCS9bDRl6NMsQMLs3Ucz1c8/ZHQq2MSZvQqAT40WxrsszvFdYwRThtXrFgbyo\r\ns2UQvbBHCSkINUgnh84LL+zRzvhcWPk/zxKRkjM5Jgm4AkBgW5pmNukR56Yk\r\nFcq0FDcAd0M182WI7bceXtmxyNaDp1ILitmmRHukZJQ7YXK3rGaHT+ciMPP0\r\neiHmwpRHfOlzIC1p43TdElQw68vA918KkVU=\r\n=cs+A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"c3deb0d980dbf983028aa99b7d2b1cc6968de432","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.6.5"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.6.5"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.6.5_1647890066829_0.6883545871399321","host":"s3://npm-registry-packages"}},"3.6.6":{"name":"apollo-server-cloud-functions","version":"3.6.6","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.6.6","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"e79eb90ef67077ab49253eccb147540ff9348b8a","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.6.6.tgz","fileCount":13,"integrity":"sha512-hQDkxvU+vtsm9ecv/wJqYqWP6jQ0hDR//A7e9x6FnZOfdrl7uVorkP5PfclM24ahk+vmvW8t+1nJ7q/r4KSRoA==","signatures":[{"sig":"MEQCIEKQFZPIjmdqGe7UvUweM2fuNTZN7kSpPr0yfngNAy3DAiBPLSEBrojoNtsCGdv9BE9hBswbVWSXKUg0fTLbnpnTxw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPNKYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq6NA/7BINZqSoE6IvmD0D1e/FOkwEXOTF1xcd8taBOE+iG5aw9wp/7\r\nBANZmVuCUGEEel125ZcZUGwizkOO6JIOsQtWtoRLZFf5WVycqHeZgtNpexzO\r\nkpTrOOow1VXKrtpvo1b/pmhxZGmM/nghC5FBhqEbevVa+QI7+V635IH/iFmb\r\no7vpBzfWND/lgxe4KYLx1oOPx3aH7bTt96Tcr+UUlHxfCSf8a7MsK1MtnA9g\r\n3sL2LHlJ9Bh1+5QvyhaNuGvPTXr4OtSbXPR+30Ez1xjAk9osAxOnMiOefrLv\r\nHz3KBMuhy0BgAh5FySqZF649GHSU4YHE7WCg1tqkd9KcnCq8BA4GJNkYCD5M\r\nBm4fG4JPin/kxNlZ6okDKtMIgcnEpRb3P7oru3/1tmV7AT1xlFvL12Vxi94d\r\n/rPAPbsbeHDYV/kvuAsVaZ4xrXOt/AiL3mXVrgBcg5HjLEGe6hVpZEcrvgbK\r\nJjLtxqrwErtul1nlcW/E8xjmQ1DHIglQjjlaEtchnWHtbvUVoM9y0GtoC1R3\r\ndDmrsYmNZ4uhgrXdzQq+PAHueKn1SuJ24O9sdMfhTRrRf2wLGklRBDNVAIRy\r\nCzTafmXT60jX379nSYcP89KuWa8hcekcxxYZCjXZqpSSLKQHczM6p3pQ4d3W\r\ntlWDrJzrolOnF9hSP+p94pii6rd3p/OMT4s=\r\n=vtOf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"1ca36691959aa3e34448fe9838010ccbfc025755","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.6.6"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.6.6"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.6.6_1648153240823_0.6807530956305112","host":"s3://npm-registry-packages"}},"3.6.7":{"name":"apollo-server-cloud-functions","version":"3.6.7","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.6.7","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"db72c22d08370e732cf8c0eb4f7ffc0ab9c12c1e","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.6.7.tgz","fileCount":13,"integrity":"sha512-5++tR/2GV/QHmT9GZfv+9Wt7L9TKQ/g04SSCgCao/2u/Igyxxm1qN7BrW+/R+GF8UTuUtPOikMlnP+wBWdb3hQ==","signatures":[{"sig":"MEUCIQDIYRKPZSdLrXlTp6d4jplgE4PaL3gUm1wrnIsPXUYM+gIgUlynVWN/mTkbFgQfYNIGksC5b9f4FVaApJKOoatibE4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQ5wxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmolSQ//bAx8+iboTIBJFclCmR9QZKiLxiUUQYHvQ4Ykk/PdCdF56038\r\n480nTjftTOzS/fShEbOXuJ7LVZmV8jGZ1apvQwbdSslj7d6g6Q5rjL+5L/h3\r\nrFqB+ojsYaOIympLuL1iz61axKt223n2zCMGW3qWTq8FyaVuhCVViI1WjDL/\r\nB49pRyJCs2tI/KMJZ6Fbt93UFNDYrhX0rwiV4QqsH89wynHALu+0YcQImws4\r\n1BkvMugGal82s8sNlMLq4+/h7PtHtAdll1HBChcdJUWmp5nP+UQ3uAhzihSP\r\nKI36AojuZE2Lpq2DtGXs+hkHqmApShkE8SQvFOMlZ5Wc2wHOLIwnGGo/ackH\r\n9WGtb6fPA7sMcnBYFDsWD+kG7mfZZrhFS5SAa6YVkjxxrs8fyvE4AlHXWqRv\r\nw7mNl8+oaSP8m7R6CQubulLmIxGRoyfJinbw1wQNqSqm1hFHar6mkaj2x8Vk\r\ntZ4jQhSJpzHSsbKB1F5q+bZ/BDVwqmraYVRmbmKPLLAikQsrs3Ox0dnZWe48\r\n+8fIZ0xeRkDM/BK2Y7sqG3c8oRkWST6nVMl0ztBRfInAKSfweZQWtJ1qPvDx\r\nRkdfPFp3atOXetmiSDTlqzghxQkoW6P1B5uLJ6mlnZ8MFukznotVXwOJB/pn\r\nPIWTFoyVvqL8wSCichIBru/eWXvBVYqQh7o=\r\n=QdBk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"7678672824691c1af87a982492b45a473f35d4b1","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.6.7"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.6.7"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.6.7_1648598065458_0.658322887887606","host":"s3://npm-registry-packages"}},"3.6.8":{"name":"apollo-server-cloud-functions","version":"3.6.8","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.6.8","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"d404ccd97ce83d424f31d42441780538740d35ca","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.6.8.tgz","fileCount":13,"integrity":"sha512-YrEDk+V+8oW2zKzXLrNkxMrHhuoLohuPwNGxdwbfpgA+3xEPZm1swjlQKk0RVmglJuu+7rxAA4Xw0I4c44eHtQ==","signatures":[{"sig":"MEQCIFZxynkiM18gNCY41xWkRHJcFNj4dtElTX5PI6vwFTYGAiBLHyMeNiGzuI/cd/8mCThZUF8WuSm1ftjirbbOHmKkLQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJic/LPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrJ/Q/9GnS0TXMhqOrSBZucUeWZvI5ShByNyqmDVRGD9DKj6Wa8qhOt\r\n26bZrOqH8LBInNVMkbQtPYAwEYjTu0Xxo3yAMXdQZS8PGeMyuOHJbbwjAc66\r\n8FxuDqW5Q2gnydAo1GWeKBbNz9RPMI0Fkt1nEqwPwwB6xtsjWIA7aHKfmuEc\r\n12eVizNQVIEVCORRZZHRFjlqdEXHqcbQkzCmfgGhJUs3rNnOCU2/8+io7jbC\r\nTOIlqt3y2zK62cmlH+E/Hdbk+ZxdbnyMzpUOTRHX49S8vYsIpdhaU+ypUSPz\r\nUApqe7NTuQhN0vnY29xbTjIFIzRWjo3FFahAJxnghJ1lJfSFXD7aVLJtxRRA\r\nqAYDqS574LAqHu5r838yxSdWANn3DxWK4hxW3yilQq4l8nNjRFqbeddYuxS8\r\neFxDut7ks9+Mcs3JQysnlJE0lOdrTNa0xox+e4eYnGMlTfIY+FO2V3xlKiXX\r\ng7NT2nicxx5YIBYsK6l0VMq89x0aRo+UvdJHtWhX88uvp7zHporgb4CzGdnD\r\n+i3JDkBdQ8cH1ncBzK2X3uyuKAORKYtXh3Yf4Y8gaWvTG6J2vDMbmJwbHsaW\r\nP7cq+abVUNyi3aNPCGsHQ7OtecLjaLBOugmnn2DoBl8jxbntn0gEP/BdWjzg\r\ns6IK6A8JvXh5JiUryjrK+RcxYhkwOav3LME=\r\n=roPO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"c4a3f346533885df825297853610c1367fa984de","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.6.8"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.6.8"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.6.8_1651765966749_0.40781459309477164","host":"s3://npm-registry-packages"}},"3.7.0":{"name":"apollo-server-cloud-functions","version":"3.7.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.7.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"905e16d2f7f6e9bd184205ef2f7a1e6bcde6b548","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.7.0.tgz","fileCount":13,"integrity":"sha512-WjyAEQvP/5PhkYlb/hBWYJWQTDX+ddHuvOaRKQ1VN+j+0yTSJwe116wbpw3v8ynuSC5r96P2Yf4PNQ7qMgLoYw==","signatures":[{"sig":"MEUCIQDOUFLJc+YlmsUQ1TZylRFSOEukpTyi/0YiZxon5JeDjQIgJ9Vg1LjYJojJ6B51LEHyeiUbcFsq6eN9OnR7wMve2Qs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJidACfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq3zw//Z5VUpf8OrGsWmMUZriMt68GT0As0pKqYgwxOSPSTs2kwD6MT\r\nmpBH2LnEycWmmW7PObXpJDZamQ3qXym5J8EW2uQxUYrtAxpaviFiUW3r+F/7\r\nko0+UAzSBfFpnlb/DEN7sEtSA1aSULV2RhFhVvwBC2eYFOWMYOC5ywEsuFdP\r\n3axSkoL1hLYBnsQLyKuUf5ixYalI0yi4EdOlFycW2B/ij1PtYm6YfJQ9aaCw\r\nfTV5fpWJcYdxG3u2/sud4m9fwq+zw0PyowR4rdY3arwNAzWv4daCP+SDiKfb\r\nIFRS8JMsoVF8+/vMElfP1/iytzpf/bnl7oK8gbypPECRJGDmTovnKqt+eXT9\r\n933YMyoqi+/I4vJfw36foqwUtUJiwF5DzdOBMT76ds+vU8iw+GEW337BFNHl\r\nSxorNbezDbwk2q9/4xo/q7hsgLowkyJlGWvemri1oV0LDwxu+lJ+VzVXDQFq\r\nYmo38HKfF56Pi9qz16LbG0dQPH7z0mu+64In89avFklViVT8bVcG8+HN+0+B\r\ncDsZ+GDm45CYelJChm5PWukriEF1wOJIgr7A7SXMGXSY4XUn4MT395kas8mi\r\n3Is1eGQ26fRXVc6kK0XNSejkx609UGxRuJ85Znn72ebRCfUaXJfrtOI1ipZH\r\nie1AyrPZYS09VIGqu8SLJV+HztbxLqVPW1E=\r\n=EfsI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"58afc1a0e6660aa192b41483048cd75021be5cf7","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.7.0"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.7.0"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.7.0_1651769503679_0.5256851838754362","host":"s3://npm-registry-packages"}},"3.8.0":{"name":"apollo-server-cloud-functions","version":"3.8.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.8.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"4626292a2311f2cacddcdb00b5b12179ab1ab246","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.8.0.tgz","fileCount":13,"integrity":"sha512-GjdeutGTwUo2NJxxeODgfoqmsjBpgZi8AAOSf/Pa80XLngEb1yRJse78M5e3yvI7058e/hg7S6IMfk2ealCXUA==","signatures":[{"sig":"MEUCIQD94VkGAsy6w+mlCI0qb2bQd36d/MOLnvZRJjMKwQzrrQIgKINlaWLaUDu0F9Zodusxd3kruEZ6cOdIY6RDOWQ0nh0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJijB+7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpK1Q//c9PKdsluKZGkJX083KWbF0RpdAEEyPR03aiE0LSITX24I5Vk\r\nJZIRM7rCgMYDieeAb11QXhRB4ejJGZrzAN2MaaOx2tDwFFqcVri3CJE7ds+y\r\n0pyE3Fk9oij4zpIG0Y3HZDrs1mJ8fVUhKJMHG1BjArvYzFgO7tTeUuL+doD+\r\n9k8RpndOIVBweOt9KIlAFx6SpPvoGo445ewJM3Mr5w06PFPtk9zzqkYitmFD\r\nHQX72w+kwLsPhqhps//BGoxb9IHtVGrYUSnwxHNlGkLltHoyLJNbfBYZ9LGT\r\nSknrnBDi4eOsP7vtp6q4orzifjnrs2KL0SyWEAi6jNgjTLfJ6EA5pyDQGkyc\r\nofAoacY6clTCUUWbF3fYzZqAE3JtaYaRtM6OxYnUzc2rNeZM4BzKo10HLLis\r\nxQrUyoNEJbfNJBfB3Cjby+jQAtg1R5Zxn7s2Dg42IkgyJjdiJx1jEgIjKgwB\r\nhBUob+j1FzbepP9Gjy2dX7Chjn4qVtPveHhdBlR6XZxwhKrsQ72xdIsIEEuh\r\notTLQGNC+RUntcSNlZ07isCFg1gqqOq+nPB7x5io1ssCglfZmrpFxmf0t51q\r\nQ8GlruDT7VX+Ncm1r9hQqvQYp0ALKmYqOtEhyDFWofvE3/V1OnoxK8fZebD8\r\naW3AsAAofXKJcRgcm2ZPyDuE8VljuNqcjs0=\r\n=ugOz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"c072d9f9a32ee67f4fd8f717cbbff6fe59a3be4e","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.8.0"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.8.0"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.8.0_1653350331717_0.6321400205760823","host":"s3://npm-registry-packages"}},"3.8.1":{"name":"apollo-server-cloud-functions","version":"3.8.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.8.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"d580f6f77c562dd89332c0e15a49f4c152e4901e","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.8.1.tgz","fileCount":13,"integrity":"sha512-uEij2eXClE98mnqhR1UETs0URfGlAoQ6/YmZRgUtYUN3jWcANOa6uLX+mZT3QBeaJECL4RNcy7YQ9yzW8PItQQ==","signatures":[{"sig":"MEYCIQCKHiOTrel5ne9c8OI7Z6a+rZVOAjRrdB3HTM/HuBoGvAIhAKLza8A9wNY11jByskmLGO9WUj5xSljbk6o+nS6OF39E","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJijFsRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqu+g/+N9kIu6KEaF80+/Kf5fGiCVCyl7KZQY28Fv0MOrssG+fjdnX4\r\nFUpN8RsPVK+5NmyogNXnleuZ86R1RJ9SomLhg16MOFXj6BpecrRESVEpwloL\r\nL+c8Qn/X7XiI4ZSVjIwSDcYnnGrhlgbfp9hebTvcWoUTE+fGGor9UFBtLcop\r\ne4TMmPljUkpuA6FF0svcg/0RCtU31OuB8rlwwqKO6vpuE5jG/1QgBJvWmuLS\r\nKoV2oDAuQnYbDH5sSp4I/PewmpTLDEpXd87ko6o2vXh20bDgj+CiAVG+C7te\r\nLNiCce5mLEVHiychA/XFZGUfQdE6KBWt5CwHwtwez95+VnJPuJh0k3x3Q9m5\r\nVgMpyLnjOkBJ0Z6/qB0mvLdoW/pEynvU3GpMVj6CBQALwqySjtt1b++reJqe\r\n9x0S9j6z4NJW7q5cWgcG9jLoY0TbTBQtpEXkwIpHYBN7QYFqq4o+49skXZgI\r\njZ6bNiGNJN63zXfUaFvqYlCTthkuMlf8SB5PV6bLssFamcq6E0wmpg7LW8Jv\r\nfNPkA+cxhQlcnN1Eca9IJZP7DmPt/hk9A8KlOEcNlCJ7rPDoxBAtTdk7rRwc\r\nih0ZTjlhbgZEMvoyESd6ddeZ85NC4k84FDNXTWiFy0fui5ImIiX+j2wR5vUu\r\nGEe9F/BmBQ4PvkQcWmif4f/7D2919SdYuIk=\r\n=3WxP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"ddeb84e4035f00eb5b293b3c6ae54762fc465f93","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.8.1"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.8.1"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.8.1_1653365521174_0.3277201848202569","host":"s3://npm-registry-packages"}},"2.25.4":{"name":"apollo-server-cloud-functions","version":"2.25.4","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.25.4","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"a2df1aa060f4d512633c6c411035ae278afa87ce","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.25.4.tgz","fileCount":20,"integrity":"sha512-sXmy4KJAt84VBaqsW0aG/hX18+xCzAHx/V1K5bJF80BYVOGp8j0M/Wjbmsfo7hKgODVEGhmwyAXmC5VZdqYWnw==","signatures":[{"sig":"MEUCIQDNQZLdnjGnplvvf1dTkGYRrCc8mAg0nJjg9Yyebd13FgIgEvt5DCFkBQXFBWfOU9xytZJV5qTGNUB9rxIxvxL2Vnk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJijmdJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoNvA/9FeyM9lN/TAR13sakgMgZdZ1fnWyyg68aDkZF8byWH0/ITSqj\r\nnDCukQ9xHmHQO+zXMKODCNKy38qsXICoaT0/sG+YCYa9c96GBQjKqP9zxMbw\r\nhXtLTtdkpMGcCNHwNd4a5x2AnanuJLdHIPx5QcPN+myG27da74tvrZIXvf8R\r\ndDxCIUoyZRmfZKm0fJGd8TCHHUCJInQ44GjgwJBK0isdOgS4gJLHEOL0Z8QX\r\n9quzA7FKYa/cO7XX+ANKtm/Oxb4rlqvRl/2WThglbLGaw4tTIuroCZJkIeDa\r\nk8UWHgVwwmm3uKVyY3ptDYeT24SWybTfJC7a6zRc0KdxoXvfZU4MCt89zT4W\r\nCR/jx6nCrQUElWvD2coHijxrLcYXa048+HIhaol6NcgMZdJYEMuGOjKrpkqb\r\nc2ZPpELZGEBzeNaAWvFp1UVbCc8+KP4WoG4CG5cp5ESfDoeGHAVXYsxQ1Ism\r\nS1LpZiTN/JAwW5F5LmF36W6NGdYx40OkMVjCU5kWPyECx8ZShIMVe0iUwo/H\r\niRHh4df5sdnQZJez0QYXhst1SVPoA8c+yZtdnJ5cm9C/Pkmu4okVl9qFTAw3\r\nzg0BuXwakZta6Cl4yogyq/KZKmQjQI383Wy6hxKMEySzLH0afC3224OTcUvv\r\n4rfLn4eq2cItIWX/okyFiLv9+9DBxDwH99E=\r\n=2W35\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n# Deploying with Google Cloud Functions\n\nThis tutorial helps you deploy Apollo Server to Google Cloud Functions. It uses the following example function handler:\n\n```javascript:title=index.js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\n/*\nBecause `NODE_ENV` is a reserved environment variable in Google Cloud Functions\nand it defaults to \"production\", you need to set both the `playground` and \n`introspection` options to `true` for GraphQL Playground to work correctly.\n*/\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n## Deploying from the Google Cloud Console\n\n### 1. Configure the function\n\nFrom your Google Cloud Console, go to the [Cloud Functions page](https://console.cloud.google.com/functions/list).\n\nClick **Create Function**. Give the function a name and set the **Trigger type** to `HTTP`.\n\nFor quick setup and access to the GraphQL endpoint/playground, choose to **Allow unauthenticated invocations**. To require authentication for this endpoint, you can manage authorized users via [Cloud IAM](https://console.cloud.google.com/iam-admin/iam).\n\nSave your configuration changes in the Trigger section. Copy the trigger's URL for later and click **Next**.\n\n### 2. Write the API handlers and deploy\n\nNow on the Code page, set the runtime to a currently supported version of Node.js (such as `Node.js 14`), and set the Entry point to `handler`.\n\nPaste the example code at the top of this page into the contents of `index.js` in the code editor.\n\nEdit `package.json` so that it lists `apollo-server-cloud-functions` and `graphql` in its dependencies:\n\n```json:title=package.json\n\"dependencies\": {\n  \"apollo-server-cloud-functions\": \"^2.24.0\",\n  \"graphql\": \"^15.5.0\"\n}\n```\n\nClick **Deploy** to initiate deployment. Then, proceed to [Testing the function](#testing-the-function).\n\n\n## Deploying from your local machine\n\nBefore proceeding, you need to set up the gcloud SDK:\n\n1. [Install the gcloud SDK](https://cloud.google.com/sdk/docs/install)\n\n2. [Initialize the gcloud SDK and authenticate your Google account](https://cloud.google.com/sdk/docs/initializing)\n\nNext, initialize a new Node.js project by running `npm init` in an empty directory.\n\nRun `npm install apollo-server-cloud-functions graphql` to install the necessary dependencies and to include them in the `package.json` file.\n\nAt this point, your `package.json` should resemble the following:\n\n```json\n{\n  \"name\": \"apollo-gcloud\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"apollo-server-cloud-functions\": \"^2.24.0\",\n    \"graphql\": \"^15.5.0\"\n  }\n}\n```\n\nCreate a new file named `index.js` and paste the sample code at the top of this page into it.\n\nRun the following command to create and deploy the function to Cloud Functions:\n\n```bash\ngcloud functions deploy apollo-graphql-example --entry-point handler --runtime nodejs14 --trigger-http\n```\n\nThis creates a function named `apollo-graphql-example` that you can view from your console's [Cloud Functions page](https://console.cloud.google.com/functions/list)\n\nThe command asks some configuration questions and prints metadata about your newly created function, which includes the function's trigger URL.\n\nFor more information, see the official [Cloud Functions docs](https://cloud.google.com/functions/docs/deploying/filesystem).\n\n## Testing the function\n\nAfter deployment completes, navigate to your function's trigger URL. If deployment succeeded, GraphQL Playground opens.\n\n> If you can't access your trigger URL, you might need to [add `allAuthenticatedUsers` or `allUsers` permissions](https://cloud.google.com/iam/docs/overview#all-authenticated-users) to your function.\n\nYou can use GraphQL Playground to test the following query:\n\n```graphql\nquery TestQuery {\n  hello\n}\n```\n\nAnd verify that the following response appears:\n\n```json\n{\n  \"data\": {\n    \"hello\": \"Hello world!\"\n  }\n}\n```\n\n## Getting request details\n\nTo obtain information about a currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, etc.) use the `context` option. This enables you to pass any request-specific data to your server's resolvers.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (CORS)\n\nTo enable CORS, you need to modify your HTTP response headers. To do so, use the `cors` option:\n\n```javascript{23-26}\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, HTTP authentication) the allow origin header must equal the request origin and the allow credential header must be set to `true`.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### CORS Options\n\nThe options correspond to the [express `cors` configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n| Option | Type(s) |\n|--------|---------|\n| `origin` | boolean \\| string \\| string[] |\n| `methods` | string \\| string[] |\n| `allowedHeaders` | string \\| string[] |\n| `exposedHeaders` | string \\| string[] |\n| `credentials` | boolean |\n| `maxAge` | number |\n","engines":{"node":">=6"},"gitHead":"ae444b2916deb2fa37dbd8fa091201235dc2ec6d","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.1.0","apollo-server-core":"^2.25.4","apollo-server-types":"^0.9.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.25.4"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.25.4_1653499720832_0.17312210323536914","host":"s3://npm-registry-packages"}},"3.8.2":{"name":"apollo-server-cloud-functions","version":"3.8.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.8.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"9ae45d87491e49e8a70c42431e3c8c25c85a7901","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.8.2.tgz","fileCount":13,"integrity":"sha512-SBHwzyr3H3UVYOjOTX7ohtlpP+kbezXd8XirOlnYCblJA916d61bvMYTC9q4I7XuusyHOon51C+K/WuolPDy3Q==","signatures":[{"sig":"MEYCIQDpCu/XseqsY9Sp0/7JK8KI/0ko+SiheMCsfQWvfagTXwIhAJM2mCapVTbH0IT7T+SXxia+Rz/h+G+LonTGgqJwxs6o","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJimq2tACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpyQQ/+ITipo2J06k24n1yrzxXFdQ6MUiWLI1g846DIJXc6sp9rcjl6\r\nglay1AhA+5OZUVj7ZRVYEfl7DOtjNJG0VOP32h+B3mele4mDXmteAfGx9xNP\r\nDSegriv3jrSvYEDdROmgOg10jmJg01OnaxmxBCyUy+JL8/rtQx6MGdqbqZtL\r\nf8osD0kNnx7XEWIZlqUaKaIxHdP1Eq4zq2xGCg+FvdJYynZxB9Ogaowpusbk\r\neCXSnDVnjhpAvzgQl+b1+JC5FXNunegt+xuz7YKNTXypRWT8PuKrf63hbkWT\r\n644WrDyyFaCzckmQRLP9wYcrnPjEQ/JHDDbb020xGovjNuiWN8C8EyWlgG1X\r\n8D4Gz/H5DeOinHFpkN7NUtvaAc0gZG+U5O73s4kN5r3AAtU/K3zp1NesNIVp\r\nxaNix2ESkYO7RPLY/VA7WLvwF2NDjRYlWsY19i9mttQ2OOwndjljAAMvno4T\r\ngDsJeH39Gg8m3EcrGinf3LE0uAynUP7UT3qoyRWYGkJP2NAmrvEA+pfbXTWF\r\nBEot7GmzDyqNVwLuaea0NsrI2h0n/XznLkqbGxHtm+m/3pSrCK8cx+9BJCl3\r\nMefrUnJ8HRPTCegQxrBa9H51YxTMm7tq+mtmpSVxIkoyRv4ymmsXp0GNvMYR\r\nKFMNUNVuTke57N2RuDGX9bv8n1TmMio53ug=\r\n=99w0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"0b4e9349da13459cf279378cb311dcab4e3a7556","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.8.2"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.8.2"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.8.2_1654304173219_0.19610231799501032","host":"s3://npm-registry-packages"}},"3.9.0":{"name":"apollo-server-cloud-functions","version":"3.9.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.9.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"871548f84faf73262098c6638abf3b53e2c4ce82","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.9.0.tgz","fileCount":13,"integrity":"sha512-g60VBbXSC9mwjOJESP9ZbP8B/ZBwsT06IIwt1yZ30xdtDDSNRRjrH/TN1SZ2CyIwNltcb0Fy2BXgemef6czGJg==","signatures":[{"sig":"MEUCIQCpu5cQplSq4mn13vr+wZzEKAgD3JtVywhyaNkpGGvptQIgVFyJm095lxffEg7z2y3LUayoxhU1tqO4XqojeeM782o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiqg7rACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq38w/+PqTHrnSGlxtQZ2IRF5h9qPiVKuW/ikgPJaEPUJKunfjlkX7q\r\nxVc0ARK9lrNTz5+bga0yn2rMDcm7H997FyVt7OirBgqULJ2qTtMKyV8SWJcL\r\nEUIrCBDD8ymNY6i0OPffp9kK6xkkdFNtoID7bSUPe1wNnceq+JDr1rpX/lfW\r\nWqx3TEsyzqjxA6YpzLVko6SK+s7u+3s+VRFd2cyTQVqC0DINzGi6UiwAnmtl\r\nkKxgY6iC2prQ7cPWRF0VEtfpjK3TrkQWYfQMeOCYM+bltNUydlsf7ERByerC\r\n6FMywb7EdpPTUHG5UdzTcLCmpvgpvxmdAJMmxMHQEAvMqC4Jj/G8L+ZvOho9\r\n55trhdqgbfq+DnJK4Xhe8IApfn+O1QGDuJdtbUGo9Qim6YSCudM0eWS7x967\r\nkAz88ffusjIJYo+lhjepm1o6khx60/u4rtrMi7vbzvfZo5DxWhODVmUQdtOv\r\nxuPridhmBHv9yAd6dkEMQqRhIZIdYlBVIDdhc0kANWhMR+1mEYT5oPYhOL8l\r\nx9qCLJDVjEPrmdaXnR/OXeHBxvmKi6azsV5/bpQkLQxbo5sda7oAF/1X6ser\r\nx6dc2RleR1oXSEBmknfnHw6q2CmCdkkgz3kOUFY5lF2j5izp/TDGcutT4KrC\r\n0pTbZ9jF8i0XrOV5hioPu4qfmVSDQVz2pW0=\r\n=xpxg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"36ecbb116cef0b8b62b3ee3b557c4db8c975a406","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.9.0"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.9.0"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.9.0_1655312107098_0.4069995879689825","host":"s3://npm-registry-packages"}},"3.10.0":{"name":"apollo-server-cloud-functions","version":"3.10.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.10.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"cdf536515b052756da6779d780c764de16636fde","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.10.0.tgz","fileCount":13,"integrity":"sha512-Q/gUuRAm+3sMY9G1vj5CrRzAxEOPW7VBwIPXjSeoGWnmoAL7/VKw3/NYrStC9BOGsiUd/k3KGw13ZFt6EwA9Iw==","signatures":[{"sig":"MEQCIBleIUZ0P3Fim3sVpVfwoskcbkT25WlVA63inxN1A00YAiAYJsTWUHPT2P1Q3Pa3K/tnUIcVKb6ln5qWy47r4ImH2g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17604,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJizHiaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqNYhAAmC8Evn5D5g5NeF8W29mCzvsW9q9NT2tJs00z7OBXSKnlLPRq\r\n5baGXJHQ4kHuED6vu1IWGYPh9sCEkxUzZ7KRDTascUMFB04cqfV7sUu+4B77\r\np4dRHpEEaBclaY3Ie2EjHwwT76FDV/W0jHRx87LI+vFp+vGv0uqvuA906kvS\r\nkhSPAm8lj2ocjjVKb/kweGNuKb1d8Fv2f6kTeJe0tEjWEO9iv8aO3a0cBT0a\r\nv4WSbXgF8njPMlKrOviCwbrfOTIvfUIfufbRfEmXrABjE4UyTPM1QbtYIwcb\r\nggZeMd8fVwKvp6Od4c4fKPKVc2cTSZTnqczVu12c5cIckgt5bFGBEHDeBMty\r\n2RNGHk3E4XzcfeLg4WlBoRr5ZqRFEjAxUkg5r48U+sHHd7YNE+jiLXyjWe95\r\nNvRURnQNi4gs+Aa4QJ8bhWEIQpLS7T4VnrOG3Kzh/RFnmjNLiAzT73AAD8KK\r\nGJs/wj3h6mi/Otn2BzVUfxE7Z8s8hAWAIY8U56SOt4lqvesRsYLlXCLNiiS5\r\nRSobN8l/QllP+oc5iMd4NqRWKVe3MGdvu5++KAlvtmQtaDRod59k3mMMC1Cs\r\nf9uODn0v41TizZwnV43gqruoDI7bXxU8t18+BWNu7OlMSqWg5k3Oi8Se6OtX\r\ngh+ve23eQ44pITWCbPQ3i5/cF6aCiQYxnSE=\r\n=bKMN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"4041aaed6d616ee4b06fced0af482c73b6f752be","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.10.0"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.10.0"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.10.0_1657567386406_0.9942009704126926","host":"s3://npm-registry-packages"}},"3.10.1":{"name":"apollo-server-cloud-functions","version":"3.10.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.10.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"25fc21a8a24894a707759f9d7a878cefefbc78cd","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.10.1.tgz","fileCount":13,"integrity":"sha512-al6oTLW5IPVyBcR9aPLUgHAmG9utUrOkZxUrV/9E+kqVvdrkPACNhmT3720ImjwS5I0ymY/uYbrfRnpn6xEkQQ==","signatures":[{"sig":"MEUCIQCyWCM/hqbRp2tRWk6cI2FoG5FLxMxX/fB0a2zu6gKegwIgJa+K0yGYH2tFDK4oecFIWwcCtzsm319o53zy5yIp2FQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17604,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi8+ZdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrW8Q/+LzDZHZcoIvG0f63yMk03yQK3o/yP28PdM/TavjkX9qyjuPxY\r\n2T9W7pPR/6C11ajxWB9NFkyTyNtzk3VhOXdfbDIEk+0e6et/aSnymdOlYVxo\r\nckL9DZEpdHJlr6GFjMEOje84ARiDIC/0HHp3IYCd4SUlM6mD+Ya2pLnD8fPs\r\nhizs7DxnE0rGTGSYNVCQO9GJGqO72P37nna7aZXZkX4fpXKPLXJEtJB3aKl2\r\n9/kJBFBrGX492ca+8MaQWxtpbivOl/LI0+eSVbnCH4dHjYmEChbtl5NngTV6\r\ndC0oDbAzcX1m+6bXsKvHqT0QXZjD5qDj7j1KrbruJoXGtLWOBud4HY7SteDK\r\nNeN+Ch6t9tb2AmykEBtFSEJ3H9QMMP41oVtcvKu9DXiB4Hh1qQDlcoR7mjgn\r\nsY7J59VPHmek+d9L1PWMOY1+0jMS2po29im8duK2Kd8ykXmX3ZuAIo8xGlVP\r\nmjkPUxTBs0dWu8hHWzLAWKwZoVBc+P+I9wGOBH9zaCZ9YY787LNqFQN4U5XE\r\nAyjxX61gWmhBRHFNstT5vijzLUqLXkYPuze5pMdV8nx6FHjyp1u/8oHxuG/h\r\nGaAEGYdmY2AbzlmWIea3WT+nkaj5JfZG1Ygl1uPu/LOHsc8AhHhrLIR3ynMW\r\nYZAC5+P9vVWHiFUf4W8Fj2suZ3/y2dhJwNI=\r\n=e5/U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"e6097d614c9ac6887b359529cf27c1bd1a5de59c","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.10.1"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.10.1"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.10.1_1660151389420_0.6578388893996214","host":"s3://npm-registry-packages"}},"2.26.0":{"name":"apollo-server-cloud-functions","version":"2.26.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.26.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"b305ecd6edd3c0df0f8d38552c56a5320bd0e4e2","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.26.0.tgz","fileCount":20,"integrity":"sha512-+/Srnyx4HWfg/dqmBpHF4feMG5AgEWXtw+8P3SNTdMSj/gFKoEOli7Cd3qu3PQuq4TCQ9hAxw31HXczzWL18Lg==","signatures":[{"sig":"MEUCIQDUIjf3HGsySQlxEq16vjaHtS3SkNrrvozNo0+FYR1I5wIgQ4WZ0Cw9ShEOJ3ztxqzbW3Hn2KfsEZxzKwxSqtH28+c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/oMBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpQJhAAiBjbEc6G8BcqRnS65yLxGS97dU3WZ7GDISgA3WMesLTWCDBd\r\nF9MPipztN8vWaFZMzkvLoDCWQGGTWQkDAsnoIa2hwL2CvGVptZEJRdNX8vk9\r\nhqHFBF0nJJYpyUj51wOZCO8oxJoJW0RQJIKhH4XN0eWQbw8TzEaqAOBoHzkD\r\n+Eu8aCmSsN+2C2eD/Z/8IRndl/AtMVkwBCN3cEt1CenwP4CmeTuVmgy1YWjp\r\nb84q2aW4SHqyaaJSi5ANStGyE+yqzj8miZjT5K4XcCTYVqOYpiPw5IUExBr3\r\n43NuGlmo5U/PmW+CdALOKQDhxgQaOGorljdJHkuuUaLdeMEZZk5w6G8tQGqq\r\nTOk+QGMELWsSUlHaKNxmEJn+W03MUG/h9o3aWphrCzIz9S/hzW0KWZJR+PQG\r\nqDbprSIfS/SbbGKqJLXZNdKguDG1s5YCeTp0Ra3KmLtGzx1y0m9A5DU64O0F\r\njkQUjm71qPLRXDX/AYbfS1VFxA17mKSqVNk3D1ha/bE5s/ZBFObJyGfMfQiE\r\nPl335w0lYUkCSNviOxGC4zZOMbrxrt1rMmQuHZHumkh/xmne61GVX80gcIo4\r\nO6nUAVqYCX2zN2BzVUdZq5urbBSA5wKBxOY9hQWsMRA8P6lsJqGBrpf64EEy\r\nmbf6fZ7MM9uOL3C/16DIMAgIlVh4jt+JFd4=\r\n=mwug\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n# Deploying with Google Cloud Functions\n\nThis tutorial helps you deploy Apollo Server to Google Cloud Functions. It uses the following example function handler:\n\n```javascript:title=index.js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\n/*\nBecause `NODE_ENV` is a reserved environment variable in Google Cloud Functions\nand it defaults to \"production\", you need to set both the `playground` and \n`introspection` options to `true` for GraphQL Playground to work correctly.\n*/\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n## Deploying from the Google Cloud Console\n\n### 1. Configure the function\n\nFrom your Google Cloud Console, go to the [Cloud Functions page](https://console.cloud.google.com/functions/list).\n\nClick **Create Function**. Give the function a name and set the **Trigger type** to `HTTP`.\n\nFor quick setup and access to the GraphQL endpoint/playground, choose to **Allow unauthenticated invocations**. To require authentication for this endpoint, you can manage authorized users via [Cloud IAM](https://console.cloud.google.com/iam-admin/iam).\n\nSave your configuration changes in the Trigger section. Copy the trigger's URL for later and click **Next**.\n\n### 2. Write the API handlers and deploy\n\nNow on the Code page, set the runtime to a currently supported version of Node.js (such as `Node.js 14`), and set the Entry point to `handler`.\n\nPaste the example code at the top of this page into the contents of `index.js` in the code editor.\n\nEdit `package.json` so that it lists `apollo-server-cloud-functions` and `graphql` in its dependencies:\n\n```json:title=package.json\n\"dependencies\": {\n  \"apollo-server-cloud-functions\": \"^2.24.0\",\n  \"graphql\": \"^15.5.0\"\n}\n```\n\nClick **Deploy** to initiate deployment. Then, proceed to [Testing the function](#testing-the-function).\n\n\n## Deploying from your local machine\n\nBefore proceeding, you need to set up the gcloud SDK:\n\n1. [Install the gcloud SDK](https://cloud.google.com/sdk/docs/install)\n\n2. [Initialize the gcloud SDK and authenticate your Google account](https://cloud.google.com/sdk/docs/initializing)\n\nNext, initialize a new Node.js project by running `npm init` in an empty directory.\n\nRun `npm install apollo-server-cloud-functions graphql` to install the necessary dependencies and to include them in the `package.json` file.\n\nAt this point, your `package.json` should resemble the following:\n\n```json\n{\n  \"name\": \"apollo-gcloud\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"apollo-server-cloud-functions\": \"^2.24.0\",\n    \"graphql\": \"^15.5.0\"\n  }\n}\n```\n\nCreate a new file named `index.js` and paste the sample code at the top of this page into it.\n\nRun the following command to create and deploy the function to Cloud Functions:\n\n```bash\ngcloud functions deploy apollo-graphql-example --entry-point handler --runtime nodejs14 --trigger-http\n```\n\nThis creates a function named `apollo-graphql-example` that you can view from your console's [Cloud Functions page](https://console.cloud.google.com/functions/list)\n\nThe command asks some configuration questions and prints metadata about your newly created function, which includes the function's trigger URL.\n\nFor more information, see the official [Cloud Functions docs](https://cloud.google.com/functions/docs/deploying/filesystem).\n\n## Testing the function\n\nAfter deployment completes, navigate to your function's trigger URL. If deployment succeeded, GraphQL Playground opens.\n\n> If you can't access your trigger URL, you might need to [add `allAuthenticatedUsers` or `allUsers` permissions](https://cloud.google.com/iam/docs/overview#all-authenticated-users) to your function.\n\nYou can use GraphQL Playground to test the following query:\n\n```graphql\nquery TestQuery {\n  hello\n}\n```\n\nAnd verify that the following response appears:\n\n```json\n{\n  \"data\": {\n    \"hello\": \"Hello world!\"\n  }\n}\n```\n\n## Getting request details\n\nTo obtain information about a currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, etc.) use the `context` option. This enables you to pass any request-specific data to your server's resolvers.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (CORS)\n\nTo enable CORS, you need to modify your HTTP response headers. To do so, use the `cors` option:\n\n```javascript{23-26}\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, HTTP authentication) the allow origin header must equal the request origin and the allow credential header must be set to `true`.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### CORS Options\n\nThe options correspond to the [express `cors` configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n| Option | Type(s) |\n|--------|---------|\n| `origin` | boolean \\| string \\| string[] |\n| `methods` | string \\| string[] |\n| `allowedHeaders` | string \\| string[] |\n| `exposedHeaders` | string \\| string[] |\n| `credentials` | boolean |\n| `maxAge` | number |\n","engines":{"node":">=6"},"gitHead":"91de501bb389c07ccfc5e684811153267b91e9ac","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.2.0","apollo-server-core":"^2.26.0","apollo-server-types":"^0.10.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.26.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.26.0_1660846849394_0.16858194242817492","host":"s3://npm-registry-packages"}},"3.10.2":{"name":"apollo-server-cloud-functions","version":"3.10.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.10.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"d4cdec6e02be499d56f9200761917ee848f594ef","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.10.2.tgz","fileCount":13,"integrity":"sha512-NJGBA1QBGEKaMY9q66Se3LAX3elod07N4HPmza90nFngWpP7MAWfb95m10XSGYPBAoB/pmhaP9UYr4pI2L3/Aw==","signatures":[{"sig":"MEQCIGGmQEmyuNWvcD213q9J/bvCIlGisEH0OCtg5ccWDejEAiAq007X/U4Hk0RnzDwloEpVKZn/oqVi85QSxKAjK050gg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17604,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjCDLmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqthA/+MIYrJG2FtNZL/1XzAfWBgOUZN0DovqAvKYZjJ3TvW/jlfA4J\r\n7jAPXjcXeOOsAmWcVGn2vl68T31OuD1Zqsg46d/QCCQyJrx0Wpxnbuvqw9qI\r\n1H8wDjw6MjjF3Kh/uhELNk3Je2WSaJKFuQV8Z7AIe86siOh5qXUPawpp+MJs\r\n2aKTmOjaebpoZvIHPSMCaPVRzHd0scHRbya5aMvaQdOYA9BNQ25yQuTRk8sD\r\nliI328O1fzxTtn15iOZgrKj0QKyS/JpoAHecPQJrusDoAWOlXMbs13aW+8tI\r\nxDRuqMBWv9rrMYclSi00/gnaUjzo2OkEJrS5k+l8+dGrT7yL8XThErToiTiY\r\nEoSeP0m4xZBwY9GRxANUTnISaFanYvp4Vfm/wQAaCm5FVF6K3Gvsyh1qIrPJ\r\nLrfD2a1v5suV/Y44pMldgNd0K7r3zSSTldYld8hZBsxPRKJLBtSz2Zy51bfC\r\nwid+rYI5qAnfuD7xiQyLnMxcLDWQE9DVVK+FzIjUxsm6V5eIH4FygbXbfiXK\r\nHGTr0ktt9xa3Q081UweIfRBcVgjWB7zK6mNxUgWa77bjO2Sw/+oeJ0fLW5fk\r\nPPJIYQf3FPW8ZXofr1HmExGzuamvSHUTSt+UjrRUkp3JEvourjtddh3fo6+q\r\nc9sMj412c0crYwnuYr/fxBAYM9emgDwGkFk=\r\n=2UBo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"f6c5c9fec04c222aa15272b90d203ddc3fe64857","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.10.2"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.10.2"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.10.2_1661481702026_0.8025840239403541","host":"s3://npm-registry-packages"}},"3.10.3":{"name":"apollo-server-cloud-functions","version":"3.10.3","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.10.3","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"000b492c77c0d2ae1fffbe954fe7783a1b995ca0","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.10.3.tgz","fileCount":13,"integrity":"sha512-krIMp7Bl+0HLIaTkkeEvSibgbtTMx67TUONpi2+C4PkmAm00TaxF3fUIzz0ZrTidKml5wmyocJPCMGx4X0vaRg==","signatures":[{"sig":"MEUCIQDTf5TJ+5sxAwmFT/hCLLa28k6cqXrAvDAvO1SiG1M6RwIgLwtdGbcvLqcyIhyFr0NSVgutjje8fwYR1K40XnyEPd0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17604,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQKWUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrogg//Ry5Q7NSHnu7BlwV1lkioK34Z8BcDQnshiy39A27cM/BBxN93\r\n8xe/+cRNZGSFU32lYgMdfk/YO81/3PXwbrPdw4eEBbtg/PO2UoXAF74Y9Zm5\r\nkUlbvs3bWJ5+CnO4Y5flIp1VAxL/J/nPR+B8+eT5Iyydxyyqv6BimwtDDWuV\r\nbuauZrDbPbB+bPFt0o3Uf7Ey4+nlu0evquEpx/n6me69G1coJLgRsPBEaOTM\r\nEJzAhVn+IAK52jEqCqQTzcCQsXt/3j57wt0GTFaqveyGPHW86NUVWa3zqceq\r\n1VqB7LDqUnG6l7IOsOKKr11Crydfv8bX+SzBdf7/grNjNXXjJa3n+tJiWJuw\r\nVT7C2DgIhyKl+Wu5sEjFcyMn/Lukg3o2r1pk80plgQg03Kgwu28HEzUVhnoJ\r\nEFV2W2CiBRjqMT8RLaFY7+rBBqYSJE+9EK54SNRG6HeLCD+2dxcRgEUOLAFJ\r\ntsE3XFmxDi5YaQI6iwS5byj1nQfb7HVdY8GgNH5PYbGhasaFg+wCAvbObpGc\r\nXt4WzgwjIcz4JNcCi03kS+oEyZpLDN6o2PeSkm0O/yrKWIs2uVWP1bHccPBA\r\nV8HV0qsq2jlax9YIeTMsQcU0Em2ERUmOUymApLzdJcVLJWOVwouxZVs6U6SR\r\n16argZkdkGKJzOHy0mQhDKd7iJXvHZI5mRA=\r\n=2Mw3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"985c0795579a1d39e7b78edce1c9e2e7c8facf82","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.10.3"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.10.3"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.10.3_1665181076632_0.32518031350528953","host":"s3://npm-registry-packages"}},"2.26.1":{"name":"apollo-server-cloud-functions","version":"2.26.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.26.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"930615fee51fab2446559a0d53d42e2b3376fb2c","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.26.1.tgz","fileCount":20,"integrity":"sha512-WvyfyLvBvRNprq6WNldkxRSkl0OGZCG5vOxNJn/z1JUY8la3Vq2znzLW+rmTetwfh1o7eDjyoW3xwrG8+FUU8g==","signatures":[{"sig":"MEUCIQDpClrCROeMNx4Rq0pBA2mLCDEG3CPuq6RN/YYnL4ffFAIgRvzyBdkt1ZQAydghzpv0oOmbk05ZuiX7Zo/rkeytI8o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUY0VACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrngQ//agE1jAg+FpSJzRJkDc5v5M6wjK1MyHlFYRUuQ6U2Tlu9kv22\r\nkO9ysNWyuuGAO04tZEUwf4NkfdqWNifZRk+exgGFPkKULIsPoAY2BHxXFagg\r\nfQXXyS8WoGkU8/4MJ3CJTrL4EE2knMNXJqUwkxbiTN9XOd3tNAnn7krRpYx+\r\ndOohNO3Zt+CSCyY8D4Ds5bSbHhpZwjDcYMYAGDhavLAWDwfjMRR8CNPbgp4O\r\n3g2KTU7X49p37Tdq3iCuALyhMW4Mr6nT6epkfMPfbGwnN+eE3/4kXVznNarV\r\n/mfF//iX+lkwcK6TIjgMnQJYBc0oNKVx4s/U1TK5ikTFgSaGJo4t7rhK4Bto\r\ntJr/csUURMNYI2SZ7w9NCj9rewc7FGgDoqWouRJLdPDIp8xWgnR2NXltUZ7n\r\n83DQjg0T3lfwhgE84qvjYVhUNOFHG+msfnrvgmd1o/OIsXVC960/yA9jptfc\r\n+UYZYvWhh5nKk8/oQQdCbcKu4ugNI7/H+sRfsS79FKf+HYEV4fqUTdPbuUjP\r\ncKOkKVNPmY5+xuIAQ3/yxUbBQRUiTCnCuiuzJyOSEqXpogrgSIOiyhBeX3LN\r\n2uXq6fOdsCaA2JVrQZFdH3Iy8Bd73+FQBwG5izs6nRnNAkaHq6olJPuQYPtT\r\n+68k3PFbV7GtxuEpzUsraRrUkMPUoOxVILQ=\r\n=zBHH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n# Deploying with Google Cloud Functions\n\nThis tutorial helps you deploy Apollo Server to Google Cloud Functions. It uses the following example function handler:\n\n```javascript:title=index.js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\n/*\nBecause `NODE_ENV` is a reserved environment variable in Google Cloud Functions\nand it defaults to \"production\", you need to set both the `playground` and \n`introspection` options to `true` for GraphQL Playground to work correctly.\n*/\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n## Deploying from the Google Cloud Console\n\n### 1. Configure the function\n\nFrom your Google Cloud Console, go to the [Cloud Functions page](https://console.cloud.google.com/functions/list).\n\nClick **Create Function**. Give the function a name and set the **Trigger type** to `HTTP`.\n\nFor quick setup and access to the GraphQL endpoint/playground, choose to **Allow unauthenticated invocations**. To require authentication for this endpoint, you can manage authorized users via [Cloud IAM](https://console.cloud.google.com/iam-admin/iam).\n\nSave your configuration changes in the Trigger section. Copy the trigger's URL for later and click **Next**.\n\n### 2. Write the API handlers and deploy\n\nNow on the Code page, set the runtime to a currently supported version of Node.js (such as `Node.js 14`), and set the Entry point to `handler`.\n\nPaste the example code at the top of this page into the contents of `index.js` in the code editor.\n\nEdit `package.json` so that it lists `apollo-server-cloud-functions` and `graphql` in its dependencies:\n\n```json:title=package.json\n\"dependencies\": {\n  \"apollo-server-cloud-functions\": \"^2.24.0\",\n  \"graphql\": \"^15.5.0\"\n}\n```\n\nClick **Deploy** to initiate deployment. Then, proceed to [Testing the function](#testing-the-function).\n\n\n## Deploying from your local machine\n\nBefore proceeding, you need to set up the gcloud SDK:\n\n1. [Install the gcloud SDK](https://cloud.google.com/sdk/docs/install)\n\n2. [Initialize the gcloud SDK and authenticate your Google account](https://cloud.google.com/sdk/docs/initializing)\n\nNext, initialize a new Node.js project by running `npm init` in an empty directory.\n\nRun `npm install apollo-server-cloud-functions graphql` to install the necessary dependencies and to include them in the `package.json` file.\n\nAt this point, your `package.json` should resemble the following:\n\n```json\n{\n  \"name\": \"apollo-gcloud\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"apollo-server-cloud-functions\": \"^2.24.0\",\n    \"graphql\": \"^15.5.0\"\n  }\n}\n```\n\nCreate a new file named `index.js` and paste the sample code at the top of this page into it.\n\nRun the following command to create and deploy the function to Cloud Functions:\n\n```bash\ngcloud functions deploy apollo-graphql-example --entry-point handler --runtime nodejs14 --trigger-http\n```\n\nThis creates a function named `apollo-graphql-example` that you can view from your console's [Cloud Functions page](https://console.cloud.google.com/functions/list)\n\nThe command asks some configuration questions and prints metadata about your newly created function, which includes the function's trigger URL.\n\nFor more information, see the official [Cloud Functions docs](https://cloud.google.com/functions/docs/deploying/filesystem).\n\n## Testing the function\n\nAfter deployment completes, navigate to your function's trigger URL. If deployment succeeded, GraphQL Playground opens.\n\n> If you can't access your trigger URL, you might need to [add `allAuthenticatedUsers` or `allUsers` permissions](https://cloud.google.com/iam/docs/overview#all-authenticated-users) to your function.\n\nYou can use GraphQL Playground to test the following query:\n\n```graphql\nquery TestQuery {\n  hello\n}\n```\n\nAnd verify that the following response appears:\n\n```json\n{\n  \"data\": {\n    \"hello\": \"Hello world!\"\n  }\n}\n```\n\n## Getting request details\n\nTo obtain information about a currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, etc.) use the `context` option. This enables you to pass any request-specific data to your server's resolvers.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (CORS)\n\nTo enable CORS, you need to modify your HTTP response headers. To do so, use the `cors` option:\n\n```javascript{23-26}\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, HTTP authentication) the allow origin header must equal the request origin and the allow credential header must be set to `true`.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### CORS Options\n\nThe options correspond to the [express `cors` configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n| Option | Type(s) |\n|--------|---------|\n| `origin` | boolean \\| string \\| string[] |\n| `methods` | string \\| string[] |\n| `allowedHeaders` | string \\| string[] |\n| `exposedHeaders` | string \\| string[] |\n| `credentials` | boolean |\n| `maxAge` | number |\n","engines":{"node":">=6"},"gitHead":"84852fcfb40bc5ea83c341dba546464d6114d7ed","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.2.0","apollo-server-core":"^2.26.1","apollo-server-types":"^0.10.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.26.1"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.26.1_1666288917544_0.00819739409472775","host":"s3://npm-registry-packages"}},"3.10.4":{"name":"apollo-server-cloud-functions","version":"3.10.4","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.10.4","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"afb4266b487007a85660f926abc5d49db51b9766","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.10.4.tgz","fileCount":13,"integrity":"sha512-dImF25D15ARLAgLhNwRo5bfekh9+MCVXtidGWj/ERGA0oVgfRuhmJHLs9gZ4Cd0OCmFMnHzV4opBhNoKS5PB1Q==","signatures":[{"sig":"MEUCIQDdVzSXdBOXKzMq7iNN/urxs72IaQFaGaZflVuPPBeUMwIgbYcVg7ZU8RThxL1SMPpw+owEvk4RDFdOQAO7gBQgNrY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17604,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYEOVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrxog/9FPtydpcZWC+2geAJ/KLgpEACCTM/pS8ttkaPEjjvREkZw4sP\r\n09MQS9KarJ+5HeFgM02vF7slvhG5u8X7tVwf3OxlbBKR7ZPcMVuSeVjZtdo4\r\nKB3VfIAAqEM9L05Ah/KhBuI8B5rSpTQcu9NyVVvAMoeFtClzSNRBQ3MYpfQ7\r\n8pecnhnxinq0ppVGlXPTl7y9Q72J/CuwozZJnF/YZbvmVyZqMrqGqNqdY0be\r\n0/gk7A+ZYcKMYzDmINpgUxcQ1lJz4aPlWSICzZgygIhlPXuof/ha2JAcps0c\r\nAnJR8PLk7eDSWTMOELzi26M+XgoSS0Sa+KKoKsuYYJczIInaFKFLv4K5dtiU\r\nyq87P37IWAnerMhFqLBmrwPrVsUCdhPC96CUie4St88h8ED1YNYAkfMQglxD\r\nRe6aSoBzv1+GOE8Ro4UHr4Eb8FIWjpSDw99WVxHnkiXPouvk1HHmjXC7sp+B\r\nwDvIXyMCw6FkVYpvEEfusQMBAa/TPp3hTwixt832y0YIP5LU/0zw5GqRYPOL\r\nOYn5RtZ1MkgNbDgw7QKAZBKX13OViw5wsg3o94NyRKnJBfGHtNDtXU4ucjEs\r\nfIMzTgKzzYy1z6s/E101L9g2jy90rUxDQjSoJEh1ZHC9sr1R0QhcMkE+OuC6\r\n0FrrjhkhE5bEF+bGz0gErDDz2CWqvOdlteg=\r\n=2SF3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"f519e1d7de8564259eb1c8c1c7523669bd9ad815","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.10.4"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.10.4"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.10.4_1667253141432_0.07208806861555517","host":"s3://npm-registry-packages"}},"3.11.0":{"name":"apollo-server-cloud-functions","version":"3.11.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.11.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"22002d277917b2a121ab47f1b4b2fbb8fe1bf2b9","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.11.0.tgz","fileCount":13,"integrity":"sha512-3G8FuVcip1+CVF71aHIz73LEE3cVXoQUm9GtFa01YAi1jsHF/EyutSbSXuhuciuIEh95V/xLxNWx/Qnne4zYIg==","signatures":[{"sig":"MEUCIBHx6jbUfvewcbZ/ztETIQOFMaP0TlkGum1L/NubV/6OAiEA+eWsGHjMdo6xi6sSZugFT5lOMmt9xIXS+U9yD1oHCxs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17604,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYpM1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmplww/+Pgskc0qzIxNSORVcMyKznip9/L9CgqsNpgRUUVXtAf1K5P88\r\nQQodaV6b8IvqcJokzL9uXaSs00Bz3gskrf1j/5hCWihAd1uY8sAUgY3ak4Ds\r\nyg3E3usNG+QXGerxncuQCsUN0Dzpgm4pNFeLlcDdPJ4Qk7HU59xSuUG/okh4\r\nsrrrGctl2CAPQLw4aSFTFBLFbTnh9z+F89+NkB/IbfSCiN8KN/m1E01rnte7\r\nwjBuEipKO9C0gupC1PdGljq0YafGucyJIaAdDzxfbArM197wiGxsnpX6CYp8\r\n4VgO8LrnBtNsskOa4vca61pFi2CSJ9XSKyeTbLtqQiAddt2HtWR4+nzVR7bV\r\n2vaHhUQRLIfOxZwXMLwF2D4c0BH+PNqOuJqEFg3uL7K2lgpQw4ARTHNjgsVp\r\np46z2HOOBPV5xjmGj+bDDq8q6zUdhrbYdyiQq8jExFj76amBj1DhPtJgSye5\r\nF3in8nXjCmm99Gl1ci5XdF7D+Xf+8GouQ3fKY76A62wse+BwyYLspG3PheRA\r\nWO5cl/XK5DX5THWzmCpD/AG6ya+q6hvlyZ5g2e9qHMjvKaMNQ5LDHd1D1huD\r\nxRMXSzzOADaQCp32IlZYrSh++3mK/12ukVpsNLUuMlQi2Wb2nOdSJhP+lpVu\r\nnD8+pBgrNJlhAqELggw1QkD21kIB3/x6/cY=\r\n=GQlS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"538151b9f30dfc91036eef2f8f65fbf7922d861e","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.11.0"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.11.0"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.11.0_1667404597638_0.09294751342040741","host":"s3://npm-registry-packages"}},"3.11.1":{"name":"apollo-server-cloud-functions","version":"3.11.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.11.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"75ef911ad48f927230baedbafbf962b00a98da2a","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.11.1.tgz","fileCount":13,"integrity":"sha512-sEbrBH8bGBT0SJ6qMs+eglkHLQU4r+O9f794pWCCtBvNNjIbFGe8u4YuLdI8Kj9qB9lc8te3SKNVF4tF1eEdEQ==","signatures":[{"sig":"MEUCIQDtYqeP8JkwbCPtUcdwtU5i5mo+mi5EfoYFZ+Tr//CpTgIgNZK0x44HqJPGjJ4+nBp/57esUIjx+pfjwZqTBwf/j9o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17604,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYxLwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqNKhAAiWeOKVXdJTLqM+YxfZpcWpptDcMigAxv9MOPEQ3+mPLfJ6ww\r\nWo7TOavH8c/j1XIMLPUh+X5/0XdULiTHMkLZNPP4ujBqm9qaewHWfQFHS002\r\nXsCKfN+RcwcbeJN98/5bT/9lX2Bep6vEp0nBK6jOVzgmroqMnTwBJT6mcgpn\r\nhDqL+40iJPHsTKux6luUo6ufoHi3e95VByrczJkWLssbSjo2jRHkTwzzlXot\r\nOSd9I8s9xKjAdYeD4aFQ0PQIcYmW/jYcgxVYqRgAGhnm/ZV3vtbbkoHhOQwR\r\nOQfC0L9TQTeaOpVcEt/qJ3A6fAPicUkwlydrTNQOBm8l2cLBMBATuPb2BhYS\r\nxm2l2VxOHGUCIAJr6EsDnqkVI8Y5hje58OrjyNrN+BcvqwhwCFUdQM8KC/3c\r\nFTwX+/NA4kSuoCrg4Kna/9TmoghktfN5DrUSjFNapCKmjnoUuFOPOHU/eKwq\r\nQMgLcud2lB02UKq+BtS6Pi8KhwZdTiPfZDKGzWGoFOM4TV6H4WmZd2vwSVL6\r\nD8fOV2qLNRj++2VfDV6SK5HBCB+eCX4pF/O2SQEcNB7abfXCJvjDgmvCQVvF\r\nk8/rhlQ7WAadC26bV+2abCE5hByqXk1pEPE6AFVhbGF0E83fYw/0mS/Y1Sbk\r\nzNk3LpkRltwPdoHE0xaByefIMv9S64JIouE=\r\n=Dnmp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"6247d96ba90de6fa9b45995dcab72758c99aab78","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.11.1"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.11.1"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.11.1_1667437296317_0.3096655706312432","host":"s3://npm-registry-packages"}},"3.12.0":{"name":"apollo-server-cloud-functions","version":"3.12.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.12.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"2d1b953d3f00c9a594ea14e3b2f97935de779711","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.12.0.tgz","fileCount":13,"integrity":"sha512-CWaMAfX4J+a/b4/6pk7cKIlmT/hmaRDfM8Z4ZpgalgNR+447bTu3AxRoKRDBxta9wyDKLpMp+4+S9I3ithEOhw==","signatures":[{"sig":"MEYCIQDRVR+4kjtmXvfjFQR5dVcnySn7AuZweWh7MSCFHuLkxgIhAPZu8S1RkN/Ey+TeiN+DuZKZ8TO/jeDft11u7E083v4X","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17604,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkAPoUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpDlxAAkPNu1HdAFZfeeyLwxVDlJVX44dWscX0yb9SG7Piw65PvuxRS\r\nOca4pVkcpMQG7YE8kPc8q+e462ya3T6FK3j42/WYsoSyMBBEMhdo2+0DPJ13\r\nilQOhUIw4CKiJ+3NpbYYc1YnK8HzrggcNl82/NR1SJAKujScv2V92LxXEIJG\r\nG4EPSD0AfDRnFLWyn6XNzs7pWN2bHx1q5yEhI7m/lAiqPIUoXukGqUF9gYcQ\r\numFufhYgV+SjM1mV8iKW9aw0r+JyUHf9QMRHCl4WyiqOGEzkvMuE04AElHYp\r\nbi5qg/dP6P4x7M4keNpfwcC0oaBFgT/serEyVKYMau+SkOVIbDrmSvEz49yL\r\n3uwKZ8qJWyo+LaRWcig9VY1x/9QNvdDIr/0FNQeWMvEe9SQvrVcIPwgQx0eN\r\n01+4bLP0KFZGQ9jUdBEryA0esq2moA/RfznaJBonU9KZymm5aMFjwfortS+q\r\nOZXZ3lhztLUUqlxvGhdVNlOOX1hdMBh6PfEbzyw3qj9uZkU2c98I307qrsnS\r\nAocy6STZ4FLCWUA1VLnMLrG+0qFOrGlfYlX+ZoG72Vv1cD421hStGB7SpNGX\r\nIrDy6yFk/YLDqqMVhhtwuwi+v5NZxSo0k7uA9B3n5loe7u88EzoGzAFq+oZo\r\n6TFYVwARzqlfDlHmB4HD98FYcgHw6edulG0=\r\n=zFa3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"fac578a32d5b6e21164fb649fc61d641d0401774","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.12.0"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.12.0"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.12.0_1677785620679_0.32987410487112423","host":"s3://npm-registry-packages"}},"2.26.2":{"name":"apollo-server-cloud-functions","version":"2.26.2","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@2.26.2","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"f508ecae596080c65ba4d5737c21258fa9665df6","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-2.26.2.tgz","fileCount":20,"integrity":"sha512-E9TifkcSe3SkCukW3vGzFqttB1b/72ejCwn0Jj5bUW6qO4XG8oadfswwn/rOUx036nX2wPA5mP06eWq+qEpKHw==","signatures":[{"sig":"MEYCIQCWcEdPPhhqus0JiX6T621O9aoZTRzlyGoios15PsOFyQIhAI/TQq8otF3LXuGgFSmL697scvWiDN7lPPw5BLreF0S/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34820},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n# Deploying with Google Cloud Functions\n\nThis tutorial helps you deploy Apollo Server to Google Cloud Functions. It uses the following example function handler:\n\n```javascript:title=index.js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\n/*\nBecause `NODE_ENV` is a reserved environment variable in Google Cloud Functions\nand it defaults to \"production\", you need to set both the `playground` and \n`introspection` options to `true` for GraphQL Playground to work correctly.\n*/\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n## Deploying from the Google Cloud Console\n\n### 1. Configure the function\n\nFrom your Google Cloud Console, go to the [Cloud Functions page](https://console.cloud.google.com/functions/list).\n\nClick **Create Function**. Give the function a name and set the **Trigger type** to `HTTP`.\n\nFor quick setup and access to the GraphQL endpoint/playground, choose to **Allow unauthenticated invocations**. To require authentication for this endpoint, you can manage authorized users via [Cloud IAM](https://console.cloud.google.com/iam-admin/iam).\n\nSave your configuration changes in the Trigger section. Copy the trigger's URL for later and click **Next**.\n\n### 2. Write the API handlers and deploy\n\nNow on the Code page, set the runtime to a currently supported version of Node.js (such as `Node.js 14`), and set the Entry point to `handler`.\n\nPaste the example code at the top of this page into the contents of `index.js` in the code editor.\n\nEdit `package.json` so that it lists `apollo-server-cloud-functions` and `graphql` in its dependencies:\n\n```json:title=package.json\n\"dependencies\": {\n  \"apollo-server-cloud-functions\": \"^2.24.0\",\n  \"graphql\": \"^15.5.0\"\n}\n```\n\nClick **Deploy** to initiate deployment. Then, proceed to [Testing the function](#testing-the-function).\n\n\n## Deploying from your local machine\n\nBefore proceeding, you need to set up the gcloud SDK:\n\n1. [Install the gcloud SDK](https://cloud.google.com/sdk/docs/install)\n\n2. [Initialize the gcloud SDK and authenticate your Google account](https://cloud.google.com/sdk/docs/initializing)\n\nNext, initialize a new Node.js project by running `npm init` in an empty directory.\n\nRun `npm install apollo-server-cloud-functions graphql` to install the necessary dependencies and to include them in the `package.json` file.\n\nAt this point, your `package.json` should resemble the following:\n\n```json\n{\n  \"name\": \"apollo-gcloud\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"apollo-server-cloud-functions\": \"^2.24.0\",\n    \"graphql\": \"^15.5.0\"\n  }\n}\n```\n\nCreate a new file named `index.js` and paste the sample code at the top of this page into it.\n\nRun the following command to create and deploy the function to Cloud Functions:\n\n```bash\ngcloud functions deploy apollo-graphql-example --entry-point handler --runtime nodejs14 --trigger-http\n```\n\nThis creates a function named `apollo-graphql-example` that you can view from your console's [Cloud Functions page](https://console.cloud.google.com/functions/list)\n\nThe command asks some configuration questions and prints metadata about your newly created function, which includes the function's trigger URL.\n\nFor more information, see the official [Cloud Functions docs](https://cloud.google.com/functions/docs/deploying/filesystem).\n\n## Testing the function\n\nAfter deployment completes, navigate to your function's trigger URL. If deployment succeeded, GraphQL Playground opens.\n\n> If you can't access your trigger URL, you might need to [add `allAuthenticatedUsers` or `allUsers` permissions](https://cloud.google.com/iam/docs/overview#all-authenticated-users) to your function.\n\nYou can use GraphQL Playground to test the following query:\n\n```graphql\nquery TestQuery {\n  hello\n}\n```\n\nAnd verify that the following response appears:\n\n```json\n{\n  \"data\": {\n    \"hello\": \"Hello world!\"\n  }\n}\n```\n\n## Getting request details\n\nTo obtain information about a currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, etc.) use the `context` option. This enables you to pass any request-specific data to your server's resolvers.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (CORS)\n\nTo enable CORS, you need to modify your HTTP response headers. To do so, use the `cors` option:\n\n```javascript{23-26}\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, HTTP authentication) the allow origin header must equal the request origin and the allow credential header must be set to `true`.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### CORS Options\n\nThe options correspond to the [express `cors` configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n| Option | Type(s) |\n|--------|---------|\n| `origin` | boolean \\| string \\| string[] |\n| `methods` | string \\| string[] |\n| `allowedHeaders` | string \\| string[] |\n| `exposedHeaders` | string \\| string[] |\n| `credentials` | boolean |\n| `maxAge` | number |\n","engines":{"node":">=6"},"gitHead":"8fbc66cded6549d5a61433c9fed26775e60e0648","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/3.22.1/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"graphql-tools":"^4.0.8","apollo-server-env":"^3.2.0","apollo-server-core":"^2.26.2","apollo-server-types":"^0.10.0","@apollographql/graphql-playground-html":"1.6.27"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^2.26.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_2.26.2_1693429372831_0.19876870773825983","host":"s3://npm-registry-packages"}},"3.12.1":{"name":"apollo-server-cloud-functions","version":"3.12.1","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.12.1","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"f7ff7c5a0ccf74c48162880a6cd117455bafc1e5","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.12.1.tgz","fileCount":13,"integrity":"sha512-lmBWOF7NLApQ5/uvf38h3CwTqUSX6vID3x07H2vCCkCWmzYlNCEtCEDZsjwcFDM8rdNxC7uO9o4jjcRMKU5wsw==","signatures":[{"sig":"MEYCIQDArEmoAGSDLKGyey+2+SHxZ/x1NyeuJOGnuqLxQ6ZNvwIhAMaWDmxLOMFK1Z6IiaCudwu2Y0tCjCu9UDp/yoQgRitR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17604},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"ea2e2c3e071afc9144af00cae7b51720b9cc8b32","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.","repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.12.1"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.12.1"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.12.1_1693430239420_0.2634144403000276","host":"s3://npm-registry-packages"}},"3.13.0":{"name":"apollo-server-cloud-functions","version":"3.13.0","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-cloud-functions@3.13.0","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"e38daaf0c7f1b616c77afe758dcf024b4c5fb723","tarball":"https://registry.npmjs.org/apollo-server-cloud-functions/-/apollo-server-cloud-functions-3.13.0.tgz","fileCount":13,"integrity":"sha512-N4rViAoc7GhRnfQ2HrSRB2tYcDlxJJ+qicl9Vm/l8D1420yKP2ZH8TuddPj2Gmd6xdj3xdJFJXttu1S8aRy0Xg==","signatures":[{"sig":"MEQCIHi3UuFewT6eM8ZT+lfBXqHDRI26E+pKSOlYjCW5L6++AiBpC9gAkcDDoMxEI7dhA0bDLSWM60vxJc6pryecJeHMSg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17604},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.0"},"gitHead":"f93284e853efd6da46d91ae40da47a2dd15b61fe","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for Google Cloud Functions","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","apollo-server-express":"^3.13.0"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.13.0"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-cloud-functions_3.13.0_1699921028366_0.03529411618553868","host":"s3://npm-registry-packages"},"deprecated":"The `apollo-server-cloud-functions` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details."}},"time":{"created":"2018-08-20T21:18:20.196Z","modified":"2024-10-25T18:42:31.057Z","2.0.1":"2018-08-20T21:18:20.281Z","2.0.2":"2018-09-03T13:07:02.544Z","2.0.3":"2018-09-05T15:34:12.681Z","2.0.4":"2018-09-14T17:37:00.462Z","2.1.0":"2018-09-18T23:16:01.420Z","2.2.0-register.2195":"2018-10-09T01:50:18.620Z","2.2.0-alpha.0":"2018-10-10T19:31:51.697Z","2.2.0-alpha.1":"2018-10-26T18:29:18.829Z","2.2.0-alpha.2":"2018-11-05T19:46:43.546Z","2.2.0-alpha.3":"2018-11-06T05:37:58.171Z","2.2.0-alpha.4":"2018-11-06T19:33:59.302Z","2.2.0":"2018-11-07T16:18:12.097Z","2.2.1":"2018-11-12T13:26:56.036Z","2.2.2":"2018-11-13T13:59:26.479Z","2.2.3":"2018-11-26T18:59:00.514Z","2.2.4":"2018-11-28T13:51:43.921Z","2.2.5":"2018-11-29T11:46:00.054Z","2.2.6":"2018-12-04T11:35:43.894Z","2.2.7-alpha.0":"2018-12-04T11:44:38.983Z","2.3.0-alpha.0":"2018-12-04T19:13:10.799Z","2.2.7":"2018-12-13T13:02:55.227Z","2.3.0":"2018-12-13T13:30:26.528Z","2.3.1":"2018-12-13T19:07:54.861Z","2.4.0-alpha.0":"2018-12-18T15:14:35.871Z","2.4.0-alpha.1":"2019-01-16T11:11:54.887Z","2.4.0-alpha.2":"2019-01-23T13:04:40.850Z","2.4.0-alpha.3":"2019-01-23T13:59:19.344Z","2.3.2":"2019-01-25T16:48:51.557Z","2.3.3":"2019-01-29T09:51:48.438Z","2.4.0-alpha.4":"2019-02-07T11:01:43.238Z","2.4.0":"2019-02-07T12:09:04.786Z","2.4.1":"2019-02-12T21:35:03.608Z","2.4.2-rc.0":"2019-02-14T13:17:10.890Z","2.4.2":"2019-02-14T13:26:16.540Z","2.4.3":"2019-02-20T17:00:35.351Z","2.4.4":"2019-02-21T18:22:55.082Z","2.4.6":"2019-02-22T07:22:13.250Z","2.4.7":"2019-02-26T11:21:49.333Z","2.4.8":"2019-02-26T14:26:06.529Z","2.5.0-alpha.0":"2019-03-22T18:32:35.624Z","2.5.0-alpha.1":"2019-03-26T18:24:34.845Z","2.5.0-alpha.2":"2019-04-05T14:56:17.635Z","2.5.0-alpha.3":"2019-04-05T16:52:47.577Z","2.5.0-alpha.4":"2019-04-05T17:14:38.655Z","2.5.0-alpha.5":"2019-04-12T09:34:51.786Z","2.5.0-alpha.6":"2019-04-14T03:54:00.796Z","2.5.0-alpha.7":"2019-04-25T17:51:37.272Z","2.5.0-rc.0":"2019-04-30T12:04:54.305Z","2.5.0":"2019-05-07T12:44:08.173Z","2.5.1-alpha.14":"2019-05-10T02:04:11.382Z","2.5.1-alpha.15":"2019-05-10T02:35:44.115Z","2.6.0-alpha.0":"2019-05-13T19:23:15.783Z","2.6.0-alpha.1":"2019-05-22T18:34:40.533Z","2.6.0-alpha.2":"2019-05-22T20:09:04.631Z","2.6.0-alpha.3":"2019-05-22T20:13:32.987Z","2.6.0-alpha.4":"2019-05-23T17:21:34.897Z","2.6.0-alpha.5":"2019-05-23T19:39:51.244Z","2.6.0-alpha.6":"2019-05-24T21:22:27.060Z","2.6.0-alpha.7":"2019-05-27T18:27:53.633Z","2.6.0-alpha.8":"2019-05-28T15:26:20.216Z","2.5.1-alpha.0":"2019-05-30T09:02:55.298Z","2.5.1-alpha.1":"2019-05-30T10:57:23.003Z","2.5.1":"2019-05-30T13:18:31.662Z","2.6.0-alpha.9":"2019-05-30T19:55:20.396Z","2.6.0-rc.0":"2019-05-30T20:30:03.085Z","2.6.0":"2019-05-31T17:59:05.806Z","2.6.1-alpha.0":"2019-05-31T21:41:59.162Z","2.6.1":"2019-05-31T22:02:53.629Z","2.6.2-alpha.0":"2019-06-06T15:27:25.946Z","2.6.2":"2019-06-06T19:48:52.821Z","2.6.3":"2019-06-12T06:09:36.565Z","2.6.4":"2019-06-20T20:50:32.195Z","2.6.5-alpha.0":"2019-06-21T16:51:20.432Z","2.6.5":"2019-06-25T16:20:45.804Z","2.6.6":"2019-06-25T18:10:58.524Z","2.6.7-alpha.0":"2019-06-25T22:08:43.952Z","2.6.7":"2019-06-26T11:51:26.063Z","2.7.0-alpha.0":"2019-06-27T20:01:58.253Z","2.7.0-alpha.1":"2019-06-27T21:01:06.523Z","2.7.0-alpha.2":"2019-06-30T22:09:01.081Z","2.7.0-alpha.3":"2019-07-01T20:00:21.637Z","2.7.0-alpha.4":"2019-07-03T22:39:25.799Z","2.7.0-alpha.5":"2019-07-04T18:15:23.459Z","2.7.0-alpha.6":"2019-07-04T19:05:38.763Z","2.7.0-alpha.7":"2019-07-05T13:35:29.114Z","2.7.0-alpha.8":"2019-07-05T13:48:27.860Z","2.6.8":"2019-07-09T22:25:01.286Z","2.6.9":"2019-07-11T18:29:22.244Z","2.7.0-alpha.9":"2019-07-13T20:49:51.689Z","2.7.0-alpha.12":"2019-07-15T07:42:32.703Z","2.7.0-alpha.13":"2019-07-15T12:42:32.118Z","2.7.0-alpha.14":"2019-07-16T08:26:31.494Z","2.7.0":"2019-07-16T13:46:04.181Z","2.7.1":"2019-07-25T10:47:23.175Z","2.7.2":"2019-07-26T23:29:03.399Z","2.8.0":"2019-07-29T17:14:32.335Z","2.8.1":"2019-07-31T11:17:00.699Z","2.8.2":"2019-08-20T18:02:53.760Z","2.9.0":"2019-08-23T15:22:23.353Z","2.9.1":"2019-08-28T20:33:04.974Z","2.9.2":"2019-08-30T10:06:05.303Z","2.9.3":"2019-09-01T21:47:14.625Z","2.9.4":"2019-09-24T17:03:19.051Z","2.9.5":"2019-10-04T21:12:48.460Z","2.9.6":"2019-10-10T12:15:50.463Z","2.9.7":"2019-10-21T17:26:39.109Z","2.9.8":"2019-11-12T18:43:04.184Z","2.9.9":"2019-11-13T22:43:24.689Z","2.9.10":"2019-11-20T22:27:16.960Z","2.9.11":"2019-11-20T23:29:49.309Z","2.9.12":"2019-11-21T18:01:27.707Z","2.9.13":"2019-12-05T20:01:35.354Z","2.9.14":"2019-12-17T12:24:09.937Z","2.9.15":"2019-12-27T12:10:52.609Z","2.9.16":"2020-01-09T22:17:00.782Z","2.10.0":"2020-02-06T12:34:45.389Z","2.10.1":"2020-02-14T14:00:04.090Z","2.11.0-alpha.1":"2020-02-24T15:28:49.712Z","2.11.0-alpha.2":"2020-02-25T16:02:38.319Z","2.11.0-alpha.3":"2020-02-25T16:29:05.412Z","2.11.0":"2020-03-03T17:42:45.571Z","2.12.0-alpha.0":"2020-03-16T19:48:15.432Z","2.12.0-alpha.1":"2020-03-18T18:08:51.969Z","2.12.0-alpha.2":"2020-03-23T14:40:47.920Z","2.12.0-alpha.3":"2020-03-26T13:14:00.977Z","2.12.0-alpha.4":"2020-03-26T13:54:23.186Z","2.12.0-alpha.5":"2020-04-02T23:10:11.895Z","2.12.0":"2020-04-07T18:36:36.281Z","2.13.0-alpha.0":"2020-04-10T12:14:55.860Z","2.13.0-alpha.1":"2020-04-23T16:39:39.427Z","2.13.0":"2020-05-04T14:49:26.566Z","2.13.1-alpha.0":"2020-05-08T19:49:34.784Z","2.13.1-alpha.1":"2020-05-11T18:35:09.513Z","2.13.1":"2020-05-11T19:15:00.178Z","2.14.0-alpha.0":"2020-05-13T10:06:23.153Z","2.14.0-alpha.1":"2020-05-19T09:55:00.356Z","2.14.0-alpha.2":"2020-05-20T14:38:14.758Z","2.14.0":"2020-05-27T14:32:26.774Z","2.14.1":"2020-05-28T17:20:46.823Z","2.14.2":"2020-06-04T17:24:25.101Z","2.14.3":"2020-06-08T21:44:28.324Z","2.14.4":"2020-06-12T14:41:41.124Z","2.15.0-alpha.0":"2020-06-16T18:38:01.166Z","2.14.5":"2020-06-16T21:44:17.998Z","2.15.0-alpha.1":"2020-06-17T17:18:13.596Z","2.15.0":"2020-06-17T17:25:26.343Z","2.15.1":"2020-06-30T11:25:10.251Z","2.16.0":"2020-07-17T12:13:53.157Z","2.16.1":"2020-07-27T20:49:59.965Z","3.0.0-alpha.2":"2020-08-06T20:01:22.684Z","3.0.0-alpha.3":"2020-08-12T16:58:41.154Z","2.17.0":"2020-08-27T18:42:09.119Z","2.17.1-alpha.0":"2020-09-03T18:23:15.866Z","2.18.0-rc.0":"2020-09-18T22:17:13.515Z","2.18.0-rc.1":"2020-09-21T17:46:45.224Z","2.18.0":"2020-09-22T04:24:22.122Z","2.18.1":"2020-09-24T18:09:51.163Z","2.19.0-alpha.0":"2020-10-05T14:23:20.023Z","2.18.2":"2020-10-05T19:14:00.981Z","2.19.0-alpha.1":"2020-10-19T18:33:49.397Z","2.19.0":"2020-10-30T20:02:40.786Z","2.19.1":"2020-12-22T23:07:20.167Z","2.19.2":"2021-01-14T16:51:17.216Z","2.20.0-alpha.0":"2021-02-09T01:11:26.690Z","2.20.0":"2021-02-09T23:06:39.688Z","2.21.0-alpha.0":"2021-02-11T19:16:20.207Z","2.21.0-alpha.1":"2021-02-11T19:53:29.010Z","2.21.0-alpha.2":"2021-02-11T21:48:21.513Z","2.21.0":"2021-02-12T01:57:22.305Z","2.21.1-alpha.0":"2021-03-06T00:33:01.625Z","2.21.1":"2021-03-08T18:27:07.166Z","2.21.2-alpha.0":"2021-03-16T21:35:29.460Z","2.21.2":"2021-03-18T19:52:16.719Z","2.22.0-alpha.0":"2021-03-22T21:59:12.454Z","2.22.0":"2021-03-26T00:28:26.169Z","2.22.1":"2021-03-26T05:00:57.691Z","2.22.2-alpha.0":"2021-03-29T19:26:02.574Z","2.22.2":"2021-03-29T19:37:06.415Z","2.23.0-alpha.0":"2021-04-09T00:09:18.539Z","2.23.0-alpha.1":"2021-04-09T20:07:11.030Z","2.23.0":"2021-04-14T23:23:30.905Z","2.23.1-unified.0":"2021-04-22T22:22:37.759Z","2.23.1-unified.2":"2021-04-22T23:05:47.665Z","2.23.1-unified2.0":"2021-04-22T23:14:41.961Z","2.23.1-unified2.1":"2021-04-23T05:46:08.867Z","2.23.1-unified2.2":"2021-04-27T22:17:08.083Z","2.23.1-unified2.3":"2021-04-27T22:54:13.664Z","2.24.0-alpha.0":"2021-04-28T21:01:52.724Z","2.24.0-alpha.1":"2021-04-29T22:33:20.542Z","2.24.0-alpha.2":"2021-04-30T14:06:28.013Z","2.24.0":"2021-04-30T18:10:08.607Z","3.0.0-alpha.4":"2021-05-06T20:23:03.593Z","3.0.0-lambda.0":"2021-05-13T19:44:49.499Z","2.24.1":"2021-05-18T22:49:28.517Z","3.0.0-html.0":"2021-05-25T04:35:25.100Z","3.0.0-html.2":"2021-05-25T05:19:54.042Z","2.25.0-alpha.0":"2021-05-26T22:31:30.603Z","2.25.0-alpha.1":"2021-05-27T14:10:53.142Z","2.25.0":"2021-05-27T14:40:30.534Z","3.0.0-preview.0":"2021-06-01T05:55:54.855Z","2.25.1":"2021-06-08T21:06:15.009Z","3.0.0-preview.1":"2021-06-16T05:59:25.088Z","3.0.0-preview.2":"2021-06-16T06:15:43.271Z","2.25.2":"2021-06-22T19:54:00.587Z","3.0.0-preview.3":"2021-06-26T05:43:23.387Z","3.0.0-preview.4":"2021-06-30T21:06:11.010Z","3.0.0-rc.0":"2021-07-01T23:42:19.039Z","3.0.0-rc.1":"2021-07-02T21:48:44.849Z","3.0.0":"2021-07-07T18:17:59.139Z","3.0.1":"2021-07-16T22:45:09.914Z","3.0.2":"2021-07-20T17:28:09.294Z","3.1.0-alpha.0":"2021-07-22T20:23:18.462Z","3.1.0-alpha.1":"2021-07-23T06:14:41.642Z","3.1.0":"2021-07-26T19:11:07.707Z","3.1.1":"2021-07-26T19:51:36.545Z","3.1.2":"2021-08-03T00:34:09.810Z","3.2.0-alpha.0":"2021-08-20T23:55:57.250Z","3.2.0":"2021-08-23T23:50:45.850Z","3.3.0":"2021-08-25T23:14:48.995Z","3.4.0-alpha.0":"2021-10-09T00:38:23.284Z","3.4.0":"2021-10-11T20:58:40.275Z","2.25.3":"2021-11-04T18:04:27.654Z","3.4.1":"2021-11-04T18:06:41.049Z","3.5.0":"2021-11-05T17:54:43.600Z","3.6.0-alpha.0":"2021-12-17T21:58:03.566Z","3.6.0-alpha.1":"2021-12-28T03:11:15.873Z","3.6.0":"2021-12-30T18:25:59.516Z","3.6.1":"2021-12-31T15:57:50.361Z","3.6.2":"2022-01-18T21:10:14.923Z","3.6.3":"2022-02-08T19:15:35.018Z","3.6.4":"2022-03-10T18:51:09.053Z","3.6.5":"2022-03-21T19:14:26.962Z","3.6.6":"2022-03-24T20:20:40.980Z","3.6.7":"2022-03-29T23:54:25.662Z","3.6.8":"2022-05-05T15:52:46.984Z","3.7.0":"2022-05-05T16:51:43.844Z","3.8.0":"2022-05-23T23:58:51.892Z","3.8.1":"2022-05-24T04:12:01.337Z","2.25.4":"2022-05-25T17:28:41.069Z","3.8.2":"2022-06-04T00:56:13.365Z","3.9.0":"2022-06-15T16:55:07.259Z","3.10.0":"2022-07-11T19:23:06.568Z","3.10.1":"2022-08-10T17:09:49.568Z","2.26.0":"2022-08-18T18:20:49.558Z","3.10.2":"2022-08-26T02:41:42.256Z","3.10.3":"2022-10-07T22:17:56.864Z","2.26.1":"2022-10-20T18:01:57.804Z","3.10.4":"2022-10-31T21:52:21.621Z","3.11.0":"2022-11-02T15:56:37.798Z","3.11.1":"2022-11-03T01:01:36.497Z","3.12.0":"2023-03-02T19:33:40.818Z","2.26.2":"2023-08-30T21:02:53.045Z","3.12.1":"2023-08-30T21:17:19.608Z","3.13.0":"2023-11-14T00:17:08.561Z"},"bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","homepage":"https://github.com/apollographql/apollo-server#readme","keywords":["GraphQL","Apollo","Server","Google Cloud Functions","Javascript"],"repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-cloud-functions"},"description":"Production-ready Node.js GraphQL server for Google Cloud Functions","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"readme":"[![npm version](https://badge.fury.io/js/apollo-server-cloud-functions.svg)](https://badge.fury.io/js/apollo-server-cloud-functions)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)\n[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)\n\n\nThis is the Google Cloud Function integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).\n\n```shell\nnpm install apollo-server-cloud-functions graphql\n```\n\n# Deploying with Google Cloud Functions\n\nThis tutorial helps you deploy Apollo Server to Google Cloud Functions. It uses the following example function handler:\n\n```javascript:title=index.js\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\n// Because `NODE_ENV` is a reserved environment variable in Google Cloud\n// Functions and it defaults to \"production\", you need to set the\n// `introspection` option to `true` for a UI like Apollo Sandbox or GraphQL\n// Playground to work correctly.\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n## Deploying from the Google Cloud Console\n\n### 1. Configure the function\n\nFrom your Google Cloud Console, go to the [Cloud Functions page](https://console.cloud.google.com/functions/list).\n\nClick **Create Function**. Give the function a name and set the **Trigger type** to `HTTP`.\n\nFor quick setup and access to the GraphQL endpoint/landing page, choose to **Allow unauthenticated invocations**. To require authentication for this endpoint, you can manage authorized users via [Cloud IAM](https://console.cloud.google.com/iam-admin/iam).\n\nSave your configuration changes in the Trigger section. Copy the trigger's URL for later and click **Next**.\n\n### 2. Write the API handlers and deploy\n\nNow on the Code page, set the runtime to a currently supported version of Node.js (such as `Node.js 14`), and set the Entry point to `handler`.\n\nPaste the example code at the top of this page into the contents of `index.js` in the code editor.\n\nEdit `package.json` so that it lists `apollo-server-cloud-functions` and `graphql` in its dependencies:\n\n```json:title=package.json\n\"dependencies\": {\n  \"apollo-server-cloud-functions\": \"^2.24.0\",\n  \"graphql\": \"^15.5.0\"\n}\n```\n\nClick **Deploy** to initiate deployment. Then, proceed to [Testing the function](#testing-the-function).\n\n\n## Deploying from your local machine\n\nBefore proceeding, you need to set up the gcloud SDK:\n\n1. [Install the gcloud SDK](https://cloud.google.com/sdk/docs/install)\n\n2. [Initialize the gcloud SDK and authenticate your Google account](https://cloud.google.com/sdk/docs/initializing)\n\nNext, initialize a new Node.js project by running `npm init` in an empty directory.\n\nRun `npm install apollo-server-cloud-functions graphql` to install the necessary dependencies and to include them in the `package.json` file.\n\nAt this point, your `package.json` should resemble the following:\n\n```json\n{\n  \"name\": \"apollo-gcloud\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"apollo-server-cloud-functions\": \"^2.24.0\",\n    \"graphql\": \"^15.5.0\"\n  }\n}\n```\n\nCreate a new file named `index.js` and paste the sample code at the top of this page into it.\n\nRun the following command to create and deploy the function to Cloud Functions:\n\n```bash\ngcloud functions deploy apollo-graphql-example --entry-point handler --runtime nodejs14 --trigger-http\n```\n\nThis creates a function named `apollo-graphql-example` that you can view from your console's [Cloud Functions page](https://console.cloud.google.com/functions/list)\n\nThe command asks some configuration questions and prints metadata about your newly created function, which includes the function's trigger URL.\n\nFor more information, see the official [Cloud Functions docs](https://cloud.google.com/functions/docs/deploying/filesystem).\n\n## Testing the function\n\nAfter deployment completes, navigate to your function's trigger URL. If deployment succeeded, you should see your server's landing page.\n\n> If you can't access your trigger URL, you might need to [add `allAuthenticatedUsers` or `allUsers` permissions](https://cloud.google.com/iam/docs/overview#all-authenticated-users) to your function.\n\nClick <q>Query your Server</q> and use Apollo Sandbox to test the following query:\n\n```graphql\nquery TestQuery {\n  hello\n}\n```\n\nAnd verify that the following response appears:\n\n```json\n{\n  \"data\": {\n    \"hello\": \"Hello world!\"\n  }\n}\n```\n\n## Getting request details\n\nTo obtain information about a currently executing Google Cloud Function (HTTP headers, HTTP method, body, path, etc.) use the `context` option. This enables you to pass any request-specific data to your server's resolvers.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  context: ({ req, res }) => ({\n    headers: req.headers,\n    req,\n    res,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the GCF Response (CORS)\n\nTo enable CORS, you need to modify your HTTP response headers. To do so, use the `cors` option:\n\n```javascript{23-26}\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: '*',\n    credentials: true,\n  },\n});\n```\n\nTo enable CORS response for requests with credentials (cookies, HTTP authentication) the allow origin header must equal the request origin and the allow credential header must be set to `true`.\n\n```javascript\nconst { ApolloServer, gql } = require('apollo-server-cloud-functions');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nexports.handler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\n\n### CORS Options\n\nThe options correspond to the [express `cors` configuration](https://github.com/expressjs/cors#configuration-options) with the following fields(all are optional):\n\n| Option | Type(s) |\n|--------|---------|\n| `origin` | boolean \\| string \\| string[] |\n| `methods` | string \\| string[] |\n| `allowedHeaders` | string \\| string[] |\n| `exposedHeaders` | string \\| string[] |\n| `credentials` | boolean |\n| `maxAge` | number |\n","readmeFilename":"README.md"}