{"_id":"apollo-server-lambda","_rev":"362-59eae2d479bf76cb76d809367201e0af","name":"apollo-server-lambda","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":{"1.0.2":{"name":"apollo-server-lambda","version":"1.0.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@1.0.2","maintainers":[{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"d9ac05128674a9b0a5be4350e4cadb3390108ad6","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-1.0.2.tgz","integrity":"sha512-W99Z/QD7zfs/MhUWTcPs7kBeSQGoXdu1qXFNp7iRpCwsY3GdrH59dTzc6tPpm8aHvpklUAK+9E5bDRIVuuuEBg==","signatures":[{"sig":"MEQCICRcu4hjuI4SfWH0qjEG/pJhyIvkzd2yI3ILp/yd/818AiBwKNt2qTFtPSnCIDa1FgqhqYurU3JU0zM72gRYZeGfZw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"d9ac05128674a9b0a5be4350e4cadb3390108ad6","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"3.10.10","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.1.2","dependencies":{"apollo-server-core":"^1.0.2","apollo-server-module-graphiql":"^1.0.2"},"devDependencies":{"@types/graphql":"^0.9.1","@types/aws-lambda":"0.0.10","apollo-server-integration-testsuite":"^1.0.2"},"peerDependencies":{"graphql":"^0.9.0 || ^0.10.1"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda-1.0.2.tgz_1500334269008_0.8149346054997295","host":"s3://npm-registry-packages"}},"1.0.3-tracing.0":{"name":"apollo-server-lambda","version":"1.0.3-tracing.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@1.0.3-tracing.0","maintainers":[{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"5cc2a03d6eb34658f45f3edc8deb90ca19481a60","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-1.0.3-tracing.0.tgz","integrity":"sha512-6yoQBxyIgoispjlnJ01rVXc2l+8qCjsh87FJsGw2kIz9kOpOXG2TGqRar7RXOoL5yaPJ35cAoaYDmbrl5MJelg==","signatures":[{"sig":"MEUCIFhg6G2rwOrfGolplG5lQ59f1bEeU9LAVsC426sitTIdAiEAxz/xiMBmUdzycqDleM6NSyPt2t3qKcZP1vZesTK4S2k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"5cc2a03d6eb34658f45f3edc8deb90ca19481a60","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"3.10.10","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.1.2","dependencies":{"apollo-server-core":"^1.0.3-tracing.0","apollo-server-module-graphiql":"^1.0.2"},"devDependencies":{"@types/graphql":"^0.9.1","@types/aws-lambda":"0.0.10","apollo-server-integration-testsuite":"^1.0.3-tracing.0"},"peerDependencies":{"graphql":"^0.9.0 || ^0.10.1"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda-1.0.3-tracing.0.tgz_1500583416736_0.34443145664408803","host":"s3://npm-registry-packages"}},"1.0.3-tracing.1":{"name":"apollo-server-lambda","version":"1.0.3-tracing.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@1.0.3-tracing.1","maintainers":[{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"4719f3787f530e0d27dd2f64512fb97bf1338af4","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-1.0.3-tracing.1.tgz","integrity":"sha512-5ioHyDUuecTVj8ZInVeoiTDOf/IaqplbrHdpxrQp6f+v5yZtldXgzipoDMvYROxvb9QLxnkNY82nSmNZDwJQtA==","signatures":[{"sig":"MEQCIEp5qPi5tql3QM4Mnpb2v+jqSdF2oU9wIIRWbpwK1o1uAiAVQIPfO+1X1zDChvcPIH8fTyOREZ5Dx5VlEtqktpfYIg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"4719f3787f530e0d27dd2f64512fb97bf1338af4","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"3.10.10","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.1.2","dependencies":{"apollo-server-core":"^1.0.3-tracing.1","apollo-server-module-graphiql":"^1.0.2"},"devDependencies":{"@types/graphql":"^0.9.1","@types/aws-lambda":"0.0.10","apollo-server-integration-testsuite":"^1.0.3-tracing.1"},"peerDependencies":{"graphql":"^0.9.0 || ^0.10.1"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda-1.0.3-tracing.1.tgz_1500584192357_0.5170624593738467","host":"s3://npm-registry-packages"}},"1.0.3-tracing.2":{"name":"apollo-server-lambda","version":"1.0.3-tracing.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@1.0.3-tracing.2","maintainers":[{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"0c256062b68da0c91305bd48bf31760918b88a55","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-1.0.3-tracing.2.tgz","integrity":"sha512-LgvwxwCwZOXRNEvW1eeasry0Eox3YYKvlCisJPN8pjAhvvTYnYJQ63lKWn2B/QAkeXgm2IZ/FfUmMXKGQsVq1w==","signatures":[{"sig":"MEUCIQC5QS4F7QsSf2Mnkv7RHL3fdCDDE1rocwOCScz5uz0cOAIgGRvOqsCYErazBV0WGI5isC9lA22UOydnO330L/4kg5U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"0c256062b68da0c91305bd48bf31760918b88a55","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"3.10.10","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.1.2","dependencies":{"apollo-server-core":"^1.0.3-tracing.2","apollo-server-module-graphiql":"^1.0.2"},"devDependencies":{"@types/graphql":"^0.9.1","@types/aws-lambda":"0.0.10","apollo-server-integration-testsuite":"^1.0.3-tracing.2"},"peerDependencies":{"graphql":"^0.9.0 || ^0.10.1"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda-1.0.3-tracing.2.tgz_1500584523658_0.3231772512663156","host":"s3://npm-registry-packages"}},"1.0.3-tracing.3":{"name":"apollo-server-lambda","version":"1.0.3-tracing.3","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@1.0.3-tracing.3","maintainers":[{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"5a475ea8189856b7b95ba4b050555ddec9140f1a","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-1.0.3-tracing.3.tgz","integrity":"sha512-72uIEsrzF/mPUgDooKzQ6ewogM2paOWd56EXr16NyUvleUVRUrCt9ZIsFJZbg31PDXo64WzL+BArFhoevdcwDQ==","signatures":[{"sig":"MEUCIQClmBxYqOlS3juyrWZaz0+X/KNFUV70ZJNf2S84oiwhdgIgbgc1R27OCv+rgfhNu/54lBy0ZCFP4R/R4lhWywEuHJI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"5a475ea8189856b7b95ba4b050555ddec9140f1a","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"3.10.10","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.1.2","dependencies":{"apollo-server-core":"^1.0.3-tracing.3","apollo-server-module-graphiql":"^1.0.2"},"devDependencies":{"@types/graphql":"^0.9.1","@types/aws-lambda":"0.0.10","apollo-server-integration-testsuite":"^1.0.3-tracing.3"},"peerDependencies":{"graphql":"^0.9.0 || ^0.10.1"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda-1.0.3-tracing.3.tgz_1500600867319_0.5231034548487514","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"apollo-server-lambda","version":"1.0.4","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@1.0.4","maintainers":[{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"778d2f53687043dcf145c44dfcefe0b5c34aafd6","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-1.0.4.tgz","integrity":"sha512-tvbZzIx4rL5DL9VCHWHXlsoOBJV6R79BJVvqbNw8VLBoQxiU0p1SPly15zJpjH67eMmVtEi0Qra2JSIMcuoY8g==","signatures":[{"sig":"MEUCIQCG08vYYz+EUD/96oBu8ow4EqoEUhvma4g+QyQDNXr68gIgdVHduxfZpz7Lxa7PJoiIqy9Vkjq7moUw+Ue/N/9Q44A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"778d2f53687043dcf145c44dfcefe0b5c34aafd6","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"3.10.10","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.1.2","dependencies":{"apollo-server-core":"^1.0.2","apollo-server-module-graphiql":"^1.0.4"},"devDependencies":{"@types/graphql":"^0.9.1","@types/aws-lambda":"0.0.10","apollo-server-integration-testsuite":"^1.0.4"},"peerDependencies":{"graphql":"^0.9.0 || ^0.10.1"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda-1.0.4.tgz_1500884560397_0.35176783753558993","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"apollo-server-lambda","version":"1.0.5","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@1.0.5","maintainers":[{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"df51954607ae0fd9366587eefbcf18af5f904498","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-1.0.5.tgz","integrity":"sha512-YOX9ttf5ny2AdlCYhEd7iZF2U72ibvWajeJLVj4JLL8ux/Xqc2JeBEG5i5lw+3rDBN4jR9YXCia7fL/7DETlJA==","signatures":[{"sig":"MEUCIQD22bTgcOTEIOaqMdjoRPUi6DWKK8DzXk27cRgSEeBw8QIgbFIK4LatHTjZRi0h97lfRX7EJiucucxDO9ExN/80Vug=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"df51954607ae0fd9366587eefbcf18af5f904498","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"3.10.10","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.2.1","dependencies":{"apollo-server-core":"^1.0.2","apollo-server-module-graphiql":"^1.0.5"},"devDependencies":{"@types/graphql":"^0.9.1","@types/aws-lambda":"0.0.10","apollo-server-integration-testsuite":"^1.0.5"},"peerDependencies":{"graphql":"^0.9.0 || ^0.10.1"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda-1.0.5.tgz_1501612634312_0.20356895634904504","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"apollo-server-lambda","version":"1.1.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@1.1.0","maintainers":[{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"1d97ff9b9e61b8c7cd380be7551e05f63c858cea","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-1.1.0.tgz","integrity":"sha512-8s+pKYS3v8gBTU6/I2p205mAasM3/pNiwK4+HUFWBgTr6HuKZ2Ii/HVrU8tNpbUCcqAWoWjtJclNCuurTtcysA==","signatures":[{"sig":"MEUCIEI9U9mr40qelt0dD6nB3qhRSxpLaoeK9N8Sx4th93ObAiEAnOt45F4sv16P1HcSQ0lyNKYhq41hSyWkQuXYnOr98vQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"1d97ff9b9e61b8c7cd380be7551e05f63c858cea","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"3.10.10","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.2.1","dependencies":{"apollo-server-core":"^1.1.0","apollo-server-module-graphiql":"^1.1.0"},"devDependencies":{"@types/graphql":"^0.10.2","@types/aws-lambda":"0.0.16","apollo-server-integration-testsuite":"^1.1.0"},"peerDependencies":{"graphql":"^0.9.0 || ^0.10.1"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda-1.1.0.tgz_1502305989871_0.1153009298723191","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"apollo-server-lambda","version":"1.1.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@1.1.2","maintainers":[{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"6f0be125a777dd1f94ffc236e183fc8ad06333d8","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-1.1.2.tgz","integrity":"sha512-8HarA4LVCJSQy/Q1O4tv9+CyRk5n8asGCOHxOOGoxQ/83TLR/NzTrA+yJ3wlkh+XRV0ct8uHG553mrz9PsyIYQ==","signatures":[{"sig":"MEUCIQD6NHBMe/LAjZEuBKhXpyyoqfrqnKHAn+KBVcuJpqIqsQIgQRYIYSDUWDKXcQfA1wEMS5Yvq9kAsc67VWvvRo8uK6Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"6f0be125a777dd1f94ffc236e183fc8ad06333d8","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"sashko","email":"s.stubailo@gmail.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"3.10.10","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.2.1","dependencies":{"apollo-server-core":"^1.1.0","apollo-server-module-graphiql":"^1.1.2"},"devDependencies":{"@types/graphql":"^0.10.2","@types/aws-lambda":"0.0.16","apollo-server-integration-testsuite":"^1.1.2"},"peerDependencies":{"graphql":"^0.9.0 || ^0.10.1"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda-1.1.2.tgz_1503548863092_0.4754899060353637","host":"s3://npm-registry-packages"}},"1.1.3":{"name":"apollo-server-lambda","version":"1.1.3","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@1.1.3","maintainers":[{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"26f236768a18bddfb4a03cd5abec4138ecd83fd4","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-1.1.3.tgz","integrity":"sha512-+gu+gOkFjWNaLBV47VB9zhe5ryud3sQVFLy6SRIkRQIQ06qUqdquvZ9K++9r9nYZaBCaHUd8p74mO9C9XdklEg==","signatures":[{"sig":"MEUCIQD/Ae5TlquSoDV2t3vaXk3nKPhg3D56pFTzYu40tW7D5AIgXrQw0ILqXxxo0BRcjmZbGKqWshlDCNqy+9nZLPBH0kQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"26f236768a18bddfb4a03cd5abec4138ecd83fd4","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"3.10.10","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"6.11.2","dependencies":{"apollo-server-core":"^1.1.3","apollo-server-module-graphiql":"^1.1.3"},"devDependencies":{"@types/graphql":"0.11.4","@types/aws-lambda":"0.0.16","apollo-server-integration-testsuite":"^1.1.3"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda-1.1.3.tgz_1507178814961_0.9243398127146065","host":"s3://npm-registry-packages"}},"1.1.5":{"name":"apollo-server-lambda","version":"1.1.5","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@1.1.5","maintainers":[{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"d770efe49b88c508fb4cce10716b632472f37c51","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-1.1.5.tgz","integrity":"sha512-7T9lKyZDWdVK3Am8/xMfPxJrp/lrydtA0Kqdo1ukF9yb+9OlGrGkPsDQKLgV3LUXMbe7+z55yrkszUi4UduYjw==","signatures":[{"sig":"MEYCIQCIZxvtK5xc31xoBTak7oKlrykzuMn47CpQU0MHFKRnygIhALoUnAtoiwRvhLnTSMlc1m0WGNTTbpLtSotOkrFOelO1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"d770efe49b88c508fb4cce10716b632472f37c51","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"3.10.10","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"6.11.2","dependencies":{"apollo-server-core":"^1.1.5","apollo-server-module-graphiql":"^1.1.4"},"devDependencies":{"@types/graphql":"0.11.5","@types/aws-lambda":"0.0.16","apollo-server-integration-testsuite":"^1.1.5"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda-1.1.5.tgz_1507574066215_0.947346585104242","host":"s3://npm-registry-packages"}},"1.1.6":{"name":"apollo-server-lambda","version":"1.1.6","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@1.1.6","maintainers":[{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"6ee8874fa10267dbeb7940905507523af3230b9c","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-1.1.6.tgz","integrity":"sha512-fKU4v2ePHMB1ekw+akxhWT4gwYs1fXk/ER5wEVPQ1f4yjv91oX93XRaCRRR5wxJehG0UAssFIlPyVZU9qajw5w==","signatures":[{"sig":"MEUCIQDg2oL4vKfujHTT7L+tPk/6zRMspGicEhpJb/JWizlLMQIgIHQhaRyPPc2mScLSO3RxZtyhPMyM8EgcPYVhaCp99+Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"6ee8874fa10267dbeb7940905507523af3230b9c","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"3.10.10","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"6.11.2","dependencies":{"apollo-server-core":"^1.1.6","apollo-server-module-graphiql":"^1.1.6"},"devDependencies":{"@types/graphql":"0.11.5","@types/aws-lambda":"0.0.16","apollo-server-integration-testsuite":"^1.1.6"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda-1.1.6.tgz_1507576344447_0.7380455450620502","host":"s3://npm-registry-packages"}},"1.1.7":{"name":"apollo-server-lambda","version":"1.1.7","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@1.1.7","maintainers":[{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"848bddf876ad2b4e8e2ccd6201ccb867c6dd240a","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-1.1.7.tgz","integrity":"sha512-/HfA/dA+caug4rt6gUOMmer/BiFWjjzEEkvBsbW7bIHxm+yMLDVFbNv7wSJcpVSYGZTbFA540Lvj5jNZzmLd8g==","signatures":[{"sig":"MEQCIA2ZIHJ+BVaeB8dD7WgWgPRLMaXk3TLYtQZTlLbqn3MYAiBVhV2JGAkj1i7MDu9mUbBbd9hMYBrSRjdnPXyzZY6Z9g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"848bddf876ad2b4e8e2ccd6201ccb867c6dd240a","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"3.10.10","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"6.11.2","dependencies":{"apollo-server-core":"^1.1.7","apollo-server-module-graphiql":"^1.1.6"},"devDependencies":{"@types/graphql":"0.11.5","@types/aws-lambda":"0.0.17","apollo-server-integration-testsuite":"^1.1.7"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda-1.1.7.tgz_1508165982502_0.27712578629143536","host":"s3://npm-registry-packages"}},"1.2.0-pre.1":{"name":"apollo-server-lambda","version":"1.2.0-pre.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@1.2.0-pre.1","maintainers":[{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"1c1aeda0d440478bdc9b3d600a7261c29375b582","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-1.2.0-pre.1.tgz","integrity":"sha512-+Ib9oGi+28CZLmW03Voze+CvGy6/b5NBWA/wtxGjJnnbfI8w2TAchOK17Cl12c9r5Zciov05tSpFoGl5FWy/eA==","signatures":[{"sig":"MEYCIQDRwGIC1SM97o5tdrAXbpvHyRzWuiVoMEg8rXgBPZwbRwIhAMAvFh/xeApCGgVygttUC7xralhTJmHUxdTNAouzHsWQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"1c1aeda0d440478bdc9b3d600a7261c29375b582","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"3.10.10","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.7.0","dependencies":{"apollo-server-core":"^1.2.0-pre.1","apollo-server-module-graphiql":"^1.1.6"},"devDependencies":{"@types/graphql":"0.11.5","@types/aws-lambda":"0.0.17","apollo-server-integration-testsuite":"^1.2.0-pre.1"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda-1.2.0-pre.1.tgz_1508817312510_0.9174991925247014","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"apollo-server-lambda","version":"1.2.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@1.2.0","maintainers":[{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"cdcc8901a85bcc08be35836e1d835e26c8ad2bc1","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-1.2.0.tgz","integrity":"sha512-HQvCD/rMZmIkfwKqO++apuGhT5ROOpf35N6QBBGpLXVcCnreNKn0KhKCiLGED3cDAb+nTdx8PSFBeb8NNz3YmQ==","signatures":[{"sig":"MEYCIQCrOr3NgwUcAJL6dl4VIalfWvHv4APqyFadfEl5GoG3CwIhALt/pWAgyTe3iMUpVBVY8SPii4aaIUwKBIXeXuj444+B","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"cdcc8901a85bcc08be35836e1d835e26c8ad2bc1","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"3.10.10","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.7.0","dependencies":{"apollo-server-core":"^1.2.0","apollo-server-module-graphiql":"^1.2.0"},"devDependencies":{"@types/graphql":"0.11.5","@types/aws-lambda":"0.0.17","apollo-server-integration-testsuite":"^1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda-1.2.0.tgz_1508861703908_0.6117718203458935","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"apollo-server-lambda","version":"1.3.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@1.3.0","maintainers":[{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"7000c1cbfbcc01d8e0c176919d2cc7b21d6835e4","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-1.3.0.tgz","integrity":"sha512-4r8VIKIzaRU56EiBF8ivS+Yew70ga0TJkDQ9TofpBcfFFcL/GYcLw08TYplx/GaDFg0fT5GIWCMzksGxeM+JxA==","signatures":[{"sig":"MEUCIQCvcS7+mtofX2o9LT0A9SccO4FnS7cTf+p7OsT+w15N+QIgPwRbLF9OoumrDBwWgLKclQml9EfZyzKvCmmswB202os=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"7000c1cbfbcc01d8e0c176919d2cc7b21d6835e4","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"3.10.10","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.9.1","dependencies":{"apollo-server-core":"^1.3.0","apollo-server-module-graphiql":"^1.3.0"},"devDependencies":{"@types/graphql":"0.11.5","@types/aws-lambda":"0.0.19","apollo-server-integration-testsuite":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda-1.3.0.tgz_1513068364073_0.29026850592345","host":"s3://npm-registry-packages"}},"1.3.1":{"name":"apollo-server-lambda","version":"1.3.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@1.3.1","maintainers":[{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"25a26d27523620b1190e5bf8327c59a489f7aa98","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-1.3.1.tgz","integrity":"sha512-cWJhZuNlrGtQ0D+CYou+kK0XKa0ADzKHdShTC9+XkAWvuPLP1xkdTmrlRG+ut4vxhCJFuIsZILqu1cS25zmVfA==","signatures":[{"sig":"MEYCIQDTl1IbQzTs6BURYzbfDUssQVFNxcGj4GOeO59vyyku5QIhAKE5JXT9HeQreOg1moApQa3Owpu4ic/M69OoO/VCAS/v","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"25a26d27523620b1190e5bf8327c59a489f7aa98","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"3.10.10","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.9.1","dependencies":{"apollo-server-core":"^1.3.1","apollo-server-module-graphiql":"^1.3.0"},"devDependencies":{"@types/graphql":"0.11.7","@types/aws-lambda":"0.0.24","apollo-server-integration-testsuite":"^1.3.1"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda-1.3.1.tgz_1513578902969_0.30824418761767447","host":"s3://npm-registry-packages"}},"1.3.2":{"name":"apollo-server-lambda","version":"1.3.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@1.3.2","maintainers":[{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"bcf75f3d7115d11cc9892ad3b17427b3d536df0f","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-1.3.2.tgz","integrity":"sha512-MN6Wn2whMCwslH3lmDlEwdFkZNM9gqV6Z5FRwzusU2ACivyQcRzgl4ri9exDSkxt3i+lyoVdQISgrWK85yRu7Q==","signatures":[{"sig":"MEQCIF4R0maeyEJm4tVVYLObgQCFg+foBjvIiwjStr7ACR9oAiBqxKuCicN8oKTE/tUx0juMA7pNbS7zIVcMqoU5YU1F3Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"bcf75f3d7115d11cc9892ad3b17427b3d536df0f","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"3.10.10","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.2.1","dependencies":{"apollo-server-core":"^1.3.2","apollo-server-module-graphiql":"^1.3.0"},"devDependencies":{"@types/graphql":"0.11.7","@types/aws-lambda":"0.0.24","apollo-server-integration-testsuite":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda-1.3.2.tgz_1513699387591_0.7738918452523649","host":"s3://npm-registry-packages"}},"1.3.3":{"name":"apollo-server-lambda","version":"1.3.3","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@1.3.3","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"4728e3a145186a5a8ef1109a5d26a94a1b13f23c","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-1.3.3.tgz","fileCount":11,"integrity":"sha512-ISBQWs5et2e2M5556Yg0SGP9igDdXbGfj7bkuUcK7l3jwCnyW+KBQTX2w+0ZviVOYoLIunv28+O6f5eVkIZOHA==","signatures":[{"sig":"MEUCIQDaS8+m6yqeJUg6tMoM9MTaNADdJ+zhIzM/qPYbs7vgKAIgXXrAOn5qBY9aXOPGyim9vSj6d/mAssPoe642q1mmwaw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20816},"main":"dist/index.js","_from":".","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-core.svg)](https://badge.fury.io/js/apollo-server-core) [![Build Status](https://travis-ci.org/apollographql/apollo-server.svg?branch=master)](https://travis-ci.org/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 AWS Lambda integration for the Apollo community GraphQL Server. [Read the docs.](https://www.apollographql.com/docs/apollo-server/)\n\n```sh\nnpm install apollo-server-lambda\n```\n\n<h2 id=\"deploying\" title=\"Deploying with SAM\">Deploying with AWS Serverless Application Model (SAM)</h2>\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\n```js\n// graphql.js\nvar server = require('apollo-server-lambda'),\n  myGraphQLSchema = require('./schema');\n\nexports.graphqlHandler = server.graphqlLambda({ schema: myGraphQLSchema });\nexports.graphiqlHandler = server.graphiqlLambda({\n  endpointURL: '/Prod/graphql',\n});\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with two exports: `graphqlHandler` and `graphiqlHandler`. It creates two API endpoints:\n\n* `/graphql` (GET and POST)\n* `/graphiql` (GET)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.graphqlHandler\n      Runtime: nodejs6.10\n      Events:\n        GetRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: get\n        PostRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: post\n  GraphQLInspector:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.graphiqlHandler\n      Runtime: nodejs6.10\n      Events:\n        GetRequest:\n          Type: Api\n          Properties:\n            Path: /graphiql\n            Method: get\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n   --template-file template.yaml \\\n   --output-template-file serverless-output.yaml \\\n   --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n   --template-file serverless-output.yaml \\\n   --stack-name prod \\\n   --capabilities CAPABILITY_IAM\n```\n\n<h2 id=\"request-info\" title=\"Getting request info\">Getting request info</h2>\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaning, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nvar server = require('apollo-server-lambda'),\n  myGraphQLSchema = require('./schema');\n\nexports.graphqlHandler = server.graphqlLambda((event, context) => {\n  const headers = event.headers,\n    functionName = context.functionName;\n\n  return {\n    schema: myGraphQLSchema,\n    context: {\n      headers,\n      functionName,\n      event,\n      context,\n    },\n  };\n});\n```\n\n<h2 id=\"modifying-response\" title=\"Modifying the response\">Modifying the Lambda Response (Enable CORS)</h2>\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this pass in a callback filter to the generated handler of graphqlLambda.\n\n```js\nvar server = require('apollo-server-lambda'),\n  myGraphQLSchema = require('./schema');\n\nexports.graphqlHandler = function(event, context, callback) {\n  const callbackFilter = function(error, output) {\n    output.headers['Access-Control-Allow-Origin'] = '*';\n    callback(error, output);\n  };\n  const handler = server.graphqlLambda({ schema: myGraphQLSchema });\n\n  return handler(event, context, callbackFilter);\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 CORS_ORIGIN = 'https://example.com';\n\nvar server = require('apollo-server-lambda'),\n  myGraphQLSchema = require('./schema');\n\nexports.graphqlHandler = function(event, context, callback) {\n  const requestOrigin = event.headers.origin,\n    callbackFilter = function(error, output) {\n      if (requestOrigin === CORS_ORIGIN) {\n        output.headers['Access-Control-Allow-Origin'] = CORS_ORIGIN;\n        output.headers['Access-Control-Allow-Credentials'] = 'true';\n      }\n      callback(error, output);\n    };\n  const handler = server.graphqlLambda({ schema: myGraphQLSchema });\n\n  return handler(event, context, callbackFilter);\n};\n```\n","_shasum":"4728e3a145186a5a8ef1109a5d26a94a1b13f23c","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"3.10.10","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.10.0","dependencies":{"apollo-server-core":"^1.3.3","apollo-server-module-graphiql":"^1.3.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/graphql":"0.12.6","@types/aws-lambda":"0.0.34","apollo-server-integration-testsuite":"^1.3.3"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_1.3.3_1522074058698_0.6848435583831058","host":"s3://npm-registry-packages"}},"1.3.4":{"name":"apollo-server-lambda","version":"1.3.4","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@1.3.4","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"fc168891e0034e2884f259b573f6ed208abc2fc2","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-1.3.4.tgz","fileCount":11,"integrity":"sha512-tonnQ+HaDAYvAAoNyZsQ0EwV4OQMvyAzzeNkt7d6KKL05l5t+gpiJoW+/46tWZogYS2IPPvl6/svtS1IG0aJIw==","signatures":[{"sig":"MEUCIQCHx9La5hdhFoSNGo+52+L/Din8QHlHdKEicNv1Nw6HIQIgFUmF4C6eX+Wzgm+lhplm0P/5AKAkP5vRkZM1N+YtIso=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20801},"main":"dist/index.js","_from":".","_shasum":"fc168891e0034e2884f259b573f6ed208abc2fc2","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"3.10.10","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"9.5.0","dependencies":{"apollo-server-core":"^1.3.4","apollo-server-module-graphiql":"^1.3.4"},"_hasShrinkwrap":false,"devDependencies":{"@types/graphql":"0.12.7","@types/aws-lambda":"0.0.34","apollo-server-integration-testsuite":"^1.3.4"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_1.3.4_1522270656285_0.8559718851170162","host":"s3://npm-registry-packages"}},"1.3.5":{"name":"apollo-server-lambda","version":"1.3.5","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@1.3.5","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"ff21bded451c7e336ad9a9bf373e2af71c87713f","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-1.3.5.tgz","fileCount":11,"integrity":"sha512-ohpsSEHhOWGaU3lLWihnbJIzQr3hz3i5yBHQbacAg9LkZ351BYOAWmQkaDhmbT5sMDv/PBtFE1EzZx28ghp6MA==","signatures":[{"sig":"MEUCIQC8lMaDDbNvYQVusw5zEizcMasPLVweFnDkX21DttEqGQIgZeR8vZfsXHh8Zx5vTf0kF9y1ZsAFWKax9EEqH2TYTuY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21073,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa10PDCRA9TVsSAnZWagAAjNMQAIvNCYDrmP7f5uzFc8ga\nBDanzNcp7oUo4jhILzK4zU1L85n/7tHmgUbWtiu/n2u0HUBhlZGbxqko5AJD\ngHAnEeJOgV8gHSBhcrmaibqt7/6LcPp8hx3Ik7UB47yeXkZx6fBimI1QhHSM\nNaSlnSTcoP1zVP5WIi1G549hS7PhzRr+Wm86j7EKZFRzIGml/hpR/n/gPLdp\nojRORqFkoJgWOrJNiakiUMRC95amE9kCofrhq0QwHBIXcHsAA4nHQ95NHIm5\nov+SVR7ievK7D6rG4DbN+CHwKnL2RYuhcMqLRFk5YYg47h5KMu2232ayC0pt\nvr7ozM1WvH+oqMAyWEXWJUcTD8sSsOKcjXR0ch1Jx/7SqHSCq/dyUN4mm1X0\nAQKFD/Y9G5qylHAdfLkA6j0mZCS09tL1fxscgwH/ERW4kqU59W6YM9z2m517\noxW76AkP/mgT31nKp6lkeSZbSZiRAd8ptZ5dlc6V9yhFtAtbI7V5n2Y8LaKm\nSLQi012C9H8vp/D9034p2un6/z3brBURRH6mR1vXW8Yx3WRCwoWld/t/TJ7R\nMqIKQAtdT8t00otYhtloxST1SRKDPMllDqyx10GwZMfDFwXwlLUfBWO1OD01\ndxofv1I97QwSyPCuIjNy9CRn6djifXNGCO3Ohyb/ZrlNCSRqfrtc9HpCA0uH\nRjY4\r\n=Aewp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-core.svg)](https://badge.fury.io/js/apollo-server-core) [![Build Status](https://circleci.com/gh/apollographql/apollo-cache-control-js.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-cache-control-js) [![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 AWS Lambda integration for the Apollo community GraphQL Server. [Read the docs.](https://www.apollographql.com/docs/apollo-server/) [Read the CHANGELOG.](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md)\n\n```sh\nnpm install apollo-server-lambda\n```\n\n<h2 id=\"deploying\" title=\"Deploying with SAM\">Deploying with AWS Serverless Application Model (SAM)</h2>\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\n```js\n// graphql.js\nvar server = require('apollo-server-lambda'),\n  myGraphQLSchema = require('./schema');\n\nexports.graphqlHandler = server.graphqlLambda({ schema: myGraphQLSchema });\nexports.graphiqlHandler = server.graphiqlLambda({\n  endpointURL: '/Prod/graphql',\n});\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with two exports: `graphqlHandler` and `graphiqlHandler`. It creates two API endpoints:\n\n* `/graphql` (GET and POST)\n* `/graphiql` (GET)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.graphqlHandler\n      Runtime: nodejs6.10\n      Events:\n        GetRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: get\n        PostRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: post\n  GraphQLInspector:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.graphiqlHandler\n      Runtime: nodejs6.10\n      Events:\n        GetRequest:\n          Type: Api\n          Properties:\n            Path: /graphiql\n            Method: get\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n   --template-file template.yaml \\\n   --output-template-file serverless-output.yaml \\\n   --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n   --template-file serverless-output.yaml \\\n   --stack-name prod \\\n   --capabilities CAPABILITY_IAM\n```\n\n<h2 id=\"request-info\" title=\"Getting request info\">Getting request info</h2>\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaning, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nvar server = require('apollo-server-lambda'),\n  myGraphQLSchema = require('./schema');\n\nexports.graphqlHandler = server.graphqlLambda((event, context) => {\n  const headers = event.headers,\n    functionName = context.functionName;\n\n  return {\n    schema: myGraphQLSchema,\n    context: {\n      headers,\n      functionName,\n      event,\n      context,\n    },\n  };\n});\n```\n\n<h2 id=\"modifying-response\" title=\"Modifying the response\">Modifying the Lambda Response (Enable CORS)</h2>\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this pass in a callback filter to the generated handler of graphqlLambda.\n\n```js\nvar server = require('apollo-server-lambda'),\n  myGraphQLSchema = require('./schema');\n\nexports.graphqlHandler = function(event, context, callback) {\n  const callbackFilter = function(error, output) {\n    output.headers['Access-Control-Allow-Origin'] = '*';\n    callback(error, output);\n  };\n  const handler = server.graphqlLambda({ schema: myGraphQLSchema });\n\n  return handler(event, context, callbackFilter);\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 CORS_ORIGIN = 'https://example.com';\n\nvar server = require('apollo-server-lambda'),\n  myGraphQLSchema = require('./schema');\n\nexports.graphqlHandler = function(event, context, callback) {\n  const requestOrigin = event.headers.origin,\n    callbackFilter = function(error, output) {\n      if (requestOrigin === CORS_ORIGIN) {\n        output.headers['Access-Control-Allow-Origin'] = CORS_ORIGIN;\n        output.headers['Access-Control-Allow-Credentials'] = 'true';\n      }\n      callback(error, output);\n    };\n  const handler = server.graphqlLambda({ schema: myGraphQLSchema });\n\n  return handler(event, context, callbackFilter);\n};\n```\n","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"5.8.0","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"4.8.7","dependencies":{"apollo-server-core":"^1.3.5","apollo-server-module-graphiql":"^1.3.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/graphql":"0.12.7","@types/aws-lambda":"8.10.1","apollo-server-integration-testsuite":"^1.3.5"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_1.3.5_1524057026610_0.8709537009006099","host":"s3://npm-registry-packages"}},"1.3.6":{"name":"apollo-server-lambda","version":"1.3.6","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@1.3.6","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"bdaac37f143c6798e40b8ae75580ba673cea260e","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-1.3.6.tgz","fileCount":11,"integrity":"sha512-GILpwlKTnv97Ho3oXGHk5bRszIm3on2yMEvmUiV475nTdykK8eX9giMwx+B3mdRzEJ8IGZB78XHEpblegQH80Q==","signatures":[{"sig":"MEYCIQDevCGEl+Es3umpqoHI0aZpySFj2VKEe0JfNAS+NJ+M3wIhANtfHSTpo+2dkjWpLr1gJh8AG4EduiXws/AGlvGvDoNp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21073,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa33j9CRA9TVsSAnZWagAAPCUP/R1bZy6AfV2+nKYnHPWz\n7RBXCNGYCQCL3S0LmNYt7IdPX2UIvj5fnvRdiMKB55TTPRUCUG9wNQqVzMhH\nQWVYkdm1RiMPfgb0MDLMxfFA0AVwpKCau3q6T4jqEZ9C2ENnNG1cuprGvc9M\nPr4qOC1SW2dDjoUd8ClS1476j3m5QKBFDDyyXU7dlCA3FWKcHIXpNfAKs+7T\nR8Q+uFhxtX05i8Hjx4hDfqBOPOoQId/ojCOKQrZntLd9DFWumKxRQzcoVHVv\nml7JO6D4cUfF6F27Jtw5VHLCaghbjAKhQTJICKqGuruU74VYq4BXBeNjla0i\njH+tE/iAyPVl8QqpVMs+nm6DYrCX+3TbpO4q6QgA06Aj/wDLdkm58/4EzjwI\nMCw/6ujioObBGSAk8rFyhFt5zDVu2Hdw0ZISzW3GGNrCx94Ao32L4Fq4ZfYM\n38Esvym7fyvnks6mg2eaiCrzjXfaRjmAZLvQv7E5/FF4NkVvJxsrnYeFhuJC\nESMjiLz/pLKQMmzbXSQS+qm98zeDqiE9UmQ+B9EfjPETgnFxYcyOee2USKbs\nOzjFh8oEe2fk8hAjk9zqCryC+I8de4VAuQPbG3ADTwDIhf+QyDeFBe303vX9\nl0u7YMjJPb6H+gG/ml2kQjfFoS0FIs6K7oSCl2V2v+LToUxY5xR8AP9auOBK\nn8SG\r\n=kd8p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":".","_shasum":"bdaac37f143c6798e40b8ae75580ba673cea260e","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"3.10.10","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"9.5.0","dependencies":{"apollo-server-core":"^1.3.6","apollo-server-module-graphiql":"^1.3.4"},"_hasShrinkwrap":false,"devDependencies":{"@types/graphql":"0.12.7","@types/aws-lambda":"8.10.1","apollo-server-integration-testsuite":"^1.3.6"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_1.3.6_1524594940293_0.39411555946530474","host":"s3://npm-registry-packages"}},"2.0.0-beta.5":{"name":"apollo-server-lambda","version":"2.0.0-beta.5","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@2.0.0-beta.5","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"ca200e75227d8cd5e84cc4f7df87ee5720df5479","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.0-beta.5.tgz","fileCount":11,"integrity":"sha512-O654+pIASS+yEw1v0mI9+oNdH+yCZ0avCc1fAt2C4gfjx3ZnLsYeOPG3eXk8KKpXkdk9ISxpp4KUKroeQq6pGQ==","signatures":[{"sig":"MEUCIQDBCDNcaFhNVZJnY75u/DsvtYQw2pKr9SWTfxuEN0hdZwIgWwHn5SHi+7qK+cmJxsMzWGcnITQOYvfytudfFFORui4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21143,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbGawdCRA9TVsSAnZWagAAt90QAJBzspvxe43lkjaa4wN7\nTFD2qRily/olWWiEitCEI4g5hxIfLVwLqOdFNwjclXUgGEAOYLxWpijGi+lF\n+Xc+LS242lzD9BmpX0e8Nb4DBcrfE9KomT2JTQy9IsO1em5ts6mW2Gi+TWP9\nl/zWzJzYxUUKlKy9pEB64nadvph5upB6eCaurCq0G5eIJxeXPjuH/kqNFiVH\nVXx2TKuVW2ExtT5ezl/v+28nukfrGr4fHwm6ieQ+CSkChSc7tsJitj/sLj0K\nauZCH91xdO8zgcLeDEWiRl9kwXpt68UaoGDreNmHPivTsnT4q4boitCYjXGi\nS2ApmBuRf5kIfqdlY2gae3ed95BIXJM8FcisJFZfkavaN5A9QRafhYIQ1PGw\nHbb28ey41VixZZGb3G/4NDjrE31BmjQG+hFC/WTVasOEfsU9b4xP5WvzRxgS\nUoGy6AMBm60xPY8L6+80c/YYcPZTD6IVVNq5W9jBwAiNe/Z9/ZjoMusdAGs6\nXLrh4IsEh0Wwwx+8E2ndpwdgN669cXWa6h/Xd8LQDgUE3PBQJHhQvMb5iH55\nspSO61f8JbTQ2zmuWI2qzPJa+FrBaJ+1MoA0XZyjMm6Y4SXpdUpUd+ev1uve\nxaDkd+AzZwHA1ekQgN+7wQE4lmmJW0YxXiLhmOyKzQn4lvcHcBO8njCICLWX\nR2fi\r\n=49h5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-core.svg)](https://badge.fury.io/js/apollo-server-core) [![Build Status](https://circleci.com/gh/apollographql/apollo-cache-control-js.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-cache-control-js) [![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 AWS Lambda integration for the Apollo community GraphQL Server. [Read the docs.](https://www.apollographql.com/docs/apollo-server/) [Read the CHANGELOG.](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md)\n\n```sh\nnpm install apollo-server-lambda\n```\n\n<h2 id=\"deploying\" title=\"Deploying with SAM\">Deploying with AWS Serverless Application Model (SAM)</h2>\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\n```js\n// graphql.js\nvar server = require('apollo-server-lambda'),\n  myGraphQLSchema = require('./schema');\n\nexports.graphqlHandler = server.graphqlLambda({ schema: myGraphQLSchema });\nexports.graphiqlHandler = server.graphiqlLambda({\n  endpointURL: '/Prod/graphql',\n});\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```shell\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with two exports: `graphqlHandler` and `graphiqlHandler`. It creates two API endpoints:\n\n* `/graphql` (GET and POST)\n* `/graphiql` (GET)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.graphqlHandler\n      Runtime: nodejs6.10\n      Events:\n        GetRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: get\n        PostRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: post\n  GraphQLInspector:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.graphiqlHandler\n      Runtime: nodejs6.10\n      Events:\n        GetRequest:\n          Type: Api\n          Properties:\n            Path: /graphiql\n            Method: get\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n   --template-file template.yaml \\\n   --output-template-file serverless-output.yaml \\\n   --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n   --template-file serverless-output.yaml \\\n   --stack-name prod \\\n   --capabilities CAPABILITY_IAM\n```\n\n<h2 id=\"request-info\" title=\"Getting request info\">Getting request info</h2>\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaning, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nvar server = require('apollo-server-lambda'),\n  myGraphQLSchema = require('./schema');\n\nexports.graphqlHandler = server.graphqlLambda((event, context) => {\n  const headers = event.headers,\n    functionName = context.functionName;\n\n  return {\n    schema: myGraphQLSchema,\n    context: {\n      headers,\n      functionName,\n      event,\n      context,\n    },\n  };\n});\n```\n\n<h2 id=\"modifying-response\" title=\"Modifying the response\">Modifying the Lambda Response (Enable CORS)</h2>\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this pass in a callback filter to the generated handler of graphqlLambda.\n\n```js\nvar server = require('apollo-server-lambda'),\n  myGraphQLSchema = require('./schema');\n\nexports.graphqlHandler = function(event, context, callback) {\n  const callbackFilter = function(error, output) {\n    output.headers['Access-Control-Allow-Origin'] = '*';\n    callback(error, output);\n  };\n  const handler = server.graphqlLambda({ schema: myGraphQLSchema });\n\n  return handler(event, context, callbackFilter);\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 CORS_ORIGIN = 'https://example.com';\n\nvar server = require('apollo-server-lambda'),\n  myGraphQLSchema = require('./schema');\n\nexports.graphqlHandler = function(event, context, callback) {\n  const requestOrigin = event.headers.origin,\n    callbackFilter = function(error, output) {\n      if (requestOrigin === CORS_ORIGIN) {\n        output.headers['Access-Control-Allow-Origin'] = CORS_ORIGIN;\n        output.headers['Access-Control-Allow-Credentials'] = 'true';\n      }\n      callback(error, output);\n    };\n  const handler = server.graphqlLambda({ schema: myGraphQLSchema });\n\n  return handler(event, context, callbackFilter);\n};\n```\n","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"5.7.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.9.4","dependencies":{"apollo-server-core":"^2.0.0-beta.5","apollo-server-module-graphiql":"^1.3.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/aws-lambda":"8.10.3","apollo-server-integration-testsuite":"^2.0.0-beta.5"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_2.0.0-beta.5_1528409117158_0.5467118614162203","host":"s3://npm-registry-packages"}},"2.0.0-beta.6":{"name":"apollo-server-lambda","version":"2.0.0-beta.6","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@2.0.0-beta.6","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"85c30c40a3280edbf72dc2bf25a5d60f4839e46b","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.0-beta.6.tgz","fileCount":11,"integrity":"sha512-uQrUOxtF5MOcD7JH42MD/34S4Z2ElqFj6VioftsQ2a0GDKliRUiRWZqB7ifPurhhpTDn8YS6aR0QXGfJ6rTxfQ==","signatures":[{"sig":"MEQCIDSTTc1Rp19+fijMrfZ0AZMSsxhpMSbioVS2vInHA8ZfAiBp2Ah/IE4JJ0tSaG6zlxDpNY4aE9zLfd4f5aPc/U30xw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18321,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbHv2qCRA9TVsSAnZWagAAKkAP/2hrDqaOaSvwkLt+RSAr\nPWcvYiWylmc3/wIiM3I9h3bXUNfeU5hDS4IGs/ZHSguoZ27tKYRTB8CVFYSW\n29FESXA13KTwFziiz1qNjIcNQXJm58ziJhrums6QxIb4RhObfmjkEVIbTcLL\nWnOoSpB5ZEiqNqz7tGu9PlIu6kP+zmG87+O2K56TtrX2UHdc9GVKNdLCvAc/\ne4lbUnMTBBbC6ejyAJhS0oSkhia5myNF2exkO5TEca3Nt2QMc/CQ4tQO6Zf4\nEgnuPpiSMZPOHvHU0e0n5ANtRykVdthpvYidBQKz658VKxjCD9J1taHSSTGp\nlB00UaUYoDWQl+AjAkgLgYV3ydMxvYPX57/T3vw9muwqfGHe87HaSBb286FO\nJRjDaDi3P929NGt8ZVr6+000XzayAxmGrt7zWTPwKsnDhR+FF7XYoW40VAkq\nbIkRsywMWeeOXB2HGAdsqo2Q9YzqrXhSJMb1KYqPGiUCsqI7wjlMRsd41Fk2\nARLnBbJeSnAfkrLjR/c80pHMNGISWi4qHgod9J0mFBBsG+kZ25D3/JlB/sj9\nNaV2w5b8G5EROg8IEB2mJBJVYzshyreEbFK3fkqraTv37PWMCKxlpHWl3jcl\nB3mpyFI02vjUsw9vbGfr35N+Zo6h8xbbqFNu+KXDu5SL4TA9aJzH0KWPYNmg\nKFFt\r\n=ZeL+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","engines":{"node":">=8"},"scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"5.6.0","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"9.5.0","dependencies":{"apollo-server-core":"^2.0.0-beta.6","apollo-server-module-graphiql":"^2.0.0-beta.6"},"_hasShrinkwrap":false,"devDependencies":{"@types/aws-lambda":"8.10.3","apollo-server-integration-testsuite":"^2.0.0-beta.6"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_2.0.0-beta.6_1528757672772_0.8261193499018809","host":"s3://npm-registry-packages"}},"2.0.0-beta.7":{"name":"apollo-server-lambda","version":"2.0.0-beta.7","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@2.0.0-beta.7","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"aaed78e8ab97b1c41d408a2db37d5776fe938510","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.0-beta.7.tgz","fileCount":11,"integrity":"sha512-RmUC1h8ukQ1YwFlszuIpxvizPVNKjhdqp4MwtXKg5eo64HhNJ9L42P7TpjvNp2Wc4bx66EeyAk2vQhvNptTZFg==","signatures":[{"sig":"MEUCIGVPooNm+853MWHMTLS4dRZMaLs137IIrFCfC5tVLdc3AiEArgz2q+TVIoAzwxfTQtXL4Ye/mPQrZhlTs/Z0vPMFd7s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18321,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbHyXNCRA9TVsSAnZWagAAOxYP+wYO1E3EZexOBB+2FSTE\nMbMiNzcmf6nOxxMNyWRAlKH6o+arSLDS0pxYZz5QafwFenp1v8P6LXJdIqTL\ndPioUqLQMNI5tCVjczemHJhDvfAGia3QR+tPL00QVHRZgMGPbrq8R8KvmfHR\nGfW5Cl+bMNtg//jI2ZkgiWezfj0OgS2m9rSGnrb1nMoEC14I0v1TEt4by3yn\n5WMFGe3LBCMhF6K+iZOpwwjGtjr+SVFTSo4Sa0NILk3QVdhwQ92kbMkNgXAw\naYQ/8bCofqkIQn/iKQEph5M/tceTGjZjmaJXjtJfAOP+Od+ZIleTqMQbu2/0\n5YUDt1MBZvWyvGoQrMiNhj2ryErfMcGT8Vt6PKEtBelbi7We+w9/TKSJjE6v\ne+7HJPfYr3EtVhEqSiV66TnNMgIhBXpD0U6Sc4JiUAS6vbgRF1x91j9GINDq\nI6d2CSk7VZXCoVUk4hyeidFgkgZgTrBML2DhWbs+205aczfS/7xX6kMGwVgo\nNJXihJ3/7JAoaquQ0kksJc94Kt/KndUT4qps4kfXmIPbF+A/gxGWr0iSeCKR\n1L5RbyPeuk3CBiqMGMDkeD9YfOUOLX+9JzjMmAMAZ0kraKmU7CqhKBKOeNN9\nOjd0FGufhcCsq0sLsuOAbnBrLuqLC7ErjTWZ+05LVkAimxBPOKl1BN4jVaX0\nzevD\r\n=5YB9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","engines":{"node":">=8"},"scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"5.6.0","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"9.5.0","dependencies":{"apollo-server-core":"^2.0.0-beta.7","apollo-server-module-graphiql":"^2.0.0-beta.6"},"_hasShrinkwrap":false,"devDependencies":{"@types/aws-lambda":"8.10.3","apollo-server-integration-testsuite":"^2.0.0-beta.7"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_2.0.0-beta.7_1528767948715_0.6855532787355283","host":"s3://npm-registry-packages"}},"2.0.0-beta.8":{"name":"apollo-server-lambda","version":"2.0.0-beta.8","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@2.0.0-beta.8","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"1efc948b72a0d1a96a98275edadd961e356c9d50","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.0-beta.8.tgz","fileCount":11,"integrity":"sha512-W+sF51/kEAkZ+zGo/AVdWQ/xdzgpwHQ0/jHr0chCTdHIb9E+oJB/Nqasx+UVtgmBkJZPsB8/JtpYYwh9YX5sTA==","signatures":[{"sig":"MEQCIGioRt/PZUUisYnaEkp/V0Boz8l0qggkDPQy9UXjON58AiA7N/mTu3r2g3fcrMhzD2k1qvEXGujdIK9L3S37xluViA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18321,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbIGt/CRA9TVsSAnZWagAAfKMQAJ5Nze2llPZFjyczvvLs\nfQynTgDUXvxmRcgxLshSdl9rUbhw4b44a4/Qcn+vpPvXFdnOQrO+ZwKKJmjW\n3pm9z9It7pXnSqcwVm59sOnvOwGE+RzsVArGZ9SFjWIFEiKe83TAn75r5M5A\n4YbbYK9OGhQpGjCmhV4s2r6blxW7kAbmE9VEdjNOTZ8Vrrspk7N4J5JdnCLh\nj9/dorIQ1/aczdSK5ObXX1IRlauB18FuBDGYWZvEs1PLWYlDpi9ha1qSMWT5\n7419JWJ25RbuieZJA5rrWki16tKuF1z6wYASitWRjpHmOhXjLJ6NDkl1PK1m\nvqq3+ytzaF5X4zl2ic7UWmf13ASdzktjIrG36Cuh9s429ckueUA6ehPuknWY\nvZuxrcWD+iHOyO1NRoO+VkqT1zDxglzVHavm7xihR2BWGNuPm1dpseyDSsxr\npYq1CuMRtQSythnTb2b9HCJGcmzncmzbBRV+gCRDDrolpSNzF+iDarlpTrsn\nrKZfZlaubk9z6dXyzxU5AJxvA+I4gzxRoCtWAEKHOJjA575XfDjFi/Kol78C\nXJIwpD2TBYhrNtv9RjWpq29kg0mvub/NQ82GZVpYAIZmRtCeRfPxxHEm+3dt\noyLVXh44TPXhge6eDc3gUgWDdcHfTWn2Ec1fn0ZUc6B3mgudWbFvVNTKE1D3\nIkWe\r\n=ZAU5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-core.svg)](https://badge.fury.io/js/apollo-server-core) [![Build Status](https://circleci.com/gh/apollographql/apollo-cache-control-js.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-cache-control-js) [![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 AWS Lambda integration for the Apollo community GraphQL Server. [Read the docs.](https://www.apollographql.com/docs/apollo-server/) [Read the CHANGELOG.](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md)\n\n```sh\nnpm install apollo-server-lambda\n```\n\n<h2 id=\"deploying\" title=\"Deploying with SAM\">Deploying with AWS Serverless Application Model (SAM)</h2>\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\n```js\n// graphql.js\nvar server = require('apollo-server-lambda'),\n  myGraphQLSchema = require('./schema');\n\nexports.graphqlHandler = server.graphqlLambda({ schema: myGraphQLSchema });\nexports.graphiqlHandler = server.graphiqlLambda({\n  endpointURL: '/Prod/graphql',\n});\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```shell\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with two exports: `graphqlHandler` and `graphiqlHandler`. It creates two API endpoints:\n\n* `/graphql` (GET and POST)\n* `/graphiql` (GET)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.graphqlHandler\n      Runtime: nodejs6.10\n      Events:\n        GetRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: get\n        PostRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: post\n  GraphQLInspector:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.graphiqlHandler\n      Runtime: nodejs6.10\n      Events:\n        GetRequest:\n          Type: Api\n          Properties:\n            Path: /graphiql\n            Method: get\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n   --template-file template.yaml \\\n   --output-template-file serverless-output.yaml \\\n   --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n   --template-file serverless-output.yaml \\\n   --stack-name prod \\\n   --capabilities CAPABILITY_IAM\n```\n\n<h2 id=\"request-info\" title=\"Getting request info\">Getting request info</h2>\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaning, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nvar server = require('apollo-server-lambda'),\n  myGraphQLSchema = require('./schema');\n\nexports.graphqlHandler = server.graphqlLambda((event, context) => {\n  const headers = event.headers,\n    functionName = context.functionName;\n\n  return {\n    schema: myGraphQLSchema,\n    context: {\n      headers,\n      functionName,\n      event,\n      context,\n    },\n  };\n});\n```\n\n<h2 id=\"modifying-response\" title=\"Modifying the response\">Modifying the Lambda Response (Enable CORS)</h2>\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this pass in a callback filter to the generated handler of graphqlLambda.\n\n```js\nvar server = require('apollo-server-lambda'),\n  myGraphQLSchema = require('./schema');\n\nexports.graphqlHandler = function(event, context, callback) {\n  const callbackFilter = function(error, output) {\n    output.headers['Access-Control-Allow-Origin'] = '*';\n    callback(error, output);\n  };\n  const handler = server.graphqlLambda({ schema: myGraphQLSchema });\n\n  return handler(event, context, callbackFilter);\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 CORS_ORIGIN = 'https://example.com';\n\nvar server = require('apollo-server-lambda'),\n  myGraphQLSchema = require('./schema');\n\nexports.graphqlHandler = function(event, context, callback) {\n  const requestOrigin = event.headers.origin,\n    callbackFilter = function(error, output) {\n      if (requestOrigin === CORS_ORIGIN) {\n        output.headers['Access-Control-Allow-Origin'] = CORS_ORIGIN;\n        output.headers['Access-Control-Allow-Credentials'] = 'true';\n      }\n      callback(error, output);\n    };\n  const handler = server.graphqlLambda({ schema: myGraphQLSchema });\n\n  return handler(event, context, callbackFilter);\n};\n```\n","engines":{"node":">=8"},"scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"5.7.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.9.4","dependencies":{"apollo-server-core":"^2.0.0-beta.7","apollo-server-module-graphiql":"^2.0.0-beta.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/aws-lambda":"8.10.3","apollo-server-integration-testsuite":"^2.0.0-beta.8"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_2.0.0-beta.8_1528851327181_0.7880088195883872","host":"s3://npm-registry-packages"}},"2.0.0-beta.9":{"name":"apollo-server-lambda","version":"2.0.0-beta.9","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@2.0.0-beta.9","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"370f259a61e7562ce5a9d0c56c3fe0e6e504abb6","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.0-beta.9.tgz","fileCount":11,"integrity":"sha512-XruZOOYqt8UzNp50gTYKzmvRzxdtC6yF9TIGFUD4WTQyo45ArcUu2ovSI5kD5nA7jVkUAXY351tow67v/4H6+A==","signatures":[{"sig":"MEQCIBdSpaafS/dZ+QlpHjkDw5OlfTU9G7/qak9OL31BhmDYAiA4h/Xx+7V0nYc850i6Q7GBl0PybJxtjMrrmEsakLvqOA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18321,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbIWbpCRA9TVsSAnZWagAAYF0QAIvskQFneqiZYx/Cm5+T\nAJU5FJXuUt+AuNsmib1iALMS6fzLrjH4ex26y6u2RLWIsHsr0G3cdiSAwGK6\nud0yIritJeL6wUvTseX14xUr1M0Edt5qQLOqNJlALtdFshaHWkB6AIw3mCqA\n42Mz3mljJC9mB8OzXbAgwlr+SSeEhK3F5mTK0nstCCXCpfZHLTnQzalQdxwD\nShy8TfV2t7dx0ISG8Nxsj50f3ekUuW8brpG0xxwLi1vIW4GkjzWaJKdRpzbj\naoTsyw/+YfDaY75zp+204dufXruuVw5AHiIQlrryUU7QVFR4Xxr343wb0/w1\nOeLso9c+D+ym8E/oabfDF4ZVpid3/zfz9qLs3UrfdztYAcWQTxwM36fbwvvg\n/WJOJwsZILtqAchjH0NDqVYZPGoSULDMqlBqdFoJi5ubee3fQ5hWfnZ+oa5T\nestYSu7eujKNlToRVkyg7B2+Cgn9aJ11A23SrzaRcBSZrXJSw01bTlRvqaRK\nPbmcibaywFNDC9794ZLce5lVVbjiFsjU/4HeURzu4LxlH8d/+S6HJPotrIcT\nlDutaciOr0Cg3cojAgUSJu3uxPezW1jj+evaR3qZ0d19Rnm9cqtHxero+Geg\n9EaXpglott6dSi06Wd+r6gqlrRj+1qnB5ozwk0FUyBCDq6nC+AkEMaRUJHvO\nbhG2\r\n=bEaG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-core.svg)](https://badge.fury.io/js/apollo-server-core) [![Build Status](https://circleci.com/gh/apollographql/apollo-cache-control-js.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-cache-control-js) [![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 AWS Lambda integration for the Apollo community GraphQL Server. [Read the docs.](https://www.apollographql.com/docs/apollo-server/) [Read the CHANGELOG.](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md)\n\n```sh\nnpm install apollo-server-lambda\n```\n\n<h2 id=\"deploying\" title=\"Deploying with SAM\">Deploying with AWS Serverless Application Model (SAM)</h2>\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\n```js\n// graphql.js\nvar server = require('apollo-server-lambda'),\n  myGraphQLSchema = require('./schema');\n\nexports.graphqlHandler = server.graphqlLambda({ schema: myGraphQLSchema });\nexports.graphiqlHandler = server.graphiqlLambda({\n  endpointURL: '/Prod/graphql',\n});\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```shell\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with two exports: `graphqlHandler` and `graphiqlHandler`. It creates two API endpoints:\n\n* `/graphql` (GET and POST)\n* `/graphiql` (GET)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.graphqlHandler\n      Runtime: nodejs6.10\n      Events:\n        GetRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: get\n        PostRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: post\n  GraphQLInspector:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.graphiqlHandler\n      Runtime: nodejs6.10\n      Events:\n        GetRequest:\n          Type: Api\n          Properties:\n            Path: /graphiql\n            Method: get\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n   --template-file template.yaml \\\n   --output-template-file serverless-output.yaml \\\n   --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n   --template-file serverless-output.yaml \\\n   --stack-name prod \\\n   --capabilities CAPABILITY_IAM\n```\n\n<h2 id=\"request-info\" title=\"Getting request info\">Getting request info</h2>\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaning, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nvar server = require('apollo-server-lambda'),\n  myGraphQLSchema = require('./schema');\n\nexports.graphqlHandler = server.graphqlLambda((event, context) => {\n  const headers = event.headers,\n    functionName = context.functionName;\n\n  return {\n    schema: myGraphQLSchema,\n    context: {\n      headers,\n      functionName,\n      event,\n      context,\n    },\n  };\n});\n```\n\n<h2 id=\"modifying-response\" title=\"Modifying the response\">Modifying the Lambda Response (Enable CORS)</h2>\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this pass in a callback filter to the generated handler of graphqlLambda.\n\n```js\nvar server = require('apollo-server-lambda'),\n  myGraphQLSchema = require('./schema');\n\nexports.graphqlHandler = function(event, context, callback) {\n  const callbackFilter = function(error, output) {\n    output.headers['Access-Control-Allow-Origin'] = '*';\n    callback(error, output);\n  };\n  const handler = server.graphqlLambda({ schema: myGraphQLSchema });\n\n  return handler(event, context, callbackFilter);\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 CORS_ORIGIN = 'https://example.com';\n\nvar server = require('apollo-server-lambda'),\n  myGraphQLSchema = require('./schema');\n\nexports.graphqlHandler = function(event, context, callback) {\n  const requestOrigin = event.headers.origin,\n    callbackFilter = function(error, output) {\n      if (requestOrigin === CORS_ORIGIN) {\n        output.headers['Access-Control-Allow-Origin'] = CORS_ORIGIN;\n        output.headers['Access-Control-Allow-Credentials'] = 'true';\n      }\n      callback(error, output);\n    };\n  const handler = server.graphqlLambda({ schema: myGraphQLSchema });\n\n  return handler(event, context, callbackFilter);\n};\n```\n","engines":{"node":">=8"},"scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"5.6.0","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"9.5.0","dependencies":{"apollo-server-core":"^2.0.0-beta.9","apollo-server-module-graphiql":"^2.0.0-beta.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/aws-lambda":"8.10.3","apollo-server-integration-testsuite":"^2.0.0-beta.9"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_2.0.0-beta.9_1528915688125_0.3104471198475325","host":"s3://npm-registry-packages"}},"2.0.0-rc.1":{"name":"apollo-server-lambda","version":"2.0.0-rc.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.0.0-rc.1","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"bf608a9c5be14689a7103deef2a84e68f13e0ef3","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.0-rc.1.tgz","fileCount":18,"integrity":"sha512-v6TBgc9Fv9HmOnkI5A4kJs5oP0GtDee+H2wLsqIdeWJ4y8TNG+0uRomxwkLOX8SjGPw8f/Z3icc1mvGfZjMXfw==","signatures":[{"sig":"MEUCIQDLyy6Txl6qV7OZkeJa/Fhpu9rxzA/jk/7n3g4jRrXP1AIgV41HdQLw6m5r9JbzHCnr9uMjdFCqs6aYNUBYlrJqqJo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbLCfMCRA9TVsSAnZWagAATG4P/iEUF/6FeHSart8c+a0N\nKziyzcSIjKsVl5rN+RYXVQL9fQbsMFWOOpr93JrwVEhrVw3r8aQS90qgaeDC\n1LK2jOugTiS+WjQorRupNzv8V1EbpdRi3fOLb673VM0Hw0oT7SoyLOm/H6/K\nMY5xafaRriPlw/d00KcvolYsViezADQRKQvKUO6mecJd5SL9mrLeq1+5AzCy\ntE7WCnVI50WtY532pybNMis+VQt2jI/1Ho74hUfUtWic9Hri6OU8pLZ7sXSC\nzLSY2YmSDZGccs65wNgaXcl2YOsvyXX9mA+5e1DJE3Hs/W7R5tL2Bng1ngH2\n5TqN400tJLp/ZT9OD50YlpjFlv3SWRAUOqPbVTatnbXqCJwwMC/XOpL4oLLi\nOool58w79IEK9lE0kaccSIVyLn2Xwhe0IXbU/+5/3sHpfrOjfNhQ+JgRfvcV\n5CSe0S+M9LQ8aXX/Cg3PGONMA9dHt0BxghSEiDI4JOJcrxoWDwJCaJggkAah\ngzrnDZRe6QBN4h2d2m6rGaoQaGN4Oxg3P2mXfgS+ZVSnU6YpcnFhp28WL0tL\nKi6tMDdIF8hJYP7xT8DjLw30Br76TYAPSaNzCNlVhNmcTlPQlbfMJlt+VmW5\nLmWvIcByN7IWcKr31Z7LqcKWlqFvfAJcTNkBQgUUv3awxtvd5czRf+++OfSA\n6V7R\r\n=kry9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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/). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-lambda@rc\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.graphqlHandler\n      Runtime: nodejs8.10\n      Events:\n        GetRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: get\n        PostRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: post\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaning, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  })\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use `cors` options.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\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"},"scripts":{"clean":"rm -rf dist","compile":"tsc","prepublish":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"_npmVersion":"5.7.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.9.4","dependencies":{"apollo-server-core":"^2.0.0-rc.1","graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/aws-lambda":"^8.10.6","apollo-server-integration-testsuite":"^2.0.0-rc.1"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_2.0.0-rc.1_1529620428201_0.5854133633135206","host":"s3://npm-registry-packages"}},"2.0.0-rc.2":{"name":"apollo-server-lambda","version":"2.0.0-rc.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.0.0-rc.2","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"994090a3348296e087b2d268a124769db46d01b6","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.0-rc.2.tgz","fileCount":18,"integrity":"sha512-Knjg9WsktC0bG/mvBxIr3ghc8GIl1kYBC5O0oYJy9iopUZ0VIcr8GcRCm04qByuBcsF5Ygt20N/Tvexzv3sZ+A==","signatures":[{"sig":"MEQCICPpK9jCA4je63hN7ZO2nHiaDGGvYClQVot7ECFsFCNpAiA0woZDPGEkbb3gC4zGADS78mX3KCrU1OJPPhXcCLlqzQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbLGTXCRA9TVsSAnZWagAAZJUP/A+D0Jf5YANboV/Uactk\nGGUTq2nmNej2pN11nnr/v+oe1f3674vNJN0Up9zuCF+L0X9sSO7IIlw8RnhA\n+0K37uTTsAo5I7xWhugIRuXYBf98M+uT1rCHlYDYryCWRjlaZGBmA1dT0TBi\nAVfh1wBYuoHqjJfZgP9HJKgoQfhACz7C7qJv2pE+P+uFTPkS43dd0TggCIMb\nnv875A8M0+YWCRj+Ls+bllPS2XCVO9MAkCCT/6rrMLg3kUHANwoea9AfkyDM\n9FHMEc11N4QZQLxuOg8Lo8t3ma6nZ+B7+N0MbE5CgSmgWsESY7WUAsOdq1J7\nRXmkFaho5NnbND2EGZtmck6UTYQ5126qQyzgqHR75sIwFyxL2N5mfwjyYtRy\nNWYUr4DPZlvNy3PoSP9Snw8l/REopx824547yS204ADWCwlR3Bat0senh3x+\ntgbTxRd7HiQWSkXhjmOzeMyw++2cCKGpe9DOhNzZX00efoiaZpCz/HrNVRb5\nNeAEF20WkhMb6ERdNOQePcnQQKbLyFxxW4h6VvU96Tma91Xqa+NVexvwvDJF\nCkUx803Gd/ggyqyOnfGkREJy91/KmfqrIJuusTxAi3qHBLxDeC1K+rspSiIS\niC9V0AvCWlA1itbJRm84Cy2xzVg5bFXzfxbl4gGyKxrS7zbTPU2h3ISX043b\nIL6d\r\n=RA8z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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/). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md).\n\n```sh\nnpm install apollo-server-lambda@rc\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.graphqlHandler\n      Runtime: nodejs8.10\n      Events:\n        GetRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: get\n        PostRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: post\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaning, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  })\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use `cors` options.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\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"},"scripts":{"clean":"rm -rf dist","compile":"tsc","prepublish":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"_npmVersion":"5.7.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.9.4","dependencies":{"apollo-server-core":"^2.0.0-rc.2","graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/aws-lambda":"^8.10.6","apollo-server-integration-testsuite":"^2.0.0-rc.2"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_2.0.0-rc.2_1529636055696_0.10379160521346353","host":"s3://npm-registry-packages"}},"2.0.0-rc.2.1":{"name":"apollo-server-lambda","version":"2.0.0-rc.2.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.0.0-rc.2.1","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"bd2c5ed2ca2f8f360519ea7b961e5e0f5d9acbb3","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.0-rc.2.1.tgz","fileCount":15,"integrity":"sha512-RCDTLc3xvhFab4Qvvc+qAR0pefrzcKaRLoszrL+xHemRt0N/kPhBaEhdpNfnfvduJ8aQA3nwLXRYcAGhL84XKA==","signatures":[{"sig":"MEUCIQD+59s1+UuzkMYybdAfLjpeHEJNV/bltEQVZLJVkyNUlAIgVb78XGK6KH8/SM+l8wLtMlxjQrrtWmB8VZ9vML8Xkkg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28383,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbLaDECRA9TVsSAnZWagAAabwP/jEU0kLiE+Pn5TV51mBr\nf+QhV9V11Id/rdBrI86YxbDFVhbbvgEMe5fUGKcBb3wk9eNqwQjCeo/6gVu2\nL3EjhuQRWzN0hcdHmvVfUlcgfs3VeWzxxv26xK91bPlt+Kp/C0kRYnrkQe21\n9FyNTlis8A3Dz123MTkMBmlk5pzfqKmDYzYiu52ZmaeWstffOjkChKZXMmar\nN1yt95hUjcIed9apg8d289ZXV5dnbNkbWJaEDV33ngWKUgfX9+nLnVwZDrm8\nZav6MmLNc1WlSY1WlPa6+dChilWMWq6yK1uTi3l/1msfbMbaH/LrJnZhQQs6\njSzH85TsD1vrUYPW0tgIjDw3GnVcu+eQ08xBow1D4u838j/sejXHcJEyd3GK\nRnbQVXkWfSzgM5+KgPGlEKk1V8uP1Lla5gmPybgQEG5xkrEbHINkygFFX0GE\ncpfZNPtHRWgypNcJR0cMuu1ht80Ag96Uz5z6+knfPCoBAJFMIz78tV8bm8+R\nZPeVfqurqYZDqfeJhCBxviZJ5xafx/GQFqUz6j+tXKmyjU8dz6V54273Wiof\nbnm6dFdOyHniigcAXCvWQbdurshfFmewQjTphiatkxEzEwDD7m7pSjF3qrGT\ncTQnihoCgpl9wNIL2nc3yoLej/tOxelilTUe6pJ6mWadJCM3FwOY6nXIrZ1I\nJ6GQ\r\n=oHWg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.graphqlHandler\n      Runtime: nodejs8.10\n      Events:\n        GetRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: get\n        PostRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: post\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaning, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  })\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use `cors` options.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\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"},"scripts":{"clean":"rm -rf dist","compile":"tsc","prepublish":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"_npmVersion":"5.7.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.9.4","dependencies":{"apollo-server-core":"^2.0.0-rc.2","graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/aws-lambda":"^8.10.6","apollo-server-integration-testsuite":"^2.0.0-rc.2"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_2.0.0-rc.2.1_1529716932085_0.5178816507298758","host":"s3://npm-registry-packages"}},"2.0.0-rc.3":{"name":"apollo-server-lambda","version":"2.0.0-rc.3","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.0.0-rc.3","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"9cb916444aaeb327264d34693da34c712ab057a5","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.0-rc.3.tgz","fileCount":18,"integrity":"sha512-xgv8TnODSi+5JdsF4pILRwgIrd+WnbrcvusBUDa430PqEx2pfEF+41tOkLJuYVqLO0czRyBYVktko5eWHDjw5g==","signatures":[{"sig":"MEUCICTZrunG4RU3mpm1xjYwfkP7OtNx7vJBL1nLO0QV/m/WAiEAvzPngY73xf17ektpIG7RYGSm2znib12vXaxz50zdyZo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbL3L+CRA9TVsSAnZWagAAvtYQAJeMw6JwKhJ7sf/b/xha\n3xSR5LYKdZvSmCuLkKdshYY73AFTvriKaM+qp0Lf9r4upZ7KD9mR5vwBQrMR\nyf7OxxLORT9aXVcDUJqGf4/UVs5NgQQa7WYhj8zRVibDa71oUIhj+xw6+vtt\ns3vDvkNbmbO10wyl0OCJTUz2R5hxWBO5iklbz84CQVhLxwT/j3y1WGU+gZY+\nf0/2Cr6eZPD9mWIlPjOVN8vJq2rLT3/P1m3jUzzFVJtZ/w0nT0puvvRuAjCV\n022StA55fHrCt7DH7IX/oiSUON3W5Oxe65nn/LSWPLG4IHrh6DiRV0Rv144Q\nV4eCqK+bVpSxypBM65ira5aAe0uXdsaXdaGsj88KuwrWwSrPOgVhboNJja26\nXyjIgcOYktai8ERw7QX0bHfsA8pCAYYmU0JBi+9GVnCAhAxkOJPx5I3QUh0m\nVrl9FZoQec4Ckt3tmthoshWTGe1mNaqC8A1G58QBX26mjTIUVVAnVy0FDSou\nRaGMNmmx8hwlxNs7o5zrPl9VMP4iGSp0u6z8V14+59rKGJURC4te1BzUq1Fw\nMb4oveXCdy1up514gInEoRI00qo4H6ejK+V9mPXAFj4V9k/ypbElQJLGHwb7\nk10S2ANCXbsU9br6CAMvbsIEvxPOk38vrpTWXc+fQKQ2fezD0lBgLdXm3raK\nD0dX\r\n=PAYW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.graphqlHandler\n      Runtime: nodejs8.10\n      Events:\n        GetRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: get\n        PostRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: post\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaning, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  })\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use `cors` options.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\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"},"scripts":{"clean":"rm -rf dist","compile":"tsc","prepublish":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"_npmVersion":"6.1.0","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.11.2","dependencies":{"apollo-server-core":"^2.0.0-rc.3","graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/aws-lambda":"^8.10.6","apollo-server-integration-testsuite":"^2.0.0-rc.3"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_2.0.0-rc.3_1529836286047_0.1145635489966863","host":"s3://npm-registry-packages"}},"2.0.0-rc.4":{"name":"apollo-server-lambda","version":"2.0.0-rc.4","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.0.0-rc.4","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"1530f786c9bb94064b1b6b7c402f960cd1b1545b","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.0-rc.4.tgz","fileCount":18,"integrity":"sha512-YPK6ZpOrucn6S3rZJz/WLotwBT3cduSWACDCRcU/OnDQhVoDnLoqrCzJOGxgIBpyzf5nthQjXUoNuy5Jlo1wFg==","signatures":[{"sig":"MEUCIDv5U8tSEutqrTjhhG2rv2iL1GFDg1AMNfmWD+ciExLuAiEAwOuLj9fkp1bLgWKKMgCfdnG1XoJHpVdjygaPFlsqj/U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbMVd9CRA9TVsSAnZWagAA7CEQAJqjn4NeSBNzIPIJVprx\n+DOn9s2U98oqBMV9/Fbn6gldc+xQ+E1mtLlPA5Q7LOHdBTwEVpYMSkZM5ihF\nJHpkWxkv69zn3EfzzyiD9OVsnN8WvCKJcX2ZkJo3IgO171NvJKYXZggt8TCi\nBOUpW+l0CkqYZwZEXxtcsPAvhzBFCI0MIbRQTVCne7LliXCiU+7PibhSlMVA\nCwAsC115+Jrxmjsc7zZuzxJ8A71MvS9bffMmFdJdXV+NCfXBDtd9GK6FEmkn\nj3cEUMfiGMiCBGBaDy/o8CYgySNythdKBzUovZoGRma/cFtjP8Rrk2/Uz+YB\n+wknc3IaUZPcLi4g8hJ5VgzTN/a0lWwfibL7bFlPJbl3RLpNbqGgPs6I8hkF\nTuwD3KJ9f/IkQUgsGXLF5M9GKqGFTM6iN99BvnfAIiaq9Nr20VDp0uvUiV8L\ner0nfxzjcMZomF8At2y0XpyG6cUZWJb3TKqTdC/8RP+ZtnzrkVIQ5RvCUvNo\n1cUMfZwmAlm2H6nfxNcrTUE3YbQNEZp8Wl4su6eM4VpHWkcDsFMu+laUmPXl\nrMDclrod93ICMCc6ZXhZm3vC2vlVfNvvdENmzuwkp/FSbaCckKKzPaCKrq8/\n2q8IlevyGyMORHg28mdpvJULBah369aXm1iZIeLZ9cGEGFSq7jTKotBEB89U\nGeAH\r\n=fOPk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"scripts":{"clean":"rm -rf dist","compile":"tsc","prepublish":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"_npmVersion":"6.1.0","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.4.1","dependencies":{"apollo-server-core":"^2.0.0-rc.4","graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/aws-lambda":"^8.10.6","apollo-server-integration-testsuite":"^2.0.0-rc.4"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_2.0.0-rc.4_1529960317027_0.38999104991881595","host":"s3://npm-registry-packages"}},"2.0.0-rc.5":{"name":"apollo-server-lambda","version":"2.0.0-rc.5","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.0.0-rc.5","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"af63a1b1a4b4b2454653b2742b92644222ef6e06","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.0-rc.5.tgz","fileCount":15,"integrity":"sha512-ZT9+554gue5focwyA/rICIyzyQLz70callHs5byqkhxReir5VVDpu7aMoZm9hIIBdhGcAK1a7I3vZAWCEXPPJg==","signatures":[{"sig":"MEQCIAR9y0Z8+mp5IloMQ+DqQdr/pjmXOEEIj37nW4VDiFgxAiBb3LEdWod7G+Xa0G7SM7vDMPy8zXH44UdSMNIRqDc/7A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28389,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbMYN2CRA9TVsSAnZWagAAzrwP/24rFfVC0D6jOjPQI3+8\n3cdtSd+beRROTRVUTQUaRP0+ZsbmNNh6AkxFDUtdbAzU5qlDQGxiwXrFrYts\nKr3gZrg2cXJTNlMupekibfgYn0i5Ur9Og4c9ENyAe5Xh3U7KGpCJofNis/Y8\ndli0eCxR8iPtNMx13y/q8lSHIKDVnDdhsqutT0YRoqxXhx/5tZnV19001l6M\nOpVWlqIGm6/jrf+8jPcL4yJWJYHSUPdqtOdSdsxp829xOn8wrOK6m1rhywyd\njPVVCJonMwna6hleYqi9ay57uQNIi4qVAqW30LoO5u2UHUa4ShtbDYIWOVzj\nTWR35WOQZWzxSdx1phebHXir8DIwCkkoym/J8mKNqs4938IvL5BtDWY0hEsg\nk8ITwzum6QqSF2pmY2dMLYKWOuhFbu+pzw6JZUIYbRTGu9HTdsepy9kkNabc\nDvujp8IkAk7XdmKtqIvBrSsZbuqgLpVfaipvHTwcmw4nRTo6DPGOqmakCU2A\nAlzROwmB/5/pyoQ7ZyYJhoJIYgBUYN0BX5OKDt48Eg8g7uYF08/tp5ik4n+q\nQeFbbnf/nNQdkASBR5skOrgefPZOAiOQnUnR2ptUknj5gLTrKNDh9fHKMMVE\nquLuFLlmfsLeAPxqawfUDgLqdx20uGqhCNbl/r2cqVfO7/vOtyyDiEP4pz2C\ngSui\r\n=7Ene\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.graphqlHandler\n      Runtime: nodejs8.10\n      Events:\n        GetRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: get\n        PostRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: post\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaning, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  })\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use `cors` options.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\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"},"scripts":{"clean":"rm -rf dist","compile":"tsc","prepublish":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"_npmVersion":"5.7.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.9.4","dependencies":{"apollo-server-core":"^2.0.0-rc.5","graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/aws-lambda":"^8.10.6","apollo-server-integration-testsuite":"^2.0.0-rc.5"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_2.0.0-rc.5_1529971574112_0.7675025042093115","host":"s3://npm-registry-packages"}},"2.0.0-rc.6":{"name":"apollo-server-lambda","version":"2.0.0-rc.6","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.0.0-rc.6","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"c6de9fe5027b6279008423740b3dfa5f1beacb74","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.0-rc.6.tgz","fileCount":19,"integrity":"sha512-cxScTre7zNQrwFB64l2uOIbQxrFgu/ZED10TcRbvGw4m9XJRwAS+ghALGECvH/7NmheC0xoKgxHMHAfuG0mdwQ==","signatures":[{"sig":"MEUCIQCMln5p2PP25fw2FznkBg7Pga8KwG24aFT+7guI1NRpqQIgewsfyxgmCGo204JMnDN1ylM6GZDzgJzPxA3Kw8CwZYs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbNnpWCRA9TVsSAnZWagAA9NkP/391GKEwF7JOphlY+K1s\nJ/CD+BWbfou4QQTD3PmxYHOjYHac6HPc3yx5WqV4HJYRD6VHfutB+/Xud5X6\n4I4hmhA3+3pXkL0Y9oVqHhg9NMS4rxNIKLzEFEBPpTDKY9AYielx663rgUC8\nJKP7NIgzKzKoew8yW3t3rp1NXS6kSmZ7NImnVNZ7KLqEgF+iTGvA6U3dY1Zd\nAcOpY2h4cF7d9IZLCkTIubb7RzNLcibKzrH6vr7Xs0YsZxpytWnj1qlUoM0S\nMe2oQ2LxHFl0kgapyg1Q+3aZmUz0EuC3z28Aqkd/eNakrCTxGcTR6nyjwhLp\ndbGpgmKrQApyAT5oILJ7bfFxZVOm57D2dpQBBlmyz79dab+MlqiJtUHj56jh\nJNOvf7y1FlPa8iGEEXM7Op0sfk4uAFtDE3KXmAEDqE3e+7QDj8jaMMn4Nvtm\n+J7+VO66v67u9pJPFr5P3wdKttd+rEjNkrVHaDl7OvIZAKKSfNWA8wFZwAEH\ni592kHbaA5VBKLh9ClQMPf5qa7RoDXKQZ55bIw0Rb2K5ugzVV2cslws6iSmg\nIxS1NTqGpbiqNCq9kcJ81xVYT+6E0D2b3KeFNtAXJ/eSaTryJcrFBwySMvyE\nNBktl85z6b0tGyI79NdikhvN6EfQxZPK4shm/luScv8gzrzxjIHtTbKhJosO\nan1E\r\n=4kua\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.graphqlHandler\n      Runtime: nodejs8.10\n      Events:\n        GetRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: get\n        PostRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: post\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaning, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  })\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use `cors` options.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\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"},"scripts":{"clean":"rm -rf dist","compile":"tsc","prepublish":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"_npmVersion":"5.7.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.9.4","dependencies":{"graphql-tools":"^3.0.4","apollo-server-core":"^2.0.0-rc.6","@apollographql/graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/aws-lambda":"^8.10.6","apollo-server-integration-testsuite":"^2.0.0-rc.6"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_2.0.0-rc.6_1530296918198_0.98010196778474","host":"s3://npm-registry-packages"}},"2.0.0-sashko.0":{"name":"apollo-server-lambda","version":"2.0.0-sashko.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.0.0-sashko.0","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"affcc8fda7cf1cf65c97f81fbe3038c22ec27584","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.0-sashko.0.tgz","fileCount":15,"integrity":"sha512-Ua4POe+BIUYX9c7s/ydb/DFLdSUXfwmvyb5KoJ9wNSZ1k3cESWVLaCyYYQosV786rOHTtlt74a/WZFPNIwH3Ew==","signatures":[{"sig":"MEUCICwEGmW75VQgLP3P6B1wm5E5KbpK5u2atNk6U5tWB+rDAiEAkambuxWdGaMYTUZVdDquEzrPCI8nHi4RpIYVGSXUbE4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbOsvDCRA9TVsSAnZWagAALPsP/1VFA/48GGTBDZOEV/QA\nbvh8GcObQbHk3aB/7skwFs8T7tnWqcnxsiFXvVIdoHUOq4N2oDmb3LAAPcP5\nRy3IgLfY3h+Ig9avtDkC1MZBg4ZnqKwj5mr3V4V/KhUanx5jpB6514iB4GKD\nHKWjAL3kEBBZz+zSevF2MjyExiGF4mxu9LctGTreVuma9ORgDCKetnGrGTol\n/DENez/8bSE8ft+g/xWs23hOrsPEI4nvcrB63bDf28apHJfYxfXJvKwG551y\n0TrE/MuqYVLGg10mCMOKvvzfeFlHtHkUz4cNdwR5ZYdywOdjlVkJFu/OXvqv\nXe8VpCnfVBs7frZUOEKO1suPyvQGSjwldFAKi0oHVf/suZ3yrWFtdvv+R7Eq\nC9QsfnyAMIAyEBRLPYGlojMfsgUTGplJi8FLpHePHVdI8ALvi+bxUILsLaiy\nLg6pBqLrSbq9cjipLAqo8/de293hw7oDepM/SY8q3QIZjpAletU1IuWdX4h6\n2d0lnLnVUd3fXgHfwtMJoXPhdLmmcl+pdux+XnRxC64sUMOhZNVV6l1o+CHc\npYMkuDrtlZ9b/YUz5IoMRg79KZJVHyb3cjDWlwkerp5K7UcXBl03WPI51EAR\n1ouE1u0BFxvmIJ68w8Zhg0xPvHouywzZ478mx+vJmQ/6plkp23SevBIId1mj\nVI/p\r\n=0MT9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.graphqlHandler\n      Runtime: nodejs8.10\n      Events:\n        GetRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: get\n        PostRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: post\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaning, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  })\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda Response (Enable CORS)\n\nTo enable CORS the response HTTP headers need to be modified. To accomplish this use `cors` options.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\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"},"scripts":{"clean":"rm -rf dist","compile":"tsc","prepublish":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"_npmVersion":"5.7.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.9.4","dependencies":{"graphql-tools":"^3.0.4","apollo-server-core":"^2.0.0-rc.6","@apollographql/graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/aws-lambda":"^8.10.6","apollo-server-integration-testsuite":"^2.0.0-rc.6"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_2.0.0-sashko.0_1530579907358_0.5681255856273277","host":"s3://npm-registry-packages"}},"2.0.0-rc.7":{"name":"apollo-server-lambda","version":"2.0.0-rc.7","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.0.0-rc.7","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"d4017146a9f0a9e9cf2d6d8ce079d836ac454ef9","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.0-rc.7.tgz","fileCount":18,"integrity":"sha512-XGrXg6R3TwHMsTkyZ5vnUmu6Os4URNf6vPfoizHzNiVW4zcVsfWX3AKaYrZDjU/T0wrtuzizyBvaZx2beiU4rw==","signatures":[{"sig":"MEQCIBQ+hQgH687XQCp4FkINwuYeLpsO3nh9YluoKPc/LYo1AiBitlUz88nB9h+pLyGybk7qxqXOhCv7j9Y+GoikWDx0Hw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbRBsfCRA9TVsSAnZWagAA01MP/2Z6cQRWPCPawY2ZFCN3\ngAfYirMfIUmqw27C44gb2qquPordhwcg6Tzf/RegRdL9sk3Gc0XBFbEXusgQ\nmJut5YKY2PYc2dR3ZsITy5zmynMRhT3mMPnUiDx5GQUtyubxsqFTkeiKiQiG\nWnLUnBWSUQXMBgViHQid0lAnYz5hDtp6Cwq8jgT5hy2p2vLb2gQ12Xe8avhw\nNJfQpa5gUqi5lAr3NitSzjmuoxipiRtpjnr9hUhZmkbL6QCCRBd5jbY8v2FT\nVYZD8Jppn3GkUXD7UQwdzhGGD0Ik8rIoGZSPKKXwaLpqPK9GAsYESbhKNjTv\naNGaijgoONs5imjStzOlmOuluRYHJJZAsA72TwNty98lnW7NutvbJ/tfq236\nAeNwEKNDmTJcE8R3mBFNxY2UtnS4+xuIWJ6bK/KTHRezar/BNGYrdYv3dima\n1Qciy5aoRj/pDEB+5YhKmtRKp4Ly2S85A0lEd2KKcjP9TlrD4PZQSGLbOXN0\npmUIDDpRfCKnZJKSfnGn1Cx9YPITYr19IhcFB8JEwQ4xhXTAjsa+AQUwJUlV\nRxyXkfiF2JTC6llqllmkoflcYk/n37SXgPf3ldIi2NMRC9sR4K/ixuAPsYw/\ngcaOqA7zIQqtAwcWeN3i1r4sLowFC2jwe5s63hko7hXl7s/TBXyGysKpm0JO\nIkVo\r\n=TJ+p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.graphqlHandler\n      Runtime: nodejs8.10\n      Events:\n        GetRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: get\n        PostRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: post\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaning, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  })\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions for your schema fields\nconst resolvers = {\n  Query: {\n    hello: () => 'Hello world!',\n  },\n};\n\nconst server = new ApolloServer({ typeDefs, resolvers });\n\nexports.graphqlHandler = server.createHandler({\n  cors: {\n    origin: true,\n    credentials: true,\n  },\n});\n```\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"},"scripts":{"clean":"rm -rf dist","compile":"tsc","prepublish":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"_npmVersion":"5.7.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.9.4","dependencies":{"graphql-tools":"^3.0.4","apollo-server-env":"^2.0.0-rc.7","apollo-server-core":"^2.0.0-rc.7","@apollographql/graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/aws-lambda":"^8.10.6","apollo-server-integration-testsuite":"^2.0.0-rc.7"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_2.0.0-rc.7_1531190047605_0.7442780620221567","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"apollo-server-lambda","version":"1.4.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","_id":"apollo-server-lambda@1.4.0","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"03d8c5db341eeef2b8a2de827c8fe1b1837b6cb5","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-1.4.0.tgz","fileCount":17,"integrity":"sha512-SjvASI82t+riclOb/DJV/GKGRzHn4VBa2xvE9q4KscQ7+87MwFFIK541OoKtbhCKB9Mi/s+e46dXJ0xp43s2zA==","signatures":[{"sig":"MEUCIC972F/SOElmYmwf+xFK6GfNW/h+M0izZtz+KMw2Y+xaAiEAy0+ukb4Z7N95l5s4j9jkupkI98k6RTYYdMBsSFStvKw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31098,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbSPWHCRA9TVsSAnZWagAA9EQP/A4v5JYygsVt04RKk+ce\nHD6+Y6PLobatKuVghx87mIsSKJQ24N5OT9GTk27CfYSDGS9P7vuSlHsiMHh9\n+zyaJQA/bVyH08z8PfNvT72YxmrgVD2BF+em7zDBRZkg4a3JDswIUGk0bRxo\nd2+LDwpMTLRWMLtw+lSrt/DWKFMNiSNeuTsAJqlAW65zJWZdI2tQ20TEfhRf\npUv9NXZm2zJLM4Xs+Gxgt3uezZnbE3njo9Al3bTdg7barKWQSIxUfdkuzkBk\nqqmUx+H9btE6xdUhN0kwV76xHRL8p2QnmUj/AReZEdxpwc3GK0KIY5SusWlT\n4DSFtFBc96ZKS/eBoqzDLqMMxe0DEB/9QQ18ooKEcc/jDzxn1i8rqR2m4mm9\nFp8+q92ZKP9vqZ/dmVPW1eyarJK97813raoTR4dY8E1kG47RfQnFh8CBHczj\nFc3YhOLk4c1m/1adHS7UrvJuzOI1JiJ80004v3E+kmmu3UaOKblOsOVcwQkq\nSf2l0cn3uw+3tegep1Mv4D13X6KWQ1UiH5fNJUnMkHmdjy7xoPp9+tE7TOpI\nw5TH0kXWOKVrvaGc7Rky/c5CnNRxNZTiClOHICSRVgvX7Gc6XrFd+1U3DYo2\nX4ZqBI8Vz1gNft8Zq/3LkLDpd21Sd5hsbuApSJb2MhvmxLctzWTqgbopOBTB\npWQL\r\n=g+IH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","scripts":{"compile":"tsc","prepublish":"npm run compile"},"typings":"dist/index.d.ts","_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"typescript":{"definition":"dist/index.d.ts"},"_npmVersion":"5.7.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.9.4","dependencies":{"apollo-server-core":"^1.4.0","apollo-server-module-graphiql":"^1.4.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/graphql":"0.12.7","@types/aws-lambda":"8.10.7","apollo-server-integration-testsuite":"^1.4.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_1.4.0_1531508103729_0.1632721806650046","host":"s3://npm-registry-packages"}},"2.0.0-xrc.8":{"name":"apollo-server-lambda","version":"2.0.0-xrc.8","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.0.0-xrc.8","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"47e063ca8b88665e65db10539750ce3a68378357","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.0-xrc.8.tgz","fileCount":18,"integrity":"sha512-PfvrP+mEWvVYwbQ3Tuhyk7lxHkHgNqJWl5z/kE976xRQfxQUxb3qFOP4ihkbWJsgahQ/J7Mw6eGprBcBhIufIA==","signatures":[{"sig":"MEYCIQCorbamKEAgyrcFNfiMstSqdy4lLx9Mri0GeZcsZGSe5QIhANx2TXYJir58Z7WhEf2MmIMtGC7OIJjNZ8Uh1rAmfglN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31356,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbSUjkCRA9TVsSAnZWagAA53oP/2RnUSQpYgakAE9bDa+7\nx/uDTZVCD6xyrWKVFMmQ3iSfu/7a2jEs/jF796UCN0JWG2Az9Bww4C1XEedN\nXaNljYn+KTGCHs7L7dSclKfeYBEJQ3/LPpLPptrfv63FeJYs6e3j5rv+1ag6\n/BjPN+VYilQ+dVhUAX5nXoZ7Cd6ibxnknlh2CCgkJOM8i8tfRXf0Spn5nZta\nFHyKQiDCZ3ZDj9r5Y4zt4nV37JbG+Tv17Frjyqn90B6TLWJ31rEwFasxwFXW\n3q8dhBGs6sQWb4ZC0kgPuCoSlMVQkehbE0QM+RFOf6AGOduqX0AD35ADPl/J\niq1WaBONNeTu4gx0sYSG5CHGghgADJqjcGaRCOhq2xT97/pTwmZKF8quPpQ7\nxFN91qx26c9Tuehm2jblurgfQY2yBrd19ghXHge3tMFb5oAUkNTt1fFcHQ7j\n4jaidPwjZoTvwFlndCdlgeVIfMY5eXcSa21gjp8n57TJeXwWBqWX437Z3VfV\nMMeR2Hg2mL0rMZKkR6saegXNv+K6KO7H21i+R05Rx0yOyUd6xj6KvBBtmW3q\niBe33ISVvmrI7goIsDmlcwIFVAHnlKfEgTM/EPsM3ik44+vctGWJQVHkNjOJ\nKaC0aeTvxSobDmz/IQNTvr2PpvWTv43BHUiiRMk5YsAMQLSVCIgTKbCipxJ2\n/PM/\r\n=A5zC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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    allowedHeaders: ['X-Apollo-Tracing', 'Content-Type', 'Authorization'],\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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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## 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"},"scripts":{"clean":"rm -rf dist","compile":"tsc","prepublish":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"_npmVersion":"5.7.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.9.4","dependencies":{"graphql-tools":"^3.0.4","apollo-server-env":"^2.0.0-rc.8","apollo-server-core":"^2.0.0-rc.8","@apollographql/graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/aws-lambda":"^8.10.6","apollo-server-integration-testsuite":"^2.0.0-rc.8"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_2.0.0-xrc.8_1531529444580_0.5539473635294829","host":"s3://npm-registry-packages"}},"2.0.0-xrc.9":{"name":"apollo-server-lambda","version":"2.0.0-xrc.9","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.0.0-xrc.9","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"8482d7344db928a5da52152a4b3a3ca2494f00bb","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.0-xrc.9.tgz","fileCount":18,"integrity":"sha512-PknBhE7sxa6F/4NE6CtfQnifURev1OXU+0w3Ke6sbaEm6UXKpZOsLbQ+YljgDX/JRnJjfFFYDiEIzcq40g/F4A==","signatures":[{"sig":"MEUCIQChmnVK6sI1D07u2XDZakLQndbGghwRq4uFEdF0QInOJwIgQsvTc9i3EOhFWj8Q1tri42dW1fPr8/D+1Tnt/r3JdrY=","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\nwsFcBAEBCAAQBQJbTivNCRA9TVsSAnZWagAAjBcP/1avxQpUbHDRllsmTraR\nZT17acrzARZitfB3ymQo3IX3jIdMpS4Oo2BtL1icrXDPh5sOotZGfViyGbgj\nPWZN9vPyXOzfu7dA/4aStY3aLt7vgypYAU2ssBn/qiy2wvu5qlWZwX0D3Cn2\n5sXsNnNCCMmMdFk6HbOSzYJponRdbhO+5B2vFgW+DTie4Mp1yP51phk/6jte\nKtw4b4idDA4Ksw5TRpsxw2p6WzJyLJW/Zj/hzXybtWZQnUvdvdgL/6Hcemka\nHaxwd5qSCAqvSnPLSWj3aXspKjZ6mkH/QxenaJD1Bqp3KzaIDFJ/4oZblGHB\nMKGDwH6SVaGhwTo8qD8qQz585A90puGKQIxFnvUI1eyqaoETtr2YcHUKmhGi\n8GjlfGGIVEQxJfn0tXxV5s0K7y3VfKovagPhaEqEObtGaEKOZ5+rg/dMJea/\nlN/fMdcpKLN9WkO7Y7mVM9x3q3cPMUWhGOm3Rl9VwZIQGpEx8E/3HTOZ571K\nBFFjknRxFzmcyvhtTIKTrolaL4wzf24KQOCpBNFRL0eYqC6trhkQI/i9UD+i\nAGBPLjav1TmkqdRyvw9o6YLMWa+QXx2y2GN/hatq1QusHkOyloTAQaUE1u6v\nvUszTSvzRv1sOIFA9BqMycKb1bTVmdqS+5yl6Tw3TMDp0R6tc5N107LNla/l\n4Rv3\r\n=kNMr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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    allowedHeaders: ['X-Apollo-Tracing', 'Content-Type', 'Authorization'],\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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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## 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"},"scripts":{"clean":"rm -rf dist","compile":"tsc","prepublish":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"_npmVersion":"5.7.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.9.4","dependencies":{"graphql-tools":"^3.0.4","apollo-server-env":"^2.0.0-rc.9","apollo-server-core":"^2.0.0-rc.9","@apollographql/graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/aws-lambda":"8.10.7","apollo-server-integration-testsuite":"^2.0.0-rc.9"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_2.0.0-xrc.9_1531849666882_0.6403404521318006","host":"s3://npm-registry-packages"}},"2.0.0-xrc.10":{"name":"apollo-server-lambda","version":"2.0.0-xrc.10","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.0.0-xrc.10","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"08da389d6e0294da286b61b8b717d4f45cd426a6","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.0-xrc.10.tgz","fileCount":18,"integrity":"sha512-IvE0SMJbSXmLizE7le48VVSiyVpwGPgqRcGLrzhRczGiRHxQc9X61X4pAV0PXc+1moGlKN+lM5nMGAhcYb3ctg==","signatures":[{"sig":"MEUCIGEykiZa8gOyCTDO1S0R41Bdr3no8tNEvzCDgukK4NlxAiEAl/b4+6lSDEnJQUp2cMrAVm/S87gzocoPtHpWM2LH7ys=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31481,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbTi4HCRA9TVsSAnZWagAAHB4P/3Qu/W2MY7EGSgBJlbgX\n0HgIOPb2vQknVwVDQfq1yoJfVruEc+GV84LsGXegUmvVktvP1y+PeDgquA5E\nmhyWmNDi/tm0DtVPFZcsXtp4TW2jk9iwbuprC+TgTpa9WoJK5EPMVCkAmquJ\njpkE5+CRMdr/1FrHjSQ2AGAIHGqHF7yfnRN3K4b0hvlc1pyckUM9Gxo24fWv\niFypFq37dM9gHIhEMbKAM/UkREZ2ZtSeULf327cAqKrSktceAfFFf+EVa6DM\n/hhHxsVcj1FdrgSTP/CrI6U2flBDn1j1Ktd5SncK+vOqVSHzt6FpSbzFHZvg\n2SdiSSgQeRhCb2Odb6HihsdIC4r8sqEdX2wPZBWfs4dDJ27Dhhxlwf4rm6HH\nceJU7spFwBMsfZsaEeh2LArbsHgMRkXMFUZDJwpCMoVOHwqV2jV8BMQEAB2w\n4IacWfdXrzhbmR+td6pow/F1sjtCF9Aat8x6qNpnBNXrzC2UnkBHA3nbwyTI\nPXYX2c7Lu/XXv4Pbz4iQZRyUbo+PZD4PzYd0wn/r6ywnzRYXNpitWApQ7Z+B\nk39icgOwn5URGjA2S5zzmW/SaMsQljlauMqzIWDTpRpSrBgZFAG9p/vsofJz\nLpROGVwQufcU1Zs652xp7K82cllLwII2L5bka0YRtciHkCdExt34dcPsk7FD\n3uxB\r\n=IuF+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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    allowedHeaders: ['X-Apollo-Tracing', 'Content-Type', 'Authorization'],\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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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## 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"},"scripts":{"clean":"rm -rf dist","compile":"tsc","prepublish":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"_npmVersion":"5.7.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.9.4","dependencies":{"graphql-tools":"^3.0.4","apollo-server-env":"2.0.0-rc.10","apollo-server-core":"2.0.0-rc.10","@apollographql/graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/aws-lambda":"8.10.7","apollo-server-integration-testsuite":"2.0.0-rc.10"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_2.0.0-xrc.10_1531850247394_0.5034112013461514","host":"s3://npm-registry-packages"}},"2.0.0-xrc.11":{"name":"apollo-server-lambda","version":"2.0.0-xrc.11","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.0.0-xrc.11","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"7783741a3941eb5adf3ce606fc9eeeb6aa1d10de","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.0-xrc.11.tgz","fileCount":18,"integrity":"sha512-mfjJQemRkZGJcdmrvxWO8EE9rf52SpwEhQiLneyRMpOZEVOzU9zDj5RbfYgUXTJC2kkCA25oyYXVJ9vwHGlhJA==","signatures":[{"sig":"MEYCIQCoKoNWJX8SjrRJQZVZGfgr24cf3+FMDFk+Rhi8Eid6PgIhAKqKCTL94PqU65jTRbuthlw5L22k1RfjGqmvz9XUS4kz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbTnwyCRA9TVsSAnZWagAAUaAP/jaKfEk6ipLlLUhtGGwn\nxUixN6avDl/DNnFHJAaon44zXl1YTqdDrkWdGuSHlZXp6xkqJPafPBkqvN3a\noz7QcO++Lo5XPLkBNFtIEnFDh/Priqqgru/ZzEvB8iABCyX/hKatfRkrwa9a\nUOvf6c0Bl8tglGfBoL7c47qR56ctZH6IyrcRh0wbg2+aV3PDd8hUJHo/GBuA\nvFIjQqjdCmpLFn1sMwnOA9JzdZJw5BqLM/ESBrdsnRYiNE8b4UmTHPx6rt+C\nHm1WR+zZzkL3NZYRMtrW3sVybDYRibS3/2BDkiIqKbtEVlfOqiqfKeDI+V2S\nNnI2v/YkQ50R3w9dlyn18RM/pFiHdtldsAoZDs3jVWkg46kzCvoDjuAOCroI\n/c3sQqe+KvQH6J3lZrtsf1rFpeGTui9FiRfdlZEOPSIUp6Zr2xZc7SQfyazf\nCuF2T3K9556m5HFyWbg1UTJhJkS3Q9usDRx33AmMMbQk7YcMvFspi3lTaYaP\nU0foNy/tK+wwKI/Ygr9wASCi5psRODDO82OrGEnOfvur7t7ax5YgbPmigKRY\nH/DXQB0lzfsR3JF7tjCQhEAyyk+WUuZeP8imGOQbOueka+bjlGvaadToqor0\nI2CVwaSv0Lno2XCT5AS78naWq3lNUkzmTuFcu9nl1wFBRLja4tJG9YLZ8gBJ\nic2P\r\n=1PHD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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"},"scripts":{"clean":"rm -rf dist","compile":"tsc","prepublish":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"_npmVersion":"6.2.0","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.11.2","dependencies":{"graphql-tools":"^3.0.4","apollo-server-env":"2.0.0-rc.11","apollo-server-core":"2.0.0-rc.11","@apollographql/graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/aws-lambda":"8.10.7","apollo-server-integration-testsuite":"2.0.0-rc.11"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_2.0.0-xrc.11_1531870257729_0.17700533207364444","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"apollo-server-lambda","version":"2.0.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.0.0","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"0038dc5edf2279ef50e8cb58147bb6e25ad03cff","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.0.tgz","fileCount":18,"integrity":"sha512-B2Ctj2byvw0vMz7B0SD3jx25gW0EJ+uB98l6bVUiLuK6jKq0613IqZs7+nP4shqikK34qwkMx+XWS1hpVLgb6Q==","signatures":[{"sig":"MEQCIFR3PFO/CynRq6VA8B106+qSRNaRp+37JqM13vH8QFSSAiA+/NZtrGde0ijB2iViOm+qVaonxSW7Q6yrRcDVx58Sww==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32381,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbUOvACRA9TVsSAnZWagAA2I0P/R9GSIlZ2aix96lD81vk\ncLCMJ8H8noCm2+8a5Or0VCfbK5zBkFtsDf1voZdCme+zyslcdLq7QRf2e0OJ\nzQPyIDra0GiIMKBv5dC98uT+Bi5hcokrGyQ9PpKzN9jWBwAX/qk31lAW/Fw2\nFiaKcALuq5DOCL0pdjsxp8pgVxhmRSVOKLz7X/g0PCatzP7aht2Iu/iuSAyb\nJhamJbEOwHIlo+EGwZqXt8DX2PL+Yvv1ezCeLxkiuVeQkWuMs17Q5Vevk2eI\neiK1PPTMXS4dm8ZMiRwMmaDWzOTYq7p0/J80tbrZBpn9N5I+G6qEMWogEa7R\nzWRcPEX8GmD4JLzZYAYZfzNmdzTbaHHUZi5SpvShuXS4bxYqjG3R+/3tT4sc\nnxyTTrFJ6X6Ecp0RJOidjAjS1pOmMa5qMP9LZK4hXtr3RZWn+GQRBkG+SalV\nT66xSCQlEiHAooYVPGl27kIBnx+nUQG+YLljO/QO7548zi0uBSTaiH4UbFvp\nIU3sisQu5tMQCmv4SZ/46J7G9LqrcU6BznOY5okNayu24mOd/rq1nrieNtxJ\nbuIkFaTmFWx9om/+TeZr6ZCGSOlV67OvmRDvtPdhj3JSi9lgMHgmMQHFUYp7\nI9jXOj/w8tZPIHfGECNSfyDrBE/w6FoYIExib820mSfhd/OTvzV971kK52y6\nG13N\r\n=KJUU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"scripts":{"clean":"rm -rf dist","compile":"tsc","prepublish":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"_npmVersion":"5.7.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.9.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":{"@types/aws-lambda":"8.10.7","apollo-server-integration-testsuite":"2.0.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_2.0.0_1532029888570_0.40099457414561424","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"apollo-server-lambda","version":"2.0.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.0.1","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"0f979dd72a9745775845bb511153c834fe2ee5ab","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.1.tgz","fileCount":18,"integrity":"sha512-vGH5KNyy0qe6sOrgOsgJOGI/OPzxEErqdzfc5M7OJMyAZkxQk9pxFxuoL8g2lVjZe1kGTXVR552VCYY4fdWXeA==","signatures":[{"sig":"MEUCIHKldjDWYUWi9VKoV1IVIpT7D2/57qgLtVJVoM4hPagEAiEAmlNURsEEs5mKVwN4kS++RLBaTL7cOn/GgirgMcKHz5g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32711,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbcxoXCRA9TVsSAnZWagAApowP/3OxCuxKZk7tpCflDsqv\n79PvWFh7wePgg4qcaWrKBKdLjf+SBJ/Vi85kcetoxHrd/WoEMKmQf9yzB0mP\n/H3oitLdFoj69viaAVXTLsb6+nLpvYzek/lLpseX08QGH7iEPePv7EOO/Dxa\nVSXH2thFqtv9xrYTerXTvieGMVJjCwIMcBb5llgwIhhHTxJMjUxKlm4N8xq0\nk39/OlaFj4O6aPgZU0BcCA6KN9aXepeAD3TBLSSG/+t1/liZ3QL8DPtZVABr\nJg/Dcknh765PncDAXrsFPIQEzDK3nl8LOTjxkWwkipwa7HUwuGcFjrAW6hym\n3c08WVQb6SVxxyXJZP3NlDTYHo1CEjAVF0zOzt03mPEBybGOKwJnr6blP/vW\nMEwEu7Msxr4zJWMVbpHwzlqOfW5xOa+j4Fvfve970k/jhY2HjmlbLsYvkrM6\nMtnRr/MEs+h4AgvWsuWt/0BRFYbMQKFjoZUdxhfrro2PfooiLYxsWHLcZBeS\nH+H4A1tW5GCBkzmcbCc57MlGvube9hwfvtIdTH7aMA/hWl0RIKpVLDNgaGcE\n+/TyAeaadKR4cZrDUWS6F5AUKFpb4avqgSRs3LOCGPYPlgHQWngwTqOPzv/J\nieopw4z2LJHM2KRkoyhPOI8KF7bqJNL+OdTXmIfcMnK31Im2rwnPQyRKxB/7\nInBO\r\n=WPda\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"scripts":{"clean":"rm -rf dist","compile":"tsc","prepare":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"_npmVersion":"5.7.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.9.4","dependencies":{"graphql-tools":"^3.0.4","apollo-server-env":"file:../apollo-server-env","apollo-server-core":"file:../apollo-server-core","@apollographql/graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_2.0.1_1534269974952_0.9791500330897656","host":"s3://npm-registry-packages"}},"2.0.2":{"name":"apollo-server-lambda","version":"2.0.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.0.2","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"60db419d8de79e517ae1c5bcfd0c8b149a898ec8","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.2.tgz","fileCount":19,"integrity":"sha512-IBIFxtBEu5TZI8g7p1pDDiquHHi1mdO0Kbe0MqHdxyT0lblCHSAOeCeHSFFekTfBG2LDQ0byZN5pS8o3jCi2yQ==","signatures":[{"sig":"MEYCIQCR+Yo2CLWl5E+tgICIDuTYxt2SKGS3SVN0HduEhjPJkQIhAKSMm44SAHPJB9SGVi0LqvVhVRM5Wesbjqxtf01qfx7y","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33824,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbcySICRA9TVsSAnZWagAAFEgP/05R8kP7wPrKYkKMp8w9\nVaU6W/NnkECshgglJVxhnyfG9LghCCZMeM/zmxnCoE+YaTbhJTooOdZQwQN8\nBNXwikTHh986Ef7DYaeDuq5xPE4cnRsTtqTg3lb+CAeQCpx46Mp1z9pD0QX/\ne7lRO7pHHej1qzcd4qoqbFJgpEWqnPV+MKEDUv31LtnotadOacwwomHQJ6cb\neoVFdJ3/nW+EhgBi0kdEqlIOLYIsO/lQL7a3bDwBtMC6s8+X4BKelvLksZ/S\n8IcTAhqD838dUeI4C3zI104QRseNKLv4COZZMxtDVKwe5Bss7ZM0u38xCM1R\n3AltXZxzhIEMzbrKLC0lFci3O7uNp8PVWAEfEJxcRcZJK5qcCM0GKeLDWLtI\nZ9SqMzc5As4kU4e32DRTjw/j8VaXmHJJz+gl26E3yQ8tZrBUlTMCk4qqnPjq\nvgwGOosLe30Z31MbtxRzWM+xQIkYHOgHoBNG4ZFwuJrHn/IxpTG8ETDR64Tz\nOUBr4eA598uR54AkNHhtONuc/o0Sjm+jwT6J32GsXkpgfZrtObz/x6fz4Vw8\nmYfL/4TxWOvQdBhHHhGokkdChdgkc7X9C323ixLtx9FdcpFUqtF3DE7Kw+tb\nqrmWNwnrn6c4NhSSn3MqbKANFHHQ3PYERN22B6B6r0tpFt/g97sHYWyTmFhy\njUiM\r\n=0dTI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-2.0.2.tgz","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"f7b5d63d038384409fd4d664a3bcce04c721bc6d","scripts":{"clean":"rm -rf dist","compile":"tsc","prepare":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"_npmVersion":"6.1.0","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.5.0","dependencies":{"graphql-tools":"^3.0.4","apollo-server-env":"2.0.2","apollo-server-core":"2.0.2","@apollographql/graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_2.0.2_1534272647628_0.6220401774923807","host":"s3://npm-registry-packages"}},"2.0.3":{"name":"apollo-server-lambda","version":"2.0.3","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.0.3","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"d418b9a22554e7171a16c6a43966552e6f6ffe00","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.3.tgz","fileCount":18,"integrity":"sha512-hYZiVykbDWRKdg9Z78EoYVVcgkLa7qaLIPS409wZvV5Kl4F1nD6ji9Zv6QflZJ6SnlAo/8XvGBJoNARG9ZZaog==","signatures":[{"sig":"MEUCIQDXsbNtxAUW7cssbjtCKQ5MxWF9HyqA6WiFnRhaeXas4gIgVPJEvRz9a4LrryEsCXwneojd4peMitrNLHeVO09SgpI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32670,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbdcyxCRA9TVsSAnZWagAAPPgP/0jC7bpqLD2Yk7bRJUvl\nfM6uXSdge27lyrLgyRBBPY/9fK9Ki/fXQGBMULJeIUYmS3rvLRxoAb5VsU6c\nNjRxEIy7KIIjPPh57ONN9hBlPAvCRXFw8ALJgD6T7K9dC8CpukuTDTxnfQdn\nDxJJKaNWPm22EMxPCOCxXwDOslGGUJoGL//6/H9EMJa2g16SpUWuB/aUZ81n\n1D71lwmxOIfIFWohAt5TU5iwP59E2J8Wv0+oHB+P+k+7QAE5it7SjF5v2V2m\nD942ulUeBm1+dtyw0yhUpckaxNS1ZIpDq5oS+mnLFgR/YtuJZ1WUW7JDPxyr\nCewiohWynw3+ruC1pMEoF9O5pBPIRyFpeGy7lOCeIwTfiicGJ9PnMx+TDZn3\ndcU4ARRIRuOa/LVlEQNi0o55pL7P3WQH34kh7LgUoTPGE96V7OfbyX5f1UEd\n1qaVwbDUBRygWtpuDT9PS5Jnd1C6sGiAa+8Z1cVNuVbits9rTVCU8JO8cOaY\ngND617Xhi1LkL8ktYny6rYk4fsXeu7v5k0LTO4tMWxZUZPdxF0oS5M+xz26H\n84vAJGpKIoR3WQYpWZY1X7bmSuo2CCGiYaUa5qxLulYu4xKhtjc2/FEF+Do8\nKd0txA1FIJ48xOmpOUIYWq+dxIdHjOdohaoI0uSdlGFgAZOKBZpjlNPUhzXK\nlQVO\r\n=bbRd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"scripts":{"clean":"rm -rf dist","compile":"tsc","prepare":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"_npmVersion":"6.1.0","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.5.0","dependencies":{"graphql-tools":"^3.0.4","apollo-server-env":"2.0.2","apollo-server-core":"2.0.3","@apollographql/graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_2.0.3_1534446768686_0.391439418030074","host":"s3://npm-registry-packages"}},"2.0.4":{"name":"apollo-server-lambda","version":"2.0.4","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.0.4","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"1220984508bbc79c49b0fc07341cc2cd51c3da58","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.4.tgz","fileCount":19,"integrity":"sha512-BCZEcBNww0jJTxqjPCjO9an/mXTNwkR4Kbk7X0lYkpY141SefBoBuc5vFhthBWBZMbQmLID1FO1BhDXtTrvGUA==","signatures":[{"sig":"MEUCIB0Qug7MyhULAkf4JXeNHmIMQnuIrFsZFAw1QKiSqNoDAiEAvQK+DAwyRUX9gnZo4b7nBbHodGplncO7/ItD3yxg8/I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33824,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbezArCRA9TVsSAnZWagAA6bUP/0f0ZKU+3ijCL0FgXITG\ntiMpdLCu+s6JJDcbSjDDyJHCZIeFY60Y/++LNmMJ3jskZaiUCjR7ZDTBZ3Bq\n8s8YQaL423kQs0NvKgz32dyF96uHVPrwhaAc9hTZXCdpHlRD7BjNTVvzp9qj\nq/2dS1Zo0e/Ts/XnF191Uestq2ruin+3InyWvhuFdBGQkcWsZWE4mS8MyoO6\nT+rAqUaXNN+KlGpqZ+XMS31x0O3uNVfjMXKg6D1FH59TSBrf5g11uomVYy6T\nfNW3qYGHvD6lVd13DxR1YH8ib/NOx/hMoRcrAazITeFOdQvisVXz4Fa8FzEs\nY9w8os/DmxSQ7AXfFoq3rsxsOW+lEwzeGDx73z1yc2MG0o2u3y5rCLhHtj2q\npjA3qh/NMwk/sVLOqS//m3Q17qASxEx5va2SE5+bkdzs+2mk8Wi6pbmWvW01\nqrfucMBfmJ5vrYAE04VjZlt6Wp6djYaVtsVPPIAAKjV764wR1DIXBJ1OdQFe\n6U0MoH4fJPwuNb1DhZkxXepn2B21jFeIQOzR1ugXyjj84z8qdMK1S8aro9xj\noA4Ax/w2564P3/EvE4jjf2fHmyQdr6+gESkqDLpFyMZdVjGCp/cyva/nj7nu\nETbMwA6uY6wGRpg7DovqKXgrrEbMhBpgU/1CaK48fy1Fmv8eeUbcVLlgMdg4\nh8Gc\r\n=7p9Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-2.0.4.tgz","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"2657e9b25bc0d22336ce2b3b06784325830da6df","scripts":{"clean":"rm -rf dist","compile":"tsc","prepare":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"_npmVersion":"6.1.0","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.5.0","dependencies":{"graphql-tools":"^3.0.4","apollo-server-env":"2.0.2","apollo-server-core":"2.0.4","@apollographql/graphql-playground-html":"^1.6.0"},"_hasShrinkwrap":false,"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_2.0.4_1534799914529_0.3156371957367461","host":"s3://npm-registry-packages"}},"2.0.5":{"name":"apollo-server-lambda","version":"2.0.5","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.0.5","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"8a623481e4fd9c2bb3fc60d9c148fff232833ea9","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.5.tgz","fileCount":19,"integrity":"sha512-/akvKYInivbhHUy/tOm8XXInZDxjt5z4Bn8MqL9F87iGmGSjM0sCV6JxBXGHShW05erlHl49+E3ffWxdc0c5ZA==","signatures":[{"sig":"MEYCIQD7i8Asyx5JusWxoo/tooxw0lDths6QoD6D+wJYGfrpVgIhANid5qJeQ5iTD82UOHHGRYcHr7nz50jh5zgi+iaaSTgq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33933,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjTIhCRA9TVsSAnZWagAAmTsQAJzO5GXJvy6kOpHN3FE3\nkA3FFF4OInZ1GhYZNwp3JIfn5FNVIHc4HjunKG/W68OGi9ZILM+iAv3mB2zI\n/r2FIf1OBfWEV+s3T7w0yBLgVZPD1B9nEQcfwkr+dBA19d8sZBKfFkmrqv/x\noixyqen2sOz7DI7kjq+4Ta0OSbPyivMxamFC1H1zVLG8/Jb3AbGw5YrIHt72\n1RnFgRn5iRdJL8eCtoqtC46PmfBPI1cjsHVbPxKJZWrYXgmqJ6xt2v+lEPQF\nHwUA4Z/OOwyE0slaJCUBfFixhE7D5m22EVIIfekFCM310yDDFvBh+AijU3Sn\nMyeQ0wAy+zsfi0rNDgkzsGcJ9iCf4yICZXbsI41ZWn47896jtumXBApcbFRD\nQtHP7oFm9FqQbUKUA7jFl5AW8eShCTePRP7jWPz+Nb1SelqE+jIuovqiFKhS\nKUjSSEc2TUDFmbgGTvTuf+HXtwWAY/dzDBSnpP3WRriLQSsA/KBr0/xjDCyt\nNJZJhgKk8p/YmXkqWl3x0MOM+Ke5FLofT305LmK1T/uree2rQ7hsL00RhgdA\nUaGtx+pzzCagIaqenKQ7SZb3PUNh4FCH3xZs3sMEsgS06bFlHXQY0YN2QwYs\nWTNKaJZ1ObK6faWEfJ6OoGEU5YgnckvVCDFZmG/B/9df6/GGqisKZ+J/EPlU\npqvx\r\n=mBA1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-2.0.5.tgz","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"b80a8f050c8d473ae6804cd3be6430308a66eb43","scripts":{"clean":"rm -rf dist","compile":"tsc","prepare":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"8.11.4","dependencies":{"graphql-tools":"^3.0.4","apollo-server-env":"2.0.3","apollo-server-core":"2.0.5","@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-lambda_2.0.5_1535980064289_0.4871115458890587","host":"s3://npm-registry-packages"}},"2.0.6":{"name":"apollo-server-lambda","version":"2.0.6","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.0.6","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"97f009dcdd8de5f57cc4e368be61ee61aba5abc4","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.6.tgz","fileCount":19,"integrity":"sha512-iaOjGDw4mw35Xkv6rYNXFftdOCMG955V1gPOTqIzf9KFHrLDcv13tiNiAI1ndGnm1YSrC5Dgtd7mb1+J03KkYQ==","signatures":[{"sig":"MEQCIEzhgU7/DWfcEtOHcTZOxm9SYn1x4IVaw5R06qG1CBmZAiAdrqHGxRAbL5DOGTEIiMIeLecqkqMgsTL3CJlGqR//Fg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33933,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbj/d9CRA9TVsSAnZWagAA/mIP/3SeETsNEFBJMusFuwDQ\nyK5ub74iH4TxR1UftombOc6NRRKW+faVHCccY8LS/nW8vPz+Z2qCLB5eexSV\nMGTBUf/REXck6ggqW2uls3pQqp1JiLz4RYhhVBARt+/GMP/uMDze07jvOtYA\n6jOckIhyjxZ8YwI7EEQeZVLFC73oM5RAXZk4fS4wlbssoyrhmILIBudOijcS\nlnotyZPAJxGcDto0SB8zEVyW+UVLta0vvL2bAmF3xRWnISxxKXs82Nbl1BMT\n6Z+nEynIAqs4run1mOxLsNARg4CbLhQiquuDmmwuYjetfmaJ0ldbSS50dERA\nJnqtpTwYHjx02wxdh4MWBmmMp6Ews/u6Ku5xygVjONusoAE2wcVZMKUWjkuD\nbEL/NxYhDJcHjsr0iz+EJ7zm6l5/ZKVg1FzkOR7ASu9pcNcVAChee02EEqb1\niQabucKeHZSeVcYevUiJlAdvEaUst+tpCldo2tFrDHDOhMug1WMR1CN8pvln\nt315+XpNHC1Qkin40wtb87B0T1Dlo+RZJjO60wjynKnIR9JnD4uCGzVMkaSr\nflp2oArLuZ7N2TX0SFSKvzOmAaL7zdwwJN8jSxMUGdyQ4TZ+MLgP5hKS74v4\nh8aOx/5aK+NXf0in4MP5BOIY6wlAj+Xyhc5OqZPYxzbPMwTan1CWc1tdX/1P\nahu7\r\n=uusC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-2.0.6.tgz","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"996c73063af8aa361ecd6bb78e43b9d0c0df78a2","scripts":{"clean":"rm -rf dist","compile":"tsc","prepare":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.0.6_1536161660619_0.7996292570691912","host":"s3://npm-registry-packages"}},"2.0.7":{"name":"apollo-server-lambda","version":"2.0.7","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.0.7","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"mdg","email":"npm@meteor.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"9153a8e21dbd9247cead8d92c48b11f4a31a18be","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.0.7.tgz","fileCount":19,"integrity":"sha512-SNUpnhU0PC34Bw8u2GtFCXXYHHgyIje9VNE2XfYhrYmgbsgtwNHxVMP0y1EESzz8ppQTV4kK5IHR3DhlUcr+PQ==","signatures":[{"sig":"MEYCIQCdHWezgvkPslwpyiKvo+GqhdayoE0M3Yru4uQ1LjCr0AIhAM48krprc7rGOTx3z5Io6SoxP5ebe9dHFjG5j09JAdvN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33933,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbm/HICRA9TVsSAnZWagAADiUP/1wXTw5hpMyP8L8UnAW9\nVymq9ZJ4kBeF+WC8dg98pxfWU9fPKnzwa2XCkSMqsqTb6oH15XZsw87seOUN\n683+h1XDEROd2Sr48eku6oXpYZo4fWega8v7UM4pyS8/gfGf91fkL5c/OlPn\nQWLBedJmjMGPjiQ8HHsXea+3E9VYJCh0Bg8sS8t4/++U/3wAIa6xzAPPalkD\n1ZMk+D28pjXzgnArkjmiTDzt1g2B3SkXBkHr1dQNRZacypuQErChc6/RCr9e\nwKywJ0+d375bHUjqJKP37GnH52Z+Rem8MRdbiN950khRaMyEKiKpKUUX9HWn\n2dWiqHoqzYzxkDii1LKo0GHAvMGAKoeioZvIKOTfoEFyVRYTDNYzkOFIhfL+\nkvTPqBrzy8NY2SN3NsH58DDJN5L7tzBUgR7MjBoHXupgZqqkAF2sHuvLWw07\n+xKzpgBFz60bwCk8gk/dgmOSUcolGNiiqdab3FNuIxwHdGlAkPqLg2kO87GO\n9BRyu2ZlJtMLFJxYmIrdAngg1odUOeJoZfq5wfTTiDkdSdvTSfndORfC0Hop\nLfMQNl7jWtOSW6uvD5Dbz6W6DyiJ3/wqqTRiCgfAFECdeibccLv7xCO388Qb\nkkHoK9cJQHFtYHgKUnJGvn7Voo+KM5p6u/LyvxfrnYRffTZ4JQNGOe5ZeRl+\nshMU\r\n=FIM8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-2.0.7.tgz","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"5adae649e3e9018b061fdf35d8fe646b98d38fdd","scripts":{"clean":"rm -rf dist","compile":"tsc","prepare":"npm run clean && npm run compile"},"_npmUser":{"name":"mdg","email":"npm@meteor.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"_npmVersion":"6.2.0","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.0.7_1536946631361_0.5680146856747301","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"apollo-server-lambda","version":"2.1.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.1.0","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"f2253bc7bc4cc361df56aa3c68b11e9cbd7ed8aa","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.1.0.tgz","fileCount":19,"integrity":"sha512-Os/ctKPYEcnPh+SQkUNcQ3N1+uQHQ8vNRge1zGka2k7AL+iN89AH+pYgsRB8tZrk+HW54NGV89TaPSNxToxHCw==","signatures":[{"sig":"MEUCIQDU2WtxH8mxQAbRexHSD1y1BW20WTQl9t9gvu9aarZs1wIgXrCs+FMJ0NkhrLKr99VKWaLOSmwu+28CniWpxFqr+W8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33936,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJboYc9CRA9TVsSAnZWagAAaUMP+gJkoO9EM3Q+g8Mb/hu5\nKBzJg+DfLOfBClQZNGz+uaw6lyaLFWFNuirkZNPP9Guca0WGosAg8zOM/hUK\nd9Eq1ndquzYPi1CKpTb/m58KTstcvtGaGYq29ODEGUA07fy1uhaKXNahI0RD\n9e6kC3fjNsZQ2mF+AoxPewNAt0rJbnd2kdMbxs1EBci1otP6sg+ADaNyAwjF\njWeEDEbZ5nGhR2B5x0Q2N3jOzvNja9MqbsZLcO8O9J5rnGJufWtANWdDZFaT\nAheaxyM7CPKii7WSQRuo5RqJOnfNOW8P//PV5/8r7eIYJjDC1a+UAtoqoF9u\nHgB3reU8Fd8IvEeeJa9RLTr6TdlEnLzEND/h4xvizScg1r9sCLHIm8ZVgV+E\neEy1yoQadARX/yHrWSh2C6AL6r/bA4mZDh+5lwxtRKg/BcYCzQIEbtE4fFAl\nkdtKEkaVdHdIOOEeBAZ5IkG7I9sAWecRlgwdch5yjSKzNmATDH6srqGvQsc3\nAP/F4qzHU2aehCx9e8PZ2p+sKrrh6kpldj2LqvMrr6gujcvSFw3ePhkQlA0x\nE7DNCUdgu9S6dXdTsc6YMmsoodl+ubgd+ra1dh8EF6IkDrTeF8LaCuP3Z6Jm\nA8kvHzMa9Af1plppOHMw5KQgjf1RhpYWdoebcmKxOPS99d+kd6q8cBm5pr4N\n8rC0\r\n=z1Oc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-2.1.0.tgz","types":"dist/index.d.ts","engines":{"node":">=6"},"gitHead":"86dd95e223460f8e1768141a8cefa58bcd409b03","scripts":{"clean":"rm -rf dist","compile":"tsc","prepare":"npm run clean && npm run compile"},"_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"_resolved":"","_integrity":"","deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"_npmVersion":"6.2.0","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.1.0_1537312572471_0.5960262573516608","host":"s3://npm-registry-packages"}},"2.2.0-register.2195":{"name":"apollo-server-lambda","version":"2.2.0-register.2195","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.2.0-register.2195","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"a6fd7c212f3a438146c798a71c3e12f3af83d02e","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.2.0-register.2195.tgz","fileCount":19,"integrity":"sha512-RSih5obyDFJUxCCeYYDkVK6tutOV3+0CG05/FHq06YYjdglfIaS0YOJ0KbRduwCGxsxgPaR8tXLR8baqv2WqUg==","signatures":[{"sig":"MEYCIQCIjYI/zuPFf9Ro90adNmtijSWgyKkABXFYvh5fGquoywIhAOgzieYPkqBpeA00sqKfnybzV7fXuNwsIgmq4TGr2Fg/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33866,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbvAlnCRA9TVsSAnZWagAAdiQQAJCHpapD7S8SSDZ59EmC\nqfYuJRGv+tiMv9GuD3AUcs8nXFHh617se7pMPFI8LRGLHOOe/FLWYNtYLTCI\nnhlkkHHj8cYYvZDzbvoBKYT0lZqX/B0VkvCzjHKw5NqyaBeKCPcCZNNyM3xC\nUz3i0Yfx/rdctfu6SQQutd9Btr5ZsHK29E4pJsHHX92UBRAoX8Xpw/sD94nO\njJxSohp9ad19rS3ZGDp6bdj2P0N9IP4CgPOGH+Lz8zaKySgNSttQgEvB+mHq\nlwO2EDRrpQkY3Qdp0YIy/0KWUIdOv/CsgvJc06f9zw5gg0dhAfX1hiQkeTLl\nJisPQbRZnYchfVvTSnigRJukZZNxyygyWTpJdqnefbQZqkz0Y3nb0VXbieZe\nm2NjXMdyZuClrq8NogixiR4aDwXLaL0NAqZNjlR8nfeR2w1Q9ytgWAbN21jL\nOTcaY/W2gOOWt5ovRQ0Tral/Z88SqYbEnh5+4FFHQHYHT5bhm7pruLxsTJmK\ne9BJzV1eT6tJ8P+mX+8k/YJguBnnKV0IqSjQKTvM8yifBu0vheQfrWT+zFgD\nFgRvpgV+AkjNis8U1dcSc9DNVku3XMbbpjpTaT7qR0qV5mCZd3lrxrdqUoMS\n3stcKhw0Wt3QG79c1apuzaaKCQB4J/NeNz3ARmdFY0fkpuu7GQ+qGJGk1Vng\nXlXV\r\n=GU4+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-2.2.0-register.2195.tgz","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.2.0-register.2195_1539049829792_0.5669139764416304","host":"s3://npm-registry-packages"}},"2.2.0-alpha.0":{"name":"apollo-server-lambda","version":"2.2.0-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.2.0-alpha.0","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"cd1d835a84aec11d154e7a35fd49b97a8e0e8b55","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.2.0-alpha.0.tgz","fileCount":19,"integrity":"sha512-OOA18/Y13wJbEZ7CkSaJO5fPXECTBwE55yRJgopFr11HsEW6XCVtDegDs+hvq/v2pMLCqJnIYyLeU3JdJxaDCw==","signatures":[{"sig":"MEUCIQDX9ir46Vst8cnSvs/JiR2W30jIDUriaPM64gexg95FkAIgebJPr/7YPYrQYg7wduCWPDSflBWBtrNBCdirn8JC5H0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33810,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbvlOwCRA9TVsSAnZWagAArnoP+gNXaG+q+kEwtFzSjo+N\nIOSiZ706jqbmnpTVCoOvwjP7As8U3x6zZgnSUyeqoxFIpFuZ0Du9dB3IC5rh\neP/Hjqk0xxmiGetoQt9zcGO2jzDrC+XzpbaCKqhFqWXnKkvgncR5RofxNNPh\nw1AokCPtwE6PRi2e8dfcq4dRM6kBUYa3F3zZKFmjohT+789ZY/QWzylAJjdI\nmtuxrerQtn3Ut8um+eTjJzRmq4rdf3kgPhLoYW0hWzTAgG6p7DZlNfI6iu5h\nmfgOuvN0FCYsD5W7IBsZJzQ8q6D0q+enJgX5wSaduFzidHfI5wGq1c0BPL4X\nvHwxPOqbwzN7+uKjFyRrZEdrdTbeJERvxl1txmGH5M6Xw5Kxw86nHVTR1WMN\ndoCwJP3KSo+8SuGfEydFJbpY0adRgqEDiTLAUUVeiMUSHWIqcbUUwOnyNLMg\nS+Rgb2fCFsDln9PcgrrX3/foNm1grru09MGgjg9Hsg9irc+u3Nh+jjlrBs/3\nd//kufYNcy3Z5OKwp/1KAKRHVFBR/l5y1tz3RRaclBTNV/CH+thL1iiIiETw\nmIQKE81a6z4PvwVUwSFBEcNUYQ1NxRE5X/m6Q8NFeZpkeJxol3Jwf4sfWX0o\nxecp4vbRP1tOCjl5fnsKhMnVOG8fPx/99E2UcZeEN0w7dAGAIYS1PsExAte3\na9eZ\r\n=YZEM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-2.2.0-alpha.0.tgz","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.2.0-alpha.0_1539199919722_0.3899761891942264","host":"s3://npm-registry-packages"}},"2.2.0-alpha.1":{"name":"apollo-server-lambda","version":"2.2.0-alpha.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.2.0-alpha.1","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"f6dfc8af6507cd3af23d1c729c4d0dd1344bcbf7","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.2.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-1ZH/inC/PAJkLpZkcPY6VSFsuHEpe9O6sPfTPPi3U3tO3TGN2bkaE7RZFK9j7dWdTZJwG2T4SPqnw/mKFZRVUA==","signatures":[{"sig":"MEUCIQCfzC3eXQadqWZSSE0SrPf3j0yHYCsf63jEr3F3uQUXMAIgbzaCyv56zzYDqX3c1Fw+HSDKZU5FC4LMEZKJZ0RsQn4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35675,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb010ECRA9TVsSAnZWagAApDgP/0Yp0d58GO/kgxPOvI6b\nc4uV9cDtc5sARRAJ+kyU2UY5Tsnud+ciDTwGIBawNfn2b4p4Z82igo8RoFNN\nI50qoBqCyOXKO7o0V5noui5kIAlUV0rl2+yY4TAKtenn663GLJ44ah5nCQwo\nWjO2huwFhjcpHOS4kEkifRmvi58Z9CR9efSVP2QKupRD6+0V26PEyfzuo1IM\ngBAUPMagDqxbCsM0UjlYh8AabhkLSX6LK4iXAWewpocQNZztMV00k4gxIT0w\nOSCeInCdZ+DFGkTEKDThjpNleE/CT4+LYK8eY1Cu3ULwxgPxtNR9JoH1FNb8\nw7yXF1Dk8l7R5m+AXpkGc7/JbHInSgYSLzjws1KoHmGScxYwCjethm8BEGkX\nnunu41ZB0WSJ43mOe4HJ/9tGAYljng9C/XnFtps33FSQkQUCgnliSwyyywoW\nZSChrnR0ziQUMCQ/TndFk6V3wIE52oGMvT1tcPGcr6IvEtdAC7wcnFvJVkOP\nU54yYDmJeHPif5UOvoEg1XrsTJQ6M4IArAZg/7PBPiBHvNW/bp+YTfPuIDsP\nhwJzn5z2/H5Ai2DvU2Mfcc/k02khvmHxLzCCCswmuI1an1Nmp6pdDDLM9/Ex\n5NMPxAM69pbW4F2nDewGHAQHPA5zJQzhcZhk1aSD0f26JKRAN594B3j/+1LN\nQ/g8\r\n=UyuI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-2.2.0-alpha.1.tgz","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.2.0-alpha.1_1540578563813_0.42929970205110557","host":"s3://npm-registry-packages"}},"2.2.0-alpha.2":{"name":"apollo-server-lambda","version":"2.2.0-alpha.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.2.0-alpha.2","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"e688545ae8d9ca6e7fa05d07322bf63f4ef311ae","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.2.0-alpha.2.tgz","fileCount":20,"integrity":"sha512-xWOD0f18ISiKmJ1BBSq43+RQZ6/iOxNy2BStNQ/Uw1WHFEP2aF98Qfo4xjucafFULFUtMmC7jPDu5ub+zB0mfQ==","signatures":[{"sig":"MEQCICTeCAfidXcQy6a5X85hl3HMc0DMYonZfVQITU3Omd1XAiAFT20nq3eXH9KwUXSjdaJeips9WtyK29ioZpVbmdbGHw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35745,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4J4tCRA9TVsSAnZWagAAmdQP/3ti77tIneG2SV8xSswE\nX+hoEOxmmyHGXR8rgf6hB7HKfz+Nb5S8xSCtrJWYMzq4nio96n+CaRVqXdAi\nKUhS5MPx/Bv8wgl32jKdi5g0s4IQo3YDsMpr37ptqe5dzxo8d98k/0Zc/6T2\n243G3cXFv536ZXQCMijVD09xHGmWT6I+9QXanwSI0PkfJ/Ue5/m9OBDBH2ZM\n2Ym7CJKuxLTPkWWCvGCFlJhNXp25Vipg+ikQaqWNSpiG2Dn0WRmJvKXWTj6H\n0RrdLUvYq5BfNhtn6mU/43GSw1Bk7t7GODT1Bl2cc4agxnhpSZTH8qlFNVm8\nEthe3krPRICm15+cCLmFHMoIvcoZmLco5HrpGC0dBgL6gCqjT86xIUj9oXts\nB7JFkzbv7HcFTuLy+W/xUZ1nkxCCgHs5gZQ7z6sppu5KA5W2ZUZSrPx/Pt+I\n8OsJDcc2wWBtfHrMBjqWgcmIxzc3rn/ul8v3vh38gQTPnHV8oT3MqHfvL8Kd\nAH1BPaoXNDbQeRy4S5JRvRmOp0Ug59ei2tRqboHt6eqLR8MJNxBX6f/nQO7u\nxePWRms1WPbvDzdbGqFfe1y9P66vnQWk9/SKiiVLZKoUzaKo29dxxXY9Z3U9\nZ2/MVgmX9JlQLA8vjIwZ1DGZkapyEcAeGwllQFpCcmEJ0QNwQU0VYE5nXPaa\nSjhx\r\n=5Vfz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-2.2.0-alpha.2.tgz","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.2.0-alpha.2_1541447212373_0.915892028194327","host":"s3://npm-registry-packages"}},"2.2.0-alpha.3":{"name":"apollo-server-lambda","version":"2.2.0-alpha.3","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.2.0-alpha.3","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"2798086483158bdd4d6d27f5b1ecbcd90b49086c","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.2.0-alpha.3.tgz","fileCount":20,"integrity":"sha512-oL+j5tvHnFJDkgGoFqucnmGQEoj06h+lsChRI0fNfn+HLYr3Te1Xr78YkR4SngG8bfChE6A8XtLk7/lksGKZFw==","signatures":[{"sig":"MEQCIF9XUVycY9ToJO05xl76eaWkJtQaZvXFz8xJW26h4kFDAiApw8wzMtwVewZNTRyo8BP/j8Nk3SIRhk0vj75edP81yQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35745,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4Si8CRA9TVsSAnZWagAAnGAQAJ2PuJAsETSizeVitopJ\n8GoXZSa2jzvEasTUNNhFxxA21wB1W27Q1zApOLjqvsHNaykusjbmeoEZ5Pie\nUSty99fTmT8j3E65BGeL6G9xICax/Ch15habOU0fcgu+OJ9p7oNlRH/VGcL+\ntGpxH+NHDhpVbpMd/Zk8wTEGDEIDcVMbSRleNtfkJvB9rdJRlinJBkHl9LdE\nlIiWsFK+w2SqZuvQHRcgkbY7YSL5i8m101Jnbrrf+ufqObYn7zhs5lLIBI8I\nlvZiVRvfAtIs02ikmhiCwIBu7BVzBCBJ9PodjaonB54UMoEqVNaxTvDGITQZ\nxRvjo5mfrUI/838F+S8cA5zykW5Mxp7w1E6o8/1KdhMACHO1Mf6aaca9Oqr+\nIQDAZSB9z8BZMvD0NAP5oSdO8KDdV28il0PBAN705yPVs7xqLfg0tku0XyFk\nMUN4SnrLz8ILMyo6D9FcsKafI4VYARu/8Ytw6hFOWj6pz6YPb10Ad9d0Ldk6\ncQ96h1GPaJhbclEIBCRVzLNo4rSPvJC7MnZFIGr2FuDv6CsJHZgqgqAMTXlv\nUeXTE7605P9FwUsEAaA7cGSsOl21V/LjNhyiU0vCIO50Cha4Hpx613cbz8Co\n2NMK5h6NSsG4wX6zX/oTPajndP5HxxnAVy9m5kpSPJkCr7EMDbphWvH/lB0L\nuUXN\r\n=+ZbX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-2.2.0-alpha.3.tgz","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.2.0-alpha.3_1541482683320_0.5482837511528509","host":"s3://npm-registry-packages"}},"2.2.0-alpha.4":{"name":"apollo-server-lambda","version":"2.2.0-alpha.4","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.2.0-alpha.4","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"08485d5f0cc67028d520a4248fdebb5b1ec0c79e","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.2.0-alpha.4.tgz","fileCount":20,"integrity":"sha512-jnZI5DrPoTd5zvZyXky4PhN2POEQD83G9w4xqt0XGpC5zzQz4OOvDhlitbqRth3uWAya/kyDPeWMvFvP6DW1dQ==","signatures":[{"sig":"MEQCICzcL/0u1Z/HdL6I+vRMIcK6SnlcrHnVCU3wPHc6iTC7AiBzav2y9kL97/Ircsz5tJhZNKRRTWltDGdi3B/pW4+meQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35745,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4eyxCRA9TVsSAnZWagAA8E4P/i7Wa9r513uPYd3JYUiM\n2d7m0b0BcR3LmBZMaC5H9luzfuI6M+9A6nBUwzGBm+brkFz9As4/sfRb9mHN\nPFEpV0u1DR4948gpCwk+vQyOf1Z1FFWYsePififbQk1/oFCJxOkoMbqA3ila\nAkAeGX7t8LNnebxIFo/fExagc+bDDLs7ViEcUUY3UCcUs9L6AvC1SGY+rKzf\ny9ZBQrWNeSBGNzlQ0bXNmCohbPsXzpEnQwAKZTXuU3uJXjESD1Cg6hq4S5b0\naxJRaaYD9kGz1f5zQk9lROz39o0PaehgKHO4nKuBG/lyGCx0bEtlFdieOlWF\n1KhC8HsCL/aTEMUQT8zjtf3328K2eibqosU00vA/F3OGOMiSxDJ2XlpL3ReX\n+VwlY6Y8QP8RxZdDLiMosA5cb5eLMpEeva6Er3mVGW4nJvhFraZZ80IirmsP\n+OyprYfxMRXsAPnbJy7W/2QswChaSGEMpvsKo2iIHc3qcb71rzH+pZ3g6vRx\nRQRXYNZVftKkiMtHfHW844PVjkz8G+pRLY05K1tAD27efeBpWkInrc4CS2yT\nmQYdkcW97uLMeFhlo8dNU06JjxcqwJY++TrVssCZLR8igikr+jHPI7Z097/2\nkmSItYpZg0gJEr1SX41qdp7EneTOUYqKx7yZeyHNGpFLRyA42J8gL07d5Sw4\nI+eh\r\n=uJWQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-2.2.0-alpha.4.tgz","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.2.0-alpha.4_1541532848353_0.7435515658619722","host":"s3://npm-registry-packages"}},"2.2.0":{"name":"apollo-server-lambda","version":"2.2.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.2.0","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"4dc82f099057589f8ba1ea2d390023fe00dd68b5","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.2.0.tgz","fileCount":20,"integrity":"sha512-Ayl2V//Su0dhj0DIKXdsZ1qnfWV1Jd9TMn3gudLVC5PBCQve3f+hyLLJ+Q1VJtcoEsCrCZCdcpnA7DqO2Czfcg==","signatures":[{"sig":"MEUCIHeqd7zY+Uy+nK/d2JqmIG3UQ/tw57Ks7AQL0ew9O7ShAiEAhsdJsIJf8aIsFTlMDmT1bK6qHN30BkgIVQQM1sp7zlM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4xBNCRA9TVsSAnZWagAAqm4P/2mwNS5EJWZaZC7luSOQ\n3A2fCp7R6Txhw86BX/vCV3qcr/nOccauKVISH5btXSN1y18NOi9wHxjm+c1b\nyGxhe2+HU8KdgrDK/LF25VUgF/5gtd1UCksQfHzO6dGXxjAKf5U2eiIq+j7a\n/f8OINaYXa+VTuOo+gZE63UNEw3g1Q+Ga6G25GNEXzPp4R0DEqxSIc/ZC6/n\nFh4G86uflwCeFUWhk3p4L+VD2laYn0oixPNjROm4riNUkgy8LWeybjqrlsbD\nZVVVWNC2pN9SQmuJZMFJkiMBKZj1cI/8PkZX//zk8x/1CcqDm/Egdh/x8GJq\nYoWNMEL0+ksbaQ5jPQHvghDxQ2yxYDZz2jbLlARY/NrC4tU9ZEa5g0J8k0R0\nj48a/ILH5x3KCywl1BYkdGNPhhWB8Dc2Q/Ambi46yXCKFL5AC4AlYWAOdLTk\nYEt6FNbdEnTQiw9ZrMzazeYAMbdQU8USgG9Lwkl+zEk7yrQxL/RlRKl+QdNk\nFmWwlAeQZlenhyTuJHqQ/k2TX/BAMsO/dkHcovtGKAZQrgDdYlBXR//MJZKW\nBh9aT3SDalZPx/Ar1FuHWvTaCbD45DGh1Y6ieCPnFEi4fagYk8rcY2q0lB96\n0X55xTCegV3vf6F6ACZdI7PtyOcRFaBxwoXPy21px9m5UV9PhDkDuJZQDg7A\nwf4B\r\n=o7UI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-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-lambda` 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-lambda","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.2.0_1541607501347_0.14137237660057944","host":"s3://npm-registry-packages"}},"2.2.1":{"name":"apollo-server-lambda","version":"2.2.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.2.1","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"9c3397dfb8a8e231e51db024f5b0bdc4ce070451","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.2.1.tgz","fileCount":20,"integrity":"sha512-Eoh2zoSrtvRgE4LI9rF+Mz4ARCbykgG9haX6mCwaqOKxNtQzYjgHfOsMZ+W81BgIVICSjJgmqMP+9bnzAfnXYw==","signatures":[{"sig":"MEUCIQCW5lQ4/NdQa6+2aLF5gtEooDeRF+Nxiy//zXvqdpYsQgIgFaaK3VTqbAMnssNaQJyYGNeh1gDfaJDlCojhJ9/ucgg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb6X+mCRA9TVsSAnZWagAAbhQP/36WlwGH5cffp/Rv0FTE\n5bDhJZg+pW1KLB2KcxNTx7NjGn5KCv3HRjg2SmmfAsSsOa9NLyxV0sHL/Haf\niFVEf2mQctae4tcCPjpJqPMgt0Mf/GOpxiY9c0DO7KH5tOXF3YzQwPrqb2kY\ni3y6HyEohtqDsadgwmYPitlCe44HATJ2gTepFBQLj9BxdF7HajKSpPVUtFGQ\nrTqDDZXAox2DodyzWXZpEEqIMg+UUOKsFkQLTWvkL7+TSgkRDxAsjxAU+cAd\nphJPMzKaTVQNl3HELwn6aepQYo6OcEwCljrWSsUclbUgGeuROeXjvHgh0aCX\ntUeUuilJ7xeyyaz9OG8oXRM/O68sm35+sYZEHRk67uNSHe3IVfT/Pnj05FRg\nBaOU//Z2nK6yrFZd1fj5miKDZEChegQWoVFRD2JmAiWopZxA1We9ew0Afyc7\nxVxClmPxAgx1Spv5v0Ky4naVtN48nlRVTmwrmyS/xBAX/URrJA4e33IW37Tf\n51alzTjVHXaScxuQTYlefZSKogeG3MJ24bvyiYxVwEzgp2O7xiJPfU8lpwhT\nmaIt7/EzpgP3IYIMuuWEhMfIzKNZvYkyejQwpR3JlXTwsNpkbxqb+fKV21b1\ngm6QlIaJc5ImBI9fKB57uQvId/UlngjGEBTtnjswscxiKzwsq7kmtAtrd2fX\nGj8c\r\n=5uQ+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-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-lambda` 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-lambda","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.2.1_1542029221554_0.9148516789361751","host":"s3://npm-registry-packages"}},"2.2.2":{"name":"apollo-server-lambda","version":"2.2.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.2.2","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"dc31b12781e530f2fcddbec1f5192cd1143fec03","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.2.2.tgz","fileCount":20,"integrity":"sha512-SI528pEQWAE+oxS23EKdahUAkfiNkaWBFUBU72+gbwefGNaEu24dLy3jX0X0+5m5pJm3nxS7HvXvsqTBbIr2GA==","signatures":[{"sig":"MEUCIClPmakgrNe8//eDDPpevx17OqAK4UBWyZQlF7cdIFJDAiEA5dW5XoXyluWvX9BA7qoB8nytG3eoYX3JRdZoMhRWjtQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb6tjHCRA9TVsSAnZWagAA8+wP/1rQ2aq5LaxA8J3EmNc6\nRnDU7dueSyKXRl1AmRIgrTFh7bFB1Bi4g5N1mMVnf9S35UZzvB65AzwO5Cth\nYR7DNWNL1wL7vPF++GfSy16Mksfcnq5JFY+3AiRMi8/mmO23GOsIo6FBp/gh\neS1zWuKbO+H60zPgHukxonDimvSxBN4jISK7I0TYqZk3aS/l/gjrksSati+1\nfy+zoZSgCR0R6ANAboux85gqAcUOY1eJfw2XihWsoaoe/DRUKRbCVEgFfi4s\nKCIaegUawebvCs+eJHvwYSzetXPFzxgv5fKMUje28XmSoKNbElLrLZRe/K2G\nI3sI0pEb8U+JJIL5JVyi3y29mPb3CFMemcNmPjy6AV2qcN2OmKi0IsLC9/C9\n5EI7ITPXHSlADGSKJgVXhUpcQt/iV5wJ3wQ751Yc7FNBMk4tGg/ZTrdkXCGs\n5JA6NR86Oea3w6NYjBjBewYLoQOjEkNaiv4t7QMtyWTdX/uXdJ4sd2p7qr8B\nUG2gmxkkwOy1YX28UfvijFTuVmVxRI8aXjDz3Bgg+sOJoURPlk6f9g54MrIk\njk9FeId0asiG0E7FGWgwPji09DJCvOevrZTFwA1wrhxh2/6OD/ngVXCKDkRU\n+VU9Q2hMEa1V54UTgFiqbQTSlpe2Ctw7HVTctj1FSmzJqkPRD4tBUElpe2VC\njVMR\r\n=SQvG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-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-lambda` 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-lambda","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.2.2_1542117575181_0.8129340086639001","host":"s3://npm-registry-packages"}},"2.2.3":{"name":"apollo-server-lambda","version":"2.2.3","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.2.3","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"5180930b13362e5e34f8c071c3e9a18b721e7f53","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.2.3.tgz","fileCount":20,"integrity":"sha512-TZHM49WnNoBrYds2p8xa/zEfRO/ZBp1OiRfw3KQXfVvyqWnBiNJYsibqPyvtcMZF19B63YNCz4RRS8P86KsL9Q==","signatures":[{"sig":"MEQCIA1WgtJuzcBsKBaDKdMzGHh5rInHu4Rd627pH+be1+DiAiB6gI28I5K7RKyTzGM3YMTevX3KLd8xn8qQmkD+7lMEJg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/EJ8CRA9TVsSAnZWagAAWLoP/3VvBEaic/Dt0EQOYCdR\nYqSNHrlvsWmHuDPIwrJNZ71KtYSjhThCicXfMh3g1OXhSOph/x9CK66qbDMu\nYmysh0PTzQ5RkwJgHon3OZVG9e+yXZDG/7nO0Avokr+FkuQ6Q1wsx+K7a6Go\nswi1mm+A8rt84jU1FbGgGDworG6L6WSALaWl2HR3X/ohMvEb8Om1GZIGgJiH\nANJsoS5q3lXwxUHGp9GWHTQTQ39q2YLbxBqkd8Ll2p2lr9Pi1ujWT7FJgcu5\nUOR2hBd6DXuTPodK2QPlyKiohZDL8Kaa1N1qzHOHi0IWeR+3F/EHTZF2AnUt\nMObtjXnuXJQ/GhGBo7CYI6PoC60ksaw6UrM5TPf7goEIjv3WIXMkLElcw+eb\nh7VWfqxjJ2YLHLfxUBP1wz5nExtwGPihib7wqGyDIEDAF591Wbq2WfBtbY1W\nWHVFpdXgxoxuc0TXXQl8VysJ6zuUTY5BWZja7SPw3CyMagaK8OZThgcp2/8D\nRK/swPS0vIF5w1YKf7pPqZXLWFIvxSod2xhclE1uk3X7MUBGimWtCPKDJ1I/\neSHZntu2zm11pOH2b45JHcqJP7q8Jv5p/0iHWgcoogVBuvr+S3Aif/8Z/iA5\nL+B/nQAIcLIs08h3qQIJ6hh1YcpSUQ+ZOaELjezFrb3HHfukQ1tsmMfGpDuj\nommm\r\n=2qfL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-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-lambda` 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-lambda","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.2.3_1543258747316_0.2215447099272425","host":"s3://npm-registry-packages"}},"2.2.4":{"name":"apollo-server-lambda","version":"2.2.4","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.2.4","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"c2e4373709653398c8e465513f4e56fb1f86d4f3","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.2.4.tgz","fileCount":20,"integrity":"sha512-WSYlMQDmXxPFmfsZQUVsNJ9mVtNV+yYXoJh+lN0YrHRzLdaYhmTl+PVseZ2VjrV4oZEFA8eoMQ2/6hZhIfZh7w==","signatures":[{"sig":"MEQCIH1rjEIhn/84cg+bxWNzrO9Lec0wWxdRk6sXyK2INO3wAiBARNsZNPnTRS7MMOJh9YnaS6CXTKYkNBOv0xb6YzobCw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/p13CRA9TVsSAnZWagAAyq8P/1XXEumFW3TKRX0YcO3x\nDhYdZnmw/fIX39I4k1K4QojqMQR0KHOs2C/QccOvBPMFA/F1MiFBvN9Fdfkg\nwetzxImNocWFEksZQZf0flW7xQaVib3ni6WjO4qHUpwuLtKmqPzvu8/nsJ7L\ncvIB0b+EEBaRjc1yEeMuhzIjhUIoXd2hjrSYUw8qcwu4qRjATgp2xIYwS/KQ\ns1dEmHlxL1/pXCQzdeKaGJp5vgK5fv8unuGHBwNJLaRUkMqtQlLzsI+NVMkp\nNMylLFfeSDzTOEm3zX1GaaJGcaNLLMeLoRd35AJNAEanOrHwslPOMpTeQl2I\nWbFJC+zH+McIelAlr1FBqkj4f5S+uEmJma/9QAjVNRjlfrSyrLPfY6cUADNV\ngMhZgwfIbIRBb0F4osHEKFVtatptFY1kRpptqplTzGOfVmnsNqAYl7mou6hW\n8UqGZs9E/VT+z46cMXXm/JCbhjtOe8rEf6P+hxgzLM0Ot7cI+UDfJ6bonNE0\nR8FQ7lnPxL2VLcS0Ztavj7xqY+z/Lx9/bKVW7dHpKhleA0KoAAyiK2GpGb2U\n0D0ifqZ6P7y9u82DV2mkdpY1oOPTOR3YC2AkAbLouCOnMtvbUYsRmJd/NRuS\n9rlc5vDjD0hllSpADjxUiaBg93Zp63L8wRPWT7ncrW2qoJxn1l5Tn6Ju1ylW\nFSF6\r\n=OHif\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-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-lambda` 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-lambda","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.2.4_1543413110336_0.8161411945048507","host":"s3://npm-registry-packages"}},"2.2.5":{"name":"apollo-server-lambda","version":"2.2.5","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.2.5","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"03fca605dde84b237164a71080ea61e756837c7b","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.2.5.tgz","fileCount":20,"integrity":"sha512-ehZtp1v+/FOgtuzPOjG90TS/AqK2sHJxU5/X56yd6FYrVz6oCIPr4rwShd0QWucXsCVd71/Y1hzcFdt5C3dhjg==","signatures":[{"sig":"MEYCIQCmpW3lQyZQnB2dj3A8Ta6nb+2S+dTTviC9bOgHuM0cTwIhAMLJQPmCL6NdvdpSEMSqveKxjs7jDs5WaYanI945tAkt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/9F+CRA9TVsSAnZWagAArmAP/ilfHBU9RNDvzetaAjgD\nl77WkDGCuiDW9ELMm3Xkd4uN5udM+MrAOXiqffwWFTD+w8W6J3elZl0yT970\nszMKboYu8hBw4RwNIABGobyi4hGRxuqyeKavLb5baCHOyrr9yTnU2LIk509f\nxq5mtaz0oqqSoyVvXCoUqCCucWtWu1ya0IPR+nw4jWkVgJejOPBlzEaxz5WK\n8IY5nE4rq3RXUa8AcK+QELke+Xzi/lPWWeiXScyAz3S2qZ8D1QKI15i/Sf7P\ndzHUHfV5RCbHajZnr7Fn5tVaAWvWmWZtzn8gO9trpQ4BEvYDrRnXrA64CpCb\nCCCRSVxoa+JKvYXvvP8WxMbA+R6T/Haq8cBfTMvcmmuccJZnuVymZNd7ClOa\n2x/Tn9kycL4w3WTK3maimgILgarwFp0TENupYmeUwLnl+Cg3o8mrJ4krtXkX\nKbtjwVyhy8aFa8Q/0mz6KhG/rkNz/NxuTAXvauJS489wm0Azj8vK9qDg1Klz\nH/DKC/tXFlnvhIA79n8n0V4W6ww6VNgV1ZKtGAUjdWbIWFfAGswOlqOzSIHP\nyxbT1ITD2eeiJbQeVqP0R36IiUHySapKc7lMAsYLN2ZSih7xNWn3Cm9N6OCw\nRPR4CmkAfaDzf5Mcz+/CYhpNHhfwDjUh+76yOyTGVA25iBvI7V1/Ucsld/Zs\np4o5\r\n=D1r4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-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-lambda` 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-lambda","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.2.5_1543491966191_0.8485189482722306","host":"s3://npm-registry-packages"}},"2.2.6":{"name":"apollo-server-lambda","version":"2.2.6","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.2.6","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"76a05d713bb6f722371ba8016b71dd93aba170ed","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.2.6.tgz","fileCount":20,"integrity":"sha512-Gm4uHm4HWkQFKLqe8RdoiuOlxRRLIR6Cu+WKd73O5X6jxqPbKZUjxr4i6kUlKLAH3IQ8zJdUuvnH392ZHIeXHw==","signatures":[{"sig":"MEQCIQC6ldiXt44mVBQhB37bnFEyds74ssJNEF9kWW8Y5MOJ2QIfahjgEjO6tmFrfuwXrNVITRb8hBkcszSsDTGv5IE0+A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcBmaZCRA9TVsSAnZWagAAf2cP+QDDH50u3/DtRZ+t2+FG\n4Is/GV6VLxWiE8usc4gJHj/75Du78qrNOYAGUTRScgzic8qIAA1+pHseFd6+\nskcnPXfPdQbLYJKjJA6HWArRrHn4FCIjRRCiKujU2eGFRBmEwDWmwHj27Yh4\n5yYkvXcRXW9E8CUhvLISJT/+FHvqtt2pXO2MyZvYWmISJzhdhs4oFJZlmLIe\n8sbHAaFCyIXsDW0/7DZlsGG8hZb/m0peWNTEB6O+svd4nvgjlEldaS1jmiRU\noRf0vxWWYtcCIfNOixjs1z/hR8C7sZBr8QJFq7qOkqRaFjenej1L2aL8i76x\nO2himAgknOWCF1+ElgWV0uj5Z7NOoFoOYMLIWJHdDuVCW8ty3X6bkTV3Updh\nsnvscMipauGz/l4d4M7ps1sryKSGeFIbanHhbpEGAlF0hrtSanaKIN4LZ0UF\nku1O4qCEjnq+AWk7MtJdep3S1WY4ZbncyC0T6vnzKvdkgQV6k0dzZqP8BR5M\nn52m4Q6Y7ym+g86qY1ia6UIfZGgGTHRP5KCEaoFU0oke0UvXIAcghYUSpyyj\nod4Vk3d8QEJ7svB0mYLRflVsarcA0PhKba1PUY59DgRd+53GxaDD6apARgkt\n30T0vagHtOc4tHIygXs5QQsCCo3N9xKMrxVZIZlwJkPyjEhNvQV8nqt3CDS5\nIAuZ\r\n=I8+7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-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-lambda` 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-lambda","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.2.6_1543923352411_0.6541031999759832","host":"s3://npm-registry-packages"}},"2.2.7-alpha.0":{"name":"apollo-server-lambda","version":"2.2.7-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.2.7-alpha.0","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"6dcb5d1cf25285b41468074dda7f76dd193e488b","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.2.7-alpha.0.tgz","fileCount":20,"integrity":"sha512-GJocaVfCiTBFAjM79gsKEzRNqbGxUOkXf1y56If2flVN5D7SHzFrKxaNV8AVRwWvngFcttOVR+Ny+3TvmU1IUQ==","signatures":[{"sig":"MEUCICc50szK8Q+mVkIFIn9X/W2Jtt3kmKDLDuIEfN5+16vdAiEA1Pvs3elir1CsViGMpgLbCMX0A484F6et+cJ2+N3Lgwk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcBmitCRA9TVsSAnZWagAAn3YQAID7ZseTsV92ilz6he6P\nFTLQIp9UlNh1N4GAxSMB2yOz7pe7XhujcRn+aGWvb9wPflKAEjtoBvnC4HdU\nyZ0KKizMA5WKdEZXQ3jeuKCbwgCWTBNxKt3sLy+iQZbEOOfdT3NO/6IIcNq0\n2+F36qHioZKqulJsr0yyQRAxGJ8T8/TO/D5MsyO5DlKlzINQq6eBQQoO/WOX\nRhDJKW7oltKLk1rVtkq/K+QNP6xRiNQElDFgSzAyRQazRTWVeiJbouc+T49U\nxxwbhHM/XlO8FEemFd3Y3pr76p+ggpQM/qZyMGMmtwc6TThjuNMb/aGbArKd\nUaeM+8WXMJLHLbQkfx5OajjsDUp9cTluu0CP828EaAE/XHy8kHkEFdybBOBG\nqHWzew95lzZ0XCI+iqSDnr+vYJlt892OnYj2paEVTKXA9vodWVyHg/nBXb0A\n24qkkCupIS4f5WTgUzdLPhhnUYBTFflTWzMG1duA2TJsRIvArR1oDOize9ll\nerKx9VX8vzyBkZRr0Dqrg7Za8ha6yPYfeYrMy184pSvU+mIxxWa8O+01kas4\noZrx09zsJaRaJrfohIfEOwT0rwYbzLe2mduTmzMJ9Iw0iXlZpHOSwoYR0RL2\nUOfZsgGpFCMBndKavYfC3P7PH9eLGdzjbGH6Vr/BKpsV0ayCFFYZly4DODSD\nh6bg\r\n=7USO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-2.2.7-alpha.0.tgz","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.2.7-alpha.0_1543923885254_0.8280601895676591","host":"s3://npm-registry-packages"}},"2.3.0-alpha.0":{"name":"apollo-server-lambda","version":"2.3.0-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.3.0-alpha.0","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"freiksenet","email":"freiksenet@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"},{"name":"sashko","email":"s.stubailo@gmail.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"753697a33cd750178d3e8d4c7480c6f539b78fc3","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.3.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-UXFr29DXLIuvtfOkfzuYVr8BvkBzs9h/JByKfhDEamM4/iPGbzhBAey1kiOl2717aIARNyPLhwsVzqEqUWVebg==","signatures":[{"sig":"MEUCIQC9GA2tuqrqmJMpsqn1xkRI/O1cWHSwxVC15aPRiRR3iQIgeZHOJrLs54aoGrTsG27mqbACxkCbkbXWE8J/F02ZitY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcBtHPCRA9TVsSAnZWagAAdvoQAJLPCvCxmA/tUo1JR9ml\n2QTyXqkd+CtkLlRHelDcVRGuVu/dTjlDQhHrDcMoXkpjxfKnDV/9zGt8Onjz\nUESd6ZaEp+/5mKfV7lYQVYyLwG8YSdJl6uMoneiS4NqqiMQV1JXOvWz8evZa\ng3NFz2CxobOHhfNXumyD4/+l/nhGlMErA5RP38yEtNaVPk9GT7BD0TnCH3Q1\nKOrcDT0tS5sZxZYD8qpGMJsV7BX8Nrfu4CmcrowPmasligexS0R5DAKhf8pj\nzgXTTHrJkBtX1gvFRR9M9NrnG03fpOCHSYbZG8QCq5tNIcsLZ63B+cW8Xzvo\n5qwV9nWMKBzx0jPG7P7jzGqRgQY1bir4zVYqxC1rn1NMlLOYGTYKFhOPpmtq\ny7+WRGnkger9J7BBkLt5sshpgj0wQCSxdOpzCJV7VAJiZ8mNLKbjadYRFmiV\ndziutay8O+jpDeeiJsPX40wToapxyhbMbjigiq1VaUBP4nazXFFecxxlxueg\nsIfuY46yUjprO+ezId0LRZUiN4O+gVyVM0MXIr95l26qVsrX7gUWnHdVD07v\nfxQtrSm3/dpqMLrjZZqLkS5Mbm40RRrdbMh3VgnO2AgPRvIR9fJzTBQ2u3K9\n3tnDCDdpFEeZb6SZI/sk/ruVRizwsYPjZRoGAazjADjDh2i/Js05/TaxeMe7\nVjhz\r\n=n/ZL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-2.3.0-alpha.0.tgz","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.3.0-alpha.0_1543950798561_0.27361725365333367","host":"s3://npm-registry-packages"}},"2.2.7":{"name":"apollo-server-lambda","version":"2.2.7","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.2.7","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"jbaxleyiii","email":"james@apollographql.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"0adaa98a727d671dfd757305e03f11f5e1f88929","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.2.7.tgz","fileCount":20,"integrity":"sha512-xp1BeUtexXdzVLpn6bXd5gGCt8GCLA9evqiSfXP0AJxRFDI589WagrDLaAIzLe7U3ghD45gPr1GSg6iN0tdktw==","signatures":[{"sig":"MEYCIQC9aL8Yv7SqpqQ/K7KvRLTqRMzJt27to6YaTL69vjRj9AIhAOuutGUKHExQZJlJlVAP9uB9wRQJXKirREbNzwRnwWCG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEliICRA9TVsSAnZWagAAgR8P/2/6vGhAVwPKCDBe+CbQ\nx5Zv9Qnmuc3foqOf/Lw9ub3r0LPQrtimyFpoCh23KfgAVL0/rJNFLwHgr62f\njksND/FXaCK4BKz5jAszE0u3FKUj5Nfed6AgbCMT55YRQAdF6RieLSeMvnAe\nI8KBuHPwABAss4xqg+jvPg9vPvU4RsIqMwfg0lBUN7j4ZWQzQHtd4/uB9JVa\nLuDgdbdMALwxDAPM4naqHnHA/ER36GAC8UuhpfOwXbzP9OkgmZ0tI4t0tZn0\n+7sr77Rar14EEPmIjfL13YcW/qTQHcbnK887O3Qev5Ue0UHnM7BlP3dBcZjV\nbisB1nrk/2FFCTKiQunxnKlhuWnJ/Z8HO3ChFtxsOuEcbJcGH27OVFF29YUA\n7f418ewMNFj7NHsZVq+9AaM2NjcBdO2Uv+0SvnCiO/TS2nKJ76YOGmeZ6BRN\nxRNeC4CdUhS/tiLEak19uYNvAZBXK0GkMyioxtf5nslaAmHHlNDXkLI/Easn\noYY7P/4xde94uQjOY2w4eo0qXhlChCKx6/4heq5z2DuI4gJJtKxLHuyU9L4K\nYg8LuvuziQumJlTE/CdTZrZkZyZAgJT491sULw98xELgdBcLOsgkGWMMtjD4\nXfx8/bmhb/sYWQXhcxaD/nTFjbsswP5u/ug47DEW8BTRVdWHISQOqa8EKPrf\n4ZeP\r\n=0dHp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-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-lambda` 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-lambda","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.2.7_1544706183381_0.17747636695551616","host":"s3://npm-registry-packages"}},"2.3.0":{"name":"apollo-server-lambda","version":"2.3.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.3.0","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"jbaxleyiii","email":"james@apollographql.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"e0e25fac2f7583fa01c3ab2ca964b44ce79069db","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.3.0.tgz","fileCount":20,"integrity":"sha512-qmXl1EAG1LoSP5mjFRliSkHRymJna9NnEeAX2gXL7LfUsP5eQ+b6d1WtQHVib3ZmKhAcfyFTGBt2sG3KICXSUA==","signatures":[{"sig":"MEUCIBnNzDDUsSAyFe9bPjmB6lk2Zh/rwY+6OVgKJumm7ssqAiEAt6SbjKrTSP0kgrplhUDMnIGaP4r6A9JJaurwgFWu5Ng=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEl76CRA9TVsSAnZWagAALP0P/0dHl58/zwPoE58q+JTz\nHJi/lnhatHXOZD2KLrYyG7JcOKIVMx5LP3zwwmqXK3VElXP+GWflneICKSGT\nd3E9nfp99rR6alPcItBIqKcgGDuoGaEIDaHW1zcYc48BKxGroFwX0RHUHp6H\nKXYEl5zkk8bwUJUYtHR5VbuxTp98/bW/0RHruRYnjIzVcFdhyKT0fz209n0O\nmSpi1a7sa4IoVNF0PKPRuiuu//XA5ZJB+8i4XA9t2eqi1XkWoNDV9fQJfqgD\n2+2PgNZKn0FCfkX6/MTYxEc5FUq8JphBji32gN1cYlrh96qC6P3HdEkV/Q+1\nNZ8nq5mvxv5/CtmGkwUuyuhte/izs4Eq4BMF6RUVFc4qEmbI/rI/uJsnBHaT\ndHT+HOg80OffN7XgHU2y1uXZZTZGKS3SVcVqqc1O/Zl0e7pFJq77tEyhkksV\nmF9vwotIJshVJV/M7C8ShPxCMIs0xnRe1lQds94cixGLihpMy8JORckq0lj+\n9a0wY6NBY7iL9dXoWWj6FeNaXhElNfYf+8/DF+zoH2Iv7jny9xEz90d7zM77\nYpM1yXtGL/pVv9RCxo1ql/jHfF8eimz12w2qOXBD5l6RKokpJ7O7DtKGxFku\nz3DQfIpOjg/sZ4J65q+7CGQHkL3A3SR3dajNI+J3OYptBxiyNr9BKfUrNBrM\nlOMI\r\n=3aB2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-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-lambda` 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-lambda","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.3.0_1544707833477_0.431792901729829","host":"s3://npm-registry-packages"}},"2.3.1":{"name":"apollo-server-lambda","version":"2.3.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.3.1","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"jbaxleyiii","email":"james@apollographql.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"187d2d635aec981ea8956d75af76c185419abd61","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.3.1.tgz","fileCount":20,"integrity":"sha512-wWDzn2tG3e6ygZLdYXAv+WR80aRbMbOwXaQ7Jw1vMW08ltpvL/FTJb6Hf7oUlINKwZ67uqm3BbeSS5o4jMM12A==","signatures":[{"sig":"MEYCIQDmVCBCOfutNv3HWPSpvkXqVxYRm/3kxP0uwR7Ly+z3AgIhANx2jk1Gx0gMBpS+0wkeIt/e8shvm1uEpzKZuNRoxKu5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEq4QCRA9TVsSAnZWagAAwjYP/irplLFiFG/YBmHlXxZU\nY5hlh0PqHsYx4QOP6Yv5ZXCPCDfBF206TShJK6tTjparw/o1Ea0rkoZdzeCX\nnQ5ys0ckFeULIH8mw6DcAEQPHaq80amxEkf0Ss3dVmMvYJW1N1k1VD0O1lUc\nTmpfw5zePNhfxqtJ+X28ikOugHuVFqPvZrE4speioC1P0Bw+CYyENfelioKJ\nytTs7U63Pb7ehxB4jV6I5YnCrFJ6xOZxUeCoEXhhf+azXj8aWKc2o2TQg3y4\nuPTi8jPRygD4kLdZSnT9YXukanE1YtDaG/wuW8DGpCiKCepGSHs+7RxchmXD\nUfiGL5PS89A8OvzVezHXpl1YKe/8e8VkOwITF/4UkoNQB7aeZQXNeQGJSaIi\nB9zPJlzq2vE3WmEgJY673bFbsFvM1m3FjBdZGoM7W0RMdmnG2LZqKv6jyJOr\nYiRtxRi/NNz5OpK7BteumX2y+TxMOOfBp8Mb2l0Ek8rY50COzeVLAFPdjGdK\nj0giFdSzGoq86pkwVl44b4GgE/a8TcrFqj6bIW04NGRzen4IkrmCq4Lg5egi\nmDJouxwjU8jhwzAF8Bcuaohuh7aNLBrvpYHt9/N3zztobomVqIe6nsH8RoJd\necPMKd/FgW+3HZiPj2H9MdcA0emZpWO5ApICVSXrkDmZoFoRHF+Gx8YH3l4T\niuLu\r\n=EgnU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-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-lambda` 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-lambda","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.3.1_1544728080200_0.7460960097289713","host":"s3://npm-registry-packages"}},"2.4.0-alpha.0":{"name":"apollo-server-lambda","version":"2.4.0-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.4.0-alpha.0","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"jbaxleyiii","email":"james@apollographql.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"a271cffd98ee06cbf8301973278bbc3eeecd70eb","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.4.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-qg/8zZRRKu6vatIyPfqIHRLFkCqVGS1D3d9cRV+IomcmgSg6na34PbnS15UnpGgCJ4GrWrVhZ4Iwmqj12b3gIQ==","signatures":[{"sig":"MEQCIAVGD/s0W2nCEG2LeH3zQQJessxoy4mi2c4ssEdnd+k2AiAAiLOTY3S/R3StgkjTYmOK6A/BspNtni3YgwO1zbR8mQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGQ7iCRA9TVsSAnZWagAAPqwP/Ajatp26RtFh4oKrPO11\nvvB3b7/HCn2K31uJ7ZctGeRdFuE2xltZqr88mI656ZlbBJ3QvTkQVo3SiIhQ\ncqUDQwKXeO2PVAXtH9YvYJZbP/763DjVPOCoc6cLDqpCnvtKeQ97tMCfIoVB\nCkxKYGDCvXANbXPh767oMLNIq1t5sAlW3y1znH/radIraqFmrJhMEgm8pZFU\n6mOg15Sxy2mIAO5REMCBJ5khp85CWZHK0oAS0GQhC9U6rDJS0EkjtToSLJ2A\n+SPdc4/RmB6+5Wu7InAO9aA8u0pp9ZSiEU1/Ww7OpTLfLLrUbyWvuZZcXX9F\ntpNxe+IdOb8pTPhpTUEaSspYOfA01w8Tg9VBWKgRdmGkrE/BFgmrA6F8tLHU\nE2ywB4i/QjvBaJ4R3Cgi8PA3+sac0iPhV8AcYsIrUHW4LaSMUGsOsJ1y8wGu\nJ4Evcif9IYZeqh/+DmWmFCWYhw1LhYKhwtdCEjPE7dmvw+cj1oHlCGvdT2Uq\nkEGLowR9aRoHo1gsPAXV9LdAh7b+6TxhFtyhm3CwXR8EeS+aRNq7+VK9NEdH\n2Ouq9tL3xXoIp+5q0Cl52qYBuIYABd8aNA+/ptziq0LDuAmxkBErD+/tUsUI\nVagmlcJUNkm+5VuDBwGkV1Uz5YkMEGzL5rUuBJEVrPOJFhDC12qM641YTSen\nc6Eu\r\n=Lgf3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-2.4.0-alpha.0.tgz","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.4.0-alpha.0_1545146081531_0.017688275364773354","host":"s3://npm-registry-packages"}},"2.4.0-alpha.1":{"name":"apollo-server-lambda","version":"2.4.0-alpha.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.4.0-alpha.1","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"jbaxleyiii","email":"james@apollographql.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"722625ef23f110b9850e7ee114b140c03d19f266","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.4.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-7qijBRcbhoOjgBLGM+jDxcOYz8As9AdvczVCl3dk34tofMWsfa5OFoGXphPR9UusEIvHB5GyTS5maTPBtp6dqg==","signatures":[{"sig":"MEUCIDeBLCN5OBjn+1z6QfqAn0tpfOtx+DpssriiCKI9PAXvAiEA6FIqiUbeJrAh8vxrsS6/TcTlsmLDzGdEuJ3KUw/1yIg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcPxGCCRA9TVsSAnZWagAAdkcP/ArKWrKazvWSL8pQo6zG\ntJ3eYw3vQJzR6DJ0AfCLcQnSg/DtshfTwaZuoij/YEPnIMbC8YFHZ7PmLbo/\n/srIUUVzH2YVK+w06x21twfhj1vBgjMuEcLnu6txLXaxxLcBSdfDrSyrlaM7\n5wu+3VVphd6ucXrM9/E6FhRpt0IS7O3bhfKec1npsjI+MsL3/1lFobcSjpHH\nDAUgPzq3T+Loz0wJkRAEv1DJMb1zoNGsNnrJZNBdtR8q4eIAcLCajtZR8cl9\nA4E74tKbfEMAGb9eAHy/mg21UdOMkXud+7/p9Gzd7sPkcYV30DXADmTr0CV+\nvOmQteq5IiDJxV/ljSURjDLdSSB0d4BGP2irQ2icJ+WflHSxV+M9uh4FCzjJ\nAoGXBTTaAf8IJ7y4pN3hIqhmQS5dDJEhzktV395ZHf+MZKjiCtRFo9IArTEd\nSUX8/MOvX4lCboVgqkl7Ckj9dLVdPmnK9T1gyB8rCafe3itQbIurl5fa3lbU\ncdhKUb7kgXOGg+DQykCePbuqwvOANZZbB6+wruP3R1e2QzXg1ScmmKFIWAUW\ng3XILdmN6WeN9sgONPf/m97Qj5MFEiQg79i42kivlcf+pTMrNcjpUxlJu/Y+\nGYW9cncIO7FmFzrngkmpLJ3Pz0SXYh8vwU+YBcKAL/oyJQnHmjbprBlD6SGL\nA3j5\r\n=EPBy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.10.5/node@v8.12.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.4.0-alpha.1_1547637122069_0.8959986637936272","host":"s3://npm-registry-packages"}},"2.4.0-alpha.2":{"name":"apollo-server-lambda","version":"2.4.0-alpha.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.4.0-alpha.2","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"jbaxleyiii","email":"james@apollographql.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"88068389ada5d8af9643221b3700a615c3712c59","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.4.0-alpha.2.tgz","fileCount":20,"integrity":"sha512-7M0Lleh3eQ94Iqn+PaKAQRJ1XkXl5zrNzWFWqpB+FXzCB6UyO+42EcOeC3/MFkGsVvzXbXN7R/yPUXLoq9fOog==","signatures":[{"sig":"MEUCIQDapDUIdXy64oMIYlrpRbh6ZXINxtIfhdHxIpgUdaUfdwIgRsiGJUfQWk2RCSjnSXSkcDT3QRk6PedIudvqbE+9ywc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcSGZuCRA9TVsSAnZWagAAF0AP/As7ktDJ/xqc4LJ8dI4r\nANKR2cBmW55FBfRO3HhWem7E5O2L56Wo97VR+S1+oifhkWPXVuApkRYaqqhx\nDDt9nTWFrCjg+5Xv4NqTi2l+DJ23Zdw5MaHwF1OCiD2lQeD94ycXMWlCsC/l\nylpOU5uTQDQhm41RYT4XKcjmFakwDwXHjCJhCnE/EHtQOIjSlAH7JfoLHaF3\nfGilklA/uWwHxF74Dzsu8Gf2wHmHWgHWZX7gEcqabJnkBZPnrrkbm1w6h2HA\n1fcgSN9qo1ZNWehE4RbxVHC5jqgYz4VaTdPpNG69ODbKAsXoQHaUrar7FPSY\noBW3S+95b0zJlVcrdX88+6HndbmWBLYlDxZxlAPCptAn3BUYmLeQdHEj6xwP\nO2kJYyd/ob2D0a9qVPg1D6gXiuIGzkQ+EL1t5FePrScfKvZwoOmZxS9ZE5Nq\nuQClUQtKy9/ZhtldqfxvSBuG/sqHRnd8uQw5kTUi4tpwaztIjRyXxDmc6wIa\nUzIOIG385H8sauyeY+XDpF9jo10zTCL7GmzLTa4X50BBu0zz91qFGBVh2i47\nnY+obfV9EG1MC7X9wdsORSCEK7yKzHp4M5M8wssQH/F88JRRRpxIk9VXihQc\n7a8I3R8Hv3TAUoLgP/oNjS/Keij0+p/gwVP6EVl8+PXZxKj3fg40LTLI5DcV\nj6ts\r\n=7bZx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.10.5/node@v8.15.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.4.0-alpha.2_1548248686181_0.895156272706616","host":"s3://npm-registry-packages"}},"2.3.2":{"name":"apollo-server-lambda","version":"2.3.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.3.2","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"jbaxleyiii","email":"james@apollographql.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"97c5e9bd22a99fa22a22fe5653a6e8d764dae6f0","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.3.2.tgz","fileCount":20,"integrity":"sha512-v0i+alMMd2cFLkj97LIm/4rwEyOmeiw44GeUmVrKhnjVxWj7BT+GO2zzH4FcWTmjvZ2nwm82iTIo8lh5LMwokg==","signatures":[{"sig":"MEUCIQCcjSMH9CVDfyUF5Wu5v90WfAXd4emBtoN7WMN52gKcLgIgBgsMSREn3mshTU3z+ikOgJdxR0cJVgaWpWYHN65oNfM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcSz34CRA9TVsSAnZWagAAGQ8QAIBPW+Seowx4eev9FrBT\nigq/GCewWN7km5KAQcJDkIOC5mygZGjh09Qj1CNwlv+FsZErdPa4dDh0LJNU\nKM/0A3z62G73n4V+u/2aaTx2FbaFXffeDivtxmmTIwhdTj2XRglR8LE6wtm7\nAEOpldwbnnUj/imKWBZXEPg8F3q6+aesmbGVA1omKo8cCpaLHUWcqeH7DQhW\n+efzNIKTULoK6yLDty2wzjizxD7jc1drPTvrOdssP5mCPBl5a9i7xRIh3qpz\nByFM7+jNi8ciz7tDf6Z1a1Uc3IaU4VxNNwFlUKEnSNSy8xKis3FDQ/U+gKlq\n0xrXBp95layYsb7AKekYJyJWnCc3fRrfxv5RHYgqi3xHuq2FNy/Rs7AOV+Lo\nBuSWArEW6CPkEV2juBT45CPLTjOmuNbfa9cVY+h6lhFeb3X2/jhflWLVbJcY\nKaoqMDeDTpbjiw/yxmp1PVZJq3wfRnJuYqnGeQv7G+DukaCN45EXpL1CNLGf\neCs9bikUvIus1od4ElcK2e0WN5ny3jrAvQlLgZbd6TCBVtKitZ7MsHStPc3C\nlujkhZnKdOhAwa2gslAm1suXKREUS1iiEvkNPDFJD9/24ycyMbPmUGEXacGi\nmfC/NHP54FtV22FnELnqtie0V5vtqtlbXC7nJHABnyzzjzJn/0Muppxx+Yra\ni0mF\r\n=Xsor\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.15.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.3.2_1548434936004_0.5105517399349071","host":"s3://npm-registry-packages"}},"2.3.3":{"name":"apollo-server-lambda","version":"2.3.3","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.3.3","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"jbaxleyiii","email":"james@apollographql.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"3b02040f0215fb5a644c8b526a70cc0db96468da","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.3.3.tgz","fileCount":20,"integrity":"sha512-4vrVEYX8U80YUG9kFNWxa6BaLRzp1SXieakHEjkrZKAEaAwXx5ykaKGgz6DgPVRqtOaquPZEH7m6DMtx4DAN9Q==","signatures":[{"sig":"MEUCICBqbVxXH4LjAXIir0XAeMjqpuh+w823pXMWXbR/bJnMAiEAu6DJ1LJg05mUTbW0NllHd1GtHmC/0BJKmVFjLdtZ6xU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUCI7CRA9TVsSAnZWagAA024P/AwnyKn4jv1yRQigyYnf\nSRC8Fko+ONzFFHRtZZmTNUUZzxOvYGoQHLoAc5X29Z8qwH+uj56ZK2X5Xh9F\nwjFsq8bbNATtnjvpVlyOBBiVG1gZ0xQ6Q7bKmFEiU0HGKFH47FchFTmjXaxs\nVYxExbYzPisTBiKhq4Wkyr5kdk00S8VSGS6kkvgfQHlf1y5Exu+2WGzqNjhN\nCqV+pYF8Tgd0BpxJuK29brUY5JvcQS9YMKFfGdHQP9pijiHa58TXWJJaWaRT\n9T5y5xuLdq7YZxx2QZ2xoNqCQQ6H5C9gu6bMv45FmqbRR/Kc5BBZNdIEm0yS\nA1CboK9qOecJL2lD7/P6/yYaZ7kDbaTcxCceGh9QXyPljzDnRpfrDVzkw+OB\nFSU2quR+d2dRjjDXAU2o4YTeyTgVW3tkz57tyCzOkNG+MvM17lDXUOpOueb0\nPXMpJ5FCRR11U3YhMHAA9iTwSreuxxpf6SWaPtZ7IUfH+h1Nohz6MUq+JRqf\nxZSzw1+Xo8ThAnLQp/bH1EFVQIFR48AO9OmH9kiMwaI6vDOQgWUP8GeJd+UW\nupoIDAPWElQ6fCk5abgJXJNd6nkh3/HAB82DoUAnJTIk942/WyWrZ47KYDo2\nHAsrLiW7oV/mkntP+HLLuSUD4AzA425JOKUiwhuu8rBzCh1bGlVfdKdMeg5q\nMUhY\r\n=HlHD\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.15.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.3.3_1548755515425_0.862042639486613","host":"s3://npm-registry-packages"}},"2.4.0-alpha.4":{"name":"apollo-server-lambda","version":"2.4.0-alpha.4","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.4.0-alpha.4","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"jbaxleyiii","email":"james@apollographql.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"5799074e7ac9614320f81495b4fe4c970d3bfdd7","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.4.0-alpha.4.tgz","fileCount":20,"integrity":"sha512-KL2fLYP4Hw385XXrdXaB8q2y6xFWzKmV2ZII6w5UbFFWNkJ+unBuxL8VV+xKsI5QKB7uDnBlKX6J0oeDxwymCg==","signatures":[{"sig":"MEYCIQD12/nbtcp9b6YG+NucGc7OujeeeeI/R2XwkpDoDDZ4OwIhAJ6ffqbKrPt5nEjeVsgaS2ftYjj3lUCK9tFo7v9jZJVO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXBAfCRA9TVsSAnZWagAAgKMP/3kDWhwqmDy6CUf294Qf\nOJtGwdJyfcnNP98Hq9WtGRxRbCDguqD0IDDo3QGpCEMf/yseeO0LkcR6JmrU\n2+CNKR7ysO5S7nC2GF0HO0RJ/iUpMHbUDwkc8WUvjKHx2bhgwxO3MARUgYDD\nnvva6NE4Rah5vfVqAa9dw6C09jEWCmrCrLTpKCGtvwaZSzY7JlWmVEba84Kk\nYkT1XIAA5/WPDbixbwd9xh/Giz/bgcIVpcZonWhUTH9HPD0bMQV/QJeWna2p\nNm1Waaz+0WhjiB6vwoBxVHlttOPCgHXuUBof7Rx7VlnyHfKCyvRCnE5z3avD\nlCBkAQj170gse+lrSz7+qVWVrQR+0s0+QuSovcWgC7SSHG+6VB1Xd/foXbJ8\nT55olSL+Ma/5o7VHGK78XmA6tsCaH6pzQ9o/vMxQpCLHq1hnV8yvLjddsiMy\n4qj+bGlHfyNeQ2duEMIsje+L9Hdl8/lqy8KLklk5iAtRIwOQb4atJWKkoUiy\nzQcIzufFgF053VCHvSOTwJQIpsI6jtYpk0XYrVNYI+IHZv1RMNuxJc09TWlT\nTli03bH3g+C9wYk82SYM6DFZxFjm0jsHwXmu5yD9JAP/9UnXIWWNpmzCFbw5\nZMEAZS5JPltgVolyjkU0gbslSywfncQI7qQ5YP5h0mm5QV7eahPokeZVqCUq\nK40q\r\n=uOFr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.10.8/node@v8.15.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.4.0-alpha.4_1549537310885_0.42755843531024573","host":"s3://npm-registry-packages"}},"2.4.0":{"name":"apollo-server-lambda","version":"2.4.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.4.0","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"jbaxleyiii","email":"james@apollographql.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"1b448bea3e2e6d8e2da9b239dcf4b0765fc873a4","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.4.0.tgz","fileCount":20,"integrity":"sha512-gZffq/plh+CFG9e8Jmpk7IKxairvdHXu/r8rCT6WdZRg70Mmdz3F1tSLBnuNK9sRHh0HA2moZ9FAHFoNHLwwoQ==","signatures":[{"sig":"MEQCIGGWLK5muLHlom315H7lfx/gBq9fM0mkfDEyBzwL6ku3AiBm/bzmsKqAhNkWjWkUbLe2MVqQVEl7l2nE6XUs0DBDkQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXB/mCRA9TVsSAnZWagAA8QUQAICCo2NSlO3mJ97DjjhU\n5/9sO/VMu7ySKyMeA2bxfYXJ57eZY0t4hw+mmmYLUTKoeI5l9soyT/tVRS0F\njLGDROUC/gEg202cH9rmBInpNT5RApQjdCJeG89TcOwOFF0BELkZFTul8VvB\nicC5ZhesHtFJFHALiC9KAYxFegGTCdkICK30r/pME6RAWno4lyDp1eorOyvK\ndz7n34WmBL5BC5iIo5jG5cZvmv5EgDV75oK4j8tUGxBHsx5G0ezmUuXZrkes\nthXXujvolBOKU9gPAP8qNCTW3BcHq6nEhuBqNpdijbt8oBU3ehv2KiVhKhAT\nntwvln1dm24jHlrcJK5atzzhGnQ821fuwZsCdUtFIbSSECt+U3sMN1A+/xqY\nZ8qj4ArQz/kFOUH+aj8gYBnhToOfQw+Qdd7W2CsT8HUZkVsS7F03yzEskfIl\nsWpmXTfmtJMkSE4y7Wy+Vl53oiEqhOqoLdDDpt5UoZGmUfkNWlIQaKgYiYWE\nHTdx9RybjiRUIfrlCR1ToZfijPK/gKZZwXNX6fedEmiucKHrWSZLNO05fkJU\nGvNaTC57vWzixHvHs7J4659qPOOCQiObCxzRPqfL+KgvxY2HWJK8S9KWhtvQ\nghAkSh2wN88E+kRniO8xFyaYAF8lQElfYKcYLXg04PkRB7xRjxlbMFBAP8UA\n65NH\r\n=yXoi\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.10.8/node@v8.15.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.4.0_1549541349567_0.11577446014092008","host":"s3://npm-registry-packages"}},"2.4.1":{"name":"apollo-server-lambda","version":"2.4.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.4.1","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"jbaxleyiii","email":"james@apollographql.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"d68692ea302474654ffa5b5632c717a5bc291d97","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.4.1.tgz","fileCount":20,"integrity":"sha512-DmNGG9QTFhzVyamT9jN1ei9oQR+4OsYI6DUEP+vbrUzimUJknEPIyG5nDIQHnsDXgDWUsyzOsSLVDrrhPJo2pw==","signatures":[{"sig":"MEUCIGzTuh1+ukaNbi2xNMrAfe32ssAR8JQ9uoMWuVq5r4OrAiEA+XHV/RlaV1bhSHxVwVOUUPG7RRnUY8BBOUcjOxMjiVE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYzwPCRA9TVsSAnZWagAAUs8P/2YoH3iWriwk0qI+peeE\nHbpjolIcH101ADvZgghuN9N54JgpohZdxSpdn1BYlkbyRya3cv78aNMzOJif\nPYmVfOIniVrxPv848gWMrwB/7Juv2X2x4EUqoeAzwJhVZwa43y/WF4eWcZ4V\nCu3Y92F29chZriyiojGGSGNupzcJB9YUpp2rvyLXGXWfLZaRx8Wq7Sfkcu9E\n6G7cmBEexmb9WC9FQk/plU80LQE1BPg8eaF4QMrVpYR1cz10RlJHWZa4qVH8\nsIOyt8w/JGX273Rh/Szk8RIsfTHeoYozhOWpaFpm14/SRVxd8y4FXmTRG+SG\nqMmxOErQ1dsumgqAk/EcZUQDcykykvedcW4K/EIGuAh3NfYcsEr1Uh11KrIs\nX07YGZO3jbHKzem7vkBIoRvY943uu8zbtbSsR94k1qDslfaaRed4Du8Y0qQx\nBsV59QX452yXJDI8ULANqRAR/L3Y72iEsrekHiWMyJfnhP5Ue7iIYPrI2Ljb\na9NbYM4/McfML3qTKj+U3RC2AhYznqtB4gcXYdIYMFE6vZCPvFRjG25cB7Xw\nha5rpWCxmJb8ys5Y2rZvMz0/3bbGSx3UiM+8mTaMO7PFD7onlbFZYA8aAJU8\n7ECd+n+alyTlfxhTUXEEXkpojI2WwEhmmK7mls3F0pTvE4QWQE/gdpzGTxVG\nZ0re\r\n=prAU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.11.1/node@v8.9.2+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.4.1_1550007309898_0.2829800855586997","host":"s3://npm-registry-packages"}},"2.4.2-rc.0":{"name":"apollo-server-lambda","version":"2.4.2-rc.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.4.2-rc.0","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"jbaxleyiii","email":"james@apollographql.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"742ffae80b1dacc402e0437d751165a20a147f6c","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.4.2-rc.0.tgz","fileCount":20,"integrity":"sha512-tnRVLfGfcXyZE49JXj0/oA0//PuFMi9VY3f76CchHvV4stn/rY0K75oLQRRNOwKfIcZdtY95e4sHkUdlCCxfxA==","signatures":[{"sig":"MEYCIQDhqJpxsrNG3S2i1xx/I7SV3zkdd42QCduQbPj2TWTPvwIhAOPF3jb/5Sb8uoKtqYWF50Ggz8RmQFh2xM20Ks0zrZ6i","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35728,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcZWpdCRA9TVsSAnZWagAACrcP/RgWNMExNrE5hH92qYZd\n4IMGktYXnjcE7Z5WEM19ro3pHZtgzNbvS9xGFlqzBWhCtXmzkZqMgIb1OCV4\n6TIL6jUJF8uKmqIXM05nJp5OSNpj5NJC6lcc4WfmV6xBpsSLJh2QVT749S/X\niJYMFrIoQjRh6giwrL2tKoSwdkgbWmJ1jWMrp8871wogGJ+FCQMUXuZOEIfW\nyYp+74Q2MQkGK5EHeKQkj5jLWdZG3VEfilWLUjbBLg+VE1lQqT0OIrCd4pN9\n8H3i9jEpv6F0oi2EmPN2o85yWf2NadrHJHcBmeu8MucCjX9bCqKNyRICOktQ\n4rhH+EaSWMmTXVduFk7F0sbLHP3OL4cIp/qB6fg2J40UrcgfMKqJZA+tDTaF\nuk91oZIG6YPEQpSrfJqqjggYg32BGcYJxIU4G3M3lNLJ8yf7dEu/M+B2EXlY\nqD5mIzVK3dJcb607CGuT57RLjeD6rxnT3Hiq8MfKMsiZGhCKzN0633uiz1G7\nh8tJ7ZOEGAEpxd20FxaLn9Z1Uz2I9JnB+kDAryMJKBntDyq3pWpOPogI7j0v\n1btqDP3G0xZeMuKjgDU7HWbAT+yv/gjp86Ucld3N0gIZNxgfoyjXPzuw8qHc\npK+E1EzjVgd6M5e8rJf+JXr9BgeTxytaXZeaVe0PBQHIVdC31Lh/7UsHtnx4\nO294\r\n=aNbU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.11.1/node@v8.15.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.4.2-rc.0_1550150236474_0.25772649071978426","host":"s3://npm-registry-packages"}},"2.4.2":{"name":"apollo-server-lambda","version":"2.4.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.4.2","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"jbaxleyiii","email":"james@apollographql.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"18b923be6fa846cb35f5a28fd858a76290acf897","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.4.2.tgz","fileCount":20,"integrity":"sha512-QpgKresjE5c0tqgJSH74WDLnoVyjugEoSSf65qoIyT2qHgbjhS/sWD/c0wjpZxPb0Fr0/+ohy3nMJ6ZRHNrBng==","signatures":[{"sig":"MEUCIQDB2i2QFndZZX7g/6X8r1UI7PqU2SfsVd/pfX7uaq1/ywIgE6qXGwZCgVC2eXuR3Ge2x1ziid2229zBC4smCsBdViE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcZWyACRA9TVsSAnZWagAAKuwP/2Q/wqlDTJb9jumTNTN1\ndAHZC2pZcHP4x1/YAxi/O2I7/eLDb5hQMi6iPXUMY/VpVVyRxhNqLd32X3Os\n2Q+E4sDIzSqK+lj6gwq6m9VtUXHewoZUJ/LMYCpGiUboGuboxCCREJCx7PtK\naa55nsUDnkOBkhAIvvIn08/V8Tmo6MU6rkqRbtuRHWBQ1Ub3VzZ+SoliY9MD\nZ/IjtF6dvpQEhN7XkWCtzWh4kEGxRq0oDJnEcaUiC4nqCm94dZE1KtH3212N\n5KtKYDPc3NF9fAxAZ5fdQtcEFrBK9bUC7N/RDWcWvEAgme2VuNRVOomwQngu\nGdIY369jToQZAKIPFB4LHRYnkj6qOY24RSiABfCwFtJH+d8sAzKVSgMotVSx\nKnXfoO4zAibinhZzxm5uYvs9dPWTsTP3QKAWkZhXdk+RhrtfAolAi0NjEyWh\nuFxIoWBRruq7IcGgjEP/tUv1rrwS2tBGQjdvFhmluTei5kcNcaNM5KdRUDJB\nGlSUYE+hVIWAxaHs8h8p2u/akXGAsaHlUa7mNi5F72I9q0H9W27vmLzy1owq\ngCqxRUXA9at5KSxxjwqEeNWU9wkDFP8Lxzrm7AHMdYDCX16OWTwCx6IxWUUP\nmBY/jDvmva3zbIX4Kg66MxrMTmAKuUpW+Npgvx/U3IlAFcN0tVZo6fIhI5bD\n7B7R\r\n=v6Fz\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.11.1/node@v8.15.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.4.2_1550150783519_0.8706160111388959","host":"s3://npm-registry-packages"}},"2.4.3":{"name":"apollo-server-lambda","version":"2.4.3","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.4.3","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"jbaxleyiii","email":"james@apollographql.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"4c942f9cfd9742d649abb0b0717e6087ab3a0bea","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.4.3.tgz","fileCount":20,"integrity":"sha512-lBpA26I+Ge8G2vgtifwVNXxNGPvVckXyR/nTs2HEMBDI7TqoENgSw9l35ziiXHhCEV6aqpHgYXaYUKZL8LaWMg==","signatures":[{"sig":"MEQCICMrG7we9J1k+TKhRxKZzzSat+DMlk/kve30vJcY1jHqAiAAmdzScgDXkhdrLtqKscCL1DbFRVHfS6hQOYm/nbcBwg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcbYezCRA9TVsSAnZWagAAklsP/0gpr4nIlbobIMW1SUnr\noXIbyPROzBhdD2p3h37AhCNEFRZQtC/p4ghAzFr3dvOl1FbqTHu+au2TtvbX\nwqplSXR0xU15IqCSkpwucb3AD7YZjRdxhGMWaj3ovYdI1BaRiZa/OZROqtIb\nym62zy1ocaAv/43R7S4r33GH8EhRFPKvX3ExCEuSL9fzz9bSDZNlCCEaRU/l\nfj0Y7aroeY8L8lUbOLo5h5qXYwvTNFciZ986EjlTroFGnBZNIRXA+ETRsxW3\nRxw8KW1cct+/hv1oIf5oxfIlAmXvJsrEyojtHse0ESQvO7yIvS1Q54pTv/nq\n8V1I03CXF5BWDPM6OzPe2HHb1fe41AeWt9+XNdF5hLH4FUrypT61nDYgiuCp\nFTNJWmNjkc8bNTmwcKz2vBVrazUDTjIo//uwT6UhiZAMUllIX/jEVtiUVp96\nK18mm66untqEMxQAUwsWpC8cEJLIfAULgV+AP2Em/x7fcOdjV413XzPyVUj+\nimrhY22aIjv/THEyEkV+lelmivebUne5ncxmub903sDNx5kH0SmuDKKTodlO\nsd+GJ4HHCT2+axwiRPmLpk1NSxpkkU9QBgZ566g66D/7xWRS7T5I79Gsdh86\nfkowaw5FNEz/Os1rjFiNvg2yNMmYwsUGbX8DJbfRpzUJ0fKSyeNgFwvFF56J\nVm2c\r\n=pvII\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda@rc graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThe will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.0/node@v8.15.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.4.3_1550682035289_0.4889724674355578","host":"s3://npm-registry-packages"}},"2.4.4":{"name":"apollo-server-lambda","version":"2.4.4","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.4.4","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"jbaxleyiii","email":"james@apollographql.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"e8624af0cfe7fdc13db21d0c2272bc25ddcb736c","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.4.4.tgz","fileCount":20,"integrity":"sha512-9hw0mS4XboMLibSJh2LU9Y0hLrnvUjDWS+0q4G0/sajsgsUd6B6jRNsLiJj1RpNwP41EUlpE87vUVZgDnYBuwQ==","signatures":[{"sig":"MEUCIQDTq5B3tYlVVxoGc1teeZpPcItZkOm6gjqwfKo0s576wwIgUldoelwjknBFons795OdS9sPM4SRmnmQOQynNInmpzg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcbux/CRA9TVsSAnZWagAAFDIP/0W+dOmZFqBvHYrOVsAY\nIGR9ljd02ugUcmW+5jmsBeXmzpdK6SVNAZzY6GaSiRuJcP43zm8yjtZBkjIf\n9yTUQrp1vZ/jZ9VwSjzu3c3nqEa+c2VDXqmqcpQctbZw1FZ6XFbOw4nGFooT\nZ1IERK6JXvebmflJV+6Hf9m2f/dCDihaMasNpP2uMYiZKSAPFJ5M6w5xBy3o\nT1lfOc06f1LXSNBFhdBBsVkS9PwdjAaDieC//vXPTuuC4canZTHwxG8K61iU\nhFZX+RU043APKjDt4e0JA315AZvfY+DOboEdvAw7lXWsTX0KzNUEuYazvY2A\nFJ8KePiwBMxtWQDbHFxvCfWEvldFTu4V4sXqeOe67Ip3FDPRyqEqCP8RCalX\nsjqjATMwwCB7zEIBGr4ol79w40OmBbG54bgmOX4poxOBvRa6i8vvy7kX7K/H\nHYOTuHX2EqEol58vVogB+Ax0n4TtG7Bi9DEHTrReog61Uw6lchTRAj7lY/qu\nzntqLHziGF4P5ID/c72/y/MeyvhzL1TXo2cd3qAQOHHWj/Lq/4QM80LXlFxF\nZCwH1x1kEVSFJmyyNnAm6uwOCIC6nPFar+QYr7vSuGHD3X+5IqxsSahI0i0d\nz4c8M5hDVwQVAA6FmSsRbMU+SlPJPE5Wnk6eEFIwEPlnPJhQVdd6nLVCEdry\njkzX\r\n=qJYH\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.0/node@v10.14.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.4.4_1550773374903_0.4878943139613583","host":"s3://npm-registry-packages"}},"2.4.6":{"name":"apollo-server-lambda","version":"2.4.6","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.4.6","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"jbaxleyiii","email":"james@apollographql.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"bb91bd73d551f2745cb2e052698f6a3ed8c8a881","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.4.6.tgz","fileCount":20,"integrity":"sha512-SQtC1cUqdSegZaVE9QYwEHGJVAmhVyHM64V7vHUlEbtJEsA7JAwUctvSpwJVuo9vKt4JhzeA6A0vSK8uiWIjfw==","signatures":[{"sig":"MEYCIQD4HrY+0RfWJKCgo8oLqD5hdR7mfyQJGy5DucTKr08swAIhAKYJNA8NIBnyCoTagEwBoyku3Amw5uJcKumw9Rs3eZMP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcb6MtCRA9TVsSAnZWagAA7W0P/0bY+IpjId2DbQ64Zv2c\nFuRviz3pdqrnIuXcIrVp8nic3YgoEj+9N47KxIa/zM+ucEkCTIq9hSjnYONj\n7vVXlmScjfJsHTnyXJvGgmip/I+e7omxb0flmtz23iztSaBUfTq1/OGJM4Re\nuqaUa6XS6h6WZe7Y1QUdI9i7k3MGzx4M3Pjhq1r6BSX2+Jyufr2Pb/yMLV+6\nCazravoWXuATBuApBjxOuseeK4gPcA/v0N6MGuPSvzOzm7NuYeEZ9/SPpder\nBvlLGVzPCBC8IVrD8yznuaX1ilARi71IvU6gYYiKQvTKCqfW2nE8nPMdXycw\nIgUtG8VZmMCl0ZrQJDDixylNE1iOLLjP+Y34uTOtphoie1SNdnudapSuZE6Y\nbPSQ4LlUUUlo1CyoL1NtkWK/sDbi7NsEELrYdSNWWR8gUHMnvi/Ep0uP4PJA\nvoj+R9KVM3I/t9eJ7/lylcj7C5SQpJ3H2q3ehWYIZDmqRduTX2dTRWdCzr9L\nC10tH35z4BZkm7/aHm6k2S+Me0prh0XjrS98jX1LxzRhvLRmZ3WmXsAKzJbW\nTAHVvcVI0C01UNbK+uoF8s2xRevUUq0v33MORv505gXETMf8Jpn+to7ZnckY\ndkEE/OA84f1PW3QEnqC5Z1XjXBkIJrwPc5uPjNEwU79v15dFSAwHf0qOGHCp\na1RK\r\n=Ngg7\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.0/node@v8.15.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.4.6_1550820140981_0.6978518806770415","host":"s3://npm-registry-packages"}},"2.4.7":{"name":"apollo-server-lambda","version":"2.4.7","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.4.7","maintainers":[{"name":"abernix","email":"npmjs@jro.cc"},{"name":"apollo-bot","email":"npm@apollographql.com"},{"name":"jbaxleyiii","email":"james@apollographql.com"},{"name":"martijnwalraven","email":"martijn@martijnwalraven.com"}],"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"2f7d21c3a6cad8d86223dc1595cffb50b0543c6a","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.4.7.tgz","fileCount":20,"integrity":"sha512-DkNadK056I50ed4AdT279BZSUPmRi4tImWCgzxGMgj0nxo7tP9j4uevTj99pgFqKvbeYXpOIZpdkDLtHRYI8Pw==","signatures":[{"sig":"MEUCICJSpfHgwvDNUNisfPhveLBxsyIICGPefJjs5RXJwBzhAiEAnXi/eIadOGD7GVXhQOAjDzCOoUqm4qYaFtBPdMBoxxo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35663,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdSFOCRA9TVsSAnZWagAANOUP/02uyIb4r9TRDcrhfSZb\nbKcuaw6/15skFNzajQFUGQ/Yjoq0gBkA6n00qSfoGNzgVOGYsp5DAVloQmmH\nXB3DEUoicLuUyznZAA8aCIwzHUcp1PwpTB3tyeT4gsjgtG71in7d2ZrLON/r\nj5C9yLYpOS4+k4pp6Yr8PPNvOKUWfpXVNHXLKehpDB7tlsEIYsDuuBvsQHv/\n7/HJQOwym9JboHo3if9BV9pyuw0FtGalG0/uI1esMNAuYDIhnV8OHnKL05vh\nWjsUuPjxKbOG6Ov3Mwp1Qc3Inzkr1MtD1db1LTjjYiXjrdyaqRyX/Xpdb5Dn\n2mobD8t7RsEShPVuo28p4ZbVKDTgiG6ptTYc86qmW6cb/eGy7Rq1TqCdQDPR\nsHsbgENpuoOCdM7eTHHsarFzdwI9Ww7uyowopKagEWlVJOM4DgIkeUapP52I\nGleDiM/przgmMZX5gfe2ICWY7QwFPaEFae9Ut9fREaBAG3cXoW1OWblf16D0\noZ015nLIF01HokeGxFZf6uq5VO6f5dFXm9s9N2ZqwHL/TFLf2aV5BN4YLYwx\nYoZKTqIwSnK/xGZCcn1CZMUqswkkXrotHTKC2TUi+eAqaWr9L+xZc4IvmhuL\nRAVsMqdHw/0acvli87BKdHpgPJ8gvW/3vkI55E2d+T+eKKRvZoeezhsmoAg5\nMhg3\r\n=1izR\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.0/node@v8.15.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.4.7_1551180109903_0.9839983797500698","host":"s3://npm-registry-packages"}},"2.4.8":{"name":"apollo-server-lambda","version":"2.4.8","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"eaffde833cd47a1107de6dbcdd0960d799d6b246","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.4.8.tgz","fileCount":20,"integrity":"sha512-H85v4FohyoK0Q89iCWNOQqcIbu3E42sPpspPzccx8btsSTPXHlJRb/SrKCAb96Sk68XXMdwHGKzGSb2TY6WIFA==","signatures":[{"sig":"MEYCIQD4UXzs4YOgB9xxZQdaPu0ZpTwYqjqd/lCnn5pqpI6sjgIhAPwAN4D4bmhHKZ+px+0kTX7BlQF7hs2q3/8IdwYI5LVv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35663,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdUx/CRA9TVsSAnZWagAAHDwP/36D+e/PtF4UCzbNvfn5\nzylOi9k0JcBeblXniJLY9h0F4NQNMmQOg+hygWZ8Hm3Kjva92VWcsvqFpupO\nQHChEqLurTEw3w7G4C4eV0nX9aDYc/fcKFigzY3UcMZGRBTI/D2/lD66ItOv\nOT0mYd20u8cfCjT4tJnxdgKVl6yRg1fL8ahISlXNO1fryg/31NTBjk1JW9oZ\nZSKAju4vR0ueavmzEQJoDv8cQZFQb3y3a9fBWiSY1HDBK90OXkNda+iaY9+u\n+owFm8W3JqfzK7+yFYWZciT+K/ZzO4k89+BTnBYmkWVZyMspHaCKKHr+6Kuo\nUV7t8FGhNoM3Y10dE3aJofLEsdtlcFLDvwqqzWlwYPmf4DKdSRtLpJimaF53\n6v63ZJEY3c2mO2REwjzoQuujcKepRmM9btAOqCHW61ikBL0mRy9IWIOwumRk\nAT4imtb6+ZPDV5YoDKki71Fibnm22rKEmdrCIe7V8I+v7SX58G8AvDotDaWx\nPahP6GoJoAbXHWctWT7dZrOYcB3Fmra8xNT8CEhQWHhAof4h+HanWNCymHj8\nHnAOngPtkfAZRvT41+jAldBNMlEzU/3w21n1/URaKzLMV6OG6wm7t6RXwdf0\nTPSk9l7XEI5qnYb1qy7TckqOiDhxDnsURD5lm7L3CVPZWNNa0YS4Vg9aEbBy\nt8zd\r\n=TIRg\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.0/node@v8.15.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.4.8_1551191167029_0.9721239588217951","host":"s3://npm-registry-packages"}},"2.5.0-alpha.0":{"name":"apollo-server-lambda","version":"2.5.0-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"c7eaa2b68492eb1f38d8b4653720acc273cc62a6","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.5.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-yDMmSOnJ6Jgvc3HZxRFbkdvX71tkdB0tOuoeWKkJNPpWdHfjG8o/s92e/kHvPGM/I5FC8vAjjiLAJFjs4s10hg==","signatures":[{"sig":"MEYCIQDuawQRFDwbkSoRItEy2iwVeMV4LD5Vy0suhj65WzEFMwIhAK1sat95zPD69JmA17MbYdODojmjaoX5+bglt9mmU6Mm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35773,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclSpICRA9TVsSAnZWagAAIeMQAIzYAuODhqqQ4anbIGFK\nHdXKy8dfYSvupI94eDI8AsA34h5e7SIZzh7CSSajbOUXlHIROc8EnHyNawZ9\n5QTDAeZ4PJyX3u+T7pvK82MTgy/SDGSg0EWny1moWW0KEK/3QRe9N01RgVTa\nxb+HN5whybRhawDQ4Y4bNgDBKiXtKqDK4k+3CoAUnIhIzHWp/0e54/4RLwRu\ng3NW3XjtpTucel8+Z4FmgBOl4AvgOkSZZiEqJhG+Cfle7WRMvLgQplLHeLqi\niR5Hbvs+l45nMQDnauE96WoLtpGHSU9qKqtiF0HqQeQVzp8QVmZ6miFhwHK6\nxYPRk2nrnFosW0JwhPZWNwAvCFHJTojFJs6FCmertUjHgtECNuE5BKIom+YF\nxlunUPe5659buBK1EE4f/O0jCOTeSo4+FbxEypUyXQp+w6C8X8H/EKz3SCTZ\nJp1nL0D4yHlcUBeB5NwFf98s+zCYmWhkI/v1LrJa1gvzC9ds4SkpsCwCK4W3\nGV1lkZFST3DXO69LsKZNknlqxBAMBCRJYhN2DVmA/oXpldfArVMewCeIGwD3\nufmGztyYnE1yq4XNbRF1dZLW0/yAN8vJLbg/ut5pm9CcfbH+FOpdWURe6nza\nLDv5Vj+PRy+x/BHR3bWUzmwjhDULLeJh7HtrCuZOTnDZbylx1PtlP8CkbKTL\nOf/7\r\n=A4iN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.1/node@v11.11.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.5.0-alpha.0_1553279559436_0.43812388818727954","host":"s3://npm-registry-packages"}},"2.5.0-alpha.1":{"name":"apollo-server-lambda","version":"2.5.0-alpha.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"eadac10c2f60b46212df9270864c507a21d5af10","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.5.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-zZu7XNNAtG9fibiLhOGcIP9AAw/oV4JLYE85vDTCgR/ucrm6tP9Y0dgfojNDo/jf7/SglsnwgINjz26qjHzXGQ==","signatures":[{"sig":"MEUCIQCvGEUt6NQ7txUangUn70CvSdEP8G/O5Bc5eMqfVN2apwIgEW7/FcvTlFpedYTmBo4TOPfAY28h1vlL7tazUfXyFrY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35773,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmm5oCRA9TVsSAnZWagAAL9kP/A8oksehRAOI/iPZL04N\nF//CtGJwrgNZHVtYHSMtgiJQnWll/gLdfVinygb+lYC0xOws4II8IaA+cUSr\nu+tjgOecobN6jEfgiLuR7hWiH2ja/3NlOBU9qrAO0WyFFJ+AK0HKHtD9w+Vx\nXZg/j0/IwhsqyuAraUsqst/INdDyJvuXhsdyTJxhhcN33W3+BHM/nFwANGlN\nY0Hyd5Aoz25y1UTysJx6VXH+o2rabLpNmfduvnTJSNuFlXAmKJY+snmRtFSP\n+NWozjNEh8MXuu9JU+6n5gsh8g2FOp3rLy93izufRA8glD02b3UGZbKJgdqV\nUXzkUGoStVb+md1gRwJt288e/6fhZlz/C3Ay4pwphGGF4PdezNhwXnJiq+Ja\n3wbV59yUbCefkD9sXuMzrXF7KEg7jw5sYZUCx9xSRzI+WiTFfj6a8G3YBbgg\nVT59Tl9mOcU3Cew3qpKnHlWmBP3T53ip4c5PKTCizd9nejpfqzpW94j/vncz\nsTxmUKD8VYJnTl1Z0zcJz75zS/Fo6+k2C+vzIL2jlBQtuqn7on8sI6IljyfS\nGnpyCVCuZ/ZgYAcx/7Svxjykl220jpeZhyd9Aa9j9V4xl4KVH94RAwhrevPI\nr0jgmejHvzDoTHoeeKTZ4zTGb2bTvu37ZKZULwHuX6CI7XvSm62YE2Nmt3CI\n3p4R\r\n=2tDs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.1/node@v11.11.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.5.0-alpha.1_1553624680152_0.05185036537542631","host":"s3://npm-registry-packages"}},"2.5.0-alpha.2":{"name":"apollo-server-lambda","version":"2.5.0-alpha.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"730471e4e887ed379f564f7026bc75a107d4824d","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.5.0-alpha.2.tgz","fileCount":20,"integrity":"sha512-8MjP4GvwpXJc2OyqAh4B9831Cwuo0ZCISuVqD9uU96FD1gP1oczdVoGqUW0pVYStYTndsVjnXhPDQBEvz+rBVg==","signatures":[{"sig":"MEYCIQDiX64M3GO6Zt1zKnl7cmMKhxfyyxcy1jto8qAYAVjM9wIhAMm1VFGo2Y6YPPOp5q9y0ggPppuTqJpEhFfk+kd0U7g4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35773,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcp2yTCRA9TVsSAnZWagAAIUoP/js0WnLeOX0r5XSTMO6k\nVsjDTtAdS34f9gCbI9RqBT5PmvWnK3d0h9XKOyYYpFa/h6Y/pxZFjPvnZmHG\nlsezlBth2WeQHfhoqGYxmePe3Usm2jG9NB8xsJZpEI77vMnoOqUnD1/gJ44S\nILLFpi+NbcrvHKCFc5HAe8y8YXifzkeRnI9dAQanJ1jYrKFcmWOSWZIWEDPu\nVSUzgXlUlhadvY8BafVYwFx4NdO92KE9wS/PEw6JasXCHATu33vga+u48Rxq\nPKrcWUTB+BOhlIkUDx1h6tPSX5Wg1XyQD/pIP/n1jUKm9r6q3JuPJNtj9TDs\nBoJS84SGkP9XBnRpqn4OtQoDXStb5q1oeke7A9zkUDgcn99SfP5ac+W/rjSS\nhikx9FxGUl/rZT2hS7acoa7/C/oCntvbXEXIh8hOSC3LRpP0rXkcGYEw2BSx\nY/Y3G4t+ee+5rXlcc2Gq/ZwhA7aZFm+ZZVXKSinFKYN1xGcMl+rgHpjiyROI\nQqrYrRaaPX9HRX7ycJUldxIl6PvNItckVej6H0mSnrwRY25Bys6/dJXC9zAv\naFdgvD/CD/vi2xYvR721ffF9y9hgTiScjtRQLWfKJQAtLiRonkvrfN5EdN6y\nc61JYtQycUpvF+/WVO88GWD9eD0i+n+y8GNngMzCu7/lGk9+Du8aZ8XFo+5g\n50K8\r\n=bvP8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.1/node@v8.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.5.0-alpha.2_1554476178294_0.7088056746501068","host":"s3://npm-registry-packages"}},"2.5.0-alpha.3":{"name":"apollo-server-lambda","version":"2.5.0-alpha.3","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"27c8b447d009dcad768266d59427140455f3165a","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.5.0-alpha.3.tgz","fileCount":20,"integrity":"sha512-s/4MuhvLYCVi/1pCEuAHZiHQDA2iscO44qsWpy5xn5GeSIoEOClP98/TXfha0Cuayo62hnUU6tMTAJqbnPJweQ==","signatures":[{"sig":"MEQCICCpNU1LKa+pukDpKGbkLO6DccGwnANPugqFm+ZCe9GPAiAWh7BjsNmmr3P0p+Kgtx2VC4EfAnHaawYqzg/62RPbEQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35773,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcp4fgCRA9TVsSAnZWagAABSkP/jHHH1OqMsCImKUuanNl\nuX8nzUycO5rkhR/KsE3jfY2fhlHej6VnrdSptX8gK2p64LMYRgqAeoy6Hti+\nIQzgIEi0x8Ydxm36J+mVs6ASKKmMEvUCLF9FET7YTX4WDRFm0+EcdLbx29GX\n2+NITGFH6zYEevKe/i1gF9AjyXxh8vGSkCrFZmS6c0R5ojgmyYoVbrELBKjt\nBDdVQH3tPnm3+Emw8enqQl3mLnvCno9mhZtP/n18dbS5z+9cSKGzROzwM0t9\nVLg+0h5ISbY+MPf11CzrWWbXkXX1mGDRWbMKj3YbqXtqk+12NsNVHXHd9tvz\noAS3za41RK0/MRpwz36dxL1wtNDuawh7/cjtURaNcBEgV9L+UVKIUNfflpv9\nazh4l4VSo/+3Aw3d2g82JDCTeVSTtBZ1YtZivxYHS9ah9IVegHhmwEtvW0X1\nVP8nvzNZ6BfG5LAyaAqPUue5UAeaaAY55CAcSfjmC+yxcNvIgMm5U8m34DUK\nrPv62moaSYrTsFtCApG4eP+r5+IaN+ph1ZoeOh+OZ1ElKJnUw1KyEneyVxFT\n1DalQzDA2v9JDDXgXAZnr0UOJITdeM+QauOBujEMJLWElx5nQYfOO5HXihJH\ns6WSWCi5jRpV15li43si44kD06rcR5XSI7hNEzMAkcuO7ZpRVdehv9e+DxbF\n340h\r\n=eRQx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.1/node@v8.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.5.0-alpha.3_1554483168185_0.0745779862172582","host":"s3://npm-registry-packages"}},"2.5.0-alpha.4":{"name":"apollo-server-lambda","version":"2.5.0-alpha.4","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"4cad638489edd55d2ac11871308634ad6ca3d940","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.5.0-alpha.4.tgz","fileCount":20,"integrity":"sha512-7/CrrEbi6LpVBhiVqcKE/s5qrcdeJUi1bvBJ4rbDBlN9gLsqO1DCOJG36P/2ZvVbV0/SRuysqNDbJuGgIGjjoA==","signatures":[{"sig":"MEUCIFmekB2l1ToztA2a0gbrKbxkoiI6ZHsx8V4Elk9t8PYHAiEAs9v76A/pB4zUcsiC5WizgjhVVYh/2jL9f6kQ4hPOkeg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35773,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcp4z+CRA9TVsSAnZWagAAwjIP/0zcDWTu5ymS+QxEQE8X\n8LgA3jcFfMKYlaHRahnjvLImRSVXxTb9vLsEeIW503QahyUXAQTXQwB0tE23\nDBugIx628FTWIm798GNu45pOZyL1YLt+0gLo9ZljFM/xrcKl3bI7nV8Jfiqo\nXXgWUpH+HByIr/9FZWpjia1kfN3KtNUXT60HvhQcuINK7OdDuqWTv7wPrLoN\n6gaP2nvdHTMcGi7hP/o06HzWwGlxdAX7O+a93ZnRar6w/qlrWxR8uj7xalRS\n8sR/WmODV5tXTGquY87lLAPsjcf0PGeBKbxb1ycEUGpXn1Kre5IyEO+fnksG\nB5eFo7eXgyRs0KqJwM/LPdnxCS1x6ThThP+nBAbbeeqcRrLMwHmShTK5lA0q\nMcQ9/3iizmUxkfsjEwZyZCU5I6Ls928bbkYhuzgOhjAiXSGsb9gdOFCGbaAu\nUz7a2NOpD5RFmGja59DMqMnVgj3c1QHu9iT9tAvylD7lSdkfAuekCP9kLgRP\nSitcK0FIqXZ5oPG4OCtX4LWtkVEA71C9a3Xk4d4IzSBgkD//a0FOwUjNP3dm\n4HhA4vYBTuEQd8YGV7Dml5j7Pv0Yspy/TM0inuO1vHUDp3Rw+SZ4mhlCI2NH\nA8xyt2cgrJDF6ERq/6OPYTEMywMsKpGsbFoGW/DAUANMCBLCDaQ9ltYvC9WP\nvxbc\r\n=KQdt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.1/node@v8.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.5.0-alpha.4_1554484478072_0.5759098918227199","host":"s3://npm-registry-packages"}},"2.5.0-alpha.5":{"name":"apollo-server-lambda","version":"2.5.0-alpha.5","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"904ac09a8059e20602834965d6aaf9325c057a63","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.5.0-alpha.5.tgz","fileCount":20,"integrity":"sha512-Gjld2UyB1u0rkp2P1MdK2bX5PcDuDWrmUy0zed/dz/LstdJDebpo45Qgn2goLNoafYFKcVRI5GEp48L+BndArg==","signatures":[{"sig":"MEUCIA2MstsubsXIkD468HcSTFxRHAPAAGMU42PQZ3FiHUt1AiEA3LwtWX8DNP28yQS39ifKwtEw0ctNSNqg/THroYM5JfE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35773,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcsFu9CRA9TVsSAnZWagAA1K4P/0ZefWfqFIu+CjsWynRI\nHsdCX7gaNryQUfR42N9qMoYLQaH9/yrAB61PuPcjTEiYbfQP0EaI+Exn1Soq\no1UOADhv8y2hmLFTZAJQL32X2rfvoO8SiKssOQV7tbbZEzg0s4XeNCZ87fEz\nRx4d7RqBq5VRmK3fzCJkHpDiXu4OUz4+XtD8BhNh5m/NqY2FRU6hi/g/9Ygs\n3Jhcw49WzxQ5CBJsMLsGCRVlqwDvj1+pRxrnecIs+XnxyKs3ZVLD+O9z7g+/\nkp0ZZXhNDLwE1R1y4WgdWy+ZRZe0aA1TshE6Pkrn7rESFEPcfJXb0wpRawOU\njt2LZim1B7GyyXM5V3qxjQJ42rACJAxceq2/q/JG8fpESkZaBYoqjEKwCGOI\nVL1V28EJYQeCFODPdAh7dc+WHxqpOE0gLO11uq5j6gAlnnjsuzolZ1UPg53H\nAiAtgwdhZ1j+Ewze66RfppcMeTADCUjcMpqN4KZXAonw+4CDN1+6enDFZDYS\nuLHtSJbkOTeiWxq/9o9xdfb8XQ7fTHQvhKA8emElcSrg+nFasPzyP4FjEElS\n0bkQqWilADf4yHQXF1i0syfZQfosEf4S3krWepdR7XOGsxVITNnyuNrSHpog\n1k1jWTrLLgtYXUVEkcmlXWi5zlWLkPyhCw9Q7+J96SIBN1yQewG+Ptf2MUwA\nL0yA\r\n=dklh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.1/node@v8.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.5.0-alpha.5_1555061692475_0.30184466140444033","host":"s3://npm-registry-packages"}},"2.5.0-alpha.6":{"name":"apollo-server-lambda","version":"2.5.0-alpha.6","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"1f3448284ec3e0840d5cefdb3cd983d0c78af6d7","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.5.0-alpha.6.tgz","fileCount":20,"integrity":"sha512-5jTGUCuq+uELhgVVR463cSifH4Rde+JfnWgH3oqMieuQoFt6ll9v9CjnfffQfuJykkw9t043JvrJNW/rOoU3OA==","signatures":[{"sig":"MEUCIQDfYdmY2Y0XrWGrhLpl6CUDJH7Y3xnZtfKU15LCPZHvwQIgbVPpR/7CLAOTLLi5+9JBrlqBL0BVL90YVxvvAK7y+D8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35773,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcsq7hCRA9TVsSAnZWagAAb5wP/0/l8IP0Dvcj+QkUwqyP\nEDGcg9hVpHXesmwrYin0CuJfyLNib9NE0LYmO5pRjQk3rIM++WJKRQSofZw6\nTr5vw7gfbFPK9cpyAkleUFDhwDAyrqJn/O4rW23fkyhprm4bF4LjuhP9P2KF\ntzkpObbwk1u0BEWprrMq9z1hO3AN0rsQjq/K70otWjrwiF2Kn/Le5aT1R3zk\njxEXaGTbNJXNgv/Ei5heOXrRwP6v8kbhBwFhM55/uWI78AhjdxjtOS6cx1aC\nOSaE8YLJSUP6kU5xaa6jPCcshX2wqlU1mUZZMaD4t5r17fgLR63mU2GuaaL2\nZkHzjXMObfLiItZx7Db9EjrYTOZzshjyWpK3f00oeBQAEIIyhenFe4HVai5k\nBeHx3MFbEPcCr0z0UueuSXzLaDGvoENeX1zG5B9W1fCrHRjFXRBXfmMmWuqu\n/8LCpNUmZvwdtRV5x3H8eqwd8oR5v9j42w0L1h/FeTLvFvFnTpCjxg9pDXag\naFkq4U/4f00egd3k/P3xN7kNa1XU34qrtc5hS6aqG9GSJ9lGgv5Sgd4oG3Tp\n+SHrNln+qtOcBTguHP5tb5y5ZoG1OHAQgT/lpbv4o1CXODZ80pzMlBNtwhBz\nssJABQEvHcuJMkZZpvJplrcqiwJKYcMTh09lmpaE50viOQD7WPUnXsCuwzhb\n2Bku\r\n=hMm9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.1/node@v11.2.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.5.0-alpha.6_1555214049036_0.044027827066880576","host":"s3://npm-registry-packages"}},"2.5.0-alpha.7":{"name":"apollo-server-lambda","version":"2.5.0-alpha.7","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"bac66974c42df431262b748d6d914060d7c2853a","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.5.0-alpha.7.tgz","fileCount":20,"integrity":"sha512-ccw1uxqQTyS/Nms+X05Ck/c6brRpXwSxB3895ihqJvlYC1cRpU8ofHwG4CjGzpa/iW2kw5G6Q8vJ8AuaOKK3zA==","signatures":[{"sig":"MEQCIAv85Em/k7deByZ6gWfzfRNdzenk7Re+3z98Sgv7z0VmAiB3XxSsyarzXd1547EtTsEFodtbWwPjp5/GkYn5H/p/5g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35773,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwfOqCRA9TVsSAnZWagAAWFwP/3yXT8TC4LJ8HILn8UQM\nhb7wk4MfGKARrkg6bgEiKgNY3X+5vLNaxu9svrqlhxv93B7s4jr3R/mHmB4c\nQFgB21e9Q0ed/RIyh6j40HYxE8uASqeOEcxpUiAvMmHyUfc/UbGMyL+ILWBc\nFNhsuFPHs85IrxOp4WB6rBCEBMxuRrL5Glfz3nkXWCt4bYmzOP1mGhTdDm61\nMJon5yAKAo42pWzWbdX4aw1H9fVReabHKM9bXdK+AjRghomufurk7+U+B6hk\nUpMZ/ApGkyf7i2H7kMmFlclKyrOdP/++KWyZ/9r/JoHDxJc+cyPxW2qFR3+s\nSycIFBQp70j8WkiuG5aCvGbkaUpc3iS3mUfUbfEFe9Sdsmbc9cL7CS+mSAWy\ny5As1l3zyCCfKx0ssaA1iq9BkVBI8U2o6JO4l1og1cTI0b1qyiYhBeAh4//b\n3xW7kCFMSEcpxVw0rxfvf/Bq+QtLLGkVvJ0SP8jinWZupbD3kwE/hLpJ0EMx\n14rEF0zEVUaZhyH9WpXpWipPIsyhgfMxBlOE/wlj5IVOdwJ2a4Qg18fd6Z7r\nLicEX+GbbFz5juezdORAjhQKvAr+gWTmqqvHvxfl5tBf4+7YsPtT47nTTy+x\nTYQM8LrUg/jD7xzzaUV/jew1vNZIyX36fDC47e/tf0pgyujF3dnQoJPS2xsL\ncOoj\r\n=8KFy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.1/node@v8.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.5.0-alpha.7_1556214697902_0.5302539958459611","host":"s3://npm-registry-packages"}},"2.5.0-rc.0":{"name":"apollo-server-lambda","version":"2.5.0-rc.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"c194db4291ae111954df8a7125cf27c49a53da50","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.5.0-rc.0.tgz","fileCount":20,"integrity":"sha512-vIx3eUFC6oGn6Q6JbRJdFSIGq0i9izvtu4yHzda9dhKj5D6OxDi51/mJxevaqb6gls+uidwFUQSGqlNgBLlPzg==","signatures":[{"sig":"MEUCIQCuTiPz8txoUbKMK91oNdT+RK6NA4o+t+UrWCYVFg501wIgTMwWMOFeUbl7OWGyMXV2G7dTsqh2AabzXvXgWQv2T/A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35764,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyDnnCRA9TVsSAnZWagAAGrIP/2+f15mHAmO9vn/aV9+/\ndlCiZ7O9Y8D1txcLSj8AUHYH1+zsj6a9Ra4WN670DR4pqslhSLdYkGTs1tMY\nhQoHLuKjjL2MeyAZPYQ7edw7zMwsFKcHlWIxLJLO4IUWhAbxpzPlywZafSI+\nafvV9loFVYNeZSJtdUux/g7zSKsjWFMMbTFjXTiJ3ftSO7LzzERV8Jwj1DV2\n3vDarAR53xjwqHV9AYDYrQqwFOrcWlLUJY5PpighAhHDM6LXqWsLQyr0vmeX\nFscwGgMMUjSqOmMG/dv3D+vnwHr637pfzyUfgeN9eFbiBuyaSvByDerCfBNa\nrE92sr4QulT0zz0fViZlIu+JLZcVwHqrzPZzDofs8DWr5OsXjENDGHkC98p9\nXLefNj7TX2FeVQ0nomcrLZkkZt65shNK6HODb44jIKnEh8+sN9y43swvMf4H\nJT//5dBZyNpTT4lnRl8eo+Vv2FlEnOFS83DbOBstW+E07wtN89FsG8dDov8A\nsVckvDzKe3X3z2+Opfb9ViCROURpS6p81QNBDWFO9M3urqns25mOtMSSq/kO\nXrTd/a+dKuby2hlQeN+4JwkG5B46ocqOiRzq1Q7WqVM3TfCYppCWWsc2B3Ee\nFInc14cCieue2M5YHq4k3h4dGdmnVODlXdeg5vxMCMedXp9L7yi2T00m+gZR\nYMhL\r\n=z5B9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v8.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.5.0-rc.0_1556625894978_0.6137690608199684","host":"s3://npm-registry-packages"}},"2.5.0":{"name":"apollo-server-lambda","version":"2.5.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"7c6b0c336f5e55f51ddd0d5a200a985efd770b37","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.5.0.tgz","fileCount":20,"integrity":"sha512-p9Haaq6GSgYTDeL50glAI3RyoVLfZBc1V2zN0NASQFNdBmmY9cY3vHU8xrEVYuEDhC/mHEuWVpzlKVzuh53c4g==","signatures":[{"sig":"MEUCIQDqIEbAcYxG9FR/WY92sAro2+cH9gN6AjNA8eO9PfP/mwIgAJPr054JYwe2x/9/f3BxWYt3+xEGGXXeVvFM8Ug6G6E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35741,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0X2YCRA9TVsSAnZWagAANm4P/1ncfqmljMKqRBrWcfXv\nLNGyQjlE9G+SeLaV8VnmdyXvGnagMswiU4ggOf/cZU9/0ELqZ0BHMVEsKvAF\nGUCNpZu8ICMj/2W9ALsr2jIidCozyZyeRPUpTbKuAmAcmHmtzDm/n77NVPrq\naB5GhsuyFGgAR3E9h/pciEb8SgnFdzmVa8OX94YLKnJMVIk8DHw2RiqgKupR\nisfqJPvti7PYlb6XOd3Vyx1WfDivFoRIWVlq/xLz/yIs65x11Yy44U/b20F4\nCZ16DRDngGkzYjnWnpIKiAFTizvGDR4uPcZYhbboqTKiP0yM0wNq+ctQ9bkq\nQUG/jPNI/YuM4jxUyQWNVlHbMC38ByAnFr9mZTmDOmpIwnd9GJd4GvJdfDwZ\ntCU1+vJTEgvtoupm81MAbcR1JVp39kXnXsAvWZFe+wWjDxq69csMFobhAQfp\nWeCJB+eFVvLD3TcC0OC8ET97KHqYFaD3WKEHxYEeCfyy4dy+/COvMz95F7wX\nmXOg2M+8v5soui5VLYIifDGRxo+d8ST2jsDTl/z6h3BXJIFhp56RNt+Q8wyA\nIcOmOU35PwE3yg2rxeb9lfrfZpGom748uisKF/YOvotWAxfmmbapglQcW7g+\ngPIR1boQo2afoHFDyHf7THJOBRdwnO4KwVpOfoDN/Z5w4SeWaUCDLNgzERP0\ngDo8\r\n=noRF\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v8.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.5.0_1557233047971_0.3644633960694923","host":"s3://npm-registry-packages"}},"2.5.1-alpha.14":{"name":"apollo-server-lambda","version":"2.5.1-alpha.14","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"0c2dd0736ac68daf9dea8d76f5859a5ea10a804c","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.5.1-alpha.14.tgz","fileCount":20,"integrity":"sha512-+/SuuCW3m8HcxAZ/lgZ3yiP2GJ7KHR0vSrbge5SKA4QnXU6qI9NA+7nwJKxYei8XrpwdGY8MwjKyRaS9zmUHUw==","signatures":[{"sig":"MEYCIQDPIBfyVezxGEMmOGh3NRNWkrg1UJkj0HfwEPGSTmB/1gIhAO8R7hwOT03kV2NNI282KGSzUKAFdppmvftIrH8aWNg9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35795,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1NwkCRA9TVsSAnZWagAAXVcP/iF1/VdPf53H3FTGKcVA\nIErfsfvsnyzbUpgHePYh1U112IyLryVwRTQLngtwXVeV5HqlvjcZFKyZuuog\n7MOWSd5WD1+n6t+ipvKU3eRQsbjDy4n4itT/1YU9WiDA7qPNj0tfb2FYNSdA\nU44/ZqBlaUlnZ+A5R/tC8nLbg60pCE9AZQdld0H7bI0r0Yk5E9DXxmLsw+JK\nsszFxlFQiLgj1LnOaKUzrx67DRoZq96W82Mo2y/Yqqe1cb+i1vBbjf7Ih0V0\nctS3y3602YdnRbOMNrSG5wX6Reyb+Z1oBbhHE+yWNa8JeX+bGu9Yc5Of/I1m\nf8PGW+8yZxO7TMe+XnVdlS+ka4NT55MtX/V63WHNGTVSia+Wq2ABNBmGAs56\n4AYJ8+/wS/uO3BKDvjc5ykNyP8jyiMAnVZGlS1IgPoGywSKIe/5H/t16OmVG\n3ecwb1q5soRPYQ0sdrsmr8TSgqrFGHkupNRLvGZTlhLYQt2A7O/mwNZXcIl+\nPF33s4rL0fIMthlEn7pfsFKQWkTLY4lBJ5umMkx1XVrA54D3Rc68vcVwdFn3\nngq4GQefiPl/NqWRvicdFKi8A22/r5CBaiwcA2Xd3OYrHgtgOk7w6XlrGxSV\ny7tPTtUD6WjkYvZOTO9LFlr4H3QTg+swGkHblX7UkSJbvCv4I2S3t5Frfium\nKwxw\r\n=HsI9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.14.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.5.1-alpha.14_1557453859755_0.9349892380674547","host":"s3://npm-registry-packages"}},"2.5.1-alpha.15":{"name":"apollo-server-lambda","version":"2.5.1-alpha.15","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"270cbc3a6cd6d5e97a80ff40d867435518cc915d","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.5.1-alpha.15.tgz","fileCount":20,"integrity":"sha512-aTFVTfU+FGhHwwpBVuORqueou80YOlBwiEIqKcdvyVQqe0+3nScZfd4tbB1pawIPyS8C0BVTGJDBrz/ia203hw==","signatures":[{"sig":"MEUCIDxw5VDHVukIfG1H+9UWgNXQhU2NDlJ9xHOx4txEXtQuAiEAkVlT8yZlLjeAemcKHhOZGgfxJI6UONNm+NDvDTn6q+I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35795,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1OOICRA9TVsSAnZWagAAp5cP/j/t2i/FoOk69iQQwW+u\n00us53MIoIlodFJ6E0gjnxYNouUCx5yZtqmU9ybwRyZKl7qtDYLQt2TSmO9c\nCno3F1r3jwvbIUkMw5Ojn1lm7dqTBvpWFHSyuEAmf1X0Vt0B4Hs3w0ZdztTB\nRNAlyJGPDmrlVfLRG4Jmc5LO4O/mizxQnFW8eh1qtxrdfhUohRuTfqZzmy0a\nhZuhWS2Cq+IpAlksebLr1luqoBJ0pAK9hzBQUdN02otdIlPA5wj0W6yuVORJ\nkmaQuswrL4H7N0IV1Z6FLu+SXKifAWgm9/7OUU6SPu/dawEy0oPS7mzcixUl\n3esOGHppNpGWcUytHVuMsncnUIIUdlSArnr+2Nx7d4XYBezCP9QRgD+T8ZZz\nIMrLJGOCwARikAD1kVMrivf5zwOtoSPSwCxLRaHAkZsXGBaPgVFnc83x7R+x\nrh9qTuro6YLudgZ+5x1E0tIpGjwJnH1xKzkvfeWnntlYuavCFC7A1DFq4m+W\nrLDB7sEoDOTOWptdhI+7ls+nntp/cwWAZGAci/7kDC/7xu1pw9jzxGz42hBV\n8jIVZ42vC0AFBotVoT0OnfCG238tVIR3hwFfFpmiZM0e8OhS9wghpZGXWIFV\n3L35dNnWpdxILJ6FmB62DCGmd9uKm2t6ka7ZeWG4vt1hbzaZqL/uM1J6S9lL\nb5zJ\r\n=wIW4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.14.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.5.1-alpha.15_1557455751716_0.7818857584320669","host":"s3://npm-registry-packages"}},"2.6.0-alpha.0":{"name":"apollo-server-lambda","version":"2.6.0-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"9c34e8807c382289bd7f86dcb912171ea77255be","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-nRu1tEwDNA7N0Kt6o3KA73KX7jIwt2CW9ltmzl2Ke4JP+zPevRKEYTC36ojeqVFmT0EfG+lo2YX6lFxgoRn0Cw==","signatures":[{"sig":"MEYCIQDPO+LiPEC45391Sm1zZT9IStQBAY6/f7rc+SEW3mGY4wIhAIhR9oftSs9fgarM9uDoxmofhsg53G++C2UWZmHABt4x","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2cQjCRA9TVsSAnZWagAAGLcP/1L9VmiZk8WltSUmzgQa\ni3MD0ya46HVk3QmqTLpvd4gUnmTyxHDkQ6iDR/oPk/3vNCcOraidWTr4wuvY\nnscQSom/xKsM1hoDRtW4D/OQoE/v5z7c1AAogvFESESCoqKlhNzg6YuON/Tu\n1+qIw1/ia3oUY43EOITcX/wn6p4CuxsBojqYAIgETVX4xdTtoY3YocBYOb8D\n0NOOQI/6QKY+COzZxbslBlcuBIRkfawUJlWddnvobMCy+J6AsjkTaxwogRfK\n0eF2d6DcRdtB1diwXwQ5T0O6b/Mrd6j1I0DnI4wFecR3PRC1FTtfkdteWWC2\nBGE2PF4yzIQhNvnh+mp1Q9zA50c4qhq9q28nfPUWAuakxl6eLu8+hxS3m4Z/\nGUYy4FGFr3ds3NV3670kGZwx5aER71Ire8BcQ0/nVEHxm9w+W1XKp3sQZmyZ\nxTiAvsP+wmSBqLhGTcDG7CkGNbwELIOBOsRVK5bTdmfnFLv4InJ+jGrUB5g8\nOsI30mHiQApjUZTkbgPqtDnyKkfhiWZAMDWZT9ubWj1p8TnqbeuCO+AXn98M\nAQC0S9JgNkP6cB0enEXFLuO95afJRx/XiWe3AtQYELXNRlRFc2AJtdyJkR5R\n72OpugxYYW1zlCWjvmx+soTwyFzuTv4TlaoQIADsy/oT57M/Pq+RHGVzlJ1w\n0CJU\r\n=043s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v8.16.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.0-alpha.0_1557775395143_0.47415332758481976","host":"s3://npm-registry-packages"}},"2.6.0-alpha.1":{"name":"apollo-server-lambda","version":"2.6.0-alpha.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"a42df75107eb7b31dcf6300490af0d718af7fcdc","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-SNEzq/l95w4URtmPzq88vW2xd/n+/mWLs3BFhkpyerOCOCINYLTtfDkF0NupwMmVrIKDkgovHPXhjXq0DWNlNA==","signatures":[{"sig":"MEYCIQCV6TYM8q/TI3FUSp6JgYizNkSCkOa+lEPNh8mSBDFfzwIhAJ8tlxunL+S6ui5RZLCF5DfQPfhitPZIXTz6x6HR5S59","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5ZZBCRA9TVsSAnZWagAApZsQAJsRfna7QQu1ksWd1NiI\nB5RgYt4OTuzmj2w6rTktiW5Hd3gnvm6FaCewh+s+Ezkhi7s/qvsjPp25oW2d\nlhtvyue82oeanizJJdjS+PAc4VPr+A2Eur0Y6CAIjDr/RPGDQUQpyMK8YidB\nkjSFvfUAPMfImekGWls2KiTNOQgXmKpOOg9se1tVlZprN5e6XFJ3l49+u2AJ\nA9ol4A4n8ARgtRFcggk0V3LvHaUHbgpSl5HvfiuelJxFdX8bg3aSyn9BG7MB\n0kNdwrihuC9rrD/1FEEmxdZodOPj++2VD8W2D12R8lpIZn7x8+zv3Kcz8x3P\nbnQAQi0Z4iThfYxkn1Ga4pdKB59kmIcHoTb19dRnGzsAu0nafroiodXIAM3J\nVS5IUM+P3QXamS/W8x9PnHfIrLT7kOO2GZrMe3PueyGiQ5Mt++rVhE2mTVhJ\nwV9CauPMt/SMQsDiIDpYMIhBTRmTTk0PyKy9NGDDz2eUtHPnOekrqnSRDxkx\nNRTlNisEkqdm8Rmm+FynQr+Wu737lOxI4MM04QdZ3MjVprM+pyRpq3kdOpVo\ntLBahjOgCv0NFa2bTgglwRB4Oe7NSCwG0/xvQ9AdcTl0BX7j3bBbE7CLoxxd\nkpSTAamQFjEOS8+0NEBRSzzP/jsfKNDAQn+mlJh7JaG+lwTMoycxsV68/oLA\nIuAY\r\n=n1/X\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.0-alpha.1_1558550080330_0.19084582997057198","host":"s3://npm-registry-packages"}},"2.6.0-alpha.2":{"name":"apollo-server-lambda","version":"2.6.0-alpha.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"fbc7eb441a9f49d2eeec8a33001191b6affb8bc8","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.0-alpha.2.tgz","fileCount":20,"integrity":"sha512-ZjTXdxTB5kGm57yjGyEB8642qyWos5OZ1wHNKbaW3OR1HmgkEDPgTzmrrNTcFQviNKlnOOlIsWRy9F79XJxo4A==","signatures":[{"sig":"MEYCIQDGFlMrNSq4M9QDgw0m2Pj815etuZnkK2VVSi5IcdyMEgIhALytFUQXbmkpkrosTvejCbzqkyZR/E2aHIXwOxDrvgTg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5axiCRA9TVsSAnZWagAATLAP/3yWBxUmPtUxsMgblgh5\ntbzsLjzYNuv29rsdLCN4JgRX46YUc2szhGGk9O4TQmuE0v9Bgg1P3SrsDtnw\nv1ks/ybfFj0Lnhn97omwXkXkYU0SHOzvRzB2d+NRW7K6IzvuDZvoE0E/njt+\nw6WvxxrNRL1UTP1MjHxLb1I/WGUX6hDYNUED5tmHCO8pQ2fDsGmfYlQ1yNeD\nPAPrlo6oGezQ4YUVYn1yjvVoveUFTE951mQBF65HqJvYwonNezVJP/wlUTyf\nqHYKPnxJ+9d/qIao5ccp2FLcWV91XCXD//8UuhHT+4GsiX5so7fpfNKdz9GD\nWSuS6EIPb59fHF1IRG6ybcWLvezP3y3SFzHluWt1Kp5rLMTdPapsQIh2yN39\noRxl/KY7+sta7k5iSqvSwGT0aa3T4oTvgJLHwWQ+K8dgO6Mn5vJptY5vtw5Z\np2lZZMm96cWWqeXeOH+IePVJTEjrIMfrdYTwX+4Y7I/ODK2IX+OtN/J6nxTP\nUPsrcwv9pqunhSefM3Sf67HIGRo5Xeees/EiahvJVhBsNeViReZZJ20kmpE4\nlpfI6NsXTos6ClVXlNkCaZL2uX7HFsF9ZVo8tYRdflYnK67cs/0ufgXCmu/Z\nREFCwXzMDTiK3hgUMlohD0wjjMAWpPqDDSdTlmM3128KpVGA7aibghCgS3mL\nAkNl\r\n=sN6A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.0-alpha.2_1558555745393_0.8905077812889255","host":"s3://npm-registry-packages"}},"2.6.0-alpha.3":{"name":"apollo-server-lambda","version":"2.6.0-alpha.3","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"6412e46c45d6cd8d09c76f2a2eff1d83206395d0","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.0-alpha.3.tgz","fileCount":20,"integrity":"sha512-y2LJEhBLIn+DLC5koU7CXwGnjc7HRW2jxUIJNzsGH3oa2c80HEflYDkpFwBn/bQZ/PYd/wn+MChlfv3W5j3Ulg==","signatures":[{"sig":"MEQCIHh9MaDh50APv5foLX4NLLzy9rEopjqgHFItpv5ScME5AiAWlpPzUwbPAUjYR5w1agxhQeFdwIGpm6lvFZDLJ9EpVQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5a1vCRA9TVsSAnZWagAAb8gP/i2x1pJrfjiQXdPwEpgo\nn0h7mNYGw8mX2R4bCVC6vvgTzuG/l0YDB3lclQ7hYK4VQQFZwsNYxfOi8EhJ\nO6oR/u2t3U2Tuq6W/t9TNmjAhxKZjnAzDjb23czNZAlXSwtQZfuhjlGU8PMj\nNObnD7YzRN6gfyrHF9WXkoexEPy9Eyo5QtChVEfzLT7VBaSdPpcaEoFUbUUx\nOYbCXNYBU8+TFu1PW7m0wwiJxp+e3ON8SawSxR/phtREl+DhazoCBZj14fW1\nPEzeIhMP4HzqYEmWJxYDw3PiEPra5GynaqXKI9KywJZL6/U2H0VWApOkG5H9\ngAyelzEIxvVVjidZhFOgxrXljL6UmIXZEgL+48L3ojPacAMNDhTlaGDT+G/Q\npjFT6+rqxfridIYvC0t3vBli0/m+MGO//s4JUv+kigltovBdit1K1ZJjT0vA\nH3g2eqh7IY9tK+p0Lz2GkLi5ol0SB6FNvynQQwhj4FCNwNsC9c59q4Hn008n\n/UlUbA3mo/4S4qEvvWS7aQcNCJSVM5QD8yjiOOpzwbS5l80EtnSQ21RJNcaT\nbfvccwYMeBozDVR4ut5iYQ5x37Unb8omBRdMPjrydxNtfq/wCaxK7te68HO1\nY7ccrOhvy8bJikEPPeRkwDatoty7cwOl1tiu96VwINCWh3XTEXcLRauX1zYY\nrkbl\r\n=SLQi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.0-alpha.3_1558556014006_0.9791737025529843","host":"s3://npm-registry-packages"}},"2.6.0-alpha.4":{"name":"apollo-server-lambda","version":"2.6.0-alpha.4","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"d1912f97aeb023da820b5ac49f16004083e7dc43","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.0-alpha.4.tgz","fileCount":20,"integrity":"sha512-5KDRp0YNTe+b+hS6UxfliNbu/AbEr+bh/ZM9j0DlwVo9aS/u21Jj6j4Fh2RLYiceity6MFWLECnpcStPv72pyg==","signatures":[{"sig":"MEUCICEvtoCvYaJ3oyUQV72f6Dew1T0XNeJyf4Ez/NwUi8msAiEA9f0ukhA29qJfib13vY4/3L/L5Fw6inMVFsRLRUTt+rA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5taeCRA9TVsSAnZWagAABcgP/10cqogaIO3fMm6+BYGO\nhjelxLul6dJmsxvxBYvbnXlOfAxAp+v1zg42oipKos6XWypo5ki94Swn0oO0\nmppax7NqihLxSFmqTcg4o4a9MM7gXMYICxrkPjwLm8ipckFRbbgpapbET2Jz\noOzVTusUoKWbIISgO8Y6bvpijnuzLLAMhV+v8dCcDjIN4dnLN8to+ijmZweh\nV0KCipq7O5FPITWJUXwbDC/JAvUDqUv2cq/YPcATGQbicuVwd3qMu7PR5Eog\n/e6hvoL9FZVIeYEBXxTJV7qewR6ODSyjTiHXn7br/vdxDEFyfGF8kh6jxQVG\nmaeEMz4DXo6A/mxLNq/ls7awxv9/0KQhUtBD4FvfR7qfme0LnZ/ePehODEsc\npTsiRFBGx0/0PcB4byDsQZBtAHb1qbUxX++UsubSv5rsRmanYU/qfEOlDXqu\nDC4B75NI3bair7FWL1Q1/Z1O3Bo9x4IEsmRuOxQd/s7ksi/tV/Y2EH99+rod\nZj+GQ8vltivjvHo2V5gQj/QCgmmRIsHa5UPpJg3Zckdo5lJIUv99UryNrlXN\n1Q23Gp4X/lq0OJBPxa5nnyXSvgdTzZ8rL1b71W4tIGzXXKEGJPRFvqnPTPvX\nU4fBfzJ6ob7P1w8ozGo6wACBrBmsf9Wtp1IL/V1h4bfpZvzY/gJZOWu6ZZ6C\ni8dk\r\n=a75n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.0-alpha.4_1558632094127_0.2453442652011979","host":"s3://npm-registry-packages"}},"2.6.0-alpha.5":{"name":"apollo-server-lambda","version":"2.6.0-alpha.5","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"0560a80519d218ca92cb4de7c733ab08c85b88c1","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.0-alpha.5.tgz","fileCount":20,"integrity":"sha512-6Ki7tvmviqA19RmjlGGIimsouplzeFD/ewymOofMuwC/KaXj1pqb+2OWH2/ON1y5EWyDVO53gp5V2JwpGkwxqQ==","signatures":[{"sig":"MEQCIDi4KCIqkDM2qbumC3UQi1KhvLzVOp97/+XTu4W/J1GcAiBJJSeAiT9W8EWDhnDryjyjzLwRxwkr0X0I10Ta32sj8Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5vcHCRA9TVsSAnZWagAAHrMQAJ2dCTwhhKMw53yBPDuD\nXba93ABJNuxOord3Ip2chXiCi0IXHTly/epRZ7VSosaRAONDTKndNlCnOKOQ\nNEUNIHjT6nHArxMIukXIhzsEnU+Ua1H27XOxWaAAngU9xXJzdx9PeeWPNd5m\nM5saKrpraWhiJk+HfHZ/HLkQE83P45rwPrP7Gz7LVVEBcELLWsuK7RTbK27N\nLDDAPhABvZ7eJ8C+gHAI2RIqSgWPOahEOriJJtuSxhFmN9CfJaUXcat8NdLN\nPksTBAfcFUYJnFLFNQSANdFZCuXWLmCGXR0ZU6Ph9qJuf8mhk+mwygG2A8pX\n6GNTMNBrkerCI5Nn+unRZoBqOI8S54TY9+wwHbi5YPlio4UXRSozaDoOc3lK\n/GDy2kkthAHUP8wrK7kYqaGITu2ZSK1ocDm6Z1Y5gjmKY4QJqi8XE8qUEb9u\nlryXjSiS+Oe8m4MPkdPZUUDiAhyNn+hBQgfXbVlqM44gm0RWmJ9fGoLKa4I9\nHJ7cqGMnmIChpU56mu/85MFlsd3Vmpc2b+Q3a5J0rKHFFoNdIiXWZAeDSigT\nM9hoB/Q/KBsedGqyJTEzupwf5pseqOmb2OisIcabkxwLy56u25sdzY873cYV\nsd58XtOnTM+pFCi63BsWFugkXdjsorUHC9kMIXNuQ36v0F9pNDSFW7YBTe41\nKiTl\r\n=PycL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.0-alpha.5_1558640391202_0.03033335339135501","host":"s3://npm-registry-packages"}},"2.6.0-alpha.6":{"name":"apollo-server-lambda","version":"2.6.0-alpha.6","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"f41872e8d21e1e748ec8288b5157e03117ee90b0","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.0-alpha.6.tgz","fileCount":20,"integrity":"sha512-R+uKeL05jwgqjXYl+SOwRKaeji8qAQxnPlsrPY+Vz9A2ti446LsIFgwVW9URiDH2s7en2IjsSy5q3tKLGbTZbA==","signatures":[{"sig":"MEUCIHRySlPfDMJj7uDS5TY83tAHmLO6qTvxEPpe9C0DNVlwAiEAz/cVgS6Znv2wVIMXD7y9FQsl1aAuVWJjc5KfOrFNC3w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":37684,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc6GCUCRA9TVsSAnZWagAAw8QP/0I8TEUwyCBCsbY9t6xZ\no5703MDKjekxiSVx/4P6OFvk6egh1eWv2WYL5TVoMZc24aUtgmCcCV5whPgg\nq6HKO7yUr1QlVT3zCNtVIk5K/OXKQuVDRRkhg+Qa7hgykiJxKZ0NuEnX8o+A\ndpvAq6F2lKy37u89k2oPzMG7cB2gv96StOpRgAft/pUbaSUieZf1binZlYmP\nHdBC/tTGbJKUq8RNc5CSmXdyosZy1aMikejB/ADFkG89pbScXzhL95p6ug5R\ny5Me/novku7H+UG98LmPhYQt6tqlB/15S2574WQ+9zK34/2gDY2tQu0RSGiv\nCVRm/GhSXWyK7gMmB+56L+Uq9U5+GcUsoeSN8H4z+8a39D9UmVfXJ40r13s5\nlmoiaZvWXr31jQxzwOXhXyZzx2Q4Zqs7bJPmUDQjO/HCQlFgmhQgR9B+XITU\nRnqXPgheqJ8kTM9m32aWVuxC5ifzQZZkPQH2IpvY3NMb8J8ELD6u/S93V7jL\n+mRzfHEbOARV+5FbcqqcANxBHEZwABcJEUTMhLpP2pGY85np9Z1Gc5eZbj5Q\nFLFrjuwNZA3ZXtvrfQMvqgIk7kejEEXgIBYBqWBaV4NA+HP2If2zpR5fpv2t\nZvx3BmGz00K0MRZzQcKeP9dzUwPxvzLEGTaCCZl+096xxGl7Z5lTBH3g9qXq\ncJQX\r\n=2NWA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.0-alpha.6_1558732947807_0.7760689761722515","host":"s3://npm-registry-packages"}},"2.6.0-alpha.7":{"name":"apollo-server-lambda","version":"2.6.0-alpha.7","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"84c2901f5e923036a4868088b92410b4cbf974fc","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.0-alpha.7.tgz","fileCount":20,"integrity":"sha512-XpBt7tuoQaQNEuKt5r+oFvIKyqz+OWvSmchPDpCodi27jiAPho87N+VAIV6FpgQsWTEm685SJRV+KX+TpuSf4A==","signatures":[{"sig":"MEUCIQCmmNZ3BRxZpsBfrVlRb4iM7pGvy2jrHK65nT7k0lUVCwIgQgShntd98iAFHXMPHb9DCmc2hsWuL+lXuUQq1k5rq48=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":37692,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7CwqCRA9TVsSAnZWagAAiaEP/A5CrrJHppiBVycGIUDV\nkDtY5zk73DZ6R3HeF+1qFWXWoH3ljc/eTnTXAcR9iU2X8/2JSGZDjQYhlfoj\nB9At+LPVJaCnbINb2umi4lWffHlo0RcHhAbR56NUGWb1FFTJhKZdW3CReZ8S\n5gOluB8l4pyK08Z0vvbFheZOreWWzIVyq6c2pTbPWu1H5qsknWDdIZb+fxpT\nkJgEmOIU6/CxueneWQYw8mVLEoPSHziMnenI47lYh5Sqv2WgEHXPCjwuD85B\nsUC2e1mnUu1i1dzfV/3yCiDxXTJjGpNxEM1lwjSFX+yw6ScNI4d6RqICsDvr\ns9nZGlJiOhO/dNYhnZGlSnbXinPXziYsmJLVsgUXnQA1ZK/kB67WScv71SFS\neBf13Av4oiQMizmvhqqlfEjBJjeHX1/ZalB8/lmVpW/fjB+a366mAcoIpJiF\nNo42spLOyfEz/h//kBtse5Yinwku0/2Nyy6mUagudCmmKTj4hB5/bvxSw5Bg\nlchQ38qIXpG3erS1AgQnEl4Mn33L4DlGqESr5XOkZUrNCCuhdbJwpP5pfChv\nFxCjg1LV81QNb0n5SU424iB6cMrYRFJavbX3f95MWBTork2gzKh9HpbF9nLS\n+HBgCbCkAorroycxeYse50JcHA6UG6rCWBpafJsct5ctz9PSrDObtEkod2Su\nExX5\r\n=Dz+5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.0-alpha.7_1558981673565_0.08418329255330259","host":"s3://npm-registry-packages"}},"2.6.0-alpha.8":{"name":"apollo-server-lambda","version":"2.6.0-alpha.8","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"3b9cf6ed54c1af169df35d82de4132981420f8ed","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.0-alpha.8.tgz","fileCount":20,"integrity":"sha512-I0n9eW5zv2QIhBisD38AXH37Rn2i+cD3bss4qbQ2rlQnyne37F4b84lBUhCN8KUmzCfe0naZRvAnMC367JDroA==","signatures":[{"sig":"MEUCIQCDzlsreTN7VecCDdutRNWnqQf6q+PaWG9X5rFvSqBLxgIgdWQ6tt2WONtXkYe7pXreIQmVNj5EoT0YxT4i0+6gqhU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38135,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7VMdCRA9TVsSAnZWagAAhiQP/2RKVgfOMwWw5tSbAmjd\na1xqV6nXazaI4F5Sbg7MwDyIKM/8IN+w7l3t953XVY5xKUklab7+9uor7aY9\nUh6RZX1Tutw66oL1ibR4FsSvjufa3Kfa8IzZT7PYM871JwXXG/L/hPst5byl\not/aFeVKYgvbRucr/vX45tc1KDYfP5N2bwS7XRaWlqGOf0yuwKRYaPOAfg+T\njJUGjfcMIegoLAF43X7neW145fOXB4TfhV02SgwMLakJmJPttOsMuKCuCy4m\nb6nSy2nejPjtF7aVVZodpgJXts1id7B2Mdd8U0PcikDHRBPbX+6tGfH4Szfg\n7GJJwM9Y/dUlwLX7vYI5IjParY7VLlnMyc3YZh4rtBcB+Lw7mAFZ46Jbs7SM\nUQawTyHHQpWSt+by4aKnHsUfpnYLqP0nrytTfzwEeKERwVcaAOyZo6ij/IhT\nYqW88xlNaDykXtNq4QL5UAjt6BV5KFLhBck8frs2hERcHwVBeTHYjvUKXDyg\nM6uoW8BHhIADeCkRB7DoqCN52jzKbw2akZuDAX1rSe+y3cGVrVIyvKmXOkz8\n5SqNqupppZRKwL9vPO7aGcTZkk294P6uE0KIUEcz4iw4wd4XfvhghV5GGCQm\nh3pQcbiD3T8tssq0/VjQ0TtNwtoAhEp5B/awRougnjaoUG8CiwrOkPpdWHY+\nXvE7\r\n=/WRD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.0-alpha.8_1559057180015_0.8524547618936775","host":"s3://npm-registry-packages"}},"2.5.1-alpha.0":{"name":"apollo-server-lambda","version":"2.5.1-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"10aa47766c07cd77bc71d56564b288b376e2384e","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.5.1-alpha.0.tgz","fileCount":20,"integrity":"sha512-tUhnKveX8iGiLuIHhJQ7yyHv311vlxmSAaS91e2oFgtbc1XdJIC6ijKgSvavT5y05B33TcXe8QqB2+f0Wc5ViA==","signatures":[{"sig":"MEQCIBibPzmJ8ZfYJw/GrhB3xBBpFej59UrYoeFpIMlKwPi+AiBNSoXiwApuyjOl4D8ocQIXq812N3Skyq9LE/GphJeCwA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc75w/CRA9TVsSAnZWagAAj7sP/3iFozgYKTOa8VMG3sZZ\noM1eLxuVe3X8PW70z+4gfnHhTN4l5P7d2TrRWcBAl1SCFlGmoRvemavUIjVI\n+BwMzk6gxTJJ2L2+Pn/jp6kAvXYoRkIuk0mCnzmlWuISobUUJq0a66TVQNcx\n6ZFXRCC/yzyvj3r349fEf8oUxXjv0rUwvYS6dt/PPO7j+H7rhxxTZqcA8QlO\nIl+G/uNp2ZPJzMUl6EkLQdtCSEIwxPV04eF5P5BpNYEJvPcuIMYz8qjl7XGF\nZsilWk+wERPBc8PCrJjD0IgrGWYjFKwG09VhKZ+U6TtlRwPAsocErXhpfbY8\nUQCUpBR71LvYCESOQt3A5PWHHDh1Ce5ypxiZ9wj5+//OTeFcfz3nEYvHzNtc\nCW2cDNy7BXFrClXvRf7qdR52BODIxne7FbKs8CwvTk1KGehGkSrGiKsZ1l9d\nNgShpVYhQWe+w0zKbGE6ZaNC1VwxoMjL0Xm7PHnLhFXhMMMWg7dceQwCJmU/\nGKh0CNsJBTECs0bph3WgSjVi5W34srQuAaPJFsWC+WK71RHvFYsdX1TNohlX\nwKghPLW++oJjTRcjhEkioOj61cKnYLp6tDCUHztHzg3unVy60/ls9SwrzwvO\n5Spd6jwVx7e4ICmN/hyhpWEKauTAFqB8UOULvupo7LJFi2UUaHuACEwEBCN5\ng2Vc\r\n=DaOO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.5.1-alpha.0_1559206975318_0.128632380532274","host":"s3://npm-registry-packages"}},"2.5.1-alpha.1":{"name":"apollo-server-lambda","version":"2.5.1-alpha.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"8aab9f29d512059eada2aa3a7a62547c4461355c","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.5.1-alpha.1.tgz","fileCount":20,"integrity":"sha512-R7LFwiG4j9Oioee7iu3uTJTaisF+srW2Uc38JLyS1ywcT80JTL4TOeGxPjE/+AVBPWmyqVKrwRie8gbqhWsjBQ==","signatures":[{"sig":"MEYCIQDH/A6ifEYKUaqe32jHTNe0vBNo8mScA7eJP0fD88DhxgIhAKcoFSGp4na59EUHBZgLYmfFArIxSUn1GWGwyjixHRoj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc77cUCRA9TVsSAnZWagAAhcUP/1ReeOdxlEF7vSvoy9Qp\noYxB5CyWZOB7MK3sTvMVKNAolyl/ut77kne8qJ9hLaW1weFYbMKeGEoRz4e5\nreMGoTR52+k/VUrbc157Ik1bykB+xE9CINv3oJHrkT3jVcCJVAs8uJFlN71a\nKGlosaPBFrZ0hcCMIvfwKIOriRe1z8izBaEnCEf2XnSz3Rf0xzGN2F16y0Pp\nv/KT2sRAgGE5iJsYnZU6bsEsnNAmkpy7s3F+dWUWNaMgoiMgsrLvrDCr/WMT\nwr2j49wNiK2LkAIKBA1pijRnO/CE0aFy8KbseXTCsTE8L9KMJWF13IeSkRe9\n6LQFyA+hISQJJaZhLrks0ALbonERSjOsccwmSMOmhIUNRqGyhTIKo1z1Np7g\nwGZZOwnLpT8pAiwal42Yw974bveuMRqlWmYTp9HVgmQ1ijmqtZR3w+lUxJsG\nNx8g+Jlh/2LWCYJnn6lvJx0BJllzfjkaaTrcwaZaezTGVMZ/M7WLG+ooBzgg\nRiRzLxrc07ICUbLjXnZGYk14DYgO2X9TGL4+nHTpec0yFrPBIIH5UM0KVzQu\np9JwMgLfGGP3lAdOux046aHgHAsSIm6x/hNX0a4HtMylRo3HG5UkAvWWf8NO\nbkkoMe2rE0EHM3X5AdNP2v4EarCagiEYeoSn+lfenoNgOwOOaNNlQfF+Xn5j\nSYkP\r\n=otcy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```sh\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.5.1-alpha.1_1559213843597_0.543551735469405","host":"s3://npm-registry-packages"}},"2.5.1":{"name":"apollo-server-lambda","version":"2.5.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"8af19545d096f4ddfa788b92630515956aced7e3","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.5.1.tgz","fileCount":20,"integrity":"sha512-8BgjoU9DxE/fhx3AeaMRPzrpkcnmIlq1N0OCcnV3kMMrx8fbREX94ZFXasw6ail9FFlZ44hX/7WfPU1BuSpyXw==","signatures":[{"sig":"MEUCIQDIEx8nctmubHBehbil6TM+Kjl6hWCSd5AdDeHki3dpvwIgZ2KWuNxbU2C/2uIQgULZ25d+nieI20gw/n6nZzwnhNo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35741,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc79goCRA9TVsSAnZWagAA/xYP/2cMlSg0ZLsi1pR3QNGP\nSzya4oDmiuY1v4yr6Z3176ret9hX/DvZn7sd8y9gMBxLWzy9hbDiDJ+NfV/x\nBqRiPN2emIgFDuoxaM436L7tLFXIu4GMBEFgP6RiMytK5/Ziecn1N/pYkTkq\nuNvJOlraoTQiGywCbxUIp18Mb6arsii1RojWe0M/+v9fooihpNcPx+zOf/BE\nEN4KSWUZ8MMfgjBSz0N5jmofOhpFqybJOCcDqSjGAMbFH9tsAUN5EZEwddwQ\nJIRRn08h0rnDsKX2oafkOBZq72aCBPSLo4yUqYJws6CZ7NJvG3PFl/mAfZem\ny0MB3A82XAwpaF3oAkAuuS2NoATz52uCm5kEsYkJfk+YS5r7I38ZxvBO22sv\nxEO+dbQRYcLTbwpcfqm7CQ7A3efC54E803b2BKj6dqkJ8CD/8H+vX0ofmYOv\n599QHkROLPtFNFS7AqtfE6vTyRJ+TirMSE3jwQdlnl0V8iYEa0CMA+mvSCQG\n4AO5ba0vxUBDWJfFLh8CQOES0eOHXardR3B7mWoBDzPDTfp4FsOsBPq6sLnk\nUI6wG4sLLTF4sXtcgdE+jtmuYokwW7SzO3bhx5iYIeT+j6vfkaFeLK7+a2Je\nqVRkAdAJEp2rOr5RCvSUHUfeb42xSOo1BVI5JvTmJropvTXrt2F+8efUMvql\nezdP\r\n=Sddb\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.5.1_1559222311714_0.3394240626107343","host":"s3://npm-registry-packages"}},"2.6.0-alpha.9":{"name":"apollo-server-lambda","version":"2.6.0-alpha.9","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"d19c842c7e9d90c2b350fc2fe01715e4debfd6f2","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.0-alpha.9.tgz","fileCount":20,"integrity":"sha512-yRgz6lAzJBqioz814x3lX3YnyA/QmbDkyM04T3sv9CnMK+v7+c3YkHbC/JGNqJuMZkRckYnraid0AqBlnY1YRw==","signatures":[{"sig":"MEUCIB6bTLwrHCPoAZlWVnmykk52cOY/P3Uz24ZgIojkfF0AAiEAsFRhFMORAep+iVm7WsRbq47yGyN2J16WFiY6/MrbbGs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38141,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8DUtCRA9TVsSAnZWagAAfAwQAJ1Rk/udGnooecU1+KAn\nMp2380t4a50DcbEZtVevzzWgMeMsKzVzywacypAl9GPTA3b4n31TYhcOTPRV\nGgfIJC5/iwmYtkp1pX9CdXQ2/yRzHqj6K7I3ngpXH+t0x8c6R2GjKpW4I3Zp\n2j3f2lPkuyS40FsOcFChXAdaf2mgPcV+/SlzTUL8DLvcENKoWO/yb0B6S0Ma\nFpApNGAJT6vUYOt7d2WQ6nqG4lSdJbg5mmswaQYZIYeCTO7xR+iy2DyoiEoI\nge3dBDctM1di2UEbM0YIEnRItMjD4Ea5p8WfopNjGNM/b9SmA3mdo0pO/Frx\nCR04shCdiEunjYJYuBgJLwhzXX/jGyPW/Zu8kvk7AMMJnKiCX4TZ/TNvZiuo\n/1VfQhI4qfdNXFU2AiUzdiUllkR/IdQ3CARjHEgXo5ixUjfN9s6y5m4jXshA\n8l3sTbeyg0DsEE4RGuBHcvVls9RAn8ngm9+uoP775yluhIZtQNAQwk+yBXB+\nTVqDzJ1ZRI63gz/TqoI6d6v/17LYuvfaN9qtiG9ph6m9yRLPKMJPnjIESXOx\nEvNj4ua0no8wxv4MPvBxWUkx7w0i2khUUBU2NUG38H+ni8KW8nGISYn3ls1C\nJIef9jsxLPGFmzIbXurS7nlPpbJK8Y5WOwG9iL9fifD9FffxAcRRknnAzmet\nA9/i\r\n=OzqE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.0-alpha.9_1559246124729_0.3484482345593305","host":"s3://npm-registry-packages"}},"2.6.0-rc.0":{"name":"apollo-server-lambda","version":"2.6.0-rc.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"f5e9173c88a19956dea0a2e9a7d5d9787e37cda8","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.0-rc.0.tgz","fileCount":20,"integrity":"sha512-PJWgWW49MC3xQZxCbB+cRQ4HvAbOUiwnY1F4xaxx2fx8RI6e68VETvAOp6jUqULcRXAOhiKXNhVXY5wd9ed30A==","signatures":[{"sig":"MEUCIEtw74Hdr10d+2vO2drPXoc2dOtZV9jHGIQJi00vcLsEAiEAyewEs5/sX9DlU/6BLKGRp99QinQo6P98QYlJz+++kUg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38132,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8D1QCRA9TVsSAnZWagAABkcP/R42YFFQF9ctDLqHnE8v\nc3/YiIyCNd5R7Lns595SZRqnd1ZodIF9SIxz7dhzZw16oR9H2c7mHDBWvqOj\noE3+s4TBA9YvqKYwPAPByI/lgpYzNv4qWYuxHUvaTLvWWRlnVgw4kcVVJ1j4\n0ptMfENOy4dfMbfOJaS2tT+rZ5Nsxh87q9CPHZSck6skWIMbmqjxy1J0Dyu7\nvnpQiwYb5MET/+rgocq97SFJRVMD6nYKpJ99H+LonpwMzJnOOknbtOxAICZF\nQXT6pjzkyo3ihCOTkKl9rpsw9CV2+M9JfIbhrANTc3ENe7B4INqWR11PirM6\nFNh31Wlk9PAGjBdm8C2plJbTcEwgDBq9KezFZpI41uqdqqh1aKyQ2sgRdM6J\nTZtU2BnHfW/vfNIcHHGkXnj7Fn9t4CVFqlTfjf6D3S6As7hXY5HaxswVwIq2\nsKIZvytZGy2emL1jgzCJTPVtCnOIcI/Wjcb2ZFYUQdGNDxnbgzmbHROMrEkr\n7tyTg/+cLKytjPvXNE4WRJIG4IC6QM1fI8WbOmU166xA5cuVz0Wf9r2Sb6Ng\nUsF7EJcYcTS/LmifVy2E9hg36+C2rRu/HrqURdVcvdz9W/UL21MXRLg39fan\n1fmxH9movED2EpInH0Pe2xPUbbtckX/jKNJxu76/jssSPoNVIlYSoYsTalep\n+QlT\r\n=7WST\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.0-rc.0_1559248208019_0.9531795087504265","host":"s3://npm-registry-packages"}},"2.6.0":{"name":"apollo-server-lambda","version":"2.6.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"ba0d1793910319b6a340327f6f5304ae415d8eb3","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.0.tgz","fileCount":20,"integrity":"sha512-hVOdWfUVsCKzq+3ZDR6I2PT3ihvYpzh/OMEsMK5Mn+euZP3StaVsEsyJDDrFYxG9uS4oF7NjxGz6f25zwzfdbA==","signatures":[{"sig":"MEUCIGzufYbYthpEY/yBXjyazvtUdsN0O/W/6tYDlUplCC2zAiEArPkCkiw+0uOo6b6vREgoa9JROJWOAab7yfpxu8gT/N0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38109,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8WtuCRA9TVsSAnZWagAA5BMP/A+icAt1tvjzBYd4pUko\nrR+2oW6EvgZsTS966BnS3qVC+LdyIOgUmQ02MtXmCiKofIT2TeHgU1Os6rNv\n3Z2j7FWZYjwUxayo9iYBvU5pYW/vwGsts+tY4bGvatebWBC6riizgLdlFjyd\n+FtQMsm66NYxc9jp+8TZujDFSCYgcEq2nP9tC+CBIcywudJ0LOfgE70Z5XK2\n9SmGnbAp6GtOaatANKkVPQ3HIxc5z9BtmrbYjidmEJDu1e9wEOF4vPi9oOsh\n2chFTSDWNW3TmgWAUFghJvmhSEDLFhhEvMzR82vTgmoIGfOecsrGgNqh7nZT\ncvK57OivdnGcWL2DkMORBWMUxEuov0XYrzidxDKg+zVjDeUKWmmvZaH8wPZO\nIaoz16QHQIMO0lfGKrmsGLY2L1q9HOK+N+O5noX/jljt5/AVwnHWect+Tqkd\ns/TMCDt7b23vUPeJmqFIqDIRDzsIl9A0lKECxk8lLkv6jMF5Ws0HdVlUZ/R8\n6Nfx5s1ePy84ySaggd3UhzVki3Rn0uiDAL1fkoJxjEtFfVq+uFVY0RIWGtVv\ngmQjYCilyACj51KTeAtsmABOsAk/GFnBf+gRDJfT/92S1cNjm7PBXpE62roi\nqFqLDByFbggdBkPu+ugJVp2n5iiz2TRfjLXBxMIlN8kZPf4O00u6jRtdp+4C\nyBRX\r\n=Y6D/\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.0_1559325549469_0.3282371844751164","host":"s3://npm-registry-packages"}},"2.6.1-alpha.0":{"name":"apollo-server-lambda","version":"2.6.1-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"a5e9d9d6371daa108391ea89261d00478869a091","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.1-alpha.0.tgz","fileCount":20,"integrity":"sha512-9UqU6kZBgtcv8l9IUDMzyp9MPwFEAgU6PwZoRS8qPsszmx+mhNGivhisBuKGT2JKXByg3Pw5c6p4Lm2bA/wYtQ==","signatures":[{"sig":"MEUCIEroZ3VXB6BqB5/9c5iIKN4cBTxRgLGJ3qeahwCxlVZUAiEA3bRyHu9WSyEXw5UOpvmnfd74bAQxFlKuuyzPBASdO14=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38133,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8Z+sCRA9TVsSAnZWagAAtY4P/1C7E9FtvQdTNPBvi/f/\nhx8yaZZ83cQtR6W0bLtzMqSieA5Y85zRyypzYvkBhjJM5zwwwAyYFy4XFlOC\n0kR6XxX7GhQu2kyokcpotoKEgqWw90kqNDpCJ7qOfdn46MHyESOA1HJmyW+y\nGoEJ/5yHyK2LAshly81n/SZ86Zx+0TUoW5qgULuz7kLsGWP+4we/uu1h3/Ab\ngURQlISpkDLX/8HqeIQ3EG17MWc0AcK/2O4j5jvis04QvzDgoUm1pdT9ys6V\n9rtRojoYpnBseWEiMYEx14fGidiF3bH4/SMRBHK3/7V3Sjk0EyP0vVsx0c6U\naJUxwpSxWvfDxS4361ENt91QlqTcDx2WV/bPw7FntFA5Hd0bufg+2CE5mqBq\nF4cRNOBqAkCR60l69VsJjkcEJxB8+m/fcWIw8PUZ5+ee5eVuv/c64F105Jr9\nu/i9pE6+YbOcw9+fJGY3Yf0EyDPyH7t/1HpMlrM3/ds/OkCeipyU7HrwG+oy\n9hIoHvhhLdYIK0mH8Mip3Eo4FcVCae6RDnUlyGn5eHOZC1FM+aq2AbsKNtha\nlDclEatEFsiN4hm4sMsSPZ5A1dtoflSeCw2jiMlhfM6RtfdwKac868Hj3ikP\nfGldl3fC+0fEFIMeH6oWoDuin4YH/1RDg7yetRR3xR2lxeo3WohuZIOV758V\niYft\r\n=rTgI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.1-alpha.0_1559338923421_0.7608255420177046","host":"s3://npm-registry-packages"}},"2.6.1":{"name":"apollo-server-lambda","version":"2.6.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"1a442ece61ee1894e540cf496cb04f543ea4c881","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.1.tgz","fileCount":20,"integrity":"sha512-QXHAC0rFu0T6/djE95/uUgtyKfuQpN8ixAp5+jTmGql5Qn/V17Y/w21F8J6NlP2+RU5Mr0kyg92sqSuBMQ0nqw==","signatures":[{"sig":"MEYCIQCIytgmnXMEbNBqtWZePEomsjipoWCcSsFugh2W65QgRgIhALOLnYTcxRGSpdOSvOwVTopI3t2CyYbTn+tEfjWc/wFB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38109,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8aSWCRA9TVsSAnZWagAAwcIQAIhtoIUzjBnPDiFw0kov\nqI4/tw4i88kMHDsj6aXYMLyH2NvDoXMI+sHY7j+idnlFizEN3Vv1xBxYso4u\nHe7DxoZY3a/ac8zwHPePdWy+CXWs/25fURoZomQAn9HfkX9ZbBfvHVr9TRbu\nY5ClbKdLNEXiiNIM7pAqKcRn+TnWYywAj7mdwBWiTsRfuu+K29etIK3po2IS\nKQ/3tAWWqdDkctcjOvPIWwgNQ8gVwFnG54wH3Ct3cLT2848ijpB10A4I1GNE\nXVHh62ue5grhjukEr5ZjnWr9wlX9PdA7qE7jS/mY27X5ah9gw6nTEMrfZEmw\n+EcaX7+Ddi/5+KVFsMrpKTQZrmC6Ud04QXWECet4+F3kseYT6f2Nnww9y5hu\ngu1p3Mz4Zu29jDQlercrPQiVhX/5e5eCRzCLnzXy7LHl3Hr73fWPYMuU61xc\nHBXiMJqAtBmnB5IaIE5sCTjhcLSviHu0NM+z8RA6ChUE6VJFD+qExvL1dxyS\nCMx0wumggDW5bpHVPmFZck2BfUAS3v8uCiYirRws8v63mm6z963gCRcQk3sQ\na/eQDWc3FzAum3o141oBRN3fmLsr2P3WjPRquVJkvakf+GSA5BOWUdJ2EwMP\nDzgExgYzWY3Tn58U5BylThHE7GFDZ9FOfWUbAy81JpcsSry9ubYV3iU2MkFO\nA/It\r\n=i+yT\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.1_1559340181768_0.6059055813611529","host":"s3://npm-registry-packages"}},"2.6.2-alpha.0":{"name":"apollo-server-lambda","version":"2.6.2-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"bd69c09e5b602cb0ac4d652ecd4d762a927e2c6f","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.2-alpha.0.tgz","fileCount":20,"integrity":"sha512-prKN9035LdSa5QN0beIFTmNPZH3KE+AvJnh9nZZjmIEejZIVdPjLQm64wuJsJC994O5KQkrUdu9jKOBNN1aiPg==","signatures":[{"sig":"MEYCIQDWL3Vg+A7UrEgMKNxFl1vg1ygzVtFo96Hesdrcjuk8ZwIhAKzF13vn6Oj+dtFuqNuYqxBDBY3QUI5yp8qoSOGSHnxQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38133,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+TDjCRA9TVsSAnZWagAA92gP/172r2sGezBbqSQswxwU\nm2XeCkQGhRy8G0/15lIedUQg2GdjekbU5vxmbhfPXpjrcZtakld2KUi/RG7U\nmvzM6eJ+7pOk78IR3kx76kEYN54PQFn3NiboW15v+udh0itQ2rAhRShdk0sm\nQWtUmq9vPTEo0dfg2usBjknFpR7rUGW77AHnj7GBr3DZCGOTaxd281XZdOeJ\nclmZftuEq4L/wzKP2TWQUVUTAp2UF3DBqStJbVp3tOUH3dqGSXzbG39fJ1yV\nf2D+KEmLOK+3REmWp3P7XCO+BHOvBQcaIAp0MT0v34Er5dKHVZKshIMzkxJN\nCwpeEMgsT2B3FMoQAerzwHn0yTdQVaNH1RvYmpYw5sNfmuKC1erKfUnY2klf\nJ8JqLzeZPtVrOzOnkUAcIGiNYyEKbNmZk43xNauvb+2aVOiSKyjRJgK0dRdW\nnef6XkvuOtaSpHH38nIe8BaoX23nBC97p3hEgsKV6gFE3UYlINNsSrPFuuXJ\nKk9OHxZYrphhiPxV/+zMemeYHOUiJ8nXjzyR7hvMuPXXHgjkLMHA3jgbt65f\nK7p8YNxV5tX5THjOmtkzM2fGO9t9z0HOmn/HtRv0jfUovKNf60gjN/67l/8y\n3soZUDxTWi2CMmLYxDTUW+8NJyIP+y1o771Al6xwV2VxiwKJc5GqTHq16S4x\nVWjs\r\n=f4ZN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.14.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.2-alpha.0_1559834850756_0.655753461378616","host":"s3://npm-registry-packages"}},"2.6.2-alpha.1":{"name":"apollo-server-lambda","version":"2.6.2-alpha.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@2.6.2-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":"99cb58449e52e01bd9d594d3936204c68f238bdd","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.2-alpha.1.tgz","fileCount":20,"integrity":"sha512-nwFuqcseMVG39gWcqxwy/aHQMvBiwq7UYzEArS5vgDEoj4+ETRGg184zzoLmUZB49lW3s2Vne/TqCbUcBeXhKw==","signatures":[{"sig":"MEUCIF5MM7YC+20wgFm49ltILgg8fQnRRCkYV8NlK2qCEdcTAiEAjhfdDeOXyD5It4gwZYOwNW9IjkwRPolksmxxRDV6B0Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38392,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+VHcCRA9TVsSAnZWagAARP4P/1a+qyqamWBmFPWBceSd\nQepkZ4QjLQgGtCGUCqWvgHOLJ02lXG8LG3gVRqEiIazzg6/FTvrANZx33QPo\nAD9T7J9m+C2aZjqJS+ZO5nlYFGkB1rRxetIe6pPVphupHR2YbVPKVWt/ac7j\niBO7oWvM9I7hDYZFh0TlcOtbsxvlbV32LAOQrxzZsLrMkPWerQknmWM0gN0H\nXsw8EJzp37RB4PrbOVmgord3EXMjMcO0FxhTYOl6E28f8c30M5FYlxDtsl3Q\nFuXe+gxTUN5McKczPUppXuKa72iYmGB2xkcyrgKodK5JwyqRF9ga0FJGfbS1\nZCmrt5fk3Y2D299hQ//g1YpNZWXmSoBM9ETZ4vQZ7J8vX2u1gQbW5aJCfgUq\nI0Fgsyoa7EuPUZPkqNM4o+VswKwxWAP3rAjCn+PYyO7PQJbwGc8OtzqnsoIe\nNAvR948q4XBAeM6Btq8O2D4JRka18/3mm/IRbCmNZij0DESXJnFLaJun/q9R\nYnHDEunr2A9R1yxmQrWHOgEZxvKGizjy0Ws97s2tUjxX50jWYQTmr4so3SQk\noUNV361gdpJW5CBF4BvcGfc2ssaxlazkWVKzydO6YeOoj5a99sRHdTf9QHla\n9QqquK1e94TEkpL7MHk9vwpyR+UxLXO7qF1VtOqZQyR1TzhZzDL8x0IgGAgK\nIZbD\r\n=iMqr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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":"d55b551f71e305b4eb1ae4727b8cfbffa7be6b9b","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.14.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.2-alpha.1_1559843291814_0.8974705851265699","host":"s3://npm-registry-packages"}},"2.6.2":{"name":"apollo-server-lambda","version":"2.6.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"e76496f803af4a33740f712c1d0380e2e0a55bf4","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.2.tgz","fileCount":20,"integrity":"sha512-eWntS5poBGUqvSGTEFC9wzt9R/DCEDBTaR4mTh79hHTrsqhyCnnE3IXRZy2YUbCsBev43cFw1YvPQdIpjMqx2Q==","signatures":[{"sig":"MEYCIQCTMmfJzSQYp//w83MG0a/PBSO8x5e+Tf7opPglFtfz4wIhAOeim1BlIRMLgpuIG9BsZlkH2DLgNyGLyjBpiSikIqU2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+W4rCRA9TVsSAnZWagAArx4P/ixhPTsaWk6HE92A8DZX\n9fiQMDpr76c6ItYCVIsiasRY5DQZ2C/bFOFF8xCQp7m5zbyuetvIFZHx4DCv\nnZwR00+wV+bWP0fSeioRMMTmK+swR5+yhBlt8q9c/PfOswuuknbwx6PM2WUK\n2XTPYP3smW3PvCQKETOZBKHFA+lVfOBdAsTbM2/zoNeIF9BKk9RPJ4j2K3K3\nzMP2K0nV/Yft4utMhJA8naOOHqyIHpSLTZoEG8N+wPiP/pAyos2Odoi/TLLd\nC5ch1wpom0of6f88BMzdpIecAZW5cbuGIk6VwJmDwGaDVWnP+gduBbOAjtRy\n28sowlh2BLxG9tCFzOHUDVPBjg10N+TI+4rFy4Slgql1Yqp/4B0PcTfVOTXL\n6tmQ3EjELZJG39T4A1eQA6uGCecfQiezoXUoAbVHVc4Bfo7a5tir064sKQmD\nACf+wDgZHbOyQX0Dt6KRdZpcAkwXA/IiF3QfkYoUWh0qk2St+WiIkD+8gX83\n6Bb1CjkA1p5GVh2is0P60nZvYpxcMP8JO3vc1JEvLnDMIhsPedjW5G+S9jJJ\nnZgF6IRgQqnpTADkbKTHVDAEOMInCPjICpG+7Eug+IOS4U8TJ9inQ0YrzCk+\nPEkV9JMwP6MEhB8rzEo3EWXv0oeXavX92TMIN4p7bCET+YsoY5UtFIbV4VUY\ndgLt\r\n=WUMI\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.14.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.2_1559850538649_0.029895025517661766","host":"s3://npm-registry-packages"}},"2.6.3":{"name":"apollo-server-lambda","version":"2.6.3","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"2cc651e8e2b7375b15410aeb5a929c951f69eb42","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.3.tgz","fileCount":19,"integrity":"sha512-AD2v0fU62zuJlLjuO5C9rrGZeR1P6JChdTWSHZcZeuFAb6dSM+xBib9nvnRuYIR85wkDI/rTqFaUuA9TeywlbA==","signatures":[{"sig":"MEYCIQCE4w6CGvkvO3zNIRh3Ibhi7Wwn6XHtaqSb9k4AmALGGQIhAPnnDhD03MXxaocx0pVvVaoIwXhl4mWm2mhaBd5iyy9q","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":37523,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAJdECRA9TVsSAnZWagAAf9wQAJinDE9FPqJ7A5iiWgfA\nevthJHh+pHmX80gn2nLk/D0h8tH5H+CwxVLBXEa/oy4ratj5kIORcgc4D05t\nJihHoJ4Niim8iGv5MT6IFnftDH5NYECHq3QRiEDya0p8otpFdWOgr/cEHjgl\npnPXUONqe5UeqQAUFhvZ7erDG5sIpStomFP5CqD4f9k0VC7qL+ZYkjMp8l8+\nQtlHSVpiM+RlZB7msPVyiVRFNHNn6HeyvMFBmU1TFYwYBewtmE9VlBabTnUw\nGqHQ3bbZ1WSql7n8bOh0BNyWaRo9peefmbvc7jU7+CLKqosLvKJ+skuGE+mU\ne7WdPXRz9lGaGFdXqy6PCY88NV+LfoYBtS427DdmR9pjcRQfNfCab6jbCB8Y\nUO3CB02lMQWFCpipr5EjYTLjkZaeoqH95qm4T+PbRhXjUwh5iaX+v0+ZOI69\nT81GL64jVudftARmFdfLWYbh5X5lNKzAMuymQbhrA2Gpm7Z4mC8KXwSPjkIK\nacWBQITMLhOwjb7ezrgI+pFK0VhklWISD903XiyqOde/j4cODp2IBD2KCtZW\nVMJOfbCMIx897obrAJoy52+E/6Qec/V3A7liALwm6Y2esipKxkja07zjQDdv\nsxDvxHp/aWVySJGJfQXY7YrcK7o/OBeOKGSFtIDU4TxVHYgX1ViQ2Rf38Gqb\nFcDP\r\n=Rvn1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:apollo-server-lambda-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-lambda` 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-lambda","type":"git"},"_npmVersion":"6.4.1","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.3_1560319811280_0.5254818937399055","host":"s3://npm-registry-packages"}},"2.6.4":{"name":"apollo-server-lambda","version":"2.6.4","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"616ec78a58f499aeabf340a022ecae30ef1c8a4c","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.4.tgz","fileCount":20,"integrity":"sha512-9ECnZsJbviKIRK9BZG/Kjd4H3ULq0WON53zBtCeNBJQSn2lhW4wIKfITNhW6kuQPYkMngwzD7ijq7gMHL9ZVMA==","signatures":[{"sig":"MEUCIF/mXafmWRMZzMFuic3XpNKSX3FlXoUERYpn1L3u0Yy+AiEA/sugAtIO+Cvx+U1kFglnFBo1kwM0sNRVullJ3dNbYao=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdC/GfCRA9TVsSAnZWagAAO/4P/jmA7BwRUEYMpkVdHdxC\nmgEY4s9mN/VG6c/ax08Rm8O5kaC+XcHBym7uXYgLNNOWzFhEZAh7z5aNnwfc\n8rqpryTkbjfzGsy/uzgAXH55DFexqBaCNL/Fh0Gsq51f9ef4NJ1kIaiMT7gt\n+dJG5c5IEbEb0S/7sjdvMdYyD9kCff74Xea5vlZT+EmRDvhkz9KBXwvM102e\n/VAEjpwdltbV9idVkspT4GvcusTX5jX7gj8b3UBYLeqlKJC4kf/74BJ0yU5K\nZYWmtmpWR770fl9UmxIqU7yBIViji2CJmeMLZEOjCsBsaZA5vYRXXZ3fCQDs\nWCCMNznAvfmPNKywxX+6uwiHoVL4agQF1AfctN9hm9oHzJzlOt5T6JXzbyt+\nZm1QuAA6HdvoQ/Mr5uj0/kZFHx4yOnj9LneVB0pB1eUU9RQZINflnO/5dsUV\nhkVNsVqw5WPya3FAwh68HM7w4msLq0MHXWltxObsG488ivIYOXy5b7uwGLyh\nCTWGfoNla5RLOtUDhyn7Cf7LvHsc2D0hVwkcp7bz3Y65i/TjZenpLhUkMRw2\n5pnW36V6vsN9NXIw0IU2GhXWPPlOGyu1MQTxgIPy7zoK9e+RvUGDu4eAbN5Q\nBdS615U/8+Y54bSO1eaiU6BxeLjdk+8TxddkCKJg6VblqRBgv/i19dNAwNbl\nlAbM\r\n=3dTL\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.14.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.4_1561063839093_0.9057302124113149","host":"s3://npm-registry-packages"}},"2.6.5-alpha.0":{"name":"apollo-server-lambda","version":"2.6.5-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"b27f4ebf765d65753a98508335173e0c757b6fbe","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.5-alpha.0.tgz","fileCount":20,"integrity":"sha512-WGm8KTgbKryJ+ExGv9M0qgvdKjgUPV8WpOUooKqJxbs4YAK/v+1X6lAkA7pzc9xaLNr5vau5OlqA5tu7FKZI4A==","signatures":[{"sig":"MEUCIFM6M7ijs7h23RkMhjCavENVUPywBs1xTuqi5kdr1cfXAiEAij5/tRvYJydB4Ql5TUhlTqzhPgbaJHn5ReuhaiAI7+k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38644,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDQsPCRA9TVsSAnZWagAAu80P/2fgAeeGi0HF+fERvQ0z\nwI1AjgXjvQ5Xxy+vpN9PWRbT4Bf7eDhsV3z4E6604RNRvseQP2cxr19zG3AB\nAwHLuVJ/Lbr0ulF36GBKp5Fwq8bljNDrHUHTSWLtaGAECZNhr8IY3Xiw+3Qe\nUgt+roCooJIB2BUjUhGsWd4nWftIM/IMOhpuLioH33iLp+iiCt0eJn18PyS1\n7ZXyJMOAZ8hGIILz533KfJ+OCpuMGFJl6OlYP9RQK9HI88EDnVt0Q5qSt8nd\nUGVaFBkSlOlsjDsGI+zgiKCDgYU5BI4iHGKUVeCENLOz2D8Gn600RpffS0O3\nMEz/Qjl//XISlG+t5SBMAsHVxOKqDFx1Xd69xsLj9aohj3YKLJTqnbukMoUm\n3zz4w3m8ODshGINTb73UCyB8S/+cgQYG0VokJTyuEA8ZfUhe8cBil4A9PHpW\nw8CPRq+tPEhONYDDwe2pOuD26OPbOdagGdDLaoWPb6s4oEVOjtbHqIJ8keY9\n2544a0C1Oy2ssXeA4bcJVnVPCR6lhnnSiKgvnffrYN1eZulM8xfat9ZKQAAp\n/BIz8PWmR0A9uxpiCUlhg8PftKjYxsVhaPa9x+p6FtjtJiqXsMpNnnDbv9F7\nvyeyWd4OzroJzrqbOtBarCPF+8Az0qMdBUoYzUylD1RLDARxXuoUHm1Qo+eo\nERM4\r\n=gDwH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v11.14.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.5-alpha.0_1561135887016_0.5776534305219636","host":"s3://npm-registry-packages"}},"2.6.5":{"name":"apollo-server-lambda","version":"2.6.5","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"c23ed8f79bcf2bfa8aa1057ccfe804928ebc4b48","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.5.tgz","fileCount":20,"integrity":"sha512-nzS8DxajLcdNIcS/Joc/BLT/FuwyiHeFL2TczKqBol9JPIBGpDh1CzHfHWF6a58cUBG8QyPXyKsZa9IXP2Hlug==","signatures":[{"sig":"MEYCIQCzG6niCJyM2dp4nRyCPkTTBv45tb7KE6ul+jBQtnTlAwIhAIEMDq+lpacbmUP57miCvmzLTfta6fTKi6TDrEq0RYPo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEknjCRA9TVsSAnZWagAAXjkP/ied92T71K6d1yGeDpcX\nur5UYqbcYkX5FExc52Klq5hiNGkC/LBKeK9/bjSRhnXhk59izhMKDFr1lX7D\nsDhc00OU7ZvFXIFpGyiRASnbWPCG/LTd+wEJ1hN/ZKTyE3sWFepq/0IcNUns\nHwJT8/DVRYDXlEMfzkyOZ/+8dM6YbjPMsme4sszWs9NrIs+CU4I0LDs1891a\nZqFsnk8+uARI+qnPjHa0n0yzC6Y/pcMCOIPkCIYtsPncNPYfLxCFiG12/yer\nG96JT+y87/gfilQpX4shWoHxiMnxbULgUcSpWDU7SWcNWImHotn1DexpLoq9\ntUx00cbMtoGnBEZyuN8n6+yOcNhyScGIlJv+duP0kEviWd7H332ASD4OAXn3\n7JKW/N1O/McKY4fDGZZewmKza6Q2KN4t5Pwnf09VfcGZTt1MrrPajyNJKPx1\nKTMDNF6VCR7O1oxq8u3To6E1IloFIumQXZZCyc7oZTG/wEZAo1W1sKy5ZJqn\n0Y+t7GEs5nNJFYZJlU8ViS8+1UkR9HMH56nC7lWpcF8tTePc0yxFWrqPLJfP\nmuP48lDD45VGoM619QN8+puyqCHQ7kVG9FQvyX1LQcUkcBd/AO5p99f2hsOZ\nVzioLrMyG+Hi/BJnY0GNlAQW7LIrGtDtJUfKVIZxGSKGBEF2w7Gd5kP0Nn6d\nbL/E\r\n=yVy7\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.5_1561479650840_0.23078351308163225","host":"s3://npm-registry-packages"}},"2.6.6":{"name":"apollo-server-lambda","version":"2.6.6","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"f39efa96e14e46d0ee7bacc180942a6a609476d9","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.6.tgz","fileCount":20,"integrity":"sha512-kbfkzw0kjbH14G9H3Yt2I53jVK4ToWeltG6tHaKZCja72S0U+wJl6P37fT3KQ8ouFBrxcvLchu3mw3PpBZ7yMQ==","signatures":[{"sig":"MEUCIALpKHXMDKS1QI11OLc7IUYsfCHzJjifJrHFbs17A7CaAiEAt0mXRdqIQOntrjosnQSNYFoXybOGwTD5RVu7tHv+Ocw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEmO6CRA9TVsSAnZWagAAwTIP+gMbuKDChXlhLOE0caOr\nGQVaHpD+8YarIs7RT1lN5i4SCbgmCIj4RTt/zTWwMNBoBfObdcFNkQlPxnOl\nuCaLXE0ejFgIjZVwm8FyfscvY/VcpKMl9k+YHfYhSCKUTenfFSeDI4jJbW+W\nvG8V5dbTyx3x0nEUPZfbD2RWWWxWmgVlabaS8M3tQi7ZAhixl1+ci7UV3SPS\nKAPBm5e2yd1wV6z4WKY0/qu/0KQ0lK0qCpmP2zIEsav4/jGCl4TYYXLHY1Vf\nKtGWUpCLeWtSMRihEsolOCeN9pN7h8jgnx/JTRFY+ZghcQ6G+GTf+xU26xfP\neXyvA645xCjZ3tDqLFImLQfYwiyg7H7EZctTFg/lQVYzI9tqXsSC9ZGZTTg+\nIHl7pyWZoudlnt+FBpst2FVm8SXwX7iV09CELU+kU+Xh5VL8Is4ZOnpqMBXp\nGhnK4T/pJXfTj3F7qEam6uXwadexH1kv+9sd99TRRUv5PNh5v4yqZNKn6ock\nprFafW9v7+MYdmuT/GiQK0/CbNVQy4BR4dFvmhTUhwdnYGnLGVfnUrvtMb3a\nz+VnU6czf9+pScYtRCOiMAYu4+wsWLk68ywmvE/45cpa6e5EVgneIDMq7wtc\nsR2agfYEPwotf5sLiZPZ8IaDgzVscF8W4hYIEzV6I0ZZhnAlU6UOu99GUE/D\nCPFm\r\n=jx0U\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.6_1561486265491_0.1936117644896973","host":"s3://npm-registry-packages"}},"2.6.7-alpha.0":{"name":"apollo-server-lambda","version":"2.6.7-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"dc0716c0bd9d13df675a2ccc0f981e15cdbc28bb","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.7-alpha.0.tgz","fileCount":20,"integrity":"sha512-DUWtzRlcwt9f2LZVPbXd123DeE/a+BcJyor0aI4ihX++lqSGu9g0L7IOwdll8DERmyI2hMVG4LFN8z8L+zq2og==","signatures":[{"sig":"MEQCIC1t/xrV0/Ep72mINj9KzkKE/Zqpepqfb3kOsS3LDf/AAiBN+9SatMW7SzG1AT+bLfi8PVZxxH+fsQ2xoG4olAmFMQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38652,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEptyCRA9TVsSAnZWagAAsCoP/3eFGTgzmE+mEYNKls6j\nWX6xQBo6Ti6rLIHVmhd5m8jhjtIJW5v9N11TjCF45WoXga4/0zTqM8NQ07od\nJF13yvqeMnROVE8KMbg3bKqWF/J0tgJ2teEgApiEOjCkgWtm/69F3bhg8WJm\nEhOaEQLCTiEWwymXl3E3cn2LNX1y5SwP6/kpoco5NdfpT2Z1XCv+Hk0sKxGr\n/MctT3ZfF5jUGEaxsTmtsyxtJRc1HA2XkQT39vADriFq987sdsAN0zGW22VE\nc3JWk2fCSTqr3Ts5ns60ESKxRRUa2iSDpg/0R7r8FNSOmDxBIHYQ6dM5s4ka\nd6PwAFN1W4DEXinP+D5C7C10GRqYS2wTMd3WB2aOIHE5s2xmBw48VOocb7cg\nu5RFv6C2GArme0vf0ADwtVHwUPPPMUh/dRJsSroUsShQTRW0lreQad1yQI8/\ngnt8Dh3VMVWxnksV9yOuPhJJubedgh8DXnl1G0CZKV9n7Bo3BxYpQV04BJ0R\n6Dn5QPzog+y90dGx7TVc1s5MxdTUcN6sXQ8KsNsdSi5t7DsPOxezYU+81Yn6\nT5C7JIhy2OtY18UpVLOt9XT3y5L/xNXB5N4eCZyJUawHpm4usBQmblUkedUK\n7fuiP+5fUWZx+/3Wi5FORswo+yocMDbwky3l5rMLU9vUNJdDXi0YGH+gxbFi\nej7f\r\n=w0ex\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v11.14.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.7-alpha.0_1561500529661_0.016068835310109053","host":"s3://npm-registry-packages"}},"2.6.7":{"name":"apollo-server-lambda","version":"2.6.7","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"edc869c688c3ccb38159b47c24f0f09e3743becb","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.7.tgz","fileCount":20,"integrity":"sha512-J1UFQer21PhrpOw5veA4aflotlMAijvVPP0T12NFKrGWmG86IpqemZiJkzy84nqrm+m5vdMiZWD475H9T/Wn2Q==","signatures":[{"sig":"MEUCIEJaRvdHGKc/6bw0J9HPCP0XRPRXyX6RSd7DgvOZy1gaAiEAwTO43lmUFgYHl3wvRpfeDyu7kGOchExOPclSN2IH0Dk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdE1xJCRA9TVsSAnZWagAAfbQP/1JQGUrxnDFcD9ipMIWq\nVH1be5EKXK5gFwCxxyUGBZpTOOqlyzbeN76519pFTvqiiagpPhD4uFCqUdJg\nLfGLB1eSb1ZKR5re5Csw9dajQv1FokWF+BjAYpf+xFG0eZZmFtStehszTCrC\nXQu4YR1E5U6Mu9t00JSf+gSTT56ysrtdoiij8Q27uZBVbohobpNnYi8C2EJJ\nTKqqRNthNL+cFwgkujNeQejnRDqI7kl3erZ9OKiOy3c1c7XrJqUHwq2WqKpN\nIYyRfG9uGP8+wPwlMKi1t3E35XlQJdybupC4sGX55QkM5eFt9Khfs6r6whN5\nExpMNYBBNklyg06FrOssnggjuigsg0Aov/liAzKOeB1zI0EdXoCywaFIhZ7j\naju4Yrf6FE2XGUSiZGE/XJfjYtKxV5UCr1BGAJeZkCW1CLb4h31Q4lH/vk9/\ndyi7zwNFFjOb8I+KqKz9w1YfvW4QSIcRfvS8N+MTkHaMNkUZT6je7PIEe7T/\nc81epknkRTCHrxXVVTIv9RsU/PQxivvGG/u+feKf1Umns5Nwhym3sNiKMvK7\njEGV7nJvHbI17N4mOI1JKh3FJsHkMgs6HNiZzde7ztaLP/2tIlevNsIFAbJa\nCQ3D2MakVCRA5afHWPlYtiOgblZFZIeGga4riLLpS9C/4UdQ0b6yLcsc1Edk\nZbbf\r\n=b/qA\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.7_1561549889972_0.6562767661711784","host":"s3://npm-registry-packages"}},"2.7.0-alpha.0":{"name":"apollo-server-lambda","version":"2.7.0-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"639a5e1af3d3558e17dc78929e7a6bbae37306ed","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.7.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-r8i1EXz/JHLbv71lrsP3h+4WZAb0d+DtNN9H/8sBuxh6+cd4S+7gQjhYu6/EmnC5EUnTNZCt/piGHDCUP4t0jA==","signatures":[{"sig":"MEYCIQDe7fMajF3t+yJBwYAAsHnN1gASA+dQpvjjcWEMZo2BsgIhAMo8NWABXM48UHZFdWy9Rc0IgC2g19vOKEw5eZtAi35/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38644,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFSC8CRA9TVsSAnZWagAAmLoP/A5B+78KeXcCs0Rfy65U\ngwmYiZlAdm0wfHN9Sj+hioonlvPVRa//VbutPNK7dGkzmZIe2x4CSscOQSAq\nIGo6HacWl/QzR2oq9t9i/mHbEWUNU4E/1MGx8xJ1AyJHRi4FkyPgdWItn6io\nh41bhzDxqfYlNzOC2sheM1QkhicIfwfVIERChxEN2hBd4Z8kK/DUUFMyaiQk\nQb4o241bMTVe0Upf5Iw+KQ4Dlw0FNMps9tmAB2Au3XZL7IjeZJEHG2y2cscN\nk1ZCsugvDYXpzQwke8/5eJLDijGO3SXkG5wWcJHAD1NWWGqZiyLoKrskAECd\npMfTWhdwzFxk7miqKFh47vi2+FkXWQ4+XAx0Muthlpu+94OImon0VD2217xY\nQ6tsU44xxTOCPJPZarHL/jj14s1Nd8skYP/8+hbiDO6GA4QeVwvDAbCKaWOm\nnqmg6IA/BvMBRylLUvmSmva2UJjZPhlfa+7TohMqgorXhufQ+o8WI7usmKsk\ngNWR1CI1krssN19xy79l3PuL+7ALjmnYhiMehG//J1gZxMRor0GzNB41K+Dl\n8ZWWzZh8C9AHKTaHEw0r0tawc7otdlhIHIWDJjvNUF8ek9cXO1V9fqt4W8FR\nlMmz2rOCeSuxZzok4ms60Jzk28ngS6NVJj02b4NAhIomtDcnvjw3ukvgH5VS\nXLg8\r\n=CECn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.7.0-alpha.0_1561665724073_0.6545627659863091","host":"s3://npm-registry-packages"}},"2.7.0-alpha.1":{"name":"apollo-server-lambda","version":"2.7.0-alpha.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"8cb6b341c27f81f5fc5f31ab7acf8b271269cb5f","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.7.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-xd+4iYVuOy6x1U2EezlKzTa1doPFrDOrpzKGJf5E5KrJD7XC1dEY3jD8F6+HDHM9GqUNVD5WKtRKw7ovBw1AGw==","signatures":[{"sig":"MEQCIBnZI/vAUxve/c9vJTQ74JN421WxL9ErxFXqgBX8YZFnAiBFQJnfhyrcUWSSeHKrX7V6x4u3yx1q2gs+syjlTdTx4Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38644,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFS6WCRA9TVsSAnZWagAAqvkP/1z/TxzmgPAldFuM6prt\n7fBCdNaTP6/47Z8GY2qXwEVJ7RmzUx/25ZGGrEEd7ohGfhCmy9y7DHktE5Y3\nmW6yRk/cZNH/KlfRimsNOHwBLYwj5tOXitstEeUyYPLwLxMd/dBYItMXPNKA\nqtP/bKM+ypifbHfUMcTZ22SKvzfIaH386lp5gJcPpxY+cZWD37V1gJIO0Xcw\nEC71/4nCy4Exj6O/yFPIMLO9A2qdddZWHXzyAHVPFjdGWZQt0n9LlcaYwNtz\nJASu91sksGUew7cujxUG82GbzRTfK03XKFCnwIEDUHLgsXcLke0M5gGQjhvP\niJQ3/gWNR0jSuh/tBVfXw4EyiITtYiODUCTt0shI8SdN5ttM7nO4ke4xot4g\nB76K9XHGtnQMvUhaSVv84mJFs3rIC65zRK8P6JNN6pHHtye46a4IG3qtd5p/\nzVXfFYtuj6tyi/r3PwXTD0FIoJUuMJlRE4JdcQVBtFvt+5b0vLAmbwDdIWp0\nvi9rPcpJ3ZtiOgbbR2zttgnPA5uzGWFF+nfRi9N0MhoU1/9qyQARL3fODE0W\nzU7MBE+V4TuxBZqWkJe9jl3BaiNWcc11arU7bFquEISjU+CO3kMpaxZ5mgvL\ngsJhRuKjYtff7M53DhvpAwBH8x22IZ/eccHvnE5IHdSYowvUfzxrs2Lk7nsL\nt033\r\n=iFLk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.7.0-alpha.1_1561669267156_0.30022418395413975","host":"s3://npm-registry-packages"}},"2.7.0-alpha.2":{"name":"apollo-server-lambda","version":"2.7.0-alpha.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"b12f16b57f5fc2c27a5250c4e09346949f5b6e50","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.7.0-alpha.2.tgz","fileCount":20,"integrity":"sha512-PkMD9nc1mfKV/77bBhI3agl8Bd4VrROoFlh/5zTIQVoiGcB9vwsaL1h5kRUX1YZZKWxS7IW/BpWDnP2+6YPdgg==","signatures":[{"sig":"MEUCIBELf5mBq+M7qlpXZTRqXxadK9xIXEN9Q1SQUmQZrZGzAiEAkqLJAFENZHvbQDqJXTsz+BqtwjqWcqPd81KMy9gQDIg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38644,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGTMFCRA9TVsSAnZWagAA2gQP/iCbka3RYpcxFj4a8HvV\nS7KKFPjp3XVG45FynUhRN0LTs+2o+c2ezmn5p154OIaK3TnDD6HJFHxqhh+R\nz1YilaVfXb7qS31Y+bASNDIsFteadLjjcKASBlmwlwOsX+px9brtrWJbqYuJ\nKTkSmqFmNSAEwvjmy8+4Jq66yt2t4n2Jq+X9Trt5ABMygM97m+v/AUUs7dWH\nhw7H8VQe3P/ODKC/N+vpcXT85YnZAKRtGdsBPWpCR8XvpKarz+ar7IOAdScz\ncV8wXxRwbsK1iMPmT/uyLE2+7ghPKsmQuBQgYIeGGC7HyQnY0wH+eh6c3ntS\nNDTc62oge6FdaRE4p413i+sphuH0FgPRwakfTAHFkNL98l8Y/qQHS9XJ4wx8\nMhfrpZwD3qQ9gIMGT9eeuTs1jxuA9Q384hCIiGjR2n/Hn8LIASHIVjncXSX2\np2kF6C1P0jbJhBs1iied8Z/7NWNO6+YvNUq/6rkZQQX7KQ3t0+i3B4dOnKDr\naNF7Dhr8KaAUt3uWSNwGXlaqA/NDNVCICEs8jXlrglo2sBHbK0wdvyZCQHrN\nhiRGHNtNmpiiym28nIW+HSV02Zl+zvCRxGLaxwfgNr2M47BWAKDIj3FlRUTP\nCMPhDhTCpY6EGaedt0aCc4okxuGa2I8hpVxhkJa6SpXfbkZG+iZiDZxSOnxL\ncLyF\r\n=Gbb9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.7.0-alpha.2_1561932548561_0.047795370535138826","host":"s3://npm-registry-packages"}},"2.7.0-alpha.3":{"name":"apollo-server-lambda","version":"2.7.0-alpha.3","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"9a706c4cab6a06786d93c4744ebd47a96e70f263","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.7.0-alpha.3.tgz","fileCount":20,"integrity":"sha512-T4rFI18bCUrApqit/nstIfcrIoxG5fnuWMsNvBNS8E4R3KDHNRJLpyR92x+0Y+19z53tmNLEdydcLWisGsQutQ==","signatures":[{"sig":"MEQCIBbcsUMed1njdtcHmE+P3pQF6EFF75wF4g/XehZ4duNuAiA1eI5D8bZWWnGX4116x1Qk1b+t51dk9ZQlQBoxrIlk3g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38644,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGmZaCRA9TVsSAnZWagAAwxoP/1Q3YHZ/MsL19wbNXkUi\ntsZW9BpJSHWa/hWf/ANpcsTvNK93pqadnK+LpoH5PdwrysXEfn/rvK5rmScP\nro7jVT5+yB/FiKAbq7T1N+C9uABxYootaMlhAB5JUpuSIKItm/H260BCpO/f\nMAa6YasbVTrKGMXm31hArp7PdS0bIP9vCfVJgxiA2BrA9aDcRPI3jQGeFgXp\nMNUudzWKnp5SL7Uvi8myDgw/JjK5WL2j5laWE2u3yZtReM7hrCNxXEkCa25r\nk60UoG1cbGRnqRu+tYgzKYqATPdy44MunDVRj1OXs166SnJeLDeEDvowgC9A\nsA7CWxam5xfCCSRXt91QBQ90K2+aJ23soIwQd7gV4eDHN8jXozKOoxQ9rjdE\n8pF31zZ6/XCSBI3NMoWkWxq0pICQ4o4Htcq195zFlR8AI2+yOY0+lr+VZm+A\naHVIaCjAdUICIXgQU7T0EinZBg7yS4mzRu7oe51rANFtqi5GCTq3/BR72AKo\n60aOYlHfxipj0aBSRfQW6iZ9t0kBY2fidpBeHWBWU6A0VGUe3V5msXlNfiRe\nMmLAO6WAuqEuo+SVXAqvFD2wn12T6Hao2oquP0gG+0d9hTbuRDW0tJyJqurn\n7oScmoz90vZFyvEZ8C9rlnPuU5iqoxIsDYnceBpvAE6KXyKm1py+NxPGxKIQ\nbF7H\r\n=IX28\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.7.0-alpha.3_1562011226128_0.7595224495047235","host":"s3://npm-registry-packages"}},"2.7.0-alpha.4":{"name":"apollo-server-lambda","version":"2.7.0-alpha.4","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"e7d14f0335b15361a04942966fc9452abf308e88","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.7.0-alpha.4.tgz","fileCount":20,"integrity":"sha512-RrEGmnGJ4kocu8XA5w7VIOwBLF4NRRExrvvHzd6X+tZtxsckcteyY0NdmCsoGdrxq4/wtYDgs3IvNqQxHKyn+w==","signatures":[{"sig":"MEYCIQCL2iQ3iDfb6hbLAXnWPi6U2E+eqUru5PwnHyQRrUKvfAIhAK2WUzU1At28WKJ3dTLTCy1OX2/TU+Fa3RiTfnVyDQ34","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38644,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHS6nCRA9TVsSAnZWagAAKF4P/25gAbLo3aC4f0zlyJYR\n54i5XnNWcc/8ghLOVru87t/a07mUrMiIpjT2TrnH5/vf84iZ0GLO4q4PTAVH\nswUqQcSh1wC42TitHMvONDGnHEkbM8rYRorT/94CoOSv/h83LElaM90s5QU6\nC0M05NOxzwOCmbFSl51ROPEcn0C6fxyizCfKvFZUHGJzJ8eWt+++QjeHyDDz\nEFDwRR0gDZiJhnyrebjS+7CVGSasGXemWz8IEMgm+H3QQbAI5EfnASPmzbgs\nHygVeTYnC9pZcbi2uUd3poCFxf1aPu3T6KwNCYCpPmV5Eal4neUwuHFd+sjq\nhpGQbWadt9T3COdJh5QA66ZkdDYjZBWZDu8+v1SwctPxP0UjZs4+bo8j85Z6\nGausH0r4yhXMqR1Nly8Sn0pHly1aFEE1wFLm93/sJAk5d03HhNRfQkX7x1Da\n2tyw8UBwpGpaHFmQLxxqGJDaHa7OI5STKHOPziZwVPlnxkGc3NNP79UaUx9E\npjgPFDkWRRkJeuieawDHyOHtsWnjjE2C2uFI6oNR0E6HuMkffL2UIzTLgXCz\n59+PnKm1NQW/igZNH3U55AMtPH4H1bwFXyT52VG+s1nKg1bqv/AaTyWbasQJ\nEJM2owOttcOh9pdAFAnzRN2udPhf3lzOoYjTYk0qk9Vfvg1iY+EVlEzc+icD\ni2lm\r\n=zuJ8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v11.14.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.7.0-alpha.4_1562193574529_0.5181508342622467","host":"s3://npm-registry-packages"}},"2.7.0-alpha.5":{"name":"apollo-server-lambda","version":"2.7.0-alpha.5","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"0a989db1cee20019e2a4b3df0f96059adc211d65","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.7.0-alpha.5.tgz","fileCount":20,"integrity":"sha512-49mt1MwTE1qj6Z0EX/sNtZpFCp04LfQ+rsRNd1eJnBkp4tJExJ4Dhl7wd86WmiS7vf5abtE2hcwf7b9yd61P8w==","signatures":[{"sig":"MEUCICbIm064A/fC9HY7iuV144yjbSe6gQgKasv1tynUNl0HAiEAla1anRKr7WyWOC7smKFrhNjxxHYwQq+yPcrrmmZwocs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38644,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHkJBCRA9TVsSAnZWagAAlRgP/1CTRugco/+Bjdlf7sAe\n46XAQeNtivw4yXJSpgIvVEKAaPZMLW3uNWDz7uwQOL+rmLV61vlTFT+V2Uri\ndUQzX6L+/K3iPIbNAMbNsbvxCnv+BRMEvLfuoZ1EpdzmASD7Y4OfvNzZPNTB\nTyNkV/geBxwpIwwfPhmFXkuvsz8F9iLN3hnmb/D48HKbC4MBAqJsyg4yer+F\nxP6cYe+iyT4Yd/YRk2flYDmuXtZOGBGS7KatLfuuxlZsAuXyYBpBD72+ZG9B\nW+N8nI7KBZXf7i5q5OYZ679nSba5xe4gfGHpbg0Lu4R4nugwEGTMuq9poQvx\n1D0CwUfiYnUcg1JPqV2thL+hFNW611d80tiU0eMU50671ZNxUZ54RoYUYoK5\nBToewky/YkGrisLsRHNdMI7SmxgppUBV0zP7ODL1GgDEDqx6bHFqxAFz0D5N\nt93VebWHrFAEt4TgypBKf/BEeUDSyvm2R+OzTOP7TeDlIQPGByRJTo07W0Nd\npDiAqd9lQ5/uisBAod76DQMRYfmXeWhgp27uEBotgUbR4wOcU2NcpcBBUpef\n3GM6ymCytT5KtR5L996gvnGtkak4P57JMenvfMjIzXNz77Tb6yTDZBrxChuL\neY/M5YayobFUOuiuDXzAb3EeiptQlNNhWqInwEALjUF8X0ab7Egeo59ejinh\nkQbo\r\n=srP6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.7.0-alpha.5_1562264129086_0.03896917355632645","host":"s3://npm-registry-packages"}},"2.7.0-alpha.6":{"name":"apollo-server-lambda","version":"2.7.0-alpha.6","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"4eded156a72b5e766bdd57e2577d1847a5b8bead","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.7.0-alpha.6.tgz","fileCount":20,"integrity":"sha512-u/fY8XPT1Tp2xKXErMLta3dhK1wgeXW19/mlxVpmV3pVrITbti2VB2jW1iKhnVspXUGYhUapUaUosh8o3FCBtQ==","signatures":[{"sig":"MEYCIQD8YZYghwrssP6vLVOasRJFOKBzfu+hKrmKZutCJaahDwIhAJDt2gKu/32xoldff63Vza+rVCCBFgWtUw0uyu5J6VnW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38644,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHk4ECRA9TVsSAnZWagAA0AcP/26jQu2vNs06S0KX61Gh\n5njtxvXGFgqMS94SfuzkVtsJfdysvQfb4ojl8d5wvOyZilmXxgWv5FG2iTcU\nPd0ztxWTQssme7gKxIV85q9IFb8mnvXeBL/SY8WDfUsEf/DBGx7uq49W2Ow4\ny6wFNuZVf0zPLLlpr+y5epqUp5qVCMQGdK4X3Z+vReGrJcEoCapBKSp9Onpy\nsmOK9rFXtmJ3mOhe9JZ32xDFmUtzmacQxIVMObmOlWmOAS41EdJhth85U757\nUrS7xIroqvXwluYE596O4d4+JIT+/dsc4C2kPFlCuXaakHaZUTAS3lk617wu\nasGW+vzNSXdgLiTh6Np8Q2NOvi3+iCzVER3WgzMz+KFjtzTD8nuFZZSzWlOQ\nKRKMW5+cG745oHbShVovU9hAor2X6/QUSFrBgSkaQxoG+69XHqUEnhIGy/ya\nIaElHglYTpIUXRHObHD6HphHkeBvXnuYDTleRiH+w5bdcaIrw8DMrm44qTWy\nV8LfdlP97pB1GhskNr7CaXH+RzNrR0n+gelUDj9LEwtQkWZ2NkWx8qIwa3lw\n64D72IHe30ICHS8pJoNTBPiKhO4dY8hxW6qg6vl17+Ns2Nn8BjsrKzA9mr1j\ni79wovyiVadD576Qiq9jfxXzLndgm7cOKuRGzwPry5OXJwfOiwiVe4PQ7ryP\nuZIn\r\n=22DX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v8.16.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.7.0-alpha.6_1562267139393_0.992426509139049","host":"s3://npm-registry-packages"}},"2.7.0-alpha.7":{"name":"apollo-server-lambda","version":"2.7.0-alpha.7","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"040e374dc765285f48462f27da8ba5e2660b7ec0","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.7.0-alpha.7.tgz","fileCount":20,"integrity":"sha512-3lzjqLbaEF0dhnGLZkrtJiqgtRlvMeULOiDHd7dVYk5BPk3nyPHcANlzl2d3Fv+KNPKBy5jALOHwgXccMeieog==","signatures":[{"sig":"MEYCIQCBn3pEUtzWthGppZL+LSe35hVRZ1ciux+Eazt0LhwgwwIhAJ+sP5GndOvfOB+VuirfSlVq3muP+eUtThhCUllIoJdE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38644,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdH1ImCRA9TVsSAnZWagAAwHkP+wfWQAgAQY8RpWkvoeO4\n3P9eQt57e2BN74RJfyNAts7gqwBCvgLEX/x//pYNtmH/GtlVL+eF/avfGVAZ\nADsg1Ykxw03LE68vw40HfBH2DsEDFD6RwJK2FBX2ZNu0RwlFl8RkZ7fXlsO7\n+7/RHimwgt9ydp7eNdb1SsmVa1c4LGSl09O15zP9ZPLvJ3VwaEoTTKSjSGsE\ngMrZVRRtSo49WUbV5gf3BLikqFpUO/7fJKi4mdUeq38WjziasM2AxbweRoTJ\nRpjo8O5tS1cmuno2lEzOn0cZD8yQf8VjjTqyypRu0VwVMaz+TacpPPLWHTTI\nYksSWS7J06rqi8iUm1T084grcsl99XQ9hMgdgak32PE81Fq/9qhCG+4MLnqa\nxEDT1w8w8D0MACMcdfKESN2gBVMt4MHljZEYwzaB2EOY786wrxJuXDLvX39Z\ncp/wm2XIbCAC45U2/n2WSIR8GoVAnDLpAgq+49fqA3SA7sxFWTgqO40S4IIZ\nRxk3lO/V1Ki2wQIGF2SNjatH0NXKyXfNaTTcFBqvm3lqPvULJ3OlppsAsjpj\nrIIbVVMgAFCgA3M1G5hk/K4YCFDF/aDg2jn66Fg0ISTsEHwGqNE5p1B/m+eD\nxfdWvOSO5l5sBb/wb2YBlogURr5Bo7zVHvemonpYDAY6VNiUt/WokeiZRMpC\nE+EI\r\n=yost\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.7.0-alpha.7_1562333734302_0.3223466315554815","host":"s3://npm-registry-packages"}},"2.7.0-alpha.8":{"name":"apollo-server-lambda","version":"2.7.0-alpha.8","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"ea4021f2fce4dec22534a5baf71e27de9ac4f593","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.7.0-alpha.8.tgz","fileCount":20,"integrity":"sha512-jSgFwFlw34DcGmX4kq7G7j7u8+iYpT+H3bHSDqb4JUP7y4SSe7gMyJkbtytvk23bGc4OXBdj1I+/TLpSbS6FBg==","signatures":[{"sig":"MEUCIQCaY476q7QB5bbmm5uu4bTT3oflZmap6RodV4WPCx2ltAIgcs6M2ydeFrdlcSxssu546IWJqr6GcJicE2VKrycT/hE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38644,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdH1UyCRA9TVsSAnZWagAA6E4P/27tT/htX2ZXo/WSB2Mj\noJwik6L3TkHTDZ0YzjgR3LcaotEtUOMLeZFoZFitfAu319nDUILroL2CEtWI\n253qo6ODYhEcEAyaiACdZtwqRKOaR8hIrOOSvevwO0DYxvOK7VyaHGnJmawu\ns26w4U289Lb4Yj6irWA/L6rgwSQ5v5PgBfsckGxea8coCbNUhyMIQtoEv+bM\n4loDxLCH4bhXtlkB8aIORuLvx2yeIcphvHXKBQMaNwUpwpfTaMJFU7R8cLmj\nWrBD+zzUvt6FsbibcXEnBUvCFXaPDyDdNREImrPwMCLuUldttP/z2YlxIrSG\nBmbf6kpo9wFqhweElZc1onqMoipswwBLplzZOWnWmvir/Pq/zvgu0OORMXGY\neFYgs06iOA9uiPL4k9EzXOyXYcHGanVs/xPpR+EKhcsUuBzMpjWSm78V2ZxS\n7bY08L++CBvvGrlzpLgkpFV08dv+oQo/Lvt8/YM1Au2k6nLHr18LX8op5Fth\nk7qKxjzgZbpwgGHT62JoqJ9XuVrLS9hLaNVZ/WdLi5gqElsQnxddLnNAHo61\njmQVs5QY06foEWJvH0627pVVi9bCHCx04iPlGig1lh0L4GXL44yMW7MliAbl\nvXBsp4uLrzzH0Kco3DO9/uGH3qRijBqpkvALVDJ1K3DNUnxfOAB7pGaf/jki\nRz7h\r\n=B6C+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"---\ntitle: Lambda\ndescription: Setting up Apollo Server with AWS Lambda\n---\n\n[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.7.0-alpha.8_1562334514001_0.7038609752345875","host":"s3://npm-registry-packages"}},"2.6.8":{"name":"apollo-server-lambda","version":"2.6.8","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"29758a9f1ac8f3e46311211fde75bf937a2f872c","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.8.tgz","fileCount":20,"integrity":"sha512-nJmZzNbTHyo3VQ9dUzxQ73AC4K18oHOPqoDgMNGQKMWFUuccd3XP1ti7yafrpceRIH56XUG+mbpPseYs3iAvXw==","signatures":[{"sig":"MEUCIH99D4MOw3RkeSlUu5Hn2nfK7iC0BLLqAnOXClb9xKglAiEAiv8sJnYbe+aTFaJkQYiXYT/8XXKUJdGzO3IVurlCpBs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJRRECRA9TVsSAnZWagAAtaQP/2olpUW4JvwEFeN5xo9L\nFtEvqWCTUbHRUOXJ5bXEqakWXpBYfLWOdVrSDXyTFbRmDPIkmHyiEPbCP1bn\n7vhxs11gXgZHLXwSjGs+7jiLs4fWXqsVN8nPsZLXLqt7NZa00g5n2n4drnl5\nJNiGhOZwLQbiBVvJBD/AX6RJSipLqhbw9gNBcWbAFHr8Yie4R4p/5tORzqky\n3SGyEp/QbMinuFi68uT9E3fK9G28XRY9eqarXEsmOzEOIMCEp2ivbfQG1ocR\nsrplilvd7ui8BGAQ+08mEP+y5WvBTuP9TdrJL5ARkHoPkkuWeM/YYa6MPauc\nu/91cNtC8gOox7rUOFZsaoi6YELmiIxsZXoabjZWbFEFDJbgbdnYbq6Y6nrr\nrgFlf9P4of0ZhygomLTtN3N7e6aXQ7RHVterZ4ySRun7lAYWbhDnwxPmHEZN\ncajw8zBhZgvToJ/qQ6x6MqdX51LO2LX0M1fZRza6QIQxJdsuCuhFxUZ18DFD\n18wRrqM+7iS0a7ehCEPA84UOMJb+7DWgjADNkoTVB9l5KbumkuSnA1AmSYpk\n0qHv6QOtl5QOEOcfhFAzem0YkDW5W6JMqmHvHQM2J02oIATONse+ly1NCeOQ\n1W6T50BYg3s3JsHfGt1yqWzaHuq7oc8ZuTN6w99t4RGhbCY4OTMDar/DmfUi\n+Q75\r\n=JNzR\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.14.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.8_1562711108141_0.1340121725360537","host":"s3://npm-registry-packages"}},"2.6.9":{"name":"apollo-server-lambda","version":"2.6.9","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"b96996c43a7bf4ac3b54968895c1fce83c1400c1","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.6.9.tgz","fileCount":20,"integrity":"sha512-mQ9wj09uwzeLbXDo3rdonozMfAlZ3Pwv0Fv0RfhPmQpigaOjYluUfZrKWrq4E9qmKVIgRbbUd5T65IlubkDDCw==","signatures":[{"sig":"MEUCIQC3jbEgyo2zNOA+8MWZ9J6H2FcCxT9INLJCtDi41I69uQIgbRKNreB6HimicqqQilHpAYztWmhRhkMXlCgCzGa2tcE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38543,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJ4AQCRA9TVsSAnZWagAA0AYP/j/75HaxKN4CNJ2cLtZc\nthGDmFJDq7lZ0VmS5MUBj7sCUjhm4zC8eg2FX9wivy14edOGJv6P1/dovaCy\ngmK2zgP1TKIEqTS1Md/7H/0+5E6X/9N5t82K07DXPs++WslYip/jXSI6UytC\n58SalvZV6P6j/lsRot5cTAz6N7v+8BRwTenn7WjpXc7Uu36+hTYIr7a9c1AC\nFji0acAb+MmK/fBPHGjbS0ug51KctDwUCgw9VzSxfGizaR/Fq7+vlzdBU/BX\nKq0bOrmUNUuO0o1qu6k2FHNaj1E785AxQcpsXkGXwOqUEYDUUvyBn6k89JN3\nKE5161KhO7XYJutJOETlZcMi2oCav/Qvo+3bR1BQxb7CFUdYOzgyP1a97Ct5\ndLn69dLnIeXCcIezHf6OkLpQQueOCiY6xmpPhyyp9UmyXvRL3JqTnr0rMvUt\nU8TH5U/X5ot5pFYeTOCduKJxSVyZNldPW/S7RML8aGoheQloxCLGvKALwJoc\nN0mZe7auj7AHQ2lgcbKWNb65qKP563OVEurwofgwre9rUF8I3YUUTTKrTGQs\np7xxi4yryaBwRG1FUXTAJ3lBMYJesanuIEgRNUPo98evbB9E3ZIpypuYIQ/h\neN+FDeO4SyLLDn+knph9E0PqX2ib6dcPAVLTmkTutfr04JfDCFSNI74ihVxe\nObCK\r\n=qOaN\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.16.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.6.9_1562869774100_0.14411768406164538","host":"s3://npm-registry-packages"}},"2.7.0-alpha.9":{"name":"apollo-server-lambda","version":"2.7.0-alpha.9","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"16bcf34fc82b79fdefa41cd1dbf5d30930ad00ce","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.7.0-alpha.9.tgz","fileCount":20,"integrity":"sha512-kPuWoJaZPfYMPwJD/G8zcQJdaKA9tVxs9tBSVUbLeeIgYcg5wT25T9DpSHfrt++k4eGC5AbUupLUzGxYyfYqig==","signatures":[{"sig":"MEYCIQDO0GCsTgt/mFcF0SUrckSDYel+YVSNjxDl/PxjB4P0gAIhAOQy4qBLpAfEREt/Wfrtq9ud8iF4x744PJCnPTtvewdx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38545,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdKkPxCRA9TVsSAnZWagAAiekP/RVKayOIGtUX8R+KG6yh\nqoHVsCCNPoB1Vx1gGqRMWH8EFwfB38hdByNPGa4R+WFU1c3ZVVvSK6o/u9Gh\n27RFWRjBAuGWg4pJ1TFdX1xUGfSYhyd1XAdWKhqMOszJ6zFUEGbAzx92qtTS\nEr6yS3TTV8Dm9B/FsgXE0QqTS8u06jRU/SxB0iP8noDVnz5KzbYA5UunG9kS\nTSvMN0zXQFAKbojohtziqAVsqXHXqObP2binL+D1YxAHQKNC7/9VgQEAnGZq\nuUYufvUC0CEaMMOsOQLa6OXy0ey4C/xdSVDO/xh1wxn4Q0XrBzpTo8twLFMY\nnncEaT9xnhRjMPEoZl/szMTFDFj+wJL7RFwb3OJ699f3hi8Wspae1GeM9hm9\nmkKdzzxypZkAp6vJVfe7I1LKmZKFfKl61RK9lCODQtAPp+JinsxBVujPkFDL\nHS0xhPHGXZAAgVzwfe0PVki/SPPvtjXGIPbezRlzwxO6K6VKjkJT/n7RcAWR\nXrHXualqz8OVygURenQ69XpElKZfFCv/e7qQuSQD7Iz5CYWZTytKp9molF20\nLfZpNdpOKc7Z7SSTPafdaeWLgWDYcjk/FaMUt7lGRl4W4bM3M85eEIEalXvz\nWJ48ASd7onbCJgC5kipbIjiW1UXjpZsrNODL685l/fzqBos54f6RiIucJM9O\nEtEk\r\n=LeOV\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v8.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.7.0-alpha.9_1563050992565_0.6241046111277135","host":"s3://npm-registry-packages"}},"2.7.0-alpha.12":{"name":"apollo-server-lambda","version":"2.7.0-alpha.12","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"c6ab0e8de2d6908614ad49706a1a904a46cc8b50","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.7.0-alpha.12.tgz","fileCount":20,"integrity":"sha512-7el3prXyM+MQT5RbvkZjfDlTS8QJyMHNhvHdxVe6mRyQWNw86TsWwVI6JP7c7AnP0f+kLoVBdxa6BXI/Pjqkig==","signatures":[{"sig":"MEUCIQCluQ7XTp718D8Ejf0soNiRvj8to+NYfvpXqngya4MVhAIgfyFWAy1HfYKZ5J3zcuvDvhn/Oz6gIpgU5kSwXf+4bF4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38548,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLC5pCRA9TVsSAnZWagAA50IP/1CLORdIi1Ls45clD2Mo\n2hdTiK/uaAD5PRJPp3BDi14GJdinw9dY3mnwp/RW6dDsKfdr/Jx56hP9j/Ms\nyGKGRyvGFAoR7yh4qrEre0agUuvrNPdNyx1lvDAzCBbxJTNqSnkrDGXAjWF7\nizEzPPoTcmCLp4bQwCR4fhmwQDfvyav7gqY8cf8bWmKgU8kGs6p4+T/Ks/gi\nSbDRlyXpguLPwGFrK7abGSo2uWsBks6sKUrLGGbryEBQHO4lM1LAc9aPKA2T\niEAhxocdpbM8elR5slFWLbbN4BDZEz9MlOjweZLuFd2eaadU6JHiq6yhHlzH\nJPLieucg47K2bbguGgvcxl+lhgfzHXf0w7zrwRXIoWZ5L6JJsiBTTLy9yrFt\n5F8zBE5wZK2qsd8pCWYNfa4gxNkWltzDazOTr2XUpmdiXXa5praWn6ggiK+J\n+fJQsvSDZ4oekFlJMCdDceXU8Q9+WXSfE54wDkUjxM0MJ0EvytMyX0XtQh8w\ngKAXbVxeJZoF/pWKQQ5pDFprduHs4wcXdGGiE+iq9xmZvNvJg+++XRQ3pPTk\n7NxqfD1kQnQZdwJMlh7qSodT8AH+n5xeT4F/09/k/b7NbiXaKKFa0utwtqXp\ntGmYWO+1BVxvLMCu9QWV3xvCUlqAAYsg6yV58+Pp8MqrM/VKHhZwSuT8oeL6\naX2s\r\n=as7z\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.9.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.7.0-alpha.12_1563176552578_0.6904192501784354","host":"s3://npm-registry-packages"}},"2.7.0-alpha.13":{"name":"apollo-server-lambda","version":"2.7.0-alpha.13","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"851c25e4c5b5518d1e27a0d237c5a0cf3ccabb1a","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.7.0-alpha.13.tgz","fileCount":20,"integrity":"sha512-eom3zONNRZkqfgT0veLgq5HZTV8YgzgVw51LkzKb4v9BLV+zq7h6Q9z+3F7LvgiRP9wnxAe5ViSIGlKsUjfbkQ==","signatures":[{"sig":"MEQCIFVhpXRdxwJg/F2kJweNchYaU8dKpMc0aROYh1lspQs5AiAGEuvoEfwzBNyl0qrUVjDQpW1LnKaIcbtdCaWXBPunaQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLHS8CRA9TVsSAnZWagAAmNkP/0AWmc4bYV+daj5kDw0R\naQ34HuKkIOZmUI0nXFXdK9xkeA0rkMpNNjoOn/21JjaIME6c8s8bPTP3KXez\nfcbiqJglQxNc6VHmLbSM+VJSgD+JDDf2uoGQeZsZU64eC/aIKC1DzJaldUvB\nTqVkPWju13FU2y1y4zzoF9VtBuM2cwmtjNk4EpecLnxnQT+FFkoT0+Uy97VR\nCGr6i1nN+lsjNXbzQ+1/eHQW4plyG20D9bvZl9X6Z9IAbPT3vZoq/iURFEvM\ntiekCReqq1ZTrbm0tFlIP4MEcOkPsr7IpXZYSpiwDLqFM40y2ygX0X1I2/Aq\nMGvtBQxQM4ux7up1sofmyq7MST2sJtW63yObimSU2zW6RvEXqVQQF7IGglc9\ns6ftmyY2iqOxxqebEqqFAkfRQzf1gdWi6sUTz+RH6CLVOQSnWBxWJNmxlSGa\nv2CnojE303/+xwowdgC3hqhaIpPIrL8sU/zzhLRjvBvkWdKBcxBrpJbrHET/\nb6jX3JJiPEdHpK0a/gxA653OYCO1Eu5p/4vRWEXtAJp7mYY5hQdmJWg2z1Bv\nargwFECyWRKsVBXSbkoPq4LZG32HQrp3pc0txkKaaXw9JELpJoRr5ZwVd7kC\n+sh4ORFTbneItunQaekf6O7ROk7TGtl3jlqw/Hlt2o2JHb9atIxMQebJnwe6\ns9uZ\r\n=4cff\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v8.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.7.0-alpha.13_1563194556113_0.39458895822899587","host":"s3://npm-registry-packages"}},"2.7.0-alpha.14":{"name":"apollo-server-lambda","version":"2.7.0-alpha.14","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"3a33de7a2728ac4be568b5e8e49987a24f9ac32b","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.7.0-alpha.14.tgz","fileCount":20,"integrity":"sha512-DzcoEppV/TgGv55fSqKuFYxAOx5sU6BGfHxIQJpf97Nk8+AgN+XM1K6KzG1d+zLeD/8sI7bebJaLXEEUJKwyKA==","signatures":[{"sig":"MEUCIQD8vgrZvUFBCm1YocH0twzzzLcc4CmPK4gSkO0NFbvuegIgdDF/qjbTvZFb4c/Vjn/jkP1WkQy5tijsnIxUeDuaHEA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLYo9CRA9TVsSAnZWagAAZdcP+gLV7+ufCDVWyeFTBjNy\nU2bdbrqEYDySEn4SzAvUGMWh1oP2UgIi0HgMqxwmUDFsV6QuQmAJz8g8dJhx\nNJXm1rtw2LYQq+16PIzHiPRzT4qByBaExYfWKByqsNtk+M+atKroinCt5QjM\nop2jsaiGGRRHap7PMCHEk5JVekpteVlx1Bvg00F7zuBh4mAIYQ4kOZAQmu6A\nDconFuyjgumqO22bzZ5HVj0h8ZBw/UipHxgwzJJ5qMgbaKMGyuxX7zxmT0xR\n55Grh7gzjlC54SbusHLstCvV1hM3c4VKgtzzWG2rJPSCkb9elZXgnsFdefp9\nLjGgENres5yTC+T27QISt6lAaWaSzL9cILY+PcX2BbMntBjGODYTd3Tq4rYR\n3qNX0EtzRsDIEZAzWSiaVc0cmFm+ReUmWI/QLr+a4LnQ4IOJl/ZdEaDakbiD\np1p6HseN3tC8p9JvCZ/xZV9AXJWQEByKTrjOSpK+xdIU0HQYsuhMlpYlpv/c\nzAotYhe1iIqZKVph88YGYyKk/Lw9dntANVrMnozreV6d0rT34tz52prqvHjR\n0mZZNrXPwHF1gmTa4IN+6hr6SNz359BlLj/KxFkIBWnzm3gX+v7P/sl0ppKG\nLjXw9QF+ECp07vt89zSjxL/LWBxB7aviOj2+qAGnEjaYEuq1S4Rq8iWDz490\n4iOv\r\n=ORkc\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.7.0-alpha.14_1563265597132_0.30875247916603743","host":"s3://npm-registry-packages"}},"2.7.0":{"name":"apollo-server-lambda","version":"2.7.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"0acd4327dca0e71146ae571992423bd48d9b91f3","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.7.0.tgz","fileCount":20,"integrity":"sha512-h/HzcEBbyUn7V4yYm3+GE3r+jWAHPcVw5AI1AQGWpP8+HHx8ggMmmJ3rf+EuMK4AT2uiBii4mWyCQBpbjGNiHw==","signatures":[{"sig":"MEYCIQCxnMH8xxeqIjwG+uNFFspum+aQC+dDTOD1gNQogjTNdgIhAL0dNeI8MKeSvHsZ3XUIW5g4MxxDwp6gnR+786M0CJop","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38513,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLdUjCRA9TVsSAnZWagAA7LQP/iyk/XvL2KUWuKAh2OYb\n2LNjEvAFDYewLwt5/1PRJUKVto2ssjWp+UdbfUVC+pfms5NNvYpAMnooN4Nm\nRVnNisWUH0VdvgthLwTl2OFOQ2N2L8Tj0Z/CnFMvi8fjhcrD//u0DbfFSl+o\nuaKZ+vPd8F1OZnkDFeeqwLL6jWKDaMvhlHTzAxxqzN+bwa8JW3oILk/ldkkT\nbi+5quNPgliSMkB6qlhUA4FYR1KW4yZKWtW/U7eZvyE2fL4TCcJm/oGreuHM\nevIYug+o2WCFAzOW5npPJZ1qsTqgD+ZUO8zROSWIORbjp5rGyg13bwLSXUqe\ntzQ79sKgfgHijVrD88OEnfplcu4EGPld789xQbw+n7HJda4MjTHqoT3vhZUw\nwmML5EpVetLOeCQV0Fb0+LIXL5WG99BLRHUbiYiZckATjc14WKvHfTZN92W0\nAN1BM0EMxIRaVbife/OSNSwSkJjJwiA7yGl/ZQ/8sn1OGT9pKgrpGoG+6rC4\nAYwc3xXD4bP83octaTDiFTIRu1V0gRANbdwwBfr1VSsIA5N93SdzSx3Oh+ug\ne71WAltaJX129/NEApH84NLiCvtrZveUnxxWOJ3WImVYjymdH1YuaE6+tsjO\njdG03QvepnGA6sAaXaXS0izsJ/YwG12KMD31cgKLm31r+bZUwXZvYV9L4UDr\nbRZb\r\n=CvoW\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.7.0_1563284770456_0.5672233973551357","host":"s3://npm-registry-packages"}},"2.7.1":{"name":"apollo-server-lambda","version":"2.7.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"f0010aaab8f78b1f6eaf7644ed25a18852c84e00","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.7.1.tgz","fileCount":20,"integrity":"sha512-A9S7B/gSpJmrm3SHyseLB+VO86wIgPuQ7e5G7Fmc4wLJ86Lyg5fEkp0vSxtKndXF6uep9noUsbO4nft35xTUiQ==","signatures":[{"sig":"MEUCIQDYZKSvEzm23kh+Eg7wtowqFPBzHvJ3cCltWathI+XDxQIgGMGxVrhsPii36h0CODzuwij51fPVL0JRy4GZZuug2nU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOYjKCRA9TVsSAnZWagAAlUEQAJQ5D7xVtVMWCGRiaOIH\nxWf7u4uD36wc2m8OskZZcIBb9ifHGDk+T7+A603F3eAqlHWnf/MHAF7i20Qw\nQiQnEYZoJLo3R2CDrWsDaN9Zgjw9QTqfuYq3Efs2yuzscfQ9cJQVO5wDPiks\nSggm8yps7eVDp5L09dOXVokgamoqe1aTIGVr536FCXz+bwiV8U0oGwfTt8y0\nCRBmHwtGUJFLmdUc0LKPfGCQeKsH0bgAijg0x+TW0DQPaq7GfJ6HYGcO19cu\nxeTc3WCoYiOj24hkxfNo1XE+vUaeMlkzi9XrubmMAcjG12V7Cyh2vrRvDVC5\n4LwbJonlAExTyXQsNnDt6yl+1j2wlOblwFVLeJ9CFe4hGS5gSy620bYGbiPI\n4PjuERzimo/gGZuC8D/hqaI+5sXNK6M0gGmJWyYfWVTDNc8Osag5cHJcpGCC\nEyaZPnIy6e0HrhedOj6PetR0mfkkmA5s/dIQbxhm3ZG8SORlC9CCPa1U87Id\nT9d+wn/g4vFSIzJrIyGU3wUEi24s7EpvIS5+wPadQy+NZq6nGVUjabcrCjRy\nNvK48xQZ36puvSAzhjuZwmnsMPGA0stoQnn9tUZBfd2+Q4NTlft/om4FZFNE\nXp1tnPpSmrSbA/cGPQL1ituj38nyeJNlMgfqMeJY9elgPTv5BsEC46kl13LU\nFzDl\r\n=CRX6\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v10.16.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.7.1_1564051657423_0.239268786297421","host":"s3://npm-registry-packages"}},"2.7.2":{"name":"apollo-server-lambda","version":"2.7.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"c97446ba649a5e20fac2ff7b648123153b56d6e5","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.7.2.tgz","fileCount":20,"integrity":"sha512-pUZaXq+hG4NfyHnRe/kwz+Goem2Cf1a75nEUf063V+mi3csYpKTyY3uaHA6EDc4cOc+QEGN1aGi+F9+UU6j4Vw==","signatures":[{"sig":"MEUCIQDoHpI2+g4xfKpSWuKlneV03jocZvVF/L9IKlY/Dr+6FwIgPJgbmBRObW3BbY+lyNiAN7/GaU/GzNqLNglhNsI5d9E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdO4zGCRA9TVsSAnZWagAA+8kP/2Yq5soc+5lqG+kL8sw/\n6L4SU0Uy13icI9gY86XUeoFQzZhTlg1EKddrWfd82rc1jBtjQbnqeisDkjuJ\n50cg4f6aAAaNySfWGbAMH4DU8L0FvccBFawO8GlvkW0Rhvqeuk1lLdoj6jno\nWGx9Jvi6Wn7I3JC7veRDwjhXuu7/kCVIHhJhoT6cH4eh6pXjvfHHVax3HS6Y\nj84utyc4Sr8aodlkWQrD0ugZiP5RtbEKCsGKIpg2nFzBvn02CfbXbnR94btO\nlBzqPlZCB0B/sf+2MEpAzsskUw6Tg869M505ChiIQVKRQTntUJTt+4FRYtnO\nYKarSg8LUplkuKB/dqLtDFBS7IoNT7bpDq02CJmm3cmHkLun3RHdB0kdaZET\nmP8sUWBhsUjlhxXYdhuVMPuTq3kScy9FqGCY+rndLAyNlzFBZCvSPgD12btL\nC7JFO3jPr6IN08PmYvQMvk2lyyDFKkMuQy8qE4mEny5dNGrjtXT8GJ3aK62U\nMZFxBttRQ/WB93SqFjIzWvF4SjGJ/36DB55gM31m3Y6VNCQjM2Tc/OEDhvQ8\nwhXvuEZ/Mb1P9n7HZJIFsGUqIndYsI+1VPeT8OhcsGWsxeywqhIyuw4pmrSx\ngsgNy2rjU8AZ4J8zNslT8ww8se1+yEqRCMIe1VRPv2snTWjSoj0X/tAqPzAi\npIT0\r\n=UBwU\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.13.4/node@v12.7.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.7.2_1564183749476_0.8446967754463923","host":"s3://npm-registry-packages"}},"2.8.0":{"name":"apollo-server-lambda","version":"2.8.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"b7f29acaff5cea826d0ce0bf9544cf68e49f4a04","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.8.0.tgz","fileCount":20,"integrity":"sha512-RCIhoDliaTfdUp6aOmxKH24bl6HjroEsQh+1AIuZFUstePYaSXVbQdnRWLMNKDStIwgim6qbd5DSMRYQep4jLA==","signatures":[{"sig":"MEYCIQD6NTbV3cV4dFHwQdzsViFsZ6+MMef9Lcs4QqxDkwEgwQIhAMuslA15V8XUSsJBYwAQdjIoZFNyFjbwBQkHNgEkGTQa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPyl8CRA9TVsSAnZWagAA6gEP/0NkTx/6uLMGpCjXib9R\nN6veNlW29/ZLU0+F0KlyIqPhhrOQPAQVYxzWp9THbBf5MdqmuOd8kiSi/g99\nNfUm29M+HFkT4ELWVWXoydhZUomv/ocs0lQnvxQlEio9H0rfpvxy8HWzmRgM\npK2Wu3aK507ign4VDfb7rkDyk1CO7rqDU3Nwu7PDX/hJCt17U95x9dMflzzf\n5bc8ToDB7eDXg3HLORoltuqN0yzdrEtBHHQyWSAL+hQxjyN4LVakZzFVryXP\nv0QXBa8/uCjl2jVuZhekuIi2vi+n4OJM06SSbhECZgGMtlBKgPisTc4RlaxQ\nkKlVxUgxmsjMN6zwedqLj0Muuj46j00JEF3m+7AiO6mJmVRtgfAOMP828Qlb\nP8a7hJVN59H5Y/j72mnNch/IEn04e8aWF1U7kbVR3+7LOaJNRkyq5D1d07M4\nVAQ3vZbUhoSaV3vUtXoKRGMT4oq9P2AkXJJbPhThcCCgVR9LGv8dkYKOfojr\n0EY3lClZLCnvlXe+Hvn6w+D5gjVr7hbG9RKQ9/pc54pnBzC//GjNKUYslkjE\n7C0wZPy6k9/8daw9D806909/alxTqLIjCYvSoIxuz8Ebhy+VJzgoXhRErE2i\n2FwQXkLumhDwFOqqOCFYFwqUmGGQ5Y9DqlVwUMDgDdkYsqvBQ2l2dv+KbXKB\n76za\r\n=bN4N\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.8.0_1564420476010_0.38282860021798015","host":"s3://npm-registry-packages"}},"2.8.1":{"name":"apollo-server-lambda","version":"2.8.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"548e0ac2f8e105cc66f77ed6016cfb0564378567","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.8.1.tgz","fileCount":20,"integrity":"sha512-HyPpubtiFi2oHBUebAOJ0nOTMmJJcrfpgL0H9Nm3pjI4Lkzcufp33SDBS5vc7jE0q5vYQXBjNgyI79jGGCNlUQ==","signatures":[{"sig":"MEQCIDQmsAFd80NRo4NqufDBT6lJlJDTbDS/rPG8pcXB+pOnAiBq/DQkESrvg3TSJ2E6EnQH6viPxC1DFblBt8yr+yaZWA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQXi0CRA9TVsSAnZWagAAspsP/2s42y7VuStFOxWWA9SP\nNyKLNp3d0u35fJ9XGOnw7T4vMd5s8/7ba0J/Aa3QS83DRO17UGuKL+adaa66\nbJpHVunIKetk64houBeSlUeU1opssqY+ESC+amZtFrEu70tIIEv6eA8+5zys\nQ4vLYZ4leNyJLbj2lSLfujtJRmGXrRWsyIn4G+pLVMaa/FKn5zWDcum/XeUs\nbzmAX1pIKVdF7+rBVW0V3IZgJhX69bwRTGmlSHoWKZvBBlCJ9wPKpf+Z9QHt\n4O+gshzt5BEHI7jdIrejDBlSlRZckNnMCzcmpEiv94mPqBG3R8sCrViRITE9\nMqRYib8pImhvB9B+hbdFnf95vJ561M7w1v8+Yre76EHqxgPsPprq5GgeQ2Xr\nEgE3BlBD6taL8xs03KdiyHt3v43lYMiz2QfvkSIkzEu+/UtEeDcjpCQq/Glg\nRpL3LTurte8qMN99jRw0DoKQQQGvl+EFOR2Pg4cWuEfKS44h6YsT7YmHxYHs\nLXV6KdO+aFF205gp4XHEEpDCwGppeYhW8N6WZUxFfim0PaMp6tMtB/VkNTu0\naN/VpcxrxEw7GARDHZEJGpBDRvO31oIb7lwkGbfdlNfPC1LliXAIi/Ott2sz\n2BxHh1Zdft+tbl+nB/vz3DquG/emIleKzDzceSibkiRdmObDGeAWrmIjd4OY\nvuEJ\r\n=SHT2\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.15.1+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.8.1_1564571827617_0.6513051758892789","host":"s3://npm-registry-packages"}},"2.8.2":{"name":"apollo-server-lambda","version":"2.8.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"465419ed621352777141ec274b24015351206232","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.8.2.tgz","fileCount":20,"integrity":"sha512-IVLZOixt3weKGa9aJTS7QtLcwK0cwGeQSqLGNkwt+L3I3iS5pjivO7BPqOrq4cWBSS10+e2oSOFS6ivW4MzM0g==","signatures":[{"sig":"MEYCIQClqMdrRIiHOg4kCgq5XhN5VTId/b3TCiuAmRjKa4batwIhAPdmSpFfx12Qh9Vs9UuCFZ7iTLcMR2RsCtNafTI+g95v","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXDXcCRA9TVsSAnZWagAAdnIQAJjvwqXkItFDx/VdX+b7\ntUnGIy2A/ymQ4CODESNfFQ0jaZ0lP0QQovrA32ztCxY/HqYnaRvsBOTw4F9a\nRL1AMxECrB633y+VW/nAkRMp23+3/jcubyZjJqZGXfwIDMaXxXbPPQqtnVwB\n5sJRX5KvyKs7z07LLttSTyMpUim7JvLPomr1S9wSgy4MAs1U1Sg/u2L4CfVd\n6sn4YA7PKNMhHmLecn5VcxBxmQe4+6/SK4Hqlv1bMzyhN0OIhsvL0ulnJGTY\nBobf8OZU5VaTHOIEXLKZoiLHQ01dB/fVd0yBQI+pF5Afm7mu3DMHDaaIUEDT\nv3h/TRefz9uoZkg1PE2lX2O6eAtrKUGQ4IIkliKojiutEox9xpVRI2ZJ4ZXF\n6R0MoxJ3APO09mdL3+brvLoayQsgRfgsmCEZ8FfWnxQluM7dC2lrdGiBWUrE\noAUpJUKIhVessIaWEegbIZsuaL0CcDtIIGZhW6OrXlFXCMwcMlHyzGWDKyQ6\nTA1rkb2KOVTz1B/9EB+bSl/5W1C1CsRgVMH3XRKAc2yPnGgnFiJ4sQJ5fczK\nPbtvXfTKYuJDj/CzlEqtgXOfFN/fioIAbwoP2javtE/nFF0tELth3LX7su03\nsRaYT/DQCz6inLv2vKZLYFpr2jCZMqAkNpwn4vvNuZNTutNJs8uf90qfYALF\nfT8J\r\n=abzg\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.16.4/node@v11.14.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.8.2_1566324187054_0.3214138393624111","host":"s3://npm-registry-packages"}},"2.9.0":{"name":"apollo-server-lambda","version":"2.9.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"ec222d8f58a3b5b4accdd201fd4778139c470822","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.9.0.tgz","fileCount":20,"integrity":"sha512-RhtihgOdyGT57TJ2devPJUhacNCAOPuai3XRtv5YqRMipc5tam/xtcjaZhpAu1vbE4zqcM8ZPMd8TpxmOD0/8Q==","signatures":[{"sig":"MEYCIQCTlJsFUYI42YHwqfNClIK+OMg/018HGGuJjMXrJOQS3QIhAOs3DtPBB0VR+2999sBQ2/h55R2xPvN0VJMWBjT5sd4D","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYAS0CRA9TVsSAnZWagAA8VIP/1e+W/0X4a9N0t9dgenh\nPtOELCkJd2bpHv9B01uZi0VfWzZ1UrlECz83efrVlufn8SiJGISHWnF0iSgj\n129zmX75w2dw48UNEBV1TbIkcKUQeeb3nwwZpybfjCrmAJurbT6WJGJ12KeF\nrgJB2lG+64OPnZbSBMQ2Q9WTT8E5ztKQr3WctgZSXULvkD5fYll/pmaXWL29\nJZCilokBbCm1+1/jf84jjbh6WGhBzZ92LMQH8up4Y8klBicCDf4/bk41kpBp\nOTdDsXTaFwBn3nhQc7/33Bo7CYjDLTnCB4dT3/5vrrrXxo3kKMXCdDt0ecW8\npz8Se0m/4IdsxRRaiIxTVpr7KlWjYevfx6Fd20DXsr2+VbW0bjG58/38wZsD\nTiSoTdq0E++mnldSQoc6b8F6FA8Kh4I5NwfkZUfFq3Q1UvH9d93nv9dcf9Xe\n0mtIT9qrHYyOfS4KNktpeAChknhb4i6u3vKZvI2OFHcKOoM6OYfHK7UYAJi4\nhRjXbXvxUTjWvYBg37nJqAbHFza5Aa7ALLdTUGj8uM1Ai7rHy4K9u/j6h97F\n2e50LY28LNdpM9t3Wt00gkeSP624wgEmfwtZ4RajTFun/Rzva6G724l63K9C\n1hE32udesdaeFROnbtVoe9dF55NQfhXUaLXBxqPinm7btrXDaBJqMOCU6jBH\nT4KT\r\n=2A0g\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.2+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.9.0_1566573748244_0.890929887704538","host":"s3://npm-registry-packages"}},"2.9.1":{"name":"apollo-server-lambda","version":"2.9.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"50733a50b44b2598470135e94af33c2cb50454ad","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.9.1.tgz","fileCount":20,"integrity":"sha512-XbmiK2/+y2FNWuP6a8YvhA0FiFvAf7KMUThRWQq3xbZEIEpst1+yZZ7sfaJGXm7PY1k64dr+myhzgB3qr4MgsA==","signatures":[{"sig":"MEYCIQDWtA2PtVhwi26j+uA/5gSb+Lmg9bRDvJW1RhK+8blxjAIhAOwvdjUepH+6u3UL/jDFyfyBbbdj+O1qULigq3dZJYlW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZuUICRA9TVsSAnZWagAAF3IQAJ/0axlWOZXtdkQgymoU\nlSyJ+UVN5aG1TPOKNO3kLSpd81TjK/he3qZhrct8if/aC4YkqB78WwdX+nb8\nsDZg0U+U/5lGq+ZwxWRiaIVuslPQEZcG7vuGf/ue8SVxW1EuJVoIqfudWDy1\neHnr2c7injTihS3CyDfiDxfXrFnI4cKSoQK97N22dbzeUKRotrVl846LfZ9O\nWuufzAdBXLH8XBMwkakJLmTaHkONfmMRQXx4mm2gGsAUIgNjeL036yCSvwff\nzJ+UAdRiFlJUsRO9KmHHeL5EZ+gxQP5MjVq5eprNNO+tQDBssN14cqP3LMYW\nFGPHOGpt0kts5oicr890d2vs5VLaaCjXPCafGHJjaLpnPFyZn+5ykC2zxlju\nHtaZWEQNKVrRZrC1rvjgWpNyc8vbzYh+8hnxmS1V+jH5Oflw6gR0r+JhRO/P\nU93vDipM2Q6J9JxJZZrWWBfaRtky5H9/eR94OqoeqZuRap/mQWRF3nmboP83\nXbK8DZ9dIpa5WgQRmtlTJjMIk1H0Cw+pPEYbs6zGEeaLdi30OYqCKj3MJ6XY\n3bEgMHqNQsbgDKKUjnnYpxAW4n1YNxZ/rA2SKzgjwEhZyPmO4J2GjWIWkO73\nr1yS0WY5tIpmxFN/OjQF8xoBNVhxdV1TD7EULZPNZnRfZoQxu/jMOteSPvp3\nWGuz\r\n=yGI2\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.16.4/node@v11.14.0+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.9.1_1567024392346_0.5471052710578197","host":"s3://npm-registry-packages"}},"2.9.2":{"name":"apollo-server-lambda","version":"2.9.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"24aa440150c48b71739ae883cc057edbbb9f1f3b","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.9.2.tgz","fileCount":20,"integrity":"sha512-jr98a1C+AcEy75xqV6/z6+vZn9GGsQq4UU+YGAqrBjZfYLZ+Sr/w14fAgoIkUWSsjd8fmrzNxtCLJfPvHiLj8w==","signatures":[{"sig":"MEUCIQD+09+/g/36BqnVv4cDJNmYe9f930Bx29FxIO7G5usOgAIgXAYUW0ZQYB2bnTTg5tswDa+7i94vVsUqGJsoTJ2KdF0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaPUTCRA9TVsSAnZWagAATesQAITcRZoGxdUEI1MI/9PL\nhB4U13M3WU6RUZOJO5KFWIvm6R/977sUa7Ztq/kK0/xDUChpIP0CC0NdCoD+\nIUMzm6pdBmrWgwTNqrjhRDM1Ukc4356lR48cKs+Ijb8dHbyl4GD9GXe8EQsh\ngdiPE1+g+FWhPXd90bZt0WteAjpHDHSbYW24gjp/HbUbt+a3IdW5Ee8Ledav\nKGy5ScNLeBJdKgNCabCZq2QBdH4LKoQK5TJTHHLV7hbkuulUL1PcCChMA6Wy\np65y89nSo3pKeWFpmb+vAvLbKtKHDh91wHdMNRPUfPlknTdZg4hkArHDMfnq\nZYxrzhenG+xGajlzhvOKCyZ1T6a49oRV/C37lI9xqBfb0bFeApH4zM2rSER3\njlWrfAqbpwMLkcCtH6wvF8JD7a1dBwOCRNR9V1Urlg+6CKOVGm2yTJ121+kb\nNV5STDqDeQmjh5+1ZopSb3qeRTjG+XryET4Uep4mw3kc4LnUQ0XYWnBJ+GsC\nzLLBJhwP1pdXF5Tz3vZLhh548yS5Ei93zoObXkj4FoB1M3gTbtZMx+xmH4ds\nwqaDbjungPnTp+KoMjtxmZa0no5HPOIkE3CoGQ07zPnxYVe+ghNavRQEsP8c\n8LGanE8M7DKwMueJ0vx8gaDQTQVyyA1tDWgH4l5BiCAGPhtu8IYyJubr5Dfl\n9BAb\r\n=ZaJJ\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.2+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","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-lambda_2.9.2_1567159570943_0.8218034076199505","host":"s3://npm-registry-packages"}},"2.9.3":{"name":"apollo-server-lambda","version":"2.9.3","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"6848ba3312d6e00ec05fec2948790a2f86ca5b63","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.9.3.tgz","fileCount":20,"integrity":"sha512-rU9Xx/s//18BpyOejbaDLahpYLpctPqHDNlOQVI7K1Nag2bKxQbgPxu2x7llt/naDc2bZHgynfRVlmuujYYJZQ==","signatures":[{"sig":"MEUCIQD41JaouNE+ItkceitslW9BD1aNxMTFa/Op48TfYZoh5wIgURT72hT2HxCQYGmS8Ho5bwJUBGDzz6RAW1ryNMTEozE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":39048,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbDxoCRA9TVsSAnZWagAA+z8QAJ5BHXvx4fUmCtqA5Yvw\nWU8JliYz+DVfX7scp6Q/58+hy42ktMttXj2liwBOCVDvHeaXzT+s/E0WPUFX\n7bysFFds0QYeOiT1Vc9HhR8FSmzTkFKm/y99h9h2Q9Cbw6bde3JubaIm0UbV\nDYsALreSsR0I3Tm9sSuX1/9dKDkclGBKJiS/W52okERcxswKSPYXi3ZRkv7n\no7oY7DfqxP/2V7z/yzv5pmRWLUh0I5wffLVwVovdaFRv7nPua5pGudFFc+Kg\nHCeRFmbjuhOaVIJUPv1TstHvCaTL6Mtcvnl7IB4yyZPJ0n6bIIAhwZpjpVLF\n4H5kxAI+PkKgvgQeEhaFNHZSJ8IGByLc9PzvwRutn2ljzRHpp52xYS7TGT4d\nLiNSlz3vu7ReHil57xbeo7Io509aDhRuLtvWenOceveN9DwdhUgV4NjvVXcR\nAZiv4VOQ1XvhoTYFNkqa0XhiHOhkoxzjLhK96dWHD3TaDTM/y38jQr6nSHAw\nFytUsl4lsw2xySrQITMIhC6HbjsJu57N5IVCuk7AJj6rbDssCmzPDgzgFlJC\nptoSKcKWpnCWe6ZOhZXT7tyjadnZOTLofVLTQf9XL8WzwAj8tRG8XLLZ+YTj\nX/CaE8MmgAx4TjQ2M6AoDG04rq+VKV9JiyzSMVeY02ljsx5SPW2bc4pJGSMs\nuYdK\r\n=ObkW\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.2+x64 (darwin)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.16.2","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.9.3_1567374439949_0.3630446096408795","host":"s3://npm-registry-packages"}},"2.9.4":{"name":"apollo-server-lambda","version":"2.9.4","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"a900a997c1511da7329db85b0ab9374f9179dee4","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.9.4.tgz","fileCount":20,"integrity":"sha512-O6ucSDd6KIh+s5X6G5pqxiXSD+KyHWy7+cccETHEm7rXEPGAgrelRN05Lz3S2dE7dcaxoh5nYalmpHzarV70NQ==","signatures":[{"sig":"MEYCIQCH8J2GY69Rkr3WsULepP49xQv18E6P97KNgZfxrqBCJAIhAKQl53iubGoE81g2Yo5o1BHF4gDJNpXx8fuJFi58JMbK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":39048,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdikxXCRA9TVsSAnZWagAAT0cP/jJGl/fj5G+sIJmRP4FW\n23h7uqTrgubXou9KHxuNRHiBIGu2R+vqE/gnRfCclEOYO/cY8bFJ+8U9509Y\n6JasP6doeLkC5fyPJgNKQKvFN0s6iM20XNB0iUJl/mUK9YW9wrlqj/3ZU3Se\n1kGjxYsLfhlJ3/n/geOfnxPueWEzkGtvMEaMPZYk3YpSRXmsW6IwYvYq9Xth\nVc6z+qMU3NgV1NrajWJ7wZ4KJ2AMvcGLUqcLfceK9jPhQLrRdsi/+96XBW8d\nGQsXhKFS1iArZlDRT0Yirv/JTeO3Y8T1THkz7CELW2QOtl5DTtseNCIUrNXo\npflfpSs5XahRw2IFzZIMI1jiN/+O5Ke6QpulOmNg/cS5nAFLoDOVHWeMRDhS\nkOsmjbq9Bw15LGppcTULf9jp8O1b+pf8r7pttbU0vBAKHWCExjzLU5UbP9WR\nvjg76aw4G2InhgO8gFXItILGmfmSpRvfey9iJmlTEnd1b+qr6KtGR3J6ArJY\nk2cQSYtr3jhYncOQcbfrcKrA2ClGdpy+RYHA7zMEF+M1/z1yXn84V+MKgQBv\n1Flq4MgF8IweOhaLuUIgMe1MHvz2abXuEhplVy3oZF6WYSNG7fStRAKb8DNu\nXNL8lYavDnj+jN5MTZLUJb9g26blDy7SXCNbgPRRio7giJyt7ufwviw3a83X\niAw3\r\n=XRRm\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.16.3","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.9.4_1569344599220_0.5400586906259386","host":"s3://npm-registry-packages"}},"2.9.5":{"name":"apollo-server-lambda","version":"2.9.5","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"f26c03da5ec2298ccdfd179c75c5d7a2f5e0d694","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.9.5.tgz","fileCount":20,"integrity":"sha512-POOOi+brPNXwz0FNyZPsmNiSQj5zyeytqRAW0igfTNt3QtFgBIREqJtfP4rJ3mzkrHnWuF9enbbzg8u7ootD3w==","signatures":[{"sig":"MEUCIG1YDV0P3sWnOSH1BFLrfDtXlLKjhdgLqHh1vctLLSvkAiEAiMneoXbVnWelMNWKs+g6PYMIyG8cnyV/X+U3nFedYyc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":39048,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdl7XQCRA9TVsSAnZWagAAjmgP/iVVl2s+AOUMCZTu8nXi\nzbDD4sMq+evHSobpvFJG1PysA0N7fJpPB147G1Ypdq2q217H9NDF5V7BEuhy\nRSrmik8LVQLa4HL5RE19Drts5SWJgQQJc2t+iLc3gFUTtZscX2ogFHvafu2N\nh4PsBm3xDFLMhaS+fMfa+Fd2OPbI6cBPq1sQnuH9skJZEGqPLONhCCgE92Ri\nN5dvEXcvf3J69G7iL4ZgYP0clR+QEE/tLirtjiXMJO6wta1vyIZl3gaKcdun\n9EgVpVS6K/NJdikwRCH51dizTERqZXvlMEb+ba+9YNHrZj1b0/56kdBmelwE\nJlHS5cauMQRyk/h2WdSXesHollZZaHjMMvNEw2l2PZl59jWSIuYoYz1/ba0M\nqjJU3SVBjXXLecfj7xU15skfQmwp9QSnFm0luCrCqvdkqVno5yr9tFYaRQZB\nibLFOb/txUsiu2+OHY1+HnnG1rEoWG1UvcN4ZD35wTI5xhDHQzeYUUOB6nQR\nA7j9WHO+nZX8iMOcEnQPaYjEGTN96XSDLljrH/jMH26PuKs9NTWcWW1elRqY\nO0+wDmaPxBv4YjLJT4QHhOP7zgTPq2NdEaDGqTwBFVEDon5P8gfNiquGP5K/\nkFgX1VOx1EWn0ipbBs6shqHwPLk2TQxyC0Rn50nojc1gSH+VsL7Y2RhT0D1W\n6eLn\r\n=W7sy\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.16.3","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.9.5_1570223567809_0.6114752323137265","host":"s3://npm-registry-packages"}},"2.9.6":{"name":"apollo-server-lambda","version":"2.9.6","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"5f1417cb0c6cd4567e2d118eddbf902edb2f1dae","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.9.6.tgz","fileCount":20,"integrity":"sha512-zPbI7gcBTpVG+Yi8rrXliTx1lEZbyEvTQVMfFNz+qXxZpjiRcRvF+Imy5+vSSWskrecFn7J9H56+24/rkAg+Eg==","signatures":[{"sig":"MEYCIQDox3/kOI49a04K/yicfi+ZbqBhjxEiTzs9bNxhQLY/aQIhANxMWJJd6JUd+JLnvi0hRuLgLwLdZIZDQgsj6RcARfQL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":39048,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnyD2CRA9TVsSAnZWagAA2x8QAJliXJDPLTHW5vKrmGHe\nUfugFkKM1sPOdZUN5xcXmjnKb01HsAOF5E0yqycG3PqKFEk3P5VGi15KXfcA\nqWX3kNLTT8ugalpaAeWvC1yzyFecEaXYSfuUZdCj1gyyngfvdThG/ESXvgc1\nY3I3V433gM5ifUUgSHkoT9kvfq+k29jhfCVAlTGP/vw5Xo/UWrzzXXF4wySo\nk8OVdyt3rLY/4kdXdCcOSdgD86R5AwXt/TrGHVCPF4iUZ1l9Yhmvd/km2ktD\nFQi2k65ZpIFNgAuyTuHSHRx9AdBcd/vwfJRI48FRY3/DfQVnqlJOIGV9Yom9\nH+WaOiUe8Utn3m5YAiqLu4IXO0M6KvcQk2LvgDOejGZvv2QVxHPY7LxI72tn\nfeBh3FmlvVdTKaol5VHjvnseyUM0SAP/4p9iOS25gpJXAj5IC3AOCDa5w01H\nvnvnX72QK5bzX5jAA0yETjFe63TRmQNj3B5yxhPuK+IFllrQ2jWbA9aCfvQZ\n5r8ASty5PGVcZIOoqnB5U0NHQqc6JAxh9LyqGpDo7SlZ4BMp8Y61EGElQgm0\n4pqSCLDpYRZtTQ/rTmt4s6tHwxDwvUrwaykdoM/OKg5MOWv815ZXDsS/fVv0\nCTyKldZwNoAvxI3DC2lHyzdBSKvpsJujIEEkQrNpnQBmARolQ9UixHYKVDum\nWUUu\r\n=5Jjd\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.16.3","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.9.6_1570709750255_0.043276410236501084","host":"s3://npm-registry-packages"}},"2.9.7":{"name":"apollo-server-lambda","version":"2.9.7","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"322becf0d82619cc74ffab5d668ac364dc0f52ee","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.9.7.tgz","fileCount":20,"integrity":"sha512-6c4xbsWLYUZKdYw2bYrIEHZEHXJcAX6mzivzwoldqlnDu8VdrDipfh5QnBvJ9tRy08E4K8YZLjpGxKL0/l1yVw==","signatures":[{"sig":"MEUCIQD50dBul1Vf29D3pYJkCzUYpanjj2p0VBJX76yEyshPAgIgFUwS0dQ3TI3ujNQc6cOuXRHSn6jZEFa1gdI+k8V72b4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":39048,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrepOCRA9TVsSAnZWagAADCQP/A99+msjmQJohdNIYmFd\njLEgUd90x6W2bp+r/5ohhi7HdVQSFp2H6cmbAwri+K5drz3EpjX1wPmeFI6j\nMj8auiDIVj7EzqnoixuXaaWFVwCBDefX69XW7NkvLsxzR6fPeYXMM08nxCdF\nbRbqNoIUPhkyiq0l5n1KPgVCTMX4aA5mJ1aJ7zU53siudz+Usy5xz1TDy3Lj\nQvZ6s5s09H4XJZktutU7q1h8mfQ+FuMlvZS8f7uIBcYXIqzDw96Hv6Suc/E4\nsBcBd0imfG9fRi2PSWD1bZBDIpFUDjgwGVMiwy+Os6911l+ca2v5J7gNT86v\ncsqg3b06S0GTkcfWAkL2RnVzG5giRhg42px0CymzrSz78smRmjjY9LYoBvwM\nCB8Y1L/78G7q+2p70tAcNjAHjXE+6OLUieFoZ1sOfbphmBjTvFgDl3aoXDLr\nzlJlhGi9PbDVNGe5dXjc9UTzyShnpHI4attHk2xkB9J5TfjeNgOJjB6hPDXh\nDtol6SDhurBCuIotyMPp9Sz+Sq7HwizpBwEjUxt0AW/ejsUb3vG5CVx4XhKU\nihg9S9QmdQkBawhhwNICma0lYN2ZdFdh90DmmfbCr4jwThZjY6yZSSXx/Btp\nwn+T2Q06LvkQg1GSo1Jk3+hcEnRelG6FDm6XcrKPuAf5aQPwSYX3O/2cDQiH\nGsWd\r\n=aIcu\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.17.0/node@v10.16.3+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.16.3","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.9.7_1571678797511_0.6942535443666531","host":"s3://npm-registry-packages"}},"2.9.8":{"name":"apollo-server-lambda","version":"2.9.8","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"d0d65eb1d9133b91ec2d661f831f23e13da78c48","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.9.8.tgz","fileCount":20,"integrity":"sha512-vKN34FgQa13ZTGGH8UETNMpX+ZcAkjiUMMnzlk+n6AlbFNlWdJJSlMi4jDj7lb6a57tbKLCkLROkvgpLtgGiMQ==","signatures":[{"sig":"MEQCIEPVQ3uYhslKWIZZX3OD5VkzZF+74q0ZZOF/LCxkxdJwAiAWZqfvKRml9zBFMsVxqFQ+/fOuh6vfN812AN+e8A89cg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":39048,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyv04CRA9TVsSAnZWagAAKeEP/ilb8hX2VM23JFdsoq0E\nkWf0S6UgFY+17kFNhfV9/RGGcJTISM0VrujN/eDc+aESP2SEs7SPdyj6g+3G\nBEjGLGXewDEMb2M/brJKO/CE6GYJdONA6EUUukVcCV2MFppm4L3gBipkjWXx\n8WYHjr2kAn9Y/uPwTXSW1mCT2sMiB5u/dg5T8RV3cHXPB+cSr9Xd3go9ZBjn\n00KMQ6PPcrpYiCt1v4meL1iMTzr/BLglHTYq1sRKxIhGYRTSC7yGKrwRIhac\nAN8rg6fpzRyTvczvK7D9R/AMqSFeby/p7VdsLRwsr51cG16JBFJmBuI4eDoa\nmUwUM7B5XC7GGaxy3/V4ADXdt9P6iMCwahkvNuZ+cdlcAJhQ5/XN/B6Z/Bfs\n7XyUnhc3uGD02rNvNq6kZ9hYw0m8b6skr66NTQdHsmJ04cUb8G2mpZuJ0dtk\n8VOWDY/YYqV4509n4SXBj5iQhV3QIrCZgeea0Yhpi9DHSpAkOO31AO1nSCUl\n0zD9YDV7k0aMu8R/3Ha34tDksnfZoI3uBZ680G5C3VeaazSAbB+A9r0VkFRe\nx5YSrbckFb8JpHzt/l1O46qgNk19aO6+UBJbQhjnfdS5wGyweWJx35oJAfdp\nO+Cq+JtBh8jA/fwE2QglEjd83c2EtxXPIjxgKN2wh1dk5mfufumlfA+BsxML\nmsyD\r\n=e0YG\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.17.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.9.8_1573584184000_0.73098016587928","host":"s3://npm-registry-packages"}},"2.9.9":{"name":"apollo-server-lambda","version":"2.9.9","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"bbb258cf32d79044b1fd7364d2e2682169f0edf2","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.9.9.tgz","fileCount":20,"integrity":"sha512-5kcy9zRKmP2WoBkoVMBgw1XzctpxQQg5R2t1f8PrEurvp4EVk+dUOQI65XE1exJzpF1Ik9EbFwPc7hcYFJjKog==","signatures":[{"sig":"MEUCIQCNIjaZK4O+UpKeszlgE4rrRcVmI5QOewPDflAVur0bSQIgdENxa+yHMvBk5cKwNnyS41Y2muBvxv0z3DZDobA9F+c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42014,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzIcMCRA9TVsSAnZWagAAfNIP/R8Ydc9JUQm73nqpv62F\nY9Ula2NYfMPsa5XTUQiRywq/jn3Mp+ou704mESA0ykFp+3jS0zWTjdgf1aIW\nHUx8PagN71tTh+bUKpCCtgM0Nn+wxcu3LQ065rzh/GElpWStbbL7GLNu2O/y\nwjgtxZ45KShXGp39yQe9OXFjJJus9lk54ocULEa/LSGiVBrvnN08R5fWzkq7\n/eBf77VAB80w6YpSmeVDsD4JGygIqhPQ2BcwpN+Xx4QGSjYcFnOZeMoKMHRc\nxg4+tydPsTaV/gTK38QRnrTt92Dja70fYNgUM/sqNq8Lk4JXYJcBs5SU8pRP\nnZOPDx+eGql8BIlkMDGjG3ViCmuXOBgADs76CCZKU5DfyHtGXD/YJm2CFtqb\ngRUbWv5x5ZfeUPYQuUWwsD4PYBz9QKOPrG+YAaCQFuY0z0vPYbMb9yw8Tth8\ndMTGu2xvm1jFVMLOHouhDS8ZxR4472zD7EQbBRtLOHSWc8ywwaaT15/xHPss\nLNAoS9GKAbvI0kjQz6UlDZqiei6Q84a7ehm1glRBPJ4YvvO/t71J1bfTg9PD\nmHdB0BOjJUVZdqYvlJVB73jjO+mu+PG2O9/h6P8cf/hWaMFPUfsXdVp7sjKo\nIs5tLRFeVDnf9Yf7s0YxjTNyNzU3QdlZGK5D17szKi5vp3NUetNpUNaAirKw\nJUD3\r\n=rIPk\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.17.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.9.9_1573685004360_0.701458614037036","host":"s3://npm-registry-packages"}},"2.9.10":{"name":"apollo-server-lambda","version":"2.9.10","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"3ac1ccfe851e5f0d4f4914fdede56a3b0c4f2448","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.9.10.tgz","fileCount":20,"integrity":"sha512-7MgOeDEo62DIObUW8n+3Fsb2b73XY75jnTUVcOTDfUeQmiiu0K8VGv6u/aHEc7jhJTYFey0E/XbwkbumaIyReQ==","signatures":[{"sig":"MEUCIQDtIZfSV3rS4OHBpeRKdGdlRgCR/DMaTgmmpIGwDsQgLQIgOL2MfzIFcOUZfmSYMBvWMZvA3ZF6q5jbgqxbC209LbY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1b3FCRA9TVsSAnZWagAAF6sP/irL9RnTgjBDGhgVNZSg\n4q7fP1eJtKsITUx7roVMpZ7dvi1ssUVCfwnVpwAAdkdMOfkbdgRAkIHIBQcG\n33jCPTOzXfDmzvkxXi5HzNiX9x5P26zGCEyuH7fnU6mkdTgsKAufllsvsUEY\nodBnQdTX+Q6GnBikZ7LVLEkgo+2034WJBLzgfBlvGLjzZoLNtMM647doTL0i\nyS9ZUmgzdTf+YyOYoPmRxwIPUX37KjmVxeuJMprglCaASuoBQNWZVXA+leQd\nQwpyaZnuQJwbm/KegegKtw1F2mYIbsoRXJLGIM+mWdGBOmdNvlOYaGokqG6v\nq+G1WSq+HRhn+YMD7FuVuTurUqm7vhgWaXJb3b02+ywuxQmyFWrn885MkddW\nSG6z1LCQ+EnFufYH/cjQGRsTdR1ekya7SVDLYwn41dln6WmJB/oa/yPiSiTN\nRrRzZ4HB+gphJAVlIzcQDd8bq7igHB6TM77CIQoVgtZtfQdGV+XiZsEbRHZ2\nPA2z44o9o9Ehln7MpmzyUmBKGGn79ZtPvPiGQVzOB1F0DUnOAty35HYHFPfq\no4TCGSQwziJoJ46CLBVh9shZDT3AI6k3zKZTXg0HSFelhEsmC6vcS+853lNr\nTRirF7kqd9WHZw2qGYd7yY4sgO3O5qal4u8h34WTBWQgJju5gXg5avgJOXJB\ncJ5T\r\n=Gnln\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.17.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.9.10_1574288836891_0.8568812608185834","host":"s3://npm-registry-packages"}},"2.9.11":{"name":"apollo-server-lambda","version":"2.9.11","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"8cd1011317ea41f7bfaaaaec8de91ccc497c02dc","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.9.11.tgz","fileCount":20,"integrity":"sha512-+B80LjNR63c/opzS2DXaqiAiCU/14tOokIhYbQB2uGVHkioA9qxxrVVJaR4CXrPLzKrHHRsZf9rb/AtkuQaYLw==","signatures":[{"sig":"MEYCIQCKI0ldPGH/46Ehi0r05dcc5jRdoHcvk3iLTANv+tVsNgIhAKEbBAXdwCOFcZ/SirE7H3j0Ebimc2/e95HH4KcbOQkf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1cxtCRA9TVsSAnZWagAAUoEP/1UQobuIWIDinELeB5qJ\nEWP8oDY+BBiTi7dzx48KlKNOeyUZ4taFiAN5+3Fp5Vh628PvIh1z/D2u7ECc\niCiGbBRTpEtVGVM9ibyH6IRogB3SCWcxcA7SC2cPBKYHCEFuxab8CxAgU165\nKH74gXglpaPz4Y0xEXn2fQYKG3C686gib32I0x+QwNcv5ZgkUGBTTG7Hh7Ca\nqKYqZ8AXt/sxDQrNVQL+C08r90ClxzpvnbXbkkoAxxP14KUr+4upRD/Am1T2\naAwpOOhGPt9kAPSEitd/29df0x+cuh8/AYbZO6jIgpcadQKvkHUO3QXImmfc\n4WjSOBWTtNq1f56J09gnzSotOgHwphYREjHd7YwQ0ObWmJGBe4SmkZckl6J5\nhe9Lymle3lIe0lJg1036yiM1Y9L1FEDM9qq30bF4Dz5EA18pPwpQgNwdNYa3\nfz6BY1E5L0r5rZYGI84II4FqWsVtsBq0t2fuwdpbmCxuvp7K+H3KK/pXOPSn\nn9Sftqv/YIGkbvRk+rR3I1h6A9bOMo4PCRV0iHfkoRj/pTx9jTihx5O7dU++\nrjeDI5xtkMF+3qdx3hPV967p3aqbZM9XdK9Bb6UzzHsm6mJ9nY7LK+7yzUu8\nOGZkLh19URsaYTn/vxa3jN0td9SHicCR/T7SIwBS0IyOQt4ti7iQFeBWn0H4\nTVm3\r\n=pnMF\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.17.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.9.11_1574292589184_0.683040182653256","host":"s3://npm-registry-packages"}},"2.9.12":{"name":"apollo-server-lambda","version":"2.9.12","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"488c46753b8f26665ab6e14c9d70454b59a5c728","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.9.12.tgz","fileCount":20,"integrity":"sha512-Gy60ZeuJxSzRpvNl//kJWFwPxCr03vana3xHLz5KAEgqoJPa5G3bOQD/kEMRK4Y4KqFMjnQ2SheBrNTeqxQCCw==","signatures":[{"sig":"MEUCIBV/FudXWNxkEDh9IfBhlW3fh34j40gxauAJVy3jdCQUAiEA+EDOSLoRDZ7StZ09hOjeQ8tOpbS7JLt32VWRxEs5iFY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1tD4CRA9TVsSAnZWagAA+L4QAJ5lBjfEivedavVsLbVF\nC/dMc1PK63Lj7Z1XKILnOpN1akFL+hUXKbQe1XBExoqa3gbuSxIWI3L9oGiw\nPmGGB32IZw8cczUSmW5Ssj7cCK1HgjYOUVFCsATCzUC+QgRHMr+u6wmzOWFq\nR9FgtnImAhYoywjANQOdqxkXlSYyZjuQ95Rdd7W+h4pqNwAebPQsxIzHq4EV\nKUXj0F/qADAeo937DFxRhfKMMP+kTiXYK/DbPrltcvh3CjFCZv/XQAgzD5kI\nUq2EbJ6VPoc1BJv1HWIWgP//uTVchkA4AkBVupmocsV27eQL+UwjIdgOwzdW\n9nSHZYY6uSySHRPsZe5uNU2YVguygLxtWt+8TSG83fFnSTKwy2iICbGsAqBM\nSZaKws4jikKZclxcwAiudG8QSiJE2sndQt7G6A+OdLhncxZW20PLbAamQaT9\niC0RofWMJAkbdWWkBzEgzbZ17vyDRzmWJ+un4dt6Z2LBpWUiiccchK8L6O13\nKizi7o3AmSnO2sIuH5iBcPxmsCfFHhqETSyi/73hzjOCUsKlaJ7FWvzwXnbo\n6WHiJMnTkZ3erqHvP+mqw23BTSuUQYYnpvLgq1awYsmq0/eVHdF758fZAIZB\nOHZevRkF4otucLBDmFKC/xxUOBHw392UGCti/obeN5+/Y+weIXNy4sczLkLs\nEYXz\r\n=AqKW\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.17.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.9.12_1574359287519_0.09553349012577783","host":"s3://npm-registry-packages"}},"2.9.13":{"name":"apollo-server-lambda","version":"2.9.13","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"c8794f4944691b5efd7b68c7c1ab7a327740e8b9","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.9.13.tgz","fileCount":20,"integrity":"sha512-o9/oWQfRdp5mAxthPBAmhH0ke2+/MZ2bHs0QH59rQo9NkSzQHjabZjBzu9CoD8KgDCpfvtCWM+hTJyIBQtPaEg==","signatures":[{"sig":"MEUCIQCO3km3K9XHLMIA8uABgKls2JURKH2DbWgHmmOzxKYlqwIgWqoThRnxsqG588Il+m5ankqI3FlExtJjVgkdwBjInZY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6WIgCRA9TVsSAnZWagAAbFgP/1Y2Smos5O/7pW2yfpxW\nyDWnmFdeTLP5e0V9BMoiQpuhhLRVZU0iIc9y/8KuWFHEROEstqeRl52oVQXT\n2CHGRQ4LH8SVaziPKYiP2qXHxwaCO3ngB1aXKWgbUHh8SuGlte/JLP0sv9qn\ncRV9zLlEDu6MXauyDPM3Z1No/NL+EvW73ehSSxLXOJ+ygK6QMnteEZKnGzv5\nh16ryVPJ9cxZCxs8SOep2ip9rNCxODl2P4Rf6G57xBy30uwlSI1aHU8xnCu7\n3LKEYURATBg6jHnLV28uYcSv4ABkZY3RFexyF32PPig7SVwFIItdkUtcn63x\nrGx0RncgYL7Afjn3NVkoWZ08P+kA4vpZ/ZOz/hmZMjUnVVAb/9vrfxPACn7o\nAPAGmb6cISyxyN5vRonmhaSYGot1E9HDFfLQoNRwjvrZdYmIlGjBqiYCzMQw\nwigijPwX4Ipqnr89Yu0KxARc5IrnoXmN7HXITz6SjHj+ZgcX2f+BoT7IvdtK\n4wU+3N7VWtFDtCfNL7QTvUXXUceloqew5R3MDC67yEyTQlAbKp4Po9m4aRRY\np2ydF3su7NJ/1aLgHcPPFQcmuX4jCzbhGfUwBsi0oRafTz08c582RUzAabtE\nwjh814/UepFXwmwAWro0bQTrQEm1R4tGC/UwAKrYLMa/oJWnua7sGnT+yJ2M\nU2cZ\r\n=qSU+\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.17.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.9.13_1575576095547_0.8986413300385852","host":"s3://npm-registry-packages"}},"2.9.14":{"name":"apollo-server-lambda","version":"2.9.14","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"b4ed1c52116cd5808c90133ab826179e296a31ae","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.9.14.tgz","fileCount":20,"integrity":"sha512-A+rgYonp3pE1PlflKmVVYbOlFLGaU/D+RcIq1+YXU8Ru9Z2V/zI9bBX2aDyNW9MrKvy4aDjqetwGW8EnQIJcSA==","signatures":[{"sig":"MEQCIGDwY7tTp9P00khGqipkQfTp36lWZHYCXuKiaX029L38AiBt6cJ56O5QcyJjqUdk7rAPwEGhJwFgE0ErnLJ020kPsA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42022,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+MjxCRA9TVsSAnZWagAAVZsQAJc+hSusYzcRgGo0ubHY\ncdC6Vzzmb/aSJg2xFmWqgmXi/QulXbEG1asfSaLlD3uiLobF9cg/NmeZgb3E\n3YyBLOtIzoNuly+qlozG9A7hd9WvQGPFN6I7/dm7gEuM7u6oYq4d5xt7lqaD\nNs7sQcLHaPgYvxgtON91DRN1Ds7mbULq+dkxg1N7KG5ef1aIpJLsCgMcMPTw\npG6rpOCanM2aKSt1eCNQHAmqLWTDwdGlFreQlxOUvHIgq2jv595otMWrOw2L\nNYQJ/aEcaKcq2WmSt2MohbSCg8ptkmRfUYyTBIxynwb3LlMMZrqhZWV4RuvL\nLZgs+rr/rFtAQLJtBSxVYgj/GBzBQVS874lsJfyK8msIJUG3Kpg7thw+hL0G\nxVPpaesXprWSVAd0LgQEOCB/4LdvNZuwG7+LzQlG0pYHOSTfWI2qmu9BStLH\nR9KvgTvi7riKa7o15ihdn6Zx7WxQx02XFd0Z95dID6BUKamhyCD2YAXdP6E/\nzJ6rWJGStaFywwlfZeHLQE1YNXdOcZjc3xmpIylpEd3TDv2U8qXHuTYYNmfL\nwhvNXeIorE2NHP5rRHbPCQ2dBZ8WkbUhsHdKVUXpiQHGzSt4G90CHxFubBrC\nLNu/2Gv/urHmcdBe5EzTzQUBa3XCeBA4sALVfvwOB04ghlRH/Y5UyyOAoRNF\n1qDA\r\n=RwZJ\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.17.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.9.14_1576585450121_0.530501273983629","host":"s3://npm-registry-packages"}},"2.9.15":{"name":"apollo-server-lambda","version":"2.9.15","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"8bf76cea78748b39bb2039280eb5dc0fc27a9bde","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.9.15.tgz","fileCount":20,"integrity":"sha512-9F+ntKnHAAIiAbvTLaQTSRPrvyv1daGYM6ED6NFEVgnQ4sLI0RpEasm5/ekKw/Nbo/Ju/1IVy6aN5g9qqJ9BsA==","signatures":[{"sig":"MEYCIQDohAfMKLeZzfk/FxxqoHbAvJY8rShvdKSt4D4jOKdswAIhAMAO1cuCKzULNGl9HM4zbGHF1TC6N1ofbuS3NOwNVN3D","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42023,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeBfTMCRA9TVsSAnZWagAAtoMQAJtIuwY1p9w6eYjG4egU\nnH2Ct8gKXaRTf68lIQSW8tf+7rAo4B9KcuC/ZCZ4qZbskmIhff5NNDLZ6aN5\nB8Ysy1KHuDrZcNHsrmUe0zjPVnfaWRotQ83cBTyTRrjDyXVluXQ91iGTwqxr\neno6QkCPvjgNon4I0iyIqLrpLzlHW/dMjMQegYUd2Nu2amSPIMQVuqfUfz/E\npJwQtk4Eve75vom3x0mNdeQKeQyFygZQudFEBJ+872Q1JC9MZy5YN0GZLbs9\nqEXBYJcTu94OH/W4ljc4+3p0jfuXvmDue/MZG5XaDP5sNf/i8n5IV3Oag33e\n/cgWRj28+x8z6ePkVhmwJezopX9kbMF6jTmebj2dtVozAKRPL5pf7OA2s3Rn\nZEFq4WMZv77W/RPKusyURBNWOFgRXTdhKeulfAdgws3FDSOkHMAE+4lmsZnI\nK3OExWAiA5J1zxJFUz2TeaQQ32Dgb8C+S/C9lJ3YuzyVEjrqh1gmxQWYgwsl\n79HeuYRnDBbDJMa57GrtxMBVWQQCBfYv1b2jbfzGhyy5qfvCAbRyk1t9X+L/\npL2VBQUPpoF3Gm4SZBVFtjNLyQ4DemnyEBoN7uKqe2ENK2cuJfXpFlJrepV/\nHCx/pkOYvqZrRhnRu2O+69MesC5oTdm/AvMLt+5W5wfv5ObpCyv5glIkbipt\nNfLQ\r\n=396t\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.19.0/node@v10.18.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.18.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.9.15_1577448652489_0.9594148525334738","host":"s3://npm-registry-packages"}},"2.9.16":{"name":"apollo-server-lambda","version":"2.9.16","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"58cb257cb2a4970070a5784fbae4109c05900795","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.9.16.tgz","fileCount":20,"integrity":"sha512-MrY3Z+5tu56lDtbB11hj4bSLceteAHYOK/VyRSGNeeX5izBSR4rFB8GAbStqdrMkMFMSkFrIkTiAt86RfqYaLQ==","signatures":[{"sig":"MEQCICHymd5/N5ZWnTqDZIoLqC7N9KlSs0vZeEBnTxxT9JgyAiAdsRqF4c+w6vPsUBqR13kOCkDzYiUNJccUGZ85VucuwA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42023,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeF6ZdCRA9TVsSAnZWagAAqQwP/2yEXfWjGDYw7JpsgCS8\nv7g8yjPL4JvmLMty2ZhahCnApzoTkzpnyBB/Pt/Q0f3KGl4xfgxF20jeuCLy\n9DKT5AoWEOzCkBC7F8lNXnjgM1ghbDxN7bUEjjCdP8VlpU+ldbw2GuxyNAWj\nArgTM/jU56WFoIoeZqTI9ChP85TRguGum/kHIWtwRREqGb6vxJy0ioZf852d\npfzAr1IqX33X/AxaEIZUqQ5P+2OiKbBjiD+79scMZaAqG+VOVAOA7ga6IQ4f\nfx/mhF/OUTRB4+sfpMKiWlvUROZZrdknK2MGc7U8//n+sYbcekc1/rqj6yZO\ni6tU9ZstML9+8RUOtxge/qfCK6Jad9CIqrCV1hcAtramq78//IcreiK/cGnl\nSMQvzEl4cLj9gvZ25JX7Iv+imyuiAeecCyJgU2g4KI2bk1OFbEv03Do8Rn2w\noeNUWBQbWfTVPmiVZrlIDThkjEkm/i7aLuyxHR6l46wwLZ2Rdo3HiWq9GV1C\nLOx5tcOu6b1PmCVL5uenTXX+bQAXzIBTA6cIV2wJDtc9cTCfs5bbayHYjjHO\nj4sxFPj/dIm255/9xIhQpXUPREyaDuBOQvW6ggtMcJoVFftt0vq8Lat4UWm3\nD2Kh0ZemLAZSfCU5P8Jr2qTe3ry65JERqJiTcQsiUc00G5HvxzMIkudSuToF\nDaTd\r\n=T7id\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.18.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.18.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.9.16_1578608220718_0.8692704394703921","host":"s3://npm-registry-packages"}},"2.10.0":{"name":"apollo-server-lambda","version":"2.10.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"fb43f2fb15a8f3b35ae2967f05e31a7eaf9af820","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.10.0.tgz","fileCount":20,"integrity":"sha512-qqN0NB14oQm6OOkq1codi7z6KntZJcD+Lmy/3VDZ2nInvo7WQ/wFDMJsWiE+uwCb6yljWJ6SkuMI0f1BJdtRdw==","signatures":[{"sig":"MEQCICkQbRCN+gjTqh+9ehctH1S++kU3pwxjqZq8Q2z5fYO8AiBl01XYLyLBWkC2+udQ6HZvrFx3dfy8wFoa5hCitXWYSA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42023,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJePAflCRA9TVsSAnZWagAA7nwP/00klke45dSJaT6qIN/U\nBvCFXytyAPA2qqDqT7V5SljxtUSIZzkrksJu70lkqsgIeO7xPHvCtmOWLYIv\nV+hJyFOxN0O7INmUICw/2RMp5GfPi5yPP8ADWTYD/CXVToJvlhitPjHGy9Vf\n6YqKs3MLFy9PW805T8w7OB9be0rmHr/MTQ+FHXyW/xbgmi+jjQ+K95B1EMgI\neuDxanFJn4poMxL2V6afMk46/2TYK6hnskzmZGAz0MlVPSVepzf0Ts3IC8fS\nkDGbcCjn9lFGneGlKmeob1BfhHwTpbyUgsMo7uKn8VSG6Zc4+k70OJ/0lH1T\ncOh5wBw/e60UN6TnuwN8sINjexfwfXvPr5O8QJvK0NEEx03SNFx4XRqEUKgH\nibmaYD+ObjIbF28zHBBH1KQbcMHHIQ3ep38pKaMypv6bzj14Y5KGW6ta+JtS\nl6jODfFw9YakMgVJkgg0eFyg9o0/9PRqmHzhb88Vi8y2jCHhH6J59GqCLFmP\nhG83uer8S4s6MnmptssgKgPugsk7Eztu/RFJpUupjxRZHHO5IokbpAPMoCbW\nElmMb68zKcieanIrKzmygDS5k9zhOFe8yMJoiKI5Rn1L36Gyl+FWMNjBKBil\nmyRZKhJPUeha59B5kWWb2UrjKS2SxNNCZoNvdI5OfTinPnpibt3TeZvO62nL\n6wxM\r\n=VTNx\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.18.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.18.1","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.10.0_1580992485320_0.029590695641318332","host":"s3://npm-registry-packages"}},"2.10.1":{"name":"apollo-server-lambda","version":"2.10.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"50cf0e2c82d6dac1f8bb9ca70264591a1ba91908","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.10.1.tgz","fileCount":20,"integrity":"sha512-TvpoRK0vvK0JkmGPGQt03N7YIqAVzf9Gi1it8KjfwKLDfMcqbVIxGREch9hy4SDm19LGC8QEeFBbMbg/OwsHxQ==","signatures":[{"sig":"MEUCIF8I+zSovn01Dg6TmON/95IAZks7NFQFWeTRdcSZ3Xg6AiEAwz7n/Bwn/OTwNKQW3Wmg62UKIOqqc1K2O7K3iLnkAs4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42023,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRqfkCRA9TVsSAnZWagAA7qsP/R8N+Ypy5YXhv9r4X3iP\ne6IWcI+9GnJqNSWI2b5upVowvvS2wrUKla/aMRb35ehLLG2h0W7ZNuKSJRxy\n6PjvqNXBJOjxgurvlajnBzXSlnPOUkAOR7RSSFqmDI/sIKA92uTVVFzLwAzc\nJpQ8a08s8wVT2T2rXPgd9GtLGLRU5smB+w65j1U6zCPeial7gwl8kFKPQedH\n7PmojSZA5ZKEXAR5LIuNuagIsONL61ADTQSLetjTbIJkFwOcG5IP4W4cQ8n7\n8hDAzlXRffvZoqs2JizAQmtV7Kqn0fKJwO47YOvi3cmlxYoSntAwqHHZ4Qyy\ng84fmlhPvYPNAmU3DviE5glXFa0hpNxZpKykt584Ev06ZDbUs2CCFh/L+Nue\nrYvpvUHa33BuFIaNpa11foC1/l09mV9wg+ZNETlxTqq4wUoKvtSTezP0SRZ4\ng4RkRnMWiS6EfJuiv46/x8jy8t2NCdL+pqcAss7sDkAhMh4k/2IF7hGSX0AU\nCDZt1y9hj6nb+yY/gieHsoTfXaNCTim7JXu5lWZ9Yf9CPiKa3k06PTzXsSXb\nYITOd+sDnQTWDo+vMakbG6YFSx5oUNIHfppVw6h0e89oHNOl0i5albIuos2h\nf61/1qqg06051F8FUn5dPsAeOYZ3+Nvh6R+0EaUBZ7w/2lPK60t04rNDQazq\ntBdP\r\n=x4ZD\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.10.1_1581688803681_0.5941254603423514","host":"s3://npm-registry-packages"}},"2.11.0-alpha.1":{"name":"apollo-server-lambda","version":"2.11.0-alpha.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"6a4789c4eb4a31c99957cead237ecaaf27712965","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.11.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-bLLSjbEg+I/wR6d/S7ohEAbOPfcu4l6oygMfthiaLCwwP4tNMdQ32qYxZJ238QIVqWLq2GO9L0g4Cka20mGNsA==","signatures":[{"sig":"MEUCIQDEqrgFudeRR8u2tCYXqUxZ/cw3oNCrAgG31AYmbwcDlgIgKbbyaBfU2RAmqqJIUApeyYjfXWlQZsBfmBXAvVrNlqk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeU+uxCRA9TVsSAnZWagAAOc4QAIdrTnDbnfsGDnA7XeIc\nKxnioTlRe6jIOY6dKDcnyk0bTl6VpEq7p36Wiw8EVkDnKA9E4RqMyo2EE91H\nnVJERcct3gHr9bwrSm7/m9eY6hvKoreLQM7SrUoRFKv51vjPGmgemKmYEt4Y\ncgrbpl0BqThJPtoxUFPRalz5Dwhsy8EMowAzzAEkHgaufU/rxmLQH7U1tziB\nplf6FKFOBXPHPtqy6LQcw3/gfapaYupM9mRnmyFtZC+lLzOSQZl4LnQ5EiG9\ny4hmyys8C5NYocy5wreNRANrKbdB6IipVGPljOMUPcDROb/AISeWs30DP5MP\nMU5OaulziDj80iPgsk3B3mpQs2d99+gPDVXXRiOHR/mNo3WgC01FOl2/NjdU\nScG53BwrWkV7Cup5X1URkL14DOj+1skQGT5gvsaEbgz2wB/dP9P5+Vy54w+4\nvLNgAtJRpr1+EJgUTMgGAaUoivQp9TZThg8gRuvWCsPZgaCQQ+KoBmIrBIBW\nxYYwiQoL48yK162WRTGttMbWXU9AKNJ3HvsunlFk5lbdyY8FoPvxqpfAfNcW\nyuLBvNuHseppAD4WlvNifEYENM2BikZU7NWItGvBKI9AUj9XiZmZpYZjxVbY\nJTLqx/O41wJ9cv/XJ3hphy6OBNZaniYqASDrXiY7i1DPF0lOsvb9zHL3cv5v\nVYGp\r\n=dPeB\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.11.0-alpha.1_1582558129516_0.9654284638457549","host":"s3://npm-registry-packages"}},"2.11.0-alpha.2":{"name":"apollo-server-lambda","version":"2.11.0-alpha.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"d28f545509abe9e87e9dad94c385e7b27ce7022b","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.11.0-alpha.2.tgz","fileCount":20,"integrity":"sha512-qkAPbYhzOKPCHrvoQybM/sHUEpnnM5sBCRIih2SBzKDAqVQAamorRosyc+4qtpqWBOa4yYXanwp6ChFR/VUx8w==","signatures":[{"sig":"MEYCIQDIKWCGOMpSzPHzUxEEu1JiFBgVNjogiDW7gjKlh0WTDQIhAN+gMbc6pZxNiT2bdVtQGCynRpDDXm6qgH6RQugiP9z1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVUUeCRA9TVsSAnZWagAAqmIP/0BdcXBfWKPC4u6TSe6L\nAfxORFzHXxm4PJ24cs12nxzwh9GaQBM2KGnNC+QCIOeZCMJagRm8yYQ50alp\nVIGO7qckOv5kroK38FGoHODQChW+MmQYyrulCE+2LdBS2PE7vfqrb8KxfzHi\n04TcHLapeFLQGuJbMf79nKbiv9DGU9OLQBn/naVYMdqt/9JPZLoliZjFgSXy\nR3KWC7gW9IJ3hekH1HKUEMMi+I+WV+VaITXpa9z3HixvYtsks15Nkat0OKat\nQrgKxQ+hl0TjIdjSr6XBpeEQAdPQMc/C/Vqzt/rhjwJv035fxwBvTMNAO66Z\n3L0rcRyBu+PXQ6tfnoCE/nUqBy26aeDoAyixqAqw3om9RYs5APg6AkOb96sz\nSVgvhiMq2a4xf1OQ7bZ2OgqgrcoHRn8XhmXHUZVulwATmSvHxnWzhA3fTPqZ\nxP9/WTP/HzJNlP/QUSD7AA47bZW19XJsm+7Lkq6f+2VIF2zTjypO9XYfxvEm\nXeLQn5zPzriCo2U8mN/PrbyIXzyK4TGhUcF6YIADedHLichvS088HX2bm4K2\nsJdp5rmrR1RXWsFUpe00BQRObBfk1WlHdOTOxkMFtzz8De0i41GZcQ7SyDQM\nnviFDHomej7BomAeQK7aXEwBWCS7Wz1tFtrUi9E+ziEXcCi9rocqGE7OFNjF\n5+NN\r\n=GI39\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.11.0-alpha.2_1582646557967_0.35809495703372884","host":"s3://npm-registry-packages"}},"2.11.0-alpha.3":{"name":"apollo-server-lambda","version":"2.11.0-alpha.3","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"319bdb85c1fdf7922ce8900ca12f59c7ba8f7c95","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.11.0-alpha.3.tgz","fileCount":20,"integrity":"sha512-RVeqfSxORe7vtajlvEwtd2SrS61WKSUwJv/L/gLtby0kwcEWJ0tMV0B3viqZKDEG5aNde90JWNldRi6sUDT1mQ==","signatures":[{"sig":"MEUCIQDyGPSGWPMJfmWNXFczDB9eqY6+0CXfyAdl4X3l+dqOWAIgRuFWTPJND5Vkit36eS8MlRwXtaGryWoun4If77RQTGA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVUtRCRA9TVsSAnZWagAAdJcP/0cNx49z3mG90m5TujWl\n9Ks//TQ7bwgbBZ+seKoW/egFyxD3R75C6f33RBxltOevzMuQ5h0LF/LdNG6O\nNZg/jcjk8iuX8Q3C+6bmvAWT3gbkt9LCzERnWp6//2SOoMjoHb3BM1ico9rL\nm+o9fjbRvvHJ4zluw213AvMAFFviDXEM26a6coydcfxfe26rF+KbWuSs7ouW\n1l/5zceV88t/cjPlGN+8kaA51hCBI/+Ywg7cUdYVNSwUf/c0yyHl+q2n0zY3\nf8pvVcfz1KGw+sZDGGhqRdqSGZAX5JsG4leO6OFFATzMFHkYU7S8PP0vH3IX\nZuPqqJwLnBuskaqLVOfSYKOpPNd8GBRk6kZuE5Qc2FB+gf77HIE9Goq/mWE3\nkQgpU9QrmPYmNaLaoaT5+noPDC7RpQ8M3bN1hPvdvVA3R0NBza3ahsxQbpQE\negzS5Lfm5TIh/yls1VTF4mnOH8tR90ZDy1+EM2bTl54oR7IrVf7MQ5UZNIK+\n1NLOqYMqaTl24xJPV4ygoBAXcE4Xoe4y7El1lkGsPCv9R4/YzO2UL48WxO6v\nq/67uMCfr5346nuND/Lb1zFPYDVuHxL1p0umpriEE7NfkI5MWIkyJIy7KHTi\nPaeZvjfdqdu44+sc0Ybk7EihuC45Ild7jB98sUPsYTj47E6uYaRt9bZIcZVs\n6/P9\r\n=cUTf\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.11.0-alpha.3_1582648145579_0.5325442916302903","host":"s3://npm-registry-packages"}},"2.11.0":{"name":"apollo-server-lambda","version":"2.11.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"ca3dce5475f9a611a61f8eef43a43bb3b450b24b","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.11.0.tgz","fileCount":20,"integrity":"sha512-44jkwT0vKsw8F8/ytC5vOu2mXZlcp1XwAg7QykhqLHi/jKvMe94GeTnhOgZPIHAZwjrEVhFQjEPJdkXw1ccm8A==","signatures":[{"sig":"MEQCIB+rNxWpApDBTsX/wng12hlvgX2xR+WO0y/lm784/ZZxAiB2qvqu8gOocUGH7nfXtXdy4/MTRYdCd9gsEW575g8ZmQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXpcdCRA9TVsSAnZWagAAZeUP/jmT35ijK03J2jnI0wMV\njwpYWzimj/NXJTluC3Rp+mpcpaZ7R7FrSesdJRndQD5kOWdgIurjHfa4e+8g\njoQNOGZH9rZkB5buJrGBaF8Gebopd6bMmYvLYQimC7/LrHhLbt2cvIsesCts\nZYYhWc0jJoo7Rtg5nG71c7VbemeMCu7WgZVvrls6ligBEGqRsAOTSbtBCQbU\nsDO03mxdkbnex1TYYhfrFiN3pPfBhk3eKewKnwKOOams6CDLJkWO85nOtPEi\nUbJj5Ep5SmJts8vBfo+ztw2QSUX9YC+I6AhKm7Hk158vOKcaMh+ApkaNsZAL\nGP4uU7QTN1yL/6F27KA+fuTiajj8ilr0LXTJfrfz4OOidSehGU7xRsHc6Bb4\nsXT0bcmMMwu+M5FtBqlwMiExShLmlYUOCXCpq+ZEi3iffWopJn9734INmlry\n4WWQrMOY+eL5Ox3UrXFuHrAXta9R/1k40R/ZAFzfl0HQIsOp4u1YjM/oPuBv\n5mowjLSbuwxQiCBzMPGO8Bl1q32+LHSaJreFqj2adXF2CAaEZRvmjyDFLP/K\ngINI5FCV0AP4yakt2VnduitTWlwAQp0s5QYcEfbic5HgfU+Imj9SebeDYh7t\n1eZSTFrre1upOhuMU7y+Q+FB1/cpy13XkhnZT0zGE955cHAxR8cv2swwzZIj\nRwzu\r\n=Zlum\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.11.0_1583257365389_0.6432763321343136","host":"s3://npm-registry-packages"}},"2.12.0-alpha.0":{"name":"apollo-server-lambda","version":"2.12.0-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"eefce08fefbd1a65f115f89507c003c4d7cd1bf9","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.12.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-OYpI3lNLHR2i4xcdPVX47G1Fp7TD3jgxKQQ9TEaP/yhOCcuOcO1dO1zVqkz551VaI97tIAHDxa0yYU780z0FXQ==","signatures":[{"sig":"MEYCIQDnlq9NdD+KnHg+RHDYv2g4KtpdrlepQ9fSZQmoA2sVhwIhAKnggerVVmFiIq6M5T7f4zw8S+7J88TlX+gWOmdOCFaP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42062,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeb9gACRA9TVsSAnZWagAAZ2gP/3zbFS5E83CwqiXnIOqM\niIA6v3d9Yvi/WIOr/RcsmuKQQeWFglxqzs8CqsGzAo6eoMYPTGAOP7unCEAk\nQoFICVy0YZ/AJ7QNHxSiPwxS7zXPUEmAdDW0OksdPRiWGgzYFxC9KzAsgfsK\nmP0/3AFpOjrNLdypz28RJi7tTzNxy9oX8+/He5Y7ncgEBaF1XGMEySP8gVNY\nKoNoFOg0QfmJFbLJoJlFiVTJW1srzVPeSRIOJQGfseQpqt3dzpavEfvMVbJL\nUmhtpY3C0Mcur8wjdAOdkBEobGazWyNiRujViWEzz8Ut61+T8SHNI8K3P1BK\nlkQLhLXHVcQ91szKPZaXb1MfZdPDS1vUn383+erHv4GSL6eCw/sPvdtUbJmW\n2V/Cb8aLY+Ub3Xewb8EFXcnxmBN9qwLZb6Szl9v9Y1tnjtKn6lAvvg8SaXQ+\nHIH5hVr2/aeYY0hQfl+pp/wZ393cqPp4gd3KfjKLn/ZYVZZ7aqjdBIVh+EiE\niBSJ1hBZ3766H7T0iiUFhZwpJFmGCjAJFGE9rKr8CFYYNi74ahJ9pcnp+h5X\nS6zU/tpCV+caD60tCEzbLDv4GQgTD2FslMlCSpY2TTLuL819q0N3dex4IiyK\nxa1gjBo3yt3rHTzaKugmIgt+V/Uy/2gBltFUS+aB49oTEgqKQv/FBmleWPgb\nTg4I\r\n=RYYT\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.12.0-alpha.0_1584388095624_0.24974929847517102","host":"s3://npm-registry-packages"}},"2.12.0-alpha.1":{"name":"apollo-server-lambda","version":"2.12.0-alpha.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"89d1c2cbc8e6e446269dd7a2580d626b9f2ae8da","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.12.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-zQy84K4uBwo+DV1E/4mHfE/LSWB7XdPOr4YbXlIqdnrwXFCgyoej5UaDSLXfcKm+SL68T4QqDa8za4AcLmY2RQ==","signatures":[{"sig":"MEUCIDUNyyAWw0M0PCcyuRiid4UWBI53DukNu35v8BpXh1/sAiEAvg/by+7e45UA9LxwgJxCOP2eq9Md+yyXBtD5N9oc8CY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJecmO0CRA9TVsSAnZWagAAEsUQAIDUMNseI50o/6pIRiTK\nWvuWL46JK92EglW3J+5Y01R5CO/lk9n7iuQTLjAB+MUDkHqYeVLwZOnKUiE4\nTClxPNrhIa2Omn2C4g93x2GrydIxdQa7rOZxOLsHl/IRS7SoQ5nMyCDWs0OB\n4ONa2JtiT+G+jarjYDWBdmaIfwTk2xMoCE+xsAJWp4M0/ghGf2yiscVeFHix\nl1LTarXvQ1wjHShTAtQd3U7qp135BF7WdL1xs4pLXcN39iKBli1mRpRPu/2p\n+WNic3jEY3mQVB34FPpwkr3K/aRtcRTokpnY8diPcH8axU71Xj4CdIiR+9Pf\n7j24J8s6ZlX8HNH93HogvqtSzvz+mB8VHifywT3zxZBuyNsADHG0ixaQgDc6\n2a5Xefm4aofQj2aejCABkNsBHoEYX6rutMPS7yPae91/RR+tDkSaQvY/Uw/6\nZ4V8qGIrAgksYfqdjs70IxCEcVO8bBJ8EOrCNbQE1nS6jvgapZgPmT0IlZ5t\n151M0/lZz/0UTWxkqW5S1jcosUiXSgZIhJkhEKkuOLI4d9K8i4C0ebAt/tjr\nEgu1bGfrRc1pB9ie3UcGR15Esqsk6h1gOvozyuk+cbwytSJxClrfrmeLLECF\nALwWHWyvGFwXXQsztwW8Hi24aA8TfnMqFI6HApAkIhGJZH5KVMo95Ei+a9aq\nnZF+\r\n=MsS9\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.12.0-alpha.1_1584554931897_0.27787359168612324","host":"s3://npm-registry-packages"}},"2.12.0-alpha.2":{"name":"apollo-server-lambda","version":"2.12.0-alpha.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"867544c4b60117a70c6a1a2143587c38dc875fb0","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.12.0-alpha.2.tgz","fileCount":20,"integrity":"sha512-6/iqv38/tBbZtec20Rzf2slvG/BOzIonxnSP0UtkcldOaTdC1BlvcaoDaLfQ5etL4jkMq1o491RBS81+tSJ8iQ==","signatures":[{"sig":"MEYCIQCZQoZtfLJuhK7CrXU168ldwvNGKmQO5xV3Ns1tB08OZgIhALXWdHKqe3yL7PcKLjQUbV4GzN674vtXQWqG/Et1SHSP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeeMpxCRA9TVsSAnZWagAAj/QP/jpfSeAJXrZyhVOiCi07\nU2Gg8+fiM+kAVIaWljLpZM0vYRmNRUH0lGw2E+2bFPwN9TBDuwIWngGycwYn\nqW8aQ+/FSW8W9aRzKlW+kMXU8hFFUHO3tvbnvWjIMzXpRBKmDWtuaDeV6+0I\n6r/6M1YQUYTuMxeIJWZ37QjriAxFqzL5RK1pPCdjvwD0emL4SJt5sXXzK8Jd\n62A3RM2fJLzmlPnMJVAXFKyl0BZ6xZxytPkomAK/Ek8Rp82iXKIm1M1WBDVg\nUT3mdobIz93X/UsVjLZJbyzhKy2MjPRaaXulU4wRDJ2neYKacdLO6XsDu1d7\ncGGOjQzgO6E+p9dF6CALuZ5bFR3hegAjFZZLJ93hP7/dcFTUJP211GzJaTeS\nNoZyX7HhMG6lNzcvo4pX0OLtqt8rYSrX2toGnT0lsYRmydyZwdznTVgVr4o3\nf8vFYjUGnX9knh7HlMRw4CX5F11uhYxY07OL3hl83XMpi3sUXbbApUTvESvj\n5Cfa/elGx+6OXYaPPDSvGwCe3aWR3yLX7Z/H3NYDeLpr+mTQlePt8GESIjUH\nX6R/mYh2TYqMvDWXCofdPhMr+iUwZwlLRoRqylxJjmGyyr5JH7lUfm7MMgnH\nh9c6ROHVU3NLFWG5GxEHo9dM9y0Kvq7rtib18dgwMT3J+FIIoubW4hPocLaP\nTGCI\r\n=EOPy\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.12.0-alpha.2_1584974449081_0.5059963855034741","host":"s3://npm-registry-packages"}},"2.12.0-alpha.3":{"name":"apollo-server-lambda","version":"2.12.0-alpha.3","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"a6f050bc0c1acb10e47add4487ed34d9d15ea812","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.12.0-alpha.3.tgz","fileCount":20,"integrity":"sha512-tPWvsG1s9khICzjC1xa0Vic+aMkqKwZh8jXYuaykNGWyBPrT3MBvqVkycm48MzhwGL6XkGCsA+7UK0S+OgRwZw==","signatures":[{"sig":"MEUCIFHOfpInsptC/rR7VZenvqE7mYi4rbdZA5BbwBgOfeXMAiEA9YOPsBKTkdUWDzCqDQcWkdnFOqR6bMLNUT1VTXh0Jzs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefKqYCRA9TVsSAnZWagAAuS0P/0yQNfPP1QqJQZG7Hhyl\nCie9CAi/Tyv5garr4YyzIZqBgh1BP4E6D87gzDffO3Yq4sOoMTMgP5fr4X9a\n9lA35zTQafwI38zdwsMX7qL2m7omtmMIrSVt6ayHC1xPFrfGSFlHE7zY3etq\n6j46/KtkvcN2+7424o+4o63RAn5IwoF3u7eqJKtpddJdRoQSLnkH1vbG1yBQ\n7oGfoQtLZbwVU5D5KY1HKoHX08lMg80TcRxmfU8pbmdYR66E9oylxGVWwF4p\nkbYZskrqFiym+uem01+iGTYsekYMPsqqWMlAaCJ24i9z6IDpeY+Y01hwJ8lQ\njmaOkqFU06+wfuBWOL6XTLNphZypH89YTdRKuqbPMAPlfVVVtLhBxtcLr++D\nCXxBxLaSUv0JUd0eO902eRw9t8lFetGKTv2YWojtFTJ6/L6x5JzCSsYek4hD\nOwmR9SVuUUPjK4xRfhtqnhprthZ2LEuaUxUu2o9t/nWW6O3f6QCDlfHilHHD\nCgOkBFRcbT/tOf+foXQ1WI+rQDG7KRGjhq3BTKpoBAKklmbWG/MqxgG9mCGz\nKO0YTBYIf37UCB6rOyIIPSXfzTItNp61vtoI5KNotdXyXnzTK3wmDoYGNWhV\nC8xg/jjC78j3vZGjh65mLVp5nHa4RYvowJXyJlWumWs8YUGmLFNDS+3s4rjd\nvSnR\r\n=QdH+\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.12.0-alpha.3_1585228439629_0.5686553380764274","host":"s3://npm-registry-packages"}},"2.12.0-alpha.4":{"name":"apollo-server-lambda","version":"2.12.0-alpha.4","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"91df8238c67ff44692b9524344d96a2dcb482a4a","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.12.0-alpha.4.tgz","fileCount":20,"integrity":"sha512-Y8+ZnTa4nEnrErDlHzssPmgnIOhiUzgf63E6LUJv4IG8nUwcZ23HRHFGz6JmRTouEHPpCjPqMmabDrNB76+FCQ==","signatures":[{"sig":"MEUCIBpIFgn1rQo2VIudwQYso3/yWM25kne5nIQ2AXO2qNX3AiEAkbRbUOrfeBOv/6dlaG5Lm42Yjpq2TVb86es8+nSt02U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefLQPCRA9TVsSAnZWagAAJxUP/076gPotujmKPdmB6v2B\nb/g9ASyZMo6rQzs3OJCaB9d9jh9JJ1JKkUAsCb6X4+LSOjGvo2c2ebl+AOUn\n21/6+mnYjFm3RyCrnw640VO3Xy7vg/tQmNLuI3VWVELS1U5Bf6Jp1kXzjdGp\n6Fv1F06Y9vyb4kk5CKFjONBEaTeBg2bgLYsp0gQ9cKtS4KD7wkpvVvSjUrc0\nW3iUG+pE52wk5fYQ7vf/ym5Nuh50AnccWInPTmnjO+3MCz8o7jzCRUPVYxKh\ncULaRxVDTVDecrIxr3woJqTH3+NRcKvPZbts2iBmizLEQgstu+jyBeKBkdPK\ntQdtJqTaoj/I+TURqQyxwKICkUnntlnM7v8ThNyuYVgi8WgxLoj4gRPboguC\naWWVWxFZXdxY571OwRNL+RIAA2NDKWIc9Wuu5ZwmzVOXAnT5sOm6dwI56ZBc\nMS+j4nIEq/kfWJOziS2znmepfwkVOlAU3kAgsS2OY3Tiw2/Kjq6JOYqex+ye\nK8tyVlj6v1oBzV/8A6O0PUWwIwpOxzLuGf0OCGpl6Tc6PU1Bqi6AukCElS3P\nStIXjK1StcvRi0S0cVBqrcLOPu5Wq6PzDVEwpct4gPkKBv+TQEW7kmOnJQKP\nBympQ/OTSTnLd/auc6lKps9D/Sug8Crp/G3a8yRXdKJQPfQB/FlJOMn7LViv\nO942\r\n=6uqz\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.12.0-alpha.4_1585230863072_0.9318433637348607","host":"s3://npm-registry-packages"}},"2.12.0-alpha.5":{"name":"apollo-server-lambda","version":"2.12.0-alpha.5","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"418fe13104e08d75a45e30a5b680d0682b03b0b6","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.12.0-alpha.5.tgz","fileCount":20,"integrity":"sha512-yK8H8G++jaCzH1YM5Sgsm6I1Yl7oT/IoO3AxK3rdYCmsqCHb+q/F6lrnun144LcD+D9YDXGUZcmwW6mEzD0NYg==","signatures":[{"sig":"MEQCIAZV1lYs+/0PkRX9HOFVwxMXR/HB2e9ZS//xjB1ZZwY1AiBxdUjPn/Bg+EjiochlRsNKnJ+9iPI55L0rt9SQIAGOPg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42065,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehnDUCRA9TVsSAnZWagAAO90P/RNEzka+oEYD3kIH3jmM\nU8qw143LNNMWKq2EfVNS96tV9rcVtsnGJbnAU/ncHDrlkiAoKf/h6j7Zg2Zs\n0NUOLSwochP0MfZmyG6yYdgjSt1da6YVuiBLSYOC/sprruAJH85BQFhnEspz\nXly+VZ4Z/VcuBkN91Fqp73DVNwMkI8P0nZC8WYmY6mBT1l5xD+MJQ3ptcMxO\nZ4qX+I9ifJu/qGJD624K8z/ARR82cxiU0vfjO36GjeiT91uRxrD0hlqBRpUu\n8Kzac0JwAzUFlNBK/NakKB+He2EVkLq2+r7r65OcJPRIjsqUQzk5X2JEqZ33\nZAimJx77hCrlT5KMl43gqE3OteBHPhAOpAqX70TQphRnurmLl6kt6oyRBkmO\nY1/Jvw1nGcS/n44qUISP4sTRtOXOAHmmINaggGdYuNlhbdujGvDbSnS5GsAC\naoEypc9rvVVjq3Ll324gJCgi3pbU1/IhRIQzqIs2beZrEgsfdAf4WOyfRAV4\n8Zgp7pO+Oc5nVul5zCFjZrPETfFYOSBgt5AOoyl7ScBUcW4T4MrbHraqViek\nvvjREoWyUujUMl2G2NDQkTflArUdPalzZZTXNGdpV6c3ohAUSeBMhohqkBB4\nsyL3gJzaBifAk7oT7LPTvvpqfTnEenHkA4CXjXhmvpWCzB1s6Va6TbsBFLFm\njC8u\r\n=oce2\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.12.0-alpha.5_1585869011629_0.20494291870334425","host":"s3://npm-registry-packages"}},"2.12.0":{"name":"apollo-server-lambda","version":"2.12.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"3f089cced4b926ccda4e9a014abc3893c42e45ff","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.12.0.tgz","fileCount":20,"integrity":"sha512-yQU1DoYcyiMpcrJJc+TbjqVUBbSXB6Ch2d5vowQSZxLSE5zqzyFDUQLwHwGw1GzghOF2jauaVRt31l/TKy0qOQ==","signatures":[{"sig":"MEUCIQCeQ+6FI7iPTbAYd4hJlnaKO8c4fEErLvey6NPUx/kaMAIgNUY+7T26ZfeR5vdAlbYyI/MUzgp02Of+EyUoYCvvEZ0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42033,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejMg0CRA9TVsSAnZWagAAutQQAJCpOmm6dUQPST9DGDwX\n7i1tBwuFaaE4dmwqHKPXBqKWOF88E3WbKMrDaU7xZDHCO7XI6iYzlzVqtwhL\nEKv9iFWGvGe1YKXzEpNDs6hjNzSBiEmFIAuXdTzkYwDRuxNNshmWvtlBUP/g\nS/gJP6SowKOnGc8mzimnT87kyvgh2JUoin1PvJyIACyNN5FrOqWWlufcD4ke\nMo4ZGXILvQocZoD7r2oen4UzjQwI9fCCDmEEPJFHKpWoc2GYkY/FWqyyvi9d\n9YCx9wq3b3MAlP9BO0YjdTr6+VC6zD7YyJiUv6InRwvfs90ZmXO9F3HVoWz7\nNbhV+9hZDLWglbtXXBGcZMbGUzr1uZAsbsVBtGA9ff3gDNYLZ33TxxtvDY5F\nskyT7iiOaE5SgXVq/rl6Yx4cFAwPeKW4jYyDV5dUUTIOm+XIR675ysG9jhAX\nxTr05ruIhkBMR+YIoVc4beTl/CbgxZYuJkpjLSmibt1JGTzXISVXweHvrNgl\nQhalsC4YG8VMwerJ4rY/EfVTg0kM7MsGGN75f4850ZIoVi6577jfUPMlVsvu\nBj+11MagoCbDTO5vYZnce2utMeH+fZbGeWesPewZSPrQQOv2c5Z1D/cKLzhd\nWOAHL4wCh5SujrEhdqoWGm3ltvXb8ly105wRZRKw0Pzt4n0F5FAMLKriYJru\nLbw+\r\n=NPFt\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.19.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.12.0_1586284596178_0.5709357023269321","host":"s3://npm-registry-packages"}},"2.13.0-alpha.0":{"name":"apollo-server-lambda","version":"2.13.0-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"ce87320374debbc1118eb90c18bd67a62f99e0c4","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.13.0-alpha.0.tgz","fileCount":21,"integrity":"sha512-V7jw8UMtflnp5u1/lW2Y/8NniwGnMsTR2CtspeZmxw6z7uCypdVIKHm1dT7/ZHyVejmwa2HWFxmglfEAnOXzXg==","signatures":[{"sig":"MEQCIAyCOLNAp9EvCYJlCwzEc0gGGB6T5rFv7d+xCSe0g+1tAiAZhIDHcdX29PBmHooD6J/WcDw/Udvl5Zai9koo5+/AWQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":52373,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJekGNACRA9TVsSAnZWagAAOhEQAJJIuN+Oa8JYVlEicM+l\n7PHW6NwWMtQYWpuGRcZvPjtwPwADuLlpu6Ob3DaWfz0hzTuSGE/9bdIJOzsH\nvPZVESGmVHTY/+jiq2uJIRyL53BskyKakPkaeYW+GgXOUCHNMxU7JaQ9XXia\nW/bTuGWBvhts+acKoRhqpGKxpq4JAvL2irk60jELsL+7v30hRAZoC0UJYgQH\nZg36PnWms0JkkXUslSf5NTlzIgr5YZGecCkDEELAG9tVQl7dSRYt7O0o5VJK\nNwM5K13LKlG2okRKWx+NeoEGEchowFvykasL1QpKVLFQd8Oj0NlfJ5LfCRrt\nJ19QvYKmlvwco7+D8ZdTD+NMW56jKFoo2ZziGefDRKQtcs32Nti1M5DMIdCA\nB0ibQkhQTymo1ihGzsVL033hltO8AvOdsLGO9ZB9/5LD4eCvK7pRAu5PeoIh\nDzttO4N5xMPdRZmVA+KX5lJp+iEH9h6Et7dGe9H2RejecD4QN+5it4pgqTPk\nwPDnaO4X6SnZirRSO/3nhmyi0H+zYJasmDFYBBL/jgAe8NF/HOgMu4fVwLa6\nEe1HoR9o8/E76Q2eQrXr53RuWGFAVoNr8bTeqf9D4bf92wXfY+uNXmLn/Acj\nqXtuS14NQEGEquJIzjqJOVS3ZkM6XbV5Sx5czsEm8rvmImuEtAW+XTJf5OfC\ntvCL\r\n=mq21\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs8.10\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.20.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.20.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.13.0-alpha.0_1586520895953_0.8424037206957786","host":"s3://npm-registry-packages"}},"2.13.0-alpha.1":{"name":"apollo-server-lambda","version":"2.13.0-alpha.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"7787228bfdc66c09692624b802aee312e60f0845","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.13.0-alpha.1.tgz","fileCount":21,"integrity":"sha512-ySljq9gJzCsK8aovM7cfFjCCXdWpiXYco9jLpysdrRgvR+ruE3EjdRmI05E8DuqpdZSEZvAGODMB/qXlw+1G9w==","signatures":[{"sig":"MEYCIQDdNG9ON+XzIBZtQoOAtHWV3wACt8HT/KorqAOVgXf6EgIhAIikhn/m03aQR9wgO7o8idOksJUcWlWR6Ht/6sMbfL12","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":52373,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeocTNCRA9TVsSAnZWagAApxQP/1swC+a2Z4u86wtDatZA\nIrifoSznvrzc112Bjc3vsF3OKR8cdEwZYy847axUcXpsN0+nFY1Uwx4zz5gr\nEgYuIMmygHt5jZ6C8wF1RNhxMYMJb/j6OtwLc7xgGYvjNEleaNHK82WxfgJP\ngeXAp673Lmx7mTISSZ90XxrnoBQ4obWLl/PseE7NKnHPFhb/XTPPj9t63az+\nGV9bZF3W+CDx9Mvnp/uDopWizfuSdqFERZr+stKbue7+MHHJ4L3d4k4ohs3p\nQw+4sZXWGW9LqsRVDzLiz2bEBQMtFr0SKDtFtsDktCvBMqBqut+lhQyRpBAK\nIGDPcKevXidzvw233eEYPBMDjn8eMf47nNfGAckm8rUwMKzGC6h7SZlOal5v\nyAvpPbTdfhVaVbc0YzJv3oXnprw8DKc6NY6yYGBsbMIXVVs0BUYSJN7Nyt7q\nzlvT2dDUQUITOXBx198xywz/1G/JkVH3b22o+uVOaLoTmMtw9nWUbw+diMBj\n2/EDlDFTAUEc9NGGILM44Inj1sOT99n7/oL558fC2LjiChMKAWxX6OhI/OL3\nCtOHZ76xZgbCthNLE1qBOk0dg3vveu5nrwHdGTAIzDnR/ICochfXN1juwfyY\nX9yqRr1/PoOkggpJKSKKktaU8k9zDStjcrRYzTgnN3f7blgQxh3Tve8rX4OC\nvgZJ\r\n=16Zh\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.20.1","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.13.0-alpha.1_1587659981352_0.7359321025851602","host":"s3://npm-registry-packages"}},"2.13.0":{"name":"apollo-server-lambda","version":"2.13.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"bb0b195b9e1eb516d051b3d2194086e0ae56cd4e","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.13.0.tgz","fileCount":21,"integrity":"sha512-L7YUwnDbu7m+j0XOj638wbNdn4aNhinbkwA9ojr6ZhHzSIYDlZs/NQeqhnDsZreACb/PPS3o4gJbLF3IoSIkbQ==","signatures":[{"sig":"MEUCIQDiwN6Qf8xTlD/jrRxv0k/J9jjuEqYGF8sfH26PyXC9mwIgFk71TFZDFfcV4T+3X5+kNK+7mWthNgbLLxfCY1D6CS0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":52341,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesCt3CRA9TVsSAnZWagAAKtIQAKQ4fBx3j8XuhggFM4He\nmIN3TlkZs33bessy0orVf/TYvBlB7AiDpAOVn21es9v+m/9+2j0RzTIdpe7c\nZA5UviaRZVFkaM2hMjEzBDi0y80soE3iXkI/PGeq9LnNg170Ngak+RXK76P4\n0HYEnyC6ZjSO/ou9sfsG31NYMFvjq0tk2YtNnhJgHzBY6PklKMqjPi/eTUu9\nZivQP886sguje36v5mlkjAwS8kKtzlHEzgcGyB/BR84s1P1A+BCjzloE3sic\nPf4xghFD75KfUZcdCVb95yMPC9B318nVxHDTRBp6xPq5KgwP3v6BdhtgH5Fe\n48IO5DQTAVa1iXdCxZi+jBE4S5CiG5CS5PpeBpB9PI1rtIbYcTT+kn0Sc9L7\nYqgm7rJ58FIE2bUQ2bhREU/CFz0rRrefEDr64rCVm4o5acceXuWQ+HU+YHtA\nDZJlZZXOLzkz4BGfdlRfZB7T6qo5YbAG3JsRiJmyIF0L4DwZPenKoV9bh2px\nFnuos8n02Zhg6IJmWZcJ7b9kEtL2PViwSwFBSWt9VvlXf7B0ITxfLUaHPs8o\nA4BGqEDZlHEebVVEoUspCMbFnchPZjPwlh6Dd3MEAPXFbLEDBa7ktF6mOElx\ngXHYvU+ERIVCfI0CrovMMuFarry/a4JvacCL6LybVR0zqkWn1vnDJm2JdRqR\nB42O\r\n=5X7M\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.20.1","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.13.0_1588603766497_0.7791372255609099","host":"s3://npm-registry-packages"}},"2.13.1-alpha.0":{"name":"apollo-server-lambda","version":"2.13.1-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"8dd4827396da2c1e8b69741833239caa8a56af1a","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.13.1-alpha.0.tgz","fileCount":20,"integrity":"sha512-NauLz6ofZ4aKQW1zTZ/zsXabtPR4h7yvzEAJdgARthxBodaviS+dXQpu0jFH+7yoosFa1MwpcmM7SKyHG3TiJg==","signatures":[{"sig":"MEYCIQCJCHq+LWMdtubxDlrWSh80eNT2er0osSboauLL3JI/RAIhALBBwjtTINECMZw2xP2AFwH+SdoJSLwt7vglIyt9PnNL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51956,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetbfPCRA9TVsSAnZWagAANtAP/AgHiMegbeCWu9fZUOsH\nXv/5bDoDJO4DPE2IqYtIBzBagx44gJSl5y0YYI+W/LiPrADiB6mSIK16omQ0\ndG26hk9KZZCsyHD/OgwQoHyLq7t6UbIIrotUIib36mgpeADHhGN/5jHTuTVY\nQSGb2XVbJ6YSScmYrJUX8MbnJrkH0irYRmA5Qkl4iZ0q0xXYOL3+4JfvQDCo\ntpmnKxazyKfZZbvXUbMQ1Hk6qXBKSAysEk532Da5ww/6LxOh/wakp2+o8c86\ne8XcdZl71YqY3pgAWiaKP9PqQ2RV3COvaQt3IMYjfyg3SYP7c96p27FDm640\nBTub5l0uspQRA+/Xrv5AblaHdL38OSe81ifCrlWR3v7awjtUdPr8mUPLuBxf\n8eKSMwaYB3dCdjg8yVwudv/dqJcj45DPQ8zKUrNuTY+s89DIj5j6x2Qh1rBM\ni2ChWnzdD8H3Z9qP/JUnOOBkpfkMDhByc3u7v65+C59rKELiyTQHoHEWYEtD\nDr4JRUB+Os8elW2s6DjjGitd/XfUCtAmss/gzEdTpzWO+2cPrqUNXLgr2C2Z\n8basWHj40ruVJIu8Ad/va5umHwWR/KwIqZxk5OWKh/hw1ppF5j0neCTUVqfU\nXC4smSdaCy8Wz2ejwD5qxNJ1Lb9W0gqBqCyMgW6hHkEuOKW3th29tpprneKd\n8eqx\r\n=Ql/j\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.20.1","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.13.1-alpha.0_1588967375042_0.707022278690767","host":"s3://npm-registry-packages"}},"2.13.1-alpha.1":{"name":"apollo-server-lambda","version":"2.13.1-alpha.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"a2ee1107c114f5fd52120ca60d1f9a9277c3752c","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.13.1-alpha.1.tgz","fileCount":20,"integrity":"sha512-MrDgOO57GQf7nCf2wfDspwWOFmb9U2BTi6+ttDnVdbReovF0O3sX+FuHXN3ENTKw7whBqaMJVLhlJxNdhCab6A==","signatures":[{"sig":"MEUCIQD4DVZ7eGv5Iht3xIMyQ/IGq0iq1nnHW1L4OOBApjrg2gIgYbfyt3O60IgvKR/Cr7FQ+YR6sgrqp5wGTKBl8lvH0xw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51956,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuZrdCRA9TVsSAnZWagAA1f0P+QAuU/7ZKcsVoq8cpwJI\nA2601RLXKDlYRs1642N4qE9F4IY8YzxaQ4YvFvWs2Oqr7B+uLcQ8twFkDYqh\ns/ULHrdEZWT3K1xIHT4dgK3sVEbE/GJjQY0XrFZnse5/YSpPvPL5r9Y2BmsO\nfsO2cIEmxiCmDFi+bZS+RlzQp6D8DvXJcEKwkb7V8mQYab4myKs83EyIhjJL\nRt+GzFcEHlWBUun6s9ubJZNA+pFXk07E4D+S288TOfJKEJDYELz5ASCwz2YT\nZn6qIvC6uLowfP9Jsp5jSOf2WYYjlxNG3wJ+GN+U0VReDywZvUJeuCHyUWyr\nnISKX4B2QA2B9betRQ55LSfHm8RocQsHQBU1xHSsKHLcGS3pqb8qtfE/m3Za\nv464CFgiBptk/CgInO3U60uDSqpuQPFFZCN9/U6MJ3IZvDe6qgreN7vBLS8H\nbLvFhXws5uf/w+DoAmF+dtehP5YcDazOQ4tLvJzZIct7o/0kMeq0SATzlWH/\nCcjNTJXiqpxqUKIUPJ8YOALXmnogS4Z7EN/NZsVe13ZJSNq/JD6s9uxIe3TA\naH0S46D3ChSNucaTHV3m/vNGyH08fWg6s7UT2SMTr2HpNpu4NMbVicsNaGU+\nVF7znwsjMB8/5Vm5gZ7pjSmhVufDOwAUL0eZO36KlM44R1eLsG5HXNDQMt9L\nboCK\r\n=FQUO\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.20.1","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.13.1-alpha.1_1589222109476_0.6335658805487381","host":"s3://npm-registry-packages"}},"2.13.1":{"name":"apollo-server-lambda","version":"2.13.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"aa92416f7634da76225c08c96f07b9e7da4682c0","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.13.1.tgz","fileCount":20,"integrity":"sha512-8EvspkzRrXjGYi/c1UD5pBzhX1VYu7o0JRaSuFJaqe6zXxK+jjp9e4hGwccvsf/Tj3lZLT50fq4E2SNZ/wCSvw==","signatures":[{"sig":"MEYCIQDfIPJX0dg+AWbvu0vBhJvyLOJ/fdbE3hy2ZvlVUm6MUwIhAMnKZM3VupMIJFqKcxs7Ybd3401aCKy5UJx7/04VoQnJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuaQ0CRA9TVsSAnZWagAAibMP+wfwvlHcrVNLh7X/Kx9y\nRvXv0RU2gSwiYir5b+5AWi/gpgEmjTMidO98g4GVB6p+JjpTcNauk2Usjlle\nUK84lAc1tot698jTc6k6l4tx6XANJ+E1B0yUG0zgb01NlMjbdD5wDV4j57GY\nk2uDOwxNUuC/+KONi5s1cquftfzwM2Jm1kibpnPpyAamOYtQBJRelUe6eCbj\nhtN508KXJeZuiFUyRl4So/SxFXIjtMaizJKQ6AQPBWgzktyh3Ksc0vymvvVg\neEygO4SLKnH1I8mdR04uHCGCsFTKYI2mI8nRQHFfRB6P7HIav9PA6WEaY2k0\nXtXJOMrQ4dPUG/FPCHWuHlOhlgv4RhhovId4j1wLtpRHRCkE6FyXd1WfCjsU\nrw4OS2alH6KcPekPXAiIeFlfrO3No/DmNUvqU+qiQvjanF75CsSbrOTW7ueH\ngUqkr6E649O0JKVbFhVkVfOm1SResQWgJtJPBC9kQZTWBjNhHA8gDCOwfu4W\nIcdKQdwPUXvWUPjce4U3qHKwwwVC7Bu583NUURfzW13s7TQuLTw5XJv0Fa8U\nkD6qKdb6Gkj5Yo3dKsJ51zLbS86LWKARDev+ZXMLqiIWDQKKKTrK9weqaqpE\ncrio0Q2jQCj2W2t/+IJkPUNI3gMO8Un3U0wj3kCl/hJ/1/BVT/qrLfHFCrPq\nKfgR\r\n=2Ltc\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.20.1","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.13.1_1589224500447_0.9616680903004304","host":"s3://npm-registry-packages"}},"2.14.0-alpha.0":{"name":"apollo-server-lambda","version":"2.14.0-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"eed95b04ce282c90352dd8be4144d5e78edd6537","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.14.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-4L8kp/69XnenPPgtd9Byp7DsQ6q5X+McAGkEHI6HVGl0CVLWEeAqvmD0sXW4/MuAEm7163ryZbcoQX3NJnLRMA==","signatures":[{"sig":"MEQCIHObgf7hTKVh0ZsIV6jaSaCROex9D6fYncLcsISYWE0CAiBLe4M09ud24ve1yFkSdY4jM+zkf0rRzn40LoWtEXPtqg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51956,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeu8afCRA9TVsSAnZWagAA7e4P/A0PIxQVoMcJR53lBVbq\nxnDm2vCHIUL2t7V58q6KMhHCzMy1mh/8I3JswHE1kQMv8O5gk6QAdDDBVpTR\nMHULIBJ9Jcnl23Bd0gcScxTPg0XeuH2bCes4+7ypfXi/0DtVQmOjcLrxl2iL\nMavDLfgHyT0Z0UrLqumxlxNrJQMmKH2UbHtDQ9OBa2WIzUW/K1Tpt+qd1IQu\nnTLTKe3+Mne+87snNPiMJcM/JjaTvc49322HtR5oME0F0Y//HUkJ2qncSESz\nHMXuk4W3ng+wfl1i6B4sawFMOdVCd2xpl4hDHI+Di1CJxzAQqKknZPZ4VKtb\nBit8BcUttCGKHAV8KouwbHcHQvePXImmKNXbOuAfu6GfMmR4KAIKALt8intw\ncB6JLvaQtX18kekpaXA2rhc6mf+ivGOEgwb9xCr9f1v5/4pWCFGq2uQczFRG\ni//wgM2op91muIjH/35JP1nOG5Gxor9VcxjcfKu9pXrIPbB9egQzLW2zy63k\ntat6ghAxsImdwrqCDIPjb25X0O0r7Dd97rlVQUMTmngLBVQgC+1xeni1ztcT\nfbp2jrvtZjjkl4CF7eX8xttkq+yLhdYtJUUe27mqJHOrYJ8G/b2KUife12ur\ntr9X8TdYvtckg4DnBwcqcNOjZUF1tsWv8AC3w/ePCLvg1LNi6TQu88SkqMjE\naPWX\r\n=QHwq\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.20.1","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.14.0-alpha.0_1589364383473_0.8196329228027719","host":"s3://npm-registry-packages"}},"2.14.0-alpha.1":{"name":"apollo-server-lambda","version":"2.14.0-alpha.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"30a7b9ed3cc54eec122f8c53f9b5630a37ff9663","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.14.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-Qlrxu6Hci7+BFdMu4jSXTHfDiEVsPmFXyQ3yyLk0XsNRoC0sNCzKdWhczisPdNsDsRGPuVSu5v2j82mKyREJmg==","signatures":[{"sig":"MEUCIEFafdJPaRUlxaCywZtdUQ71N73QEATsXk4UdzbzE5gJAiEA3LuEFt6zyXfdoFEQeX9UzM2RAx+ein1mh8J+zzIZOy0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53385,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJew6z0CRA9TVsSAnZWagAAuY4QAJ8iUganp04Tf8XWUBA8\nkhG6GcFjWaDCq++u+UjDc684i4N9sjl3oFemMPLTzM6gX/v8uP77RoOSxKq1\nP5dtuPAfmusdOxDuo5xnOYUAnxc8jMKL9J3dQgOdbfy3RdMryDH4ym5ohKgw\nJliPpDWmh+w2LgwZijMDosfsNDxWrECWE+JA/qjdHnmBIIRtC0djVI8ZMV0/\nkoM4NKbvRh6Mvvu6xQBUEWrLZBYltW86d0dIVssBuhkWDBxi9LwV2n4CDvuP\nD3w7C4BYthVqh++YcPQ8mYononAmmQlD0i+H85/uWd2LwLxubOAoJd9hMFii\n/A9QQ0uMppvRjNf8MYl2i3ZSs7f1CpfHVoghpxugFSnrL6gD3irSfzSnz84t\nkkFNhBjjiPi6NuKmB3MUBe/WCRsHdYM3hTobZubAOxUN+if19ZwtL4gNfVel\nK2p8uaXg0hn0/9fFBMDJcMcx0oavzI9mnKsoKN+eSECxftO1MoVbKunBh1fC\nppYdh0MKVVNCbm7HjQ8AkrTm1GLhlpyBOUuWq7oGtJdLSabQlkCQS/i+b+wS\nM6NtILLTnHGzEPAvm2cfzyn3NU4C6Y08xAbdY8U4MEt9dppKyFfN0MmdHSg2\nkq/VYE32udp4v8Q5B5/Vldo56qSZVPB07arotqWVrsOiayc7BPqWhyBgVzUc\nE2wG\r\n=DFDu\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.21.0/node@v10.20.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.20.1","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.14.0-alpha.1_1589882100182_0.5488612391458956","host":"s3://npm-registry-packages"}},"2.14.0-alpha.2":{"name":"apollo-server-lambda","version":"2.14.0-alpha.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"c52d545a46867912496da3460235b30dd792d0b0","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.14.0-alpha.2.tgz","fileCount":20,"integrity":"sha512-AcYALO7k78rpQmcg2afvyuWBbEfK/pSaA1g2g16uIWDEJFkmpA1K4//WgnvmPDnyeCt8cOhfzgFlxBPSoqrW/Q==","signatures":[{"sig":"MEUCIQDywbzXmMwyEXOWgP32XJa4cNKVs+wu/tzQAOnLyOVuRwIgMe8cVAYC6W2WjZ5mIA81LiE9wzcQ8MCRzrfKgirZ+4I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53385,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexUDbCRA9TVsSAnZWagAADtcP/idCbgntsFQ24eNxtp3n\n/fMVYZ4zaZJB92m6Q/0er3dG9KAUivJjOTspFOBo9yTOCM7XH8ooOK5EA6IH\nZlasF6s+0yZkFqT+Gp1PrhrKArt93+k/HnOVraNL0W6HRIblyNdFrCvAKVe3\notMGI3IxSDsuTvjVyVbL8HUl8NhbJEReO+BLOxDeZ0kwgcHMua1zhqJt07MO\nij8XJLlRC5YndFpxpmnBAuiM4H/W/SxhRDWBTWGcpWTWZtmGcDJ+LYHzN4aC\nI89WL6CtbXnJLuwKB66B81yq5O166JX8ykFSA3wcHlX0zwUAJf3Hal9+v05M\nwlRfu53CjPMKHv8bT1Mp1qFKV+HfWhmNhEfpLPhqCYXCTZffkLzM1F62ThYT\nyXUfnSk+7nniyWlDRvp/NiTE6GSl0LTzTC/dgqDPpffe6CIjtu4t/gKQS+45\nbO0kaQFX8Wv0mef56NELyDMOcj+fG49ESzw3nDtz5Qoqe5rV0OE1wCryUcVv\n8DvZiN1qPaYXP+tn5MywbFcW+Qrl84uHKZ7skGz0pbWGdinNbHdn+LPTatIC\nOiVI/jxtSQN/qEWfh2ofpPFeouHRfvUhmKWyGS/OOOBCsU/RlR3FfEWkHTHS\n4b4OX1rHVVEBS40agwT/Wx7LlJfqE8BwveZQXkr+lryylb8AAVrDsUolLa5v\nyvmo\r\n=b3EO\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.21.0/node@v10.20.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.20.1","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.14.0-alpha.2_1589985493955_0.9416950037907494","host":"s3://npm-registry-packages"}},"2.14.0":{"name":"apollo-server-lambda","version":"2.14.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"bb3bc70353c84118b4ed0c7317f3d2af301ff48c","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.14.0.tgz","fileCount":20,"integrity":"sha512-C125M+fGXn48V8LqEkyZcVQz+MZRau1WlwxDxgaUsk9/vdXTyGMa4ErcGizHarTXmumefniJyZg6akCDrF6Qng==","signatures":[{"sig":"MEUCIQCnj4tialYerOXWZk9l70Co9eUpYGNX77VatzI56XRnkQIgGaybYAuP8vSZEQjNv/5uJ4pt4bKmL80wCyVoI+CkgzM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeznn4CRA9TVsSAnZWagAAvk4QAJjXz4WwbLNZ3vkukLaa\nPvEZy3VV/QRk/d+KR/FOODPQxYT8nGgdCCD2BbPaBd0m++gonwFrLdbrPSiJ\n34K+p8MIfzK/xl8jqMR6Mq57DlRAehvuWycGLWMfgZ0pGP4uJ18sbImBmlod\nlt/dKLKB5pVudfNff0GpBQZloJYWV6eHYf7+pjpcc8BR0f14gyOo4Z3xFzar\nqYFEapQdx2y48KeqkIwVR5+KCaRwp1bBva5wnOJKwGwCBMS+txNXlRQbaxzz\n9iue+GCmDp4xfU+spwNc5gaHvQTBnmSDKCABWoN/UzuiQgLOozFQPxjt8u8D\np0WU3jKlvMFh6s13zBtF7BXYK1QDQ3A6aXMvTmgzgGmG/+CAMl1L2Ea48/NW\nD1Et2RthJj9Jzp7WIEk9ORKfMzBBD6W3kuaRyWCGRdTw47l79M3cQ6rcqRcS\nwvwA8nWckIPivtcYL/Enr/CT2XW6cy2JKm8L5rJTo8BRX66n8oR7B9yO/KKi\nqS4/e/SIOfDZqgjUc+Bu/xMV3rdSbqvlSqkh1C4GFSfHm2mfwv7QGb4r5uLH\nFIP6asB7taluvygwhfvnDMoTNd01wpFAB5XOsdV2QST2uqXFQ+dy/1B15hgO\nnqn+SNG6caAoekUADlKnZkgWbYoplu0NA8Nta/dxb4Hz6SXjX8NB75C4Ui2O\nXSIz\r\n=pSAu\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.21.0/node@v10.20.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.20.1","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.14.0_1590589944097_0.21286449967455146","host":"s3://npm-registry-packages"}},"2.14.1":{"name":"apollo-server-lambda","version":"2.14.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"a0823ab394d90b3eeac46d78f5c7b107f4f9b044","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.14.1.tgz","fileCount":20,"integrity":"sha512-54iPegxqziW1ds5avCx1Xt7nLbDloMnSgNTOP6hBc9Hnh5kGQ2aCBVf1/IAQAYZmqrgMaeiB44chipuwAb8tqQ==","signatures":[{"sig":"MEYCIQDMgEdwlXXqKCx19Ah+bvr8uKTY4dTT3tM/2/CmIkZcgwIhAIlhidVfroWxrccTPjArnezpwyOVm8IWEGPiAr6kuSVS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJez/LvCRA9TVsSAnZWagAAF3cP+QFoYvsUjrjkgnv+lFur\n3EG8dNrKn7DONcWbuRIdZUbW1StaJUXw2pUyolI3SEFNS16V2TkM6g4iGTP0\n6q7TakyBrGmLtbm0lqD2HVazW45o5EqPNHKZn9DfNqE/lfIA0evtk0lH9Wbx\nBq/N6gbHNcJRbliK85bX+icjfQ32xJpQWV52TcNY6UxMmfTUimpu3dnIZOGC\nkQNA0Vx+EhnVeZHPwBXAV5/uErSmX5meQ85p2QubTyU8OY4XyMuBWe4n8kcv\nbvkD585O+OJquIadTqslM8mZRHiIeOPOs+PFUL4eP/xqmpUdAeNUdHGcquz1\njOMBbs6MAFnKKrO8V2Bdw9ZQLqJxHiWG1zfSLNz6EXPFPfcCk8kkjLXJzZSM\n88YO+lj2UnGsD+o/STrpYaF1gj1HfgxR0xaIsgd/fR94BVWlMP5hz3twvPsJ\n74+5P2qaumrSoVvBlzXnukIeBSZ3ZPsKVaJp6RF4CBtQhc8fhZNUw3x01zjM\nOoVfQFK4kC3s1rhCC1EQ9mdqzAEHqIWcK+qa4C4wMLg5rpSn7xxrjBKfcdZa\ncwQQUhNZpiOvIiyYulyepQqr+mALjEi8AIVFUyAoP8ZYf0g6UcautaT8opyz\ndIML2OeSEYIBTEM1OqW0gbcRtg+1lFs5lXQC4TzNQeC+LqdM/jEZWr9daPoD\nBRin\r\n=wyPH\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.21.0/node@v10.20.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.20.1","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.14.1_1590686446734_0.44971639658024976","host":"s3://npm-registry-packages"}},"2.14.2":{"name":"apollo-server-lambda","version":"2.14.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"a1f4d372475ac31c7baeab9d503d3045a4f02095","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.14.2.tgz","fileCount":20,"integrity":"sha512-nx/NPVZRPhqoOw1Fi4zSQmNS7r8vLw9l11V880qm1f8mMes1AZzCJdn/pSZEgt7nMKS4YmOkeSDvaj/9XvqqYw==","signatures":[{"sig":"MEQCICW67ipC+T6/1qDeiutngXeTUhA48WFguSKJs+spbCJrAiALf+E00Avp5xFcBZ6PxDxzbXkuX8vkAJKYkfVUaXJ4kQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2S5JCRA9TVsSAnZWagAAbgMQAII0ja9VbAJCvhTeQc0B\nYHmPJrKAROFtLrWLMcaelQKLnI6atpCapiPsLCJoxTF+0Fk9t1xaxpOPNPG5\n3brgOA1GfKe1Ox3v0HbmHagEzXXumtpERFPKoEnuJzPEYXlDAZfRjsYcp3c7\npY4+wRoiVtRoPdzG1HJELmNQiCqxy3pPLaJSolmY3Ar4ML16qe7Gb6Dousy3\noEmJ8CrXmA0CsUsXp9bd+LuxZgxve1kp0hVl5/4FXAl1sJmwqB6qpjMS3TJk\nh0JT6WcEBwpv1zdBYX36jyOlCifW1WeJMRRjeiGac/CR33p7AiMPkNZ3bXZb\nyzqs9b0fi+kNO5KZFm/zP6KD8Fl20MOlokWmDHL6FGuuROCIlLgynP21hQtP\nqMeqXQuZVsmxNzasiObFAWAhZztHbhrHD5tm15u8z5TsJh64Lv/JPFayUIt3\nhA3a6nJR7YxKSBvaB5jsNURqm4mptpzRxZminC/Ye61VojH4f0ZqoBkP4Ro/\ntjbe4LovxOFtzktwU4+8KuZIXpPbhf2uD3sbX4beB01p5btOJ7fQD8SVZ1lG\nQI8rPZZKeHzj0nhsBJF+i95Aatpz31KcaP2y95PoxPyrQK89PnS9E2hZxmA+\nrRN2iJTy/HKkXozhhqbFYOYFwKRV/lgwo/hz6KOun2jAw+L9W396Y7kRlaY7\ntyuW\r\n=Davf\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.22.0/node@v10.21.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.21.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.14.2_1591291465310_0.6281948526325398","host":"s3://npm-registry-packages"}},"2.14.3":{"name":"apollo-server-lambda","version":"2.14.3","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"a2c01ca6fdb13dce327e069743e9177857f971f1","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.14.3.tgz","fileCount":20,"integrity":"sha512-LDhBOnFuqG8BTdj2ksgF28bd1AVkM+DjbC37j7HPsoftJCqn5PrY/fPVchrbWl2nijivCBEkauYebLmMPdJ8Uw==","signatures":[{"sig":"MEYCIQDIT2I+AdVYjwaZE7BrOPJIN5lOu7lq/uBrEIHsGNqs+wIhALorUFVFQ4UiLcTRejrVNF51RLSnK1E7gZVF/hijvqjn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3rE4CRA9TVsSAnZWagAAdZ4P/jus8K1fZMoIemMGiJf1\nZ/8Q7vcaL1U0GIdCTwxxF26dDt43/bLMU9SLm9YCul7aaAP6v1OAuZkDXriy\nJhAUjSCXqamzD1NFgrypE2FwVluIDCIHzhXROB5FmUTg9VG0PSV0Yq4d1mBi\nq2IGtdPx9VJoNHFcXg4yV83qs+o8MGI6S8uFJmtZ/99mecfwv+BLzbRN28/A\nZCKl51VcqFfD5YtZ9WjqSHX3nRt+4ZluwJLpHQCE2BKY0vi6ZKlrrqzyMgEs\nGjzZu2ErbkWvGP0Fdb8fexeDm4gLOBL6jm7c0NnfcElejuZZ0qded5gkCaFY\neZoTknrKKWSbhHwzz1cFta39n7DpPjprwR16P5GRS6d3swGz83M8Atbqag1Y\nlzndGXbnTkWiK0vu+x++VEDwNtU4gBH/13tLbKxoGEdpjVCJj9aotlDdAjrA\nLYQhNhNA/TOZRV++Qm0LNPEDNK5/G8a8JPnSjYOsg8rb0TXrFVnduEq+CLy0\nxyt3O0FdXuUnAcpeQsSNkZNULraXrTqSGWru6zgg0C+lD9prxLy+KQGaV+LJ\nJF3HeNOaH4KAc1k5UJ6/OdBUqA7ilQbjeXkWqC4hocKgf5LfmyrynYk+jhwI\nFcD9dFA5kBD7uAqnmaneTiBN6vOV1j7CPVpn9W1iZlHTi4ST4e7QLTIslNay\nMbEk\r\n=6Rok\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.22.0/node@v10.21.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.21.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.14.3_1591652664494_0.2439175149776147","host":"s3://npm-registry-packages"}},"2.14.4":{"name":"apollo-server-lambda","version":"2.14.4","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"2824fa6bbb449b4e1f81f41f5beee8b5643f0547","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.14.4.tgz","fileCount":20,"integrity":"sha512-93pvYJFecSxZLU9wC8tdjNZ6PpYELzkTsRmbgnwDJMV8EhYcwNpciEVwst+lwYXS1o1lrhUGTFM1S6MdMn27uw==","signatures":[{"sig":"MEQCIAXq/mZ6h8DA2fPqhAkbTBJo5LDDwVU/J1UNKmZWGgi1AiBmBX/vbi+q05YZRA3TI04uDmVBWuMkn/zpIPRAbC12wg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe45QlCRA9TVsSAnZWagAAhCYQAIdlcSERJtGOZ+fhnwP0\n9p9UVcYzfH0tZ9X5AwdthSKGKo2ZbbEOTMUojzFHRs32sz1w//YGCTePhTo9\nXONosRRo4dDFFZxyR1bbvipTaNWckcnJBjU/YJD1/c49nsrRmmG7TDGvpDE4\nSGmcP8BshnKSjI+Rm1p/giki+EPjk371gCggzSb9dhS02MU/kflWjICHJEZ+\nhwv7J0j2BFQOYdYDZ0hrHnYqH1TihkJiUgwgpzYVpl84JS6AgRiRWsEr2Mev\ncH24Udbk/9Gi6gA3j5nmWHZS8pRsJKcO42F2JsJIsD3t8mwFatBZltlMQ8CS\nz6H1/88CBgLl4jKc7ukxwbla4UdilUl94OgttHX+xGisFHWSNzYT04eYX4By\nDzSLnVPLOJD7eg7WEzfetlCck0/4mQERap2F663w2jOvUPMbpx99+Cz/3E3l\nkvkL5I+yvfMk2TvJCIGIBLrUx4p/YU9ijx/ReNNM0/1jbQ8geT12hUpY1Cws\nDG/8eJs8Q7NxRq7XWR0xyR8E1CoEThoniFIz9p6qM+dv1pzk18nhe5C43sPb\n+GOAW626G9lxhaG3PQFJFBrzOvt/93MOraL9PQ+2tUlb0uSJEIUzwWfBiiH9\ntHVOgmExgXNY5hWKt1RFAnnTsigQA1ve54uH6WQIK1qMCDpcP+7jqBFC9gTW\naRL0\r\n=tfFG\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.22.0/node@v10.21.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.21.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.14.4_1591972901129_0.8369944387329198","host":"s3://npm-registry-packages"}},"2.15.0-alpha.0":{"name":"apollo-server-lambda","version":"2.15.0-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"ebcf54f601a413db323357779e4fad115869a0c9","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.15.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-ZGQJlTHBiB+N4D4/kaS15LZ7PzwEsqucuVuv5sHQcDAoV/Pgekjs+2paeQwz3dkSe3bTxjjY8VlIsieijdhflw==","signatures":[{"sig":"MEUCIQCIrEpYfS5qCbDtQ7/vsBq1bM//k7Ipjy8IFZqqns9NdQIgFMS+hEVCqJRTdpYMQh0R9m6kXvJNNBgml/08nx/0JQY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53370,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6RGJCRA9TVsSAnZWagAAS3MP+wXnUrvStls4L7qpR31I\ntp/a5Ul4tJabrad6ABmuicTHzl6oSze2DuWYrqCKl/ACoZqIMJ9MXBvpPIrM\nKBYj4TShu0zvUmJquzCYLSFR9t1OIyqLchHfk2IKFhRDabeQq5CSqFh3eTFE\nQHpRNwxoGWV/1Y7R7EdHvMBYlEkxviVNA9JX59LsuCfAw1hhcwqLAy5l+i6V\nQ5stJY5ZAptYuo/Eocqy+rs5zQMwr7fUW0yuobC/UdYZVRTErD4fiojxVji4\n41mXZTt7xKCVwstrlGBrPAH4Pl7wu8ZtWWvqLcZr5zLDnY9ofnhRMbAH/HMe\naq5Nw9sG6wpchchguIsZ7Y5M1nfqg8QIlmhimoWbzQ/jbvvtUEOoqfW/RgI5\nPDzVLBdMRMyd/f7LOB4c5LMPVCWp19uEsbkWB95qdp4R65EtvSKil0nc/ZVQ\npNhodJ2EA0JST7nQqpNz+dGWXkUldqyqcls/Ft0dp1k1LmJsncqWXDMsrkWM\njd6ScOrBf6TQ4mT/pJq9OIGW95lqvsKjeqFwOFFIr96KukMteOtRLOkz1KPm\nOVcgYdOeM971nfuXK+bQYy3bs65VLJayGihMGFrHkGI8ZNgPe3+zs/9agKM+\n5UMArwsp3T30fL9M4bUXcyVSnEINlApS7o5IuMDDUfeChppbHj7nTwnw+c4q\n09ue\r\n=ETp1\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.21.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.21.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.15.0-alpha.0_1592332681086_0.6177692026511608","host":"s3://npm-registry-packages"}},"2.14.5":{"name":"apollo-server-lambda","version":"2.14.5","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"fbd1e58d173dcd3e6cbce8f9c19fd9008f6fcf08","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.14.5.tgz","fileCount":20,"integrity":"sha512-ljmHdGbLrNpsUqhWMANTubUC5HBcVCp+edego3KNVn/tn0vxmnbkqGLTyh73pXHnLNO/ryns+6zVqgqREgfeDQ==","signatures":[{"sig":"MEUCIQCePjN7I6FYm8ykIAqHWd94B+GKsfHL9mGK5d8KgiyFpAIgP/ePZK+a0Hr9UxYtYVtsq32GPfZ4FMPZrM2Jt57VXAE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6T0yCRA9TVsSAnZWagAAUFoQAKLUx8aqMY05/1B4DjZi\nUF4kfXcCSXbZEtH6NBPqgNK0yMMbKvtJTLV3eSxiykfRlZny20LG4BIEQJky\nqRZzLuM/C0Pw74aujRfGAzZYGiSc4uqMltqaJjlheog1cKgeUhst0aXNduJo\nu194PI39faSnu+FKYfzPtPsmwoUcdPF5G0sOc4Xa+mkhYm09WFWSCKknAAVq\nQbbpef0bWozKBIwA869zjanqJhMBEfcPqT2RFFJxtrhvkuWO6q2nnSiemZTh\nyRl9AvRb/rKdSEHJP2MY2A8CbGJ9dFO9svlzFZS9lES6oHcWYseeaAfc1K3u\nEkuUpmZcqotICxajdwyT7o3LtOZ93CH03vN+NVoXOEJubGRhtgUXhm75L6T0\nJb+z+kla4XdPxtSmuZkI/PHFT7d4z/WJHrS41ioF2oLH4B43mOPqs7x/VHRE\nA+pYlei7lh8G+1zjpJl2pUKxYRIyA0icNk4busgMyMYep4xCj5qBNpptW6n8\n+ZBAYgRqO/n0avkXp8KidqKsCmb4fy6X4qTJv21pfmEAC3hzwpqbCEoJ0pKb\nHR34jRTv4MZFYC6LTKMV52Gp2OVaKBx79nrwvh99/HVvdMF62nNdLGSYdL/7\nKTNrFCJrpC5XANsSc47UL3pxbWVNK9S57UyGPKjnOtGgpzw+td1+eyptD1VD\ni6Qx\r\n=JWdr\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.21.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.21.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.14.5_1592343857886_0.4392202802813632","host":"s3://npm-registry-packages"}},"2.15.0-alpha.1":{"name":"apollo-server-lambda","version":"2.15.0-alpha.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"46c98f3a39d5fd8ae028b9b82236a64d8c483b9f","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.15.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-baneU1OGmDu6Hsn/ehGO9zbc8kL0JBTSBYa4e6hMKNVqFjED1o78ZTYPHfDIHBGXMgNlQYfVMfA2yJ0Pj/4JjA==","signatures":[{"sig":"MEUCIHWX0HFVbq6iX3HzQfpwMYtYJU4FybNd6I7S0kZ0XhpyAiEAoHTe7r4DCNKlrTFMkMI5tpV7F8XVs2f7hfnukUCcchA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53370,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6lBVCRA9TVsSAnZWagAAz4AQAJdhSsdQEDmedU60MyC5\nzRNJ8gXCTA3PH/KzZGtQEFMVrGoghVccARtkM8B70StIHXE+LomRAVXckCzO\nMqia+iUIDh+cxBFz522c+dwDF9+vSz9NEgkVxTJ7L/4yhGNUK8/QA5et9tzA\nyphZpbfDUj7f6A6M/we5R8TEnpAOuC1u4m5H4Gfsm/TrAxCuHAOH1uNkDt8T\ngYYMo+GFxwyGMGxElkYEIsWat73I6gzuqjYz6OqRamdqbu57JqJwipozrOS0\n0cjkFT0h/5YlwBu7gZ8EJtUpmL4M17uF1w7Cgn171FmuwuKy9nvBvF05LBLk\n9vKs72vH/5AYtD/FLqUG2FiUanyj0jH7KLbXyy5DzXw8z7+NGxKORgjlUJMM\nZw1AgSp5VEi8s8b3vuwpcxL5Djh6Y5lRwQo3pq/NZtdbDqiy6xOOdCwn3+js\nfrOYhTzP+Rqf8txmM0d1g7Qs0Z5isgvreih20j4Kr8CKGMPJtLbzSNGdo9ra\n/WeWNl8ZYvPx7E2xALMWofTPcoMlBqhrxHbV7GHTUaMsTVRBtFMc2JSqrCff\nzC0nc0lWY6Hso6Q9C711HOzF5usB/tl1Z9omF/gsofEl9tLqYhqVhK5M3fJt\nJdteWfuGNz8i6RMR/azdKEpbo1n3apNAYHOr8tls7Bd97e+GRUBwZT/YXSQV\ne0Rc\r\n=t+FE\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.21.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.21.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.15.0-alpha.1_1592414293240_0.945438239562644","host":"s3://npm-registry-packages"}},"2.15.0":{"name":"apollo-server-lambda","version":"2.15.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"3619c084cac6b0503bddc9448d70d004dba946bf","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.15.0.tgz","fileCount":20,"integrity":"sha512-+RaamInAJKxYMMc61XWk2HWOLXP9V77E6g51uiVRcC8IMV5FUD9Yjg6D5WZSLvSf7V2U0knOqbZjm+AcYc8s2A==","signatures":[{"sig":"MEUCIQCADhnVpOatHNk7jukjaZaZb6nI/ym3N0R+r1OGcjPkqQIgAcSs+RtYnViMR5fJM5OX1mGx90dq7KQnH6WwcPmLziI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6lIGCRA9TVsSAnZWagAAZsoP/i8fH58DBvPcTpxCKTn9\n+u5VZUCf9EHoe6OLmTErkQLs8I0XKeZp7sTwnvxh+vXPv6SyM1NRo3Lo3cZN\nvpA/j+cMFsvXknJ1iXw0T9TRTsqaN45eIRLhurVjchIDUY34SZt3OhYpn1g7\n08f8g8VOI3zNSFbdYsso5ToCnCrTeIlSAnRUU6n4LeUvheD5ZmSEMeL8puB1\n/SG7lt+0tuJmXSjUKhc9Oj6EhhbHid8TVqJTUOKyv81odAsx3wfR4wMMxSv2\nC3ev08hiCwrEz2jom4BNsDckmK+295oLoFj6akw1nstnlsD5U0BmyH9qmxpp\nu32Cfdo9AdhV63aRA+yyRsWyqNdA+fBTODcLwkSiIUIgpHFhPdkyRzhg/wJ5\nmyBS4kOKjfYo8eLdRUu+BjNYvDimqlfGSq/tGf8tiFm4nfl4hPzTWCvzWz4Z\ndcXZWoiqAfWszuBS4+uoAMuYQL9fPJF+tY7OIjVStEYOFRPrBP8CB/2nN6Su\n4MQ5zUC5fY+hapirBZsHw8cDyOYb4WofST/WHBBzMXzhNlpG43GMVC2i20f8\nuv+Mix//K1dxckBM2CgMX4odIl1iDO2qyhU4bqHPRRVMIvwN+xBZluTSAnxb\nDC10+qIM0WmEiNDyZMHAy1v/YFFqIIX0erb2oQdrz0P6QNJqYh9r+BFai8el\neVcx\r\n=UXfM\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-lambda` 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-lambda","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.21.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.21.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.15.0_1592414726300_0.024138756345819967","host":"s3://npm-registry-packages"}},"2.15.1":{"name":"apollo-server-lambda","version":"2.15.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"4860a21259d814eb6dc5ce4c4aa1c03914ededa7","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.15.1.tgz","fileCount":20,"integrity":"sha512-lqbKslR2dZpPtTLk2vzDPRhgTKyd41mQ0yGw6phCxD8kY26CxgyDG9lT5y12bfSKhUr/1d8casDL0m4H3SlsVw==","signatures":[{"sig":"MEUCIEvtH9rML8YlndbvNgkj27uHiclQPc1Pj/o3bnbp1mM9AiEA9VVVKIV7pmIwZVvWALeEtwO3RSl1i2DZrwLxPrWmkYg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53357,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+yEWCRA9TVsSAnZWagAAeHgP/jx2ovpObjgvOBSQG3W1\nY4+fmo8lKRMnZJPiK4tW4OvBN9uz55t6bnKaLigYhlEM3BLCrbdVVwfDHoN+\nwNXIPAlQ7LZKIa7gDwnTOOh9ZT+1j3NkzkP4Bl1/LbyZh/aaN8gZgx69f452\nbgxZXeTl8+9lQ319Z2naqLa2Q8lAnBkbnhrlOhbtbWSxJSVMMSqFVkED+n7x\nGzLyUgE46Ds18QZc+k6kDSFnGcbF8kttXswRQXEjtYmOV3nETNmcNQTzRcbh\nOoLQMAhVJryd4xys9gTb4erZOaOky0WKHUm9yQMol0qODcqNYfMW2Otqp9UX\neqVKXYUOy2tvVQ+E62pC9bgY3wmvjrO+y2SFoW5cK5bXi7Pof2+iSPoYEF6i\ni26Xl0RqzPcKAh7RMx/Mx8529cue9p5NjL6UQX8af/D5sE1Al6BYDy1BXZE3\n5Q8ftsOgrXov+qXEBYFXPFRtd1/yDZTLkkd314fIBw3Ye56Bhxe8MID+f1bs\nm3fSEZL/xIiaLDkHPYsFC6ORs/u8BfJ7GmBOPJ/zR1GQcppuvb7nekU5bhad\nhSEoQxBlIchfLiSJ86nKQizpiE+LzwwMoKZ5NKGJBInmIQIsWIXwKHDvyXNn\ntUt6t0cgr0+/EP3Hdx5nYzmRbn559z4VwgS7a0heo8Gvvn2IrZTubR792UyI\nj9lm\r\n=B3pl\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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.21.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.21.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.15.1_1593516310013_0.865232262817281","host":"s3://npm-registry-packages"}},"2.16.0":{"name":"apollo-server-lambda","version":"2.16.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"35ef5eb10e7f625d528d1fbdf9f75946c67047be","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.16.0.tgz","fileCount":20,"integrity":"sha512-PkmDNI9DJ5RC20wxr7pHHoceQC/o3KD1AEJmY13ZFa6Y43yJrB7afnz9DonpNeHEZG1AYb972cXfozALDBdV+w==","signatures":[{"sig":"MEUCIQCJnd56hjntqcGfd+zny+OAIkjRyKT9A3geSkThGKyl3gIgLbd5Olu42zTiDIqbKBez0/fJ6RXrML8k9P1w1SHXMsw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53703,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEZYBCRA9TVsSAnZWagAA3wcP+QCaigK4ZaaDO+ny6NbJ\nvWWpIBf2bzQmeYteK3IY/BtmH+EgkkLUd6Skh3nD+HhgQVbWqRsJGby90YLk\ne2Du8QpqcQyFQhy1Gxkj2qbDlHJJynf0+nrQ8FHcDezW+BQA6RkITj9lti2j\nUhk8Bob4Vv2d7WlXErGA7/iPk8qyjRmA1rACfDBiC05oMkPJ6eX4Tc2bkN0E\nf68MZNdP5Ypf8YYISx4GNjVimzjFDgC9SiMM2JG/wMnXLQUytVMFc+Qg3bTu\np8ev9YRHJheVYVfXYop4lNrsZXtCKNyS0XTKavMCnD0NpBJkwlhh3FFtDEvI\nJOTAZGxrC2XFzMimnJ6upDFV7Dhnp3Hv/wHoM+ijEw1CtPD1GlCDv4R/DduF\nT7b58wT3B+yEX2Z8qy+PeAC7Aj701Xy9RAtuNnpOlfEnnROHC3jKhntLDobS\ndLvbq0Q/WjDS+Uq4tv0TeEqzuoHMqCHUCouPPD6REjtDZEp5jXndYoMZ+QHp\nkSXteCv01FjvpjnqW7+Hzi3KmvWxRdJfRo4Mfmec6wVofuoCARJk0mtBYsUq\n3jD57u6Cuh6rPuvwYDxvbZIAoq7lSUQD8OM7ft8iwDyaPXaFOJ8Zoz54UMIY\nFqV+hKvOAJBQFJtwr+AxyKvVUFkmxzwVXJkEnYNFlkEv8Nk0GOzHs8frMCD3\nggMq\r\n=gLE4\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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.21.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.21.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.16.0_1594988033130_0.2762441103664799","host":"s3://npm-registry-packages"}},"2.16.1":{"name":"apollo-server-lambda","version":"2.16.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"e0a04e003e10c0ec7942ff8e0b6103fc5cb3b6d9","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.16.1.tgz","fileCount":20,"integrity":"sha512-yMP3or/4OfOgCgcFLgCQmijAIYUvGfOXvufdf0vBnDiZ/cElN9ymGTnM1dRqsWxEqqvvZP/rcndbSmN4Ti/1fw==","signatures":[{"sig":"MEYCIQCfJAjpOZDRPB5x/Xa42LLFQmNPCsdKHNxwrhBbkJLOwQIhAPpA9dOfg8zRrxZwBYuupMLGGxXd5LjSUUheriNBVOVy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53775,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHz34CRA9TVsSAnZWagAAVXMP/03HenkKAMe4tU9w8l0f\n+wEDRfNYeAfpGytwWJxY9jsLGsovcm21oGY+8DGKBZr7XgzqG44EJ7QU0yJe\nlVEwXO2hkJiblqHtlXlS3z1+ju7kfK0gGWPJzkKAcHP0Mf/xCcxxJ2xDogwA\nYqiGDbVI1Deiqcuf4md191kkMESJRhpE97EcOExgei5rAIA3QkD7pjb2kOIT\njRmCkkV2ORmXjQoxInulCYrspHgeHHG2rY6dJQs1uCohZtF6nvmfHuP9PJgZ\nfKPM3Rv0k9I3gLgzAu/ThKppwoFbAhhr4cNZiSmNYradtiMiWDZsAUD7tkhR\nmZ0NWol3vHhzTCgK+FUHKHffU3En4NjcUnjW+zPHZMWCKA6EWnFdN1ZGlsis\nHe08Vi93K3HYS7y6QQo5+6bo7vYdcE5lAwPvsJSBOaTMdiYDkjSFquUDPEC0\nd5U/dUy2SZGwd0EyXdw4sEfTho5vO3+vIiSCAS+zQXG4KFKQlFmi/4+SfH1U\n8LHZ73t+uMzWo1z6cUiAlb+g7uymlqiC0KWxydoMfqCmJB/HX51fj2hV7H6+\nzIRrNQoBtsKvA7/TKOe/+fWP5l4/KUO45zSQ6wqmstXAWW5n8YjuqB4g3lJv\n6A9z7BWHX6JGyX/D3fmjkhHtQegQqGJhsSE1YcOrWCAJzC5UR5Yob2fhrfDX\nVLmy\r\n=frKC\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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.22.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.22.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.16.1_1595882999769_0.8477734191225568","host":"s3://npm-registry-packages"}},"3.0.0-alpha.2":{"name":"apollo-server-lambda","version":"3.0.0-alpha.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"3ea938a2b4b047fe21edee469b15fc10e80fc852","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.0.0-alpha.2.tgz","fileCount":20,"integrity":"sha512-uOjX8iCuEn1X/cQpKQy51gEcdGK43OvoK/cS7YN1B14YDVlz9X+Z9MOxPNTTf2Zv5tRpf0djcrUy2cIXQQ9eHQ==","signatures":[{"sig":"MEQCIDe+1NmOPz0DomT+T4dIegaD1/LpKSFaEeWW35gnu/XVAiBhqLOVmztKFQTjH94fnupVHFHuWJIlLm/6TE7ICLJvjw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42628,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLGGTCRA9TVsSAnZWagAAkzsP/2jC+bHMXBX1GS++rI/z\nX/UXS9dkxwRjN+l9rxjNh5LkUJ5VE/00WFM5RWiA07htp9OOD6KH+/dMZjLn\nHsswv0GaQfJ67VKoNhzJRGk/B3roTNw6KiduZN6M/vQhk8uu9ly3zYvNWs2O\nJDcqf5F/ZX6AIDdTYk/ykU7rnNrbGQhpHpKhB/gisoohf9ovTbuI+0lTEKS+\nEE/kjlsx3m71qKj+FIurwI622/nCKXLbxxxvbRB+k/hpVYuz71fR27Pjn/8x\nDH14FPj6HejGM7Z9iaTfUeU3W7JbBAz8x6GDZmAr3RwO97OYI87qYJbCs72Y\nm2YkPxPWPp5MyuY3LR3ESa/DypE7J/xIEzGYWll3lDg5LHt0/GC3DXVAQB5I\nlZouC7Jbq8efHeYaErT26ODi+0sJXFrMUc2t29uZ9WhBhd0DWRaHp45H3xDd\n/5+x7NxzDPfyPEfGMQ8KgO7mdCIFPxDyl8exDQDeWBidGpr0kbfnqM30Iqua\nDsEXxYMzvT+CMdbeS53Neuyn76RidssLEEqiNce9Hb2SZ8ddaFJnDV212rQ9\nwraHP4ItmQdbwvK12qL7Phx8iIMyzfXf0diUX2QgPmzFQjWOZlPIlfnmxutF\nDbNdmDu0c7kCdZco13YcNl8hb9FF7IGXxEbbfUKpLOStHA6yOjw/wuDf2VPI\nUTj0\r\n=lwbe\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.22.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.22.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_3.0.0-alpha.2_1596744082633_0.4838693573448014","host":"s3://npm-registry-packages"}},"3.0.0-alpha.3":{"name":"apollo-server-lambda","version":"3.0.0-alpha.3","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"9e4a7585f60964e7ccc2a8cc6f202729c18dac6d","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.0.0-alpha.3.tgz","fileCount":20,"integrity":"sha512-GoRiniZe++G3GVBwWKAZtWcLhTCLy6PRwq4zZ/et4jml2lXDqPF36FNSEmUwfKXDiGvwyD+CYY6ZiqJspF7tQg==","signatures":[{"sig":"MEQCIG0VVatv7YA9iWVapPLdPPQf+Jsv3I+o8EaaMR7s/oxVAiAK5rF8Hw8Ou4mRa4l0yv2JqXBFQm8GMhdLv3TdK66rXQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42597,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNB/BCRA9TVsSAnZWagAAAIgP+QCjAxLgjiH6VDMMs3a+\nAy/JGtSLCM9Kmt7YOENt+v+MyLc5JQNiXrWngWRljDAhG+zAA5J0yQwhdwfb\nTQwJJMnby95QJMjX/v3rG3AjMgUJ7zoJKelv7geT0mbj8DtchNyBu5hEis33\ndF+XTXRk6XuTT2UW1BKd2pBx7Y3PIV4DSDYaVQxU2nGMEc4V48LOjyp/whDR\nI2OeAbOYcirsds8HFrpb0wmC1X8vlRXlG4838fVc0F3YaJPP2/t4uoMNn0Gs\nRmeJFfFF1zDJbJgogyM4AK46+kt0T6VWImGDlAq4SFnXyJEnyUK+o0zuaR+I\n/7Mi9hWctKGtdwGL0jgkA/pThSMXh+vDyMC22ETMLtW8k2h5FHGRV105w1DJ\ngpqAN38SsU+uyQhYBOU4GGrsHx3d0xnFJbWPg9Q22BBbdcnjUYFVh8890sNH\n7ht47hm16fujO26BZI81mueQkTHEBguekpWCgvvaY+v5bKubiHyIhaYIcAtB\nLTECL0ujjhkozoXHc020tQLm2ghUfRZkUcrqZ6SGRfifKwgMWQIOBrs9Ik6k\nqs/MCuu60FGLfffgOHSU9XhidKUjGwPeYmLlmFinfAQof5AeyPB4jvwrsasC\n2zg4Q2fOiJ3UoXCK1oTOZPIu7rGenhgVsgBESQ8CRscK0djygwHsvgeeilqF\nemoW\r\n=JjMY\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.22.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.22.0","dependencies":{"@types/aws-lambda":"^8.10.59","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-lambda_3.0.0-alpha.3_1597251521062_0.010988453230772022","host":"s3://npm-registry-packages"}},"2.17.0":{"name":"apollo-server-lambda","version":"2.17.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"2e3e432f818abc30c77b6ce823471cee4e4b8526","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.17.0.tgz","fileCount":20,"integrity":"sha512-kOTrlUjmpWhKTOarTkwRdWjU9vnp4niV+743iIrlbqxZ4XWENK1lD9Mbvp2kb//zE1mZy/EF4/+dga1DZjBqjA==","signatures":[{"sig":"MEUCIQD1js20EZRiI0c/iz8uJQ5bDQlIpaRBxVPW19sJVyclCwIgXF9wixcNVTF6FwvgTxc/LOUtR8vTyULzcOWKqpVCp3I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53775,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfR/6BCRA9TVsSAnZWagAAXQUP/jLZ5Gfa61ZTNCULvATq\nuuWUU/uhIuQczW4pvxuWVAv3QH9lTmEVcYtHwqZ5jUKy655cMM7eVt5ShANC\nzcufeVH0/BQfYxNMyZlC9LcaKGWi/YkhYaJ6n+zNSYRLHELIJ2EjsFsvCqkM\nsy/OM2uEcrw16BJqEjENgVTKEXtsz5OUBCkCBCfH3G+fUBa4uuzVRSbjoR6T\nvnVbJFUuN9X9Nc0QjGXzdxARO8goJ7CH8B/aNuORgltSM2WSXMgOo4YW41XL\nj9EAcV9vVcxco8ZUD6hf7tssUqOkWWmCiR6WhtGO0v1BR0M/Tmhwe+mdfK+O\nnPWq7KI3HN42Ir6hJF6XqoKeUnHBuD7iF56j7RqZraWKuPepLIXJyEBZnfTe\nFZEAvmQkEu5+9EqdlScWDaqEWbCYIWnEyx8os8I7/Y97QJLYt+ihiO4u1QMX\n4ztU/fS9sQmlrAAu3RmybOGpQnQg4eT+Sve9rcPgnbYEHD3SYT/xr9lu5Ouz\nbSiF+9prnAkEOddKfD0aYQkfizfuSV0qdI2IATy2h8bKWRAbFsbFJml8Ahxm\nqvwBHBPxZuF0V+1PVceQpLlD6ks8Xe6Cg3owJItu8UjIpDGCoXwvMrUCpJer\nIAgn+mo4Hu0f8e8ayHEpO+hr+TGja0NIHlCg1hBtPXcXlh2DCWaCjFmwGjPF\ney73\r\n=4dvD\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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.22.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.22.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.17.0_1598553728959_0.5562681014924007","host":"s3://npm-registry-packages"}},"2.17.1-alpha.0":{"name":"apollo-server-lambda","version":"2.17.1-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"8ea75dd9a2765c502d180ad757415bed7b249983","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.17.1-alpha.0.tgz","fileCount":20,"integrity":"sha512-XAqyGGUC8PX/9284E3cgl2BhumGrq8//5sn0a4IGFimY9CnMwh55eKcWIvX+qWJH8lRB6vKle8NCn1OCjzLFTA==","signatures":[{"sig":"MEQCIBQ9Sjhu2OLuuWaZZGrwFakCGIRKIBhn5k5Z6IXzJnLhAiA8DU9wLfZYTtgWK9NBxhTEHlOVt3fazli/rn8sc7ipmw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53799,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUTSXCRA9TVsSAnZWagAA03wP/i5HLmwAa3rRu0uPlz+q\n0eqF7vMqjMtoU9JGJZy0KyRKv8iITwo7TKAaSD+2zSRCuSby0aFP9oqxjKN7\n/ASFie9pbKrPU7YhsUFuA8CN5mTQi94RBWoVqkmHctPPMN1BGTHUf8N5Vo0g\n86VAUHDaJ/7gdTawpUZq+08TZmpwo01kmV1q+y7vdtzatxff6KUnIiqImDsl\ncdTp+9n4qrGBw1gSBvCHEzX0xYLpjEEcXLrUKcDcP05LQ4jfQDCBu2l1Z8RF\nltXxkXJYX2CqVl7HizFUdARAK/6rVXQ2JIO39icff3PbQ6isFsQVfmcove6k\nfasxI6UnqPp6I8DAEIOFZk8dcei6pdsinHEeOtI3IRvkaeUirlpNf3vchOIw\njFPZtOqVuP6/UEr94n7s8lHgAMgRap41qvpJkYh9KMskDKciRDd7Pu1HK9Wr\nJoo+AQf+qQ0fTrq3mGBINQHL3hcGcwhWgBWZ0AA+UoRNh94P8UXXWVdWqlPX\n0WcYXV/4UQstgT+4tkfrQ7laRflOXVskmw6y9+/JoP9j7EoTFtC8oy1rlqYY\nfJTx3vIUFJVQhy0TO/pmDEOdd0u6NCBFaBnPjDrlnvQ+FTqXYr/WzqUUQHd8\n3LNMW1kkNr6C/2SElvCuETZgHOcO8Qn3wK97MiPJqU3VV9k9z9JkXXPTb7yp\nWb61\r\n=8p88\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.22.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.22.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.17.1-alpha.0_1599157397351_0.6250112721911318","host":"s3://npm-registry-packages"}},"2.18.0-rc.0":{"name":"apollo-server-lambda","version":"2.18.0-rc.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"2409293dd958094db5d77200400100bf89feec56","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.18.0-rc.0.tgz","fileCount":20,"integrity":"sha512-0vLGVJUOdzAtYDM0mxiBnsdqkQjnNbIIbyH9lSB8IXarCvYDMC8AAsLRpaty2tuXRcWRGW/dy7gc0ImCTpqY1Q==","signatures":[{"sig":"MEQCIBIQk51bLTgnrNX7rxkaiiMl42waE5q20y8dvVWKzHFSAiBmr5w3/7rh14zfhdnxV0Twuj03xecXDHohMpNNPBDOnw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53109,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZTHpCRA9TVsSAnZWagAADAkQAI03FyGveT3lyPkGBH1F\n+L8sMh0ij6xE/e1i8kaOvlIPqp/GFGqw0s5Re8f3JXSBDegtGkuIl7hOBfj0\nMDM3/aLx0EAjk6Dlj6fMJvMLxmvgDIvu3jXLKdVnVE9/fTGUTQGQWUkEPmE1\n36CP4XU0LPPxZTrf/Ftkb0esSvQT35q4MMkJx971zql+xEf+GKk9dggITTKq\n3yyefkTaDtrqnzM1cs+M2BlJCx82gAonr9VzeKEi5yAj8IB1DzvYiWLGjW7x\nr9Z2bmnyWdH5yljCgSdHWP/MOQqwbTC7ByZ7XeiwBpeWTIFBAZxW71AXHBEz\npnc8HvwPkr/o6dGn4PiVmead3ZgNhkYk1GGcpWP1b2zubgk8rxojIX2bFMla\nVsniNVVt+AZH/okrmtSOe8yQXcJJWn4lPUog+bGyLN9PEpCpYQ34Nwaaik2I\nbsaTBHOScVDALx5x8EsgEyUFL5nAxjP+X1LIG0+jwEw6/x0VYcIPv+CKJecK\nClMruZeyp670+t6ci8OYrd6lQAr8NW99EoUx2ihIrz30I7X30+wy0iGoPly4\nikh7TnIuDPpsRnOpsJvpqbLNtSu8o0JIAQORcLyN5qECt04YcVnsRT/U9Gim\nnAiwg1apJ6elxSwNqm1ghAB+gDn4IpQUygtwqB7C3c2m35oQaV7FnYwKFaHS\nIx5W\r\n=Xmy6\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.22.1","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.18.0-rc.0_1600467432963_0.43196554467534054","host":"s3://npm-registry-packages"}},"2.18.0-rc.1":{"name":"apollo-server-lambda","version":"2.18.0-rc.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"23fb24555ab36117dd43ede2954f796097a7245c","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.18.0-rc.1.tgz","fileCount":20,"integrity":"sha512-fW6FKegm50SSZ5JDBr7HmqFgFTB6kj+67FQR6eTlgg4z4Rox7ewWWIY4PlmBMv9N8LlO6RyNoRUcus+DhogqZw==","signatures":[{"sig":"MEUCIQDMIWqcDJlhu2mFoMRwdbr0t3A4bwOcZWoDvJvzCsDC5AIgFO90aRB+MKR2Vae3Wr7WgvsKNP8aJrzwFFs1yknsOGI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53109,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaOcFCRA9TVsSAnZWagAAgEIP/0YOm2EeCmHeAKtstPJ7\nChUZuyrHUMlVXOZnTlJ/i8Hcs/2UoeldhF9yjAP2KzkCDsafgZ2YNS8dxF/X\nrIRzVX3X4MlVgjsy7Hy8XwNMQlY/bf7uGasfkMvAsUgF4mQXdLuqGb58BDay\nFrm1HFXAgwn1HYNQnxihGHmpILHBYBWUobp3QpaTe/cJiBoa6rvinBhvm00q\nFDkZzGP0IY6VLAVoKFti/TKi6jx67hUHKTi+YERMT/atuGakuGbxTswJ2rWh\nIP9y8iEvUHWtykNQL0l2YXCklCrWfmyiI93Iku/6K2D+bsHUJPvNY9Q5fsU8\nJVGTd90g5TAmp2rkGMQHd+QcSArtVKPuH6SLM1j33vkUkxpImNghQYhtDLks\n8ZVNOxYi3aj4q3A7xiwJ6/GK+8V16K+FmRE/TqrIyyOemUA569UVrN3qr+tU\nfgMQIdaP0Q59M4E6je/0588xmAhLlEwjRU3raVb9ElADQuMACJUfBeZyUF2A\nWr2tS+cSz9EyR2li2e75Oe0vAmiq26jstQJAy06LQq997JJy6Nllj2ZzxJde\nq6sj//0CfA+7gxMX1rRk9ArKc+fYvn1othuOTXsSNz4bBO9B3baUKNvXPB8v\nmI53oZ7lBA5fFX6dKvXY8v9L8Dg2ZlZxUWFDU4mxK9YYVvPS8LSziqEYV78T\n7dKZ\r\n=tUtA\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.22.1","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.18.0-rc.1_1600710405147_0.5878322795421045","host":"s3://npm-registry-packages"}},"2.18.0":{"name":"apollo-server-lambda","version":"2.18.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"9328b05040e7496ee968f10c43bff52ef5bf3962","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.18.0.tgz","fileCount":20,"integrity":"sha512-Guk+24GFs7FDdidE3rqio9+KmLW/cT/lad2RSZg7hJxaDPx7D+3IEp6FEwkfjEiaYkxOtkFmEY5P/cKUt4sdeA==","signatures":[{"sig":"MEUCIEmicu3XbOh7jO03tyk9WhKiO5nxVtrvOgX7bE20d4YIAiEAkb1WDqzAFckvAFgH/S4sE+dZtKuB5gs8Hxt+98vBGXc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53089,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaXx2CRA9TVsSAnZWagAAdQUQAJyldVYFzIrWx8RGMo7e\nKJTGJvtBkMUDb1WgA3AY7A6huowHDvQGKTVHvJL6tfvd1Bp29AiTQUhMGYAD\nRSkbJXNH4/lFyAX2ww1gGyD6LryqggPhZ4v/0+4dnDDQF9kcRAgn4+BkkPTt\niO3GRISR73e3HFNG978HyTIBkyljGynaOnf8lBPqNweYDt59d7Ye7Go3WhQm\n23LGK24jol5iq6+H8BsqLGpon5ao1CSK4MgJdU5KqF8v91r6Rj6saG1wpZZZ\njV6NlZHXjRXacjJ85EPYsp/GuW4f/uGQfIKbdH6vs+Yboj02lGG06r2OoTJW\nGT5uiVxSf5MQEklZYurQ4jOMrEzHywGk7UVyiebEVtFSooGxK3kS4e6Mmu8/\nKHY0oqQz9opFiguB2YhJCbR99aLiTvIlQNprBXyh/b9u0H/j10kvrH3M4iWL\nekw4U45xLtG3d4S7We7s0VIvdx4PQNYjjzm0ez6BhAY+TnOaQkf1hqFQgW0g\nV5H9V2P5SCyoZr2RWMGDd3KUMawRG1YL1iTpQRlstDAaIt/MJKYq/q+9Dlja\nt5y1ohcDhiJZ1z16pybWclkunsG3R8xCQsqVimuyqY2oeqhKCD2Lq6P0vjbk\ntXqat3j17E8YabEaOpdaRbEH0a0RPyS3rWPjct3voW0iMZsOOF/TFwNtaBdI\nK/JI\r\n=tDIk\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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.22.1","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.18.0_1600748662053_0.9490432481120585","host":"s3://npm-registry-packages"}},"2.18.1":{"name":"apollo-server-lambda","version":"2.18.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"a2ec458b7c9e32c400b1c082d7d42c798ccb7b03","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.18.1.tgz","fileCount":20,"integrity":"sha512-BUp575gJ8Nb87IEflAZ2NIPYJTaaXYjDB5WDn84IR9uYgxj6k39q+1/5HdVGYjur60JluK2ld/7HCzTVarvR6w==","signatures":[{"sig":"MEYCIQDqONyVMfBszqsFgUml88IxTn53RZzWn/U1X7YE9XdykAIhAJMzjJlZ3Eab0kqwX9L/DYBngOv2F5AXWPfFAsAiTvkb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53089,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbODvCRA9TVsSAnZWagAAzIAP/2qX84mrOLhvZyRmDN92\nBV/EFeO5Kr9gxMuX7dOOPi89j/RdX1kZ7R2fBijIlR94sUiyD2qt7aANUKLc\nBZ/N0xPIIW+RCBF9nMuW1w9amXIwomluHVNouzkF3kkVx5xZSCc0HBG5HmM2\n3iCBDop+rZwIz01E1cZS984eSzk7E8bnCT+RTUg8VDIEvbIOy3ggM50f1gd3\nr3vtV8QsIJWw3Az+v4nHvjrQa0yaISvovCTk6QuvtNSNu5ahJbH2kcFBI/4P\nmQFb++9g9XPJ4qG6Aj4EONhsp4pmEXq9/geymxrQrC+YjSfMCYxSJpdwY3vA\nWYhiZU5CI6dx6xSytCaOglphDOaAjHK+1MbjcHorsCzFo0ydqjqHVjl+Jc2p\nX5HZWqdMsE5LRCZevVPek4aVDM/qXPUGhWGJRSZjWXKg+Qb32+VlvslPpZ7L\nXID38haORM6NKKn5ysCZ0qEAxhI8F9STqEVajk7VD5Wa+k2+GEeOGWVFG1Dq\nN/D9QW9v57hysLwy2m2cqqM+RISpE+tSCoPGHb8nZUeHkniCW1ai5oQ5UWvd\nQPbQhPtTMahuHoybGm7HAr82m8pJJ4TzdL5u6LxXwD3tiCohbe1+J7/MzFTA\na6Pv+F6WZXWwoWbf43kOH+B2b5KPP/ISSjKluRV3wtOvP4hl1wHZ/J3x8C71\nhcRk\r\n=XGXa\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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.22.1","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.18.1_1600970991262_0.8545406716550368","host":"s3://npm-registry-packages"}},"2.19.0-alpha.0":{"name":"apollo-server-lambda","version":"2.19.0-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"3047dc10651418cc15499d0441ef9196f8058c00","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.19.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-mqOe81B9qUk3v+EnwHzxlFpHq5b7fQYfZd/KDvWH5/yuPwkzUGjspGhFkfzoPVSyIZv46TNqYONZeYfyPus/bQ==","signatures":[{"sig":"MEUCIQCx48wUxBgD+TTuP+yHFIizgtLlis8jJ3tKyU+8g1afswIgFz+Pq8IkLw/rvg05AXDCUG3O4MwmajFZ05EBIroPbhk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfeyxYCRA9TVsSAnZWagAAUJsP/Rk2TphIFENrfHJ144sa\nEUVeQr4XJakqP8+HPVuPUkADl0IWuA2dkeXDTjDDtXRD2Gvcb79RXllpj8uv\nLyhBWtRoCHMkk7dgdBR7ombXTrOy+pIRZhWFkxLJlzEs66OFXiQcFGVRMQo6\n3/QGfhSdLUnrWBy8BMmLgHe/A1hhI7Cndv66Qj9xjGBGyeVyoTqoVCE//VBe\ncseenHaKtQJv4TDsz/WhrcURe32QRdNd5DAq7V27QZACFVWZmcZnEnPxuNaT\nBQ2qAx2RGsWZMo6cstAuyZ8wtDL9KiX6Vap9NtMiVv5cZCkquEGRTuq5UzfD\nQyE7kt4DqmJQj2z/xh77tdvPi0Wci20m2lNSdgjiLKVDGJpn3Z1WXQBnV2sp\nUXaPUkGQQzDa8Pzm6nMpQatq6REMDFHC8wr3nBJQu5rwKNmT5O5mh3eBovhA\nP2/jamXkWao1W4jDCrQWfng3E3eVqWbzneznCJ64mrN/9dQzcfI7OjBM2laV\nTUzHO5hmLLgsekcIF1Dqqip9BQdmAIzwiYI/3VKv8mwTrW7P7HWQDOLJMJmJ\nTHdJIA8RSjTSHTe8ysH3qUF9e/XAokbn6k9UojejiJCKlngCqat0L8hjE1yO\nIsoIBdOhkvR18idNi77WuNksqcnv0/YlW1aWttA4c3HHsPHLFJkl42OManPb\n3Lvp\r\n=M7xY\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.22.1","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.19.0-alpha.0_1601907799896_0.5792683178295268","host":"s3://npm-registry-packages"}},"2.18.2":{"name":"apollo-server-lambda","version":"2.18.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"3d89afd49ac617b44b141949d9acae6d77d671e6","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.18.2.tgz","fileCount":20,"integrity":"sha512-w1PxAAyrNLXOTeKl+Kp4fp37CGuAwn/ubSsWv+dz9fLgs/AXnPhb9B9mWCwLW5LOBOTWH7zYDqtSNqs/J7+r1Q==","signatures":[{"sig":"MEUCIGe5dCuI3NxaKwz+hb+SCdifalrm5bN6Fbcb6W7kWOoSAiEAjKpRGcMJd28FTncGpu9fOAQZ4ycggRYEZVqeOJoHROc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53089,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfe3B5CRA9TVsSAnZWagAA0rsQAJ0yXuL+O/x/yfjWVLc2\nJx+FooTwUs63R66OuyEu5RcvKE4zVBCkjFZE5n7MmQ7PGVYJJJXqKxKgx8BS\nxRl+KoEzxoCkOaOvSIgBHTSZfPXJE4HD3XZHEU1wWx/k44wz2GmyDpFz9VLd\nNR1ShmgEy4MWsD3AFovOcrrdkjaeK4X82iiRAATm9v90dmbTS8DDlQrgM6Lf\nXfkLQytI6BJH6XqaE6/iMmrBnRH5MrsSrxr6R1wIEIyqXx//+GDbSy9NW4m9\nZib+DOC1SmvBAG1O/gs/+eig0s15r9R5/NEypDjcM2zquHeyKYaRF9Axrq0K\nLdOc2t37R22Dri6AszyPjrk7SS9mOeFWRTXcD9LC6mflb89TigXVZ84JQgnB\nvFokGGfsVhXPtsOcz7SK/saCInhjf10yqTStCO48sL88z45yoHKg4+cr/f8C\nLpSBm5URn3G79bXJuZcmatCeurMh3NVu52q3TxLMRaDHCrYWZgOioVvC8klO\n7C/0QCRGnezJd58JCCZpB+2XK0Ddqhh+XWuJXlPz7pJj6XXGWI/EbGCl7mEM\nJtrVEUDQ88qsq8e7GDpMtng5tb3sezBeJP/an6NneDilTSxAXuMzzJ1j2Ugi\ngPdltqWLNdQE6ttKdnHYVXZjNzJgaGrdut5YzCkLE1BEvMRui3zIP1CJZov1\nhmFO\r\n=TdfV\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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.22.1","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.18.2_1601925241004_0.5322217459387903","host":"s3://npm-registry-packages"}},"2.19.0-alpha.1":{"name":"apollo-server-lambda","version":"2.19.0-alpha.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"ee7cf3a93a64f0993f8ff7d35f85deb99ab7d69b","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.19.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-ZiMKPWj92/LnPO0Kyh1wOgNtBmG4AVxBXjsM/SAI5g+Vp0xVRj7f+hYOPL7G0PolnpNdlnuXSK9xwOG3SZqqkw==","signatures":[{"sig":"MEQCIFwEYmx5HM/9Z/vbY7dTYEgO7EVzgBOZoxOpVdVuiy7IAiAH5BfIySjbTEXhhpmQtoyGpSsE8dJ287WiGl1u5cEd2g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53121,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjdwNCRA9TVsSAnZWagAAxNgP/3Id4LCFDtvVzE5iDybM\niW6OV4ROcs6LPsd/wNHkjP9JlE/kfKVlcmcQFbFNdO+NsotOZPQhHkTKIAHU\npgenpIq3kkaL1qCccXVg9irva2sBit0T3XORSyyQooyevEA6mC5xHixvgTfH\nmXCzACOzpDyFU4KGq8//mOzvcVP61AQzRtSZXd+lPS8ZRNABduhOcmHT9hrN\nKi7OlSIXQOX6dfa8GbOzAnqE5NM9ZRuCr5/saB0jbVnPtxxYV3fcDuoYWfDF\nzQdUptPqb8ZVik4d/UynpRFFXWvB97HPCh/a/ih/glqzNjs7pkSYTI3/N/gU\nBe6DruVqdxImPKIHCSlx3kHHtaNkBdA0gUvzYXWyDi9W3LoxafDyN1iRIwUH\n0mCfliZ9PMGOWk5Yi4qG1L7vrlLKKqIOD3XgKk+i9xPD7AA6TlRjdhF/6eVa\nT17wofhyjb5UI3VhhxHXHsxMjxUBturjyQBiknEQj+DUPJJnyN9Mq0JITqTL\nlp07PTaF06ehQELG4xUkYAuYCjSgZkvhM0So9rIHBaIY2nyREVZXX4oruTrZ\ne5eJ2Rne7NVvKvlpuXQLspvpK3k70/ZKjufb4F6df4qJUBEO6ZUUwSW5uYZc\nEbpXq3AqKX83kWNTurj+QdhP+npJhfRv6VYod4WzB8RG0o93507gSpFiZHIs\ncw1o\r\n=aFA1\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.22.1","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.19.0-alpha.1_1603132429253_0.0237134414950384","host":"s3://npm-registry-packages"}},"2.19.0":{"name":"apollo-server-lambda","version":"2.19.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"63d114bd095ca6d2958e1d05f0c0ed9d23cfd61b","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.19.0.tgz","fileCount":20,"integrity":"sha512-44W6QaHMnVsKKXtC0o04JR0U65hoUC7Pfj3ik1PThsGejHVByyaQi7Qfbas3vuMAxU0UGkF5TKycc7K6KFxGUw==","signatures":[{"sig":"MEYCIQD5//5/YfGk+mKp5NDrceEjVidbZZ+ocPHH4Xmp+sK8kwIhAOLRx2WP1xbPn05jMAdjrPMW7QaARtCKGYQZOYmxyFey","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53308,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnHFhCRA9TVsSAnZWagAAO9oP/2b8qo4EmzDQVQ66GvU4\n0HuznpB9xVABL1DvxT6EvheyRUDLXmRvuLCu5ht2AbCJkjmOs5hL4GFezmW8\nh290Q+ITUbUM3abXbimwsVcisQt3HL5UjUzS2CuDRgyiY6jU4FyTN+YmQVhq\nglhWatFdGgtZI9Fpjaa3XvuzXl41Mi/hucKt5yINom7ffKrrE3uR6ePexOu5\nS6o8ZnFfnYD7Stqc3+jqORB+0iKHsFNIPT3fdHbm0h5smlBIShux9+17WhyX\n+1kRh1mZcOL+SsbX2eTTJrdOn4YxLXD/AhZMr0tZ8OdaLHzm6v6vobaUntdk\nYtRcSPgaXMjZ7Jbhgmh38+KCzg9DOveXyOeHhp4pclnz2gNwCFET/sCT+c9B\nIdUZgHEQDWnjPBrIj2wWAWme77W6hId9nq5rlhe8yxoK8fL6c2u9xtmOnz5n\nHmsOE+Qkigx9XrXs1FpcD9p6ym1+AgQNanIAPKhS5nRJH4H520TLycslkGRX\nxL9LB44NrTE2lDadgSX4fVyQnNRQZkzTS9YGENj2yatTUk+H8Qz3lDSzBw7p\nWslQgjs1XHSZQUiMbZJs8DRJrdyZ7Ro3fWzmcM4qJHOKYDYQQ6xuh0UxfRVr\npiid9tMM1mOhp0V0b4ZnlB+ecRCeGVQVbI0aztkJ4nLV8pxRtCKgrJVjJrNm\numaj\r\n=pwtt\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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.23.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.23.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.19.0_1604088161064_0.34918229091512787","host":"s3://npm-registry-packages"}},"2.19.1":{"name":"apollo-server-lambda","version":"2.19.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"f65171185803d9a75b5f581265a5d57898836d8f","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.19.1.tgz","fileCount":20,"integrity":"sha512-NBBcw53uNG/trnDcAKxHQFnt2RnpkBdDChgE50alZ8KBHIA0YknTFodNBkJB797cN0fbmV0qKwcGGYA6LSw4cA==","signatures":[{"sig":"MEUCIF6gabVR9WHacS/81zHMTNd/NltweZ4LSOt2DOWcO8KbAiEA8FbkbCLgOEh9RJsZIy1GzAB8qkA68JYLvjQxPy/XQLc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53308,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4nwoCRA9TVsSAnZWagAAyc0P/jEuS+97PXs9HOm3hbJt\nCM87Wa6VkgY1ZR9XguzIjAJRPluJ7TJ+DStJaFiNk5kXOKYt9rvKqtelxwRg\naVpCpTkppCwBtfi9W5TYadi2f68Fvwc0j1XmJ7Q3hjssSOb9keDQ8QSCiL7P\nPCsBgGj1HqMSUHzeLvt2Rgbtg1LC7Duj4Pv3lC8Zunbzx2Ijyq6i5iUffTMT\nCO4GoFGemixO77A/xuI6tnQ5P1m7738FnrOaLXoiav9f0ehHHcQ5uqtZWmAN\nUeSqP5WpF7UevYwGkz0VcyTJhE/a8o95GZFN3gepu8us4J7drTYi4XiOtW2X\ntoAlCq5yjhoVPg2ziR9DN72872KsOatrXCVo9RmYVXnO1327/GxT+5V1FqJx\nOOL2ny7ZEclPnbAJyNCkxATG+v5B3E+bgz6ephUkhJsEsPC9ugHm9bJT3FWY\nbF9mp87AzzG1mOxTZ/RU6HuK99TcphMK4VIy72dcO2GgcvbVpXCLoxl02H2F\nV7xpaTrWR2Y8hnw7NcKc44YT5uYRSW50sK8czOd4SdYbWNfo8eDQZ4+p3sIw\nO+BrY8APSeKsDJgGCyu2aCWS1j92UUGDvyNgf8ZaN1N/SXwxkHI06JNp8t34\naAyVsQku1kqU6BixcqiRwmbdf6M88uBXc16OwR/3ETkNkg10CNqHBj6MJdc4\nMy7J\r\n=hvr9\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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.23.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.23.0","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.19.1_1608678440031_0.9221015434067963","host":"s3://npm-registry-packages"}},"2.19.2":{"name":"apollo-server-lambda","version":"2.19.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"339c007e0fae9c92ed6466bc84fcc803d71ea712","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.19.2.tgz","fileCount":20,"integrity":"sha512-07AUhvF/saUSlMen4BbY53mPa5Q09fE1xj0MmVr3pGCG6A+yDwhMd5B8sRuH5d2s6naDo1Wvt3udkEok4MyyMw==","signatures":[{"sig":"MEUCIHgVV8uxoBTQnl/gmxpaVzdFMzYWxuA19CyJveNIhpfwAiEArc79nswQXsRc1n7xVA2KoNLaBWpvs9Srt1woLd+7djI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53308,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAHaFCRA9TVsSAnZWagAAusMP/j2zIbPTXvO74QvqSfeh\n6i9mYmQX8kFIyUkU6KDLckeehEBzstu8V7n7Rkl540sLtUD3P68i3F0VZNlt\nticQpmGQlB/5BhowPdvotGo5TwedeMnLOMWzi0hr0PnaSUG5jMBoNF5RHR3h\n5bOOAtuhiDns5pJyPVz0r1x5zyPP4afrwsjmeEX+c5LfKP743mUkhDTAND6d\nhACJlog0+dJ9vyw4Gae6fitTe6IbnQz4heU6DFVHLbIHl5sqUYcBhgw3OYqk\nc7LJMMGCi+TnAkjesfE/BWkBtIyL6EEQhXelq3Xa8VQ+WjU/5fnhdPwZEfiI\nVFyWUa2SF3K+ksGQ7P4hXYtB2ziCBMkDqLASK289bNJAsMv3HTLz0AGrEzHj\nvkio4aAVNNWyh3aJWjfI3TNe7cbNIAs+E6II9PKCzb0cqwDzx0Z1gYoaCWDB\nxtfatKdk2kXLgaC+AjpBIRdVp5W+nLfNu8RnPBdAkMblmlbVHM04zI0XnkyW\nz4q6rzTkYb+KWKNhvB1SnhVEGU8pSiTzAT+1O+RaRO1n2nStMLFc/GT++f+q\nWLdqAw34etQSI8Qyx13Zu5aKIjWBXZiZdMpLz54l4tpEzPgW/v8w96uwogJE\nXQPV3gvUoo2X2Rf4TenWt+yYwD/npZC08ZwiqcHQDEICz2l/xgFLkTQdZbyK\njsow\r\n=ocWw\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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.23.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.23.1","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.19.2_1610643077232_0.6098209535769148","host":"s3://npm-registry-packages"}},"2.20.0-alpha.0":{"name":"apollo-server-lambda","version":"2.20.0-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"612ce730c3cec5d0de390f54ba718a028bfda977","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.20.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-2Q0EdoANQkgsijZ7o+PWfVYYBmzX0MD+TvAgyf5+5FtLxM9hAyPAreu0a6RmENrChoavU32bzsGpdNrkz7Zw+g==","signatures":[{"sig":"MEUCIBjn+DPr7ohl82GYiHH1M4GQjnqUmuKeySj9Fj8YvWiRAiEAhUx8qZdpkTHhiRPUyzzKungmZBygCxAycktdg4jIRzU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53332,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIeE/CRA9TVsSAnZWagAAL0gP/1PfK9hFG40OrpxjZEtj\nd8h+GeVxTDoBz2x/5D1eIzPhzwFQYLPAsZNiPsynPImc+qy32LeEAya3od2r\noKNpZ8VhQ5uMC2vbVPbRUBCcsKGmavCRn19jGnauE0yk30AYI0+Z4zOrwHcA\n9e8dGHq69Y60bwhmAgFQhf/zYtnUMfcF+Ibe7qHaX/UMuDCHSGNb3PvedIRz\n/0fgrQFpEejOH3313n+jtjOVBMCvh9fRsxNZIcQqhkJ970gzARxI8AcdBiB7\nELvCounSmsNA80QqGYLc8XlR1jnYk06s9ynoEjkpJ4A9NNsP/Mq2ga/TzoRh\nLmQLDcqE4erzYiAgPIBSlskIVQ5bepFu8YouAqFovFzOaKf+WJpF23BoKOu5\nslUHFDmMu4V2fCrju4I+8QT68eMRaaI74JPHmId0JBPgpMZMJ74ZnPkp9jRE\nqFVIgexjjAkGk3WNjI3188HnnHYcpamji/hJxmbaH0fWGtzLCNtZofAUlOGQ\nYgN2mfWFLpGerV4UK7S2FUkLDjYlzE+kMaZqtTfyfOg0QxZGASQ6Dym2ln91\ni8NydkilDuzcQCUU8m/itm8zKTu3tBZUhCsn27PB3lKRirRA2BTEOgfzritW\nrRRurMpUk6NLNm5Nhrb3jjlY5rjxRZJisBQha8YnnaxgYdHGYv2ZFFv6ACW4\nX0eX\r\n=KASa\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.23.2+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.23.2","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.20.0-alpha.0_1612833086937_0.2167613214306543","host":"s3://npm-registry-packages"}},"2.20.0":{"name":"apollo-server-lambda","version":"2.20.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"5b60e8fcc42329101e1127985b6717f0bab54904","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.20.0.tgz","fileCount":20,"integrity":"sha512-CkdEyBqS5MhjkqTM74OMbv9PTYs4c5VGQ8MfiDYZfU7i+GJQ71xe0HUMNfrAN8auElCsWJHwO6bWz19LWwG6tg==","signatures":[{"sig":"MEQCIB/+0hg2HKVP7qIehXGrNyqjX9uhrIC9+3ewF32uIOv2AiB7edKcRiFjni2mVzULZamydZyjd3R3sXY0RA2sZqGCKQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53308,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIxWACRA9TVsSAnZWagAAj50P/3D6wDWoRzYrC3qSktO4\n8IvzHE/EEotPXYv83CfsrT2n4C2/TlEEMcMrx1OZ7koV3EE/HTzcRksvf3LY\n2/VV1S+/W1/OubusRh4wWxQa3KVh02Wy+uPLhVryrtbq9x5fEEDqh+Ly3RcG\n1EeUYkqNC706qnm4wltIGseyB69k0Z4ZAalGhcfrNG6HmwzLT8EJIWxyvZUx\n0sMe3hj+7QKSEBEGndxehYNBukhu4Kn6+VVMcnTfsFMiiO7djQ4EcGgQ242y\nLyzbAPnB+nycGCsIm84Uxj7FZBJw0a+4RXquYxKlM8EnbAonDvuJV6fZzIjf\nD/FU+Yt8KuGtkJLShBFujvkzP86cXLKBi8G2MwQ+ZnCjRmdtAMvAWKPyXXDQ\nkXDVF3Kl+QeuZrIsWpezo7NGw3W1UpOyi7aKQr5T7gSBBBlo7K+tEIvgNlhR\nlB20bzA9b6VWuv8CUFpZaBGQroiroeWfXa2hy0xBoE7+stbGZFe7+Pk4QOe1\nDPabB49sEKxUqdjMdKGKeW/zqyk/nTVqgz58SFfLf69vZnhPKtaz2V6CAfPm\noUP34yRVTpyKAo5OYId3FflebtKfwFY5ma89j3RBnLJH6Y7VRhgJ0S6o5gOg\nJzbpdwXFCNRXY2sYs2CwvMxSN5RAy97+qkdhRWmG/nfZTeY3XqIr4LDDEU/i\nHx9i\r\n=dcD5\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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.23.2+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.23.2","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.20.0_1612911999661_0.16301420705474223","host":"s3://npm-registry-packages"}},"2.21.0-alpha.0":{"name":"apollo-server-lambda","version":"2.21.0-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"5d6243775a08f6bf28686ab7a4300d09d1f0f011","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.21.0-alpha.0.tgz","fileCount":20,"integrity":"sha512-yGNKDO4pdsf+s/+N+/izyozH/xHJNhnbKBORJBat/wmhesnAv9eA67s/iAwQcaVQLWv7aLvSz72x8P2Zzi8Tww==","signatures":[{"sig":"MEQCIDKDHPexOVbLsWZylC7l2O9uA8LVCS5TquelVtFkxojVAiA5ZMLsleWYFjLH1tgaLu8F6P96jQrQQBlqYctZMqbwLw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53332,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJYKGCRA9TVsSAnZWagAA+ksP/27tpLsZGUSWeqmPIVDD\n7er5FauMHGPRjYh2sTLhgyz61CYCGmTS5iJT5CbzK7Im2I+8L2zLWauYbwh6\nnsWpzbKBI+/e+OwfPim/3E9x3RzkNxDA+2ngSk+w6GN/Zs/psYY2uI2MkWuG\n+E+vSG6zlHiaPbgaqchO2EIAYgqkEaiBAC9dSqm2hiaVJTUTgiJ0W7NTgVjV\nHfLtbJH7PT5IaVorO4BH/WlQfkLIWtwbBx/ZUtPaZ3F51wxUnEvqfa4R2ol+\n2gtcC9bhiJlghdhKLt6EDC63lIreMZE87V4SBiwIyezfxvDxeLllO2CPvPro\nyGzTKOQ9rFwZSSawGIPK9uZPyjhqkrFOsrjiePH2hMiIa1TULvrvsK3rl0gf\nN80Gued6rzzGxKl7M8NIK6zP+Sxm5fht1oEOVsBumFrzq1ySyxwNcTgo2j9L\nXg9KN5a1RcLDTxr4lG/dzbB4GUlKpnl9HYR+lU1a7jlOgAMPBnhq0axZcO4G\nWPY5RsgVVBTXyPaaxqW02KD38tBCVi0M1/Ugc8ujc3QprVvTnGeGtV0epsD0\n6HLbFhRTDR2nzF7PKkiBvP3B2qnNB49ZamhNtkSHB6R+FjAcQc17d68IjpU2\noueh7laE7OVaLlknAXHkymUVKSFQDaQXDLRUSQGp+hG5Niy5l8QefBY+SZGB\nc+I9\r\n=GvcZ\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.23.2+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.23.2","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.21.0-alpha.0_1613070981794_0.42894851014233915","host":"s3://npm-registry-packages"}},"2.21.0-alpha.1":{"name":"apollo-server-lambda","version":"2.21.0-alpha.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"13a481d878542aeb80b1cd6b689eeb1f2118ffb6","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.21.0-alpha.1.tgz","fileCount":20,"integrity":"sha512-9tmNgosqe/8bvx4QHSc+d8f92N3HikIGEsYOllYvePNEMkjtW7wkdQVH0/n7cnoJ6GtH7Yym0dobTRBwzOrNVw==","signatures":[{"sig":"MEUCICArRqncu7yelSMI5/j8fQn2+IRsZ78kgVIN7s7wmPx+AiEA8B6/MGTJS3LJ9RhODUxWuGkDKu8MaTdUBhokEZxpD8o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53332,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJYs5CRA9TVsSAnZWagAAdtEP/RMBy/GfV9h8l/fUL7cr\ntBXsluDfSu2qD4Jc9vJ17owsGhekjWFpDK/7ytC+SV7WeYvKQUfW+zGbebZt\nvHkxYwNFgPVQqvG9mh1/aHwq8FgEfRCGn9UoR+Z8lR93vxzNHhGZ79pCD1Dz\nEsQfEeCW7oqoqBA7A6ZOvIlvB/V89y+0CUk6aAxS74y+sV10GudIascKr9c1\ntDlMludAdSwdqCYGDZxjupU/WrGWG+DwmxDREQAvXbp3It95P8dsXk77nChF\nDQXBzVyrFi5+ZBLU+gh1V3WpW/4jh1bz7mKTRoGPjxACVGYsZs4cxuhDwIW1\n2F5eIyYlQmeeKNNBG1mWt/o6m0sUBKFpSTj8L9b2SGCnsD9ga0lVeoyKLENC\n5uO8H+y5pHJRurhedCEosuptzGIk1HLAoqnSx38m9VSsWZhSA200V8th4XBC\n5lY1uoI57wrkCGjU5b0ecthrVxVgQsRPlANqObHlAV4gRl1hW8yE+5EqWfhq\nYzHI+ibVqclGf4WjARhoqjPBKwnnxyXKAtInpMvnaUhBEwV1785JSKN2vobP\n/hsFz7jOZvQRRqBUVcUlxXZ1WxP+xdY9OMDl2JPm0EeGxqDHcC9eTLTk8dC6\n1m4FHRmncGQLqZnX+/oLtHG7ed/b8Y12KSo2C/66Dr6Lokm8nyFHzg+IziC2\nhasG\r\n=caHF\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.23.2+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.23.2","dependencies":{"graphql-tools":"^4.0.0","@types/aws-lambda":"^8.10.31","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-lambda_2.21.0-alpha.1_1613073208709_0.5140587981749869","host":"s3://npm-registry-packages"}},"2.21.0-alpha.2":{"name":"apollo-server-lambda","version":"2.21.0-alpha.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"9e3f492bfe5fa0b95d16873d269538b015ae302d","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.21.0-alpha.2.tgz","fileCount":20,"integrity":"sha512-HzUM7L9i44OR4Ts5UEsPWpAD7Vda8szV/3nAGSQlpqRI/J0hJ6wfCbU5HkrEIBfyrk8aMg7j1CkDG0eTcfTDvA==","signatures":[{"sig":"MEYCIQCLK4c2chaZZTXVrJtZhHP1+FTXhG/Nf2fcj8SgwYxwJgIhAMXNuXa752pJiqAincmnurofUsp1WrCEU92pZ1n5Rzm+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53332,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJaYlCRA9TVsSAnZWagAAArwP/2105A5H+4OW4EG+AqAd\nKHFIwoCSRTUp/vcwpxnCUdaWxTOsV1UhgfZz2cyb6KuLsUQXLnuOC4/mdiZW\nuLWW2Ez+jU8Xl4f7MvJqQLNOeA3uRoO+6cUxst6HgzPh0tuR8f11r7sCMrZL\nPsoOZqdXOKKlgfMq/pEkYUIvTrm1LNU5oEph9RvrqFzSl1gxmDvaw09Yzdk+\nbqZ1W3yRfEUgcXZVaAWS8dy0Uar/FWpFLzDZsDfAK/PCxO2BRhd+P4VFVqCq\n3kvWmIT8ex3hhaHA/eKH1SyWcLwzEH1EBJ5d95jZHiaw2dkGjTG5b34w/tmG\nMHAql/U+K+Uu8H3OU0DXao3dUw5AWPLbV5n9L8OPzV8YH5xwtyATG8paS1IX\nHlcX4/7WGgCqWFtr63hyhKF+7I8pGEs8yDd5dJqZzOWsGAernE+VMfMo709w\nM+/zGMCTsoKub85pnlhbHqgd3mJRLSNMbQF3Kgi92SanTOKWJsLCyOT9IObo\npM6M+5HxupvsYGXAohmK1o2+mkYONsX8Qn+fAyw3Lc7PmWn/6usenW3qB7on\nJBcJyzi7T2HGm/IOM8JD9mFzBmf7kkTSL0xR4FT5zeAdXMcVS0hic6Otuqgm\n03bpfA/6+9LIJhZB9rgHw4ew2rODd1wWWcNGgjE+LX8+Q6YApfEI4BYyuXZa\nJ47Z\r\n=1YuE\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.23.2+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.23.2","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.21.0-alpha.2_1613080101365_0.9164183229032477","host":"s3://npm-registry-packages"}},"2.21.0":{"name":"apollo-server-lambda","version":"2.21.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"24080382aacfffe5f61480143be73c6424d3e54b","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.21.0.tgz","fileCount":20,"integrity":"sha512-j96eA4hoo6Umjml3EqjgNd8cdlYHHQY1bMoTYIZO63CYemYRGkuB4j9fumNp+fGwZ1KaENm+H53iTM011VSjpw==","signatures":[{"sig":"MEUCIE4brRWLQL82gCznGZCzr4zCPNrkt/hXocol+70Kj96lAiEA8pVZ2IegHYX+F67sqxgmqZHIXmzgc5VKiaz5YucOa9A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53308,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJeCKCRA9TVsSAnZWagAAsE0QAJZjjhZbJP/hEA/tczhw\nZn1OFTv7ATEoqPrmvN847UhbCQPtby2fw1jvOhRVpwfOAH4CyNvfgmHK2aoG\nmJORPLOnKP1dvB08yRDGH1se3HTlCedyAKDw0PuxmouiC2LAJdOqYzpsXjWE\nstY0lPuIufE9ru9U5bcQxi9Y8SEz2mzd3QKa6P8GOAwz8sXsEC2YMTkiUKgP\nDGqCLLxu1yUxsvaNasfTVRQpRWZKSxUwXzeXuZVxpOa4tPx+y2d57E1WP/fF\nhZxMta3AG2cM8W3U3o1N1whT9+0Rj5WwqGY+0Jr40SHdvQVAhMpqt74YDbi1\nfxDdN4k08UlZnxICqlgecHlRCREbtxfLWmVzte0Yq7sKIvPRVhINfILrMxyN\nOfNGgN8yLYKgeVId5VQvbxogcd6A1pnDH5hwr+83We0bzWwmsKdYDA354pgm\nGSeHY5InvYEkKIr05g6V1LXsVQ0O6zqG9U6MznvDlt0xhJGiOIyJGPq1/+GO\nLHbGlXczg5I04Uuvg334WftoUiKAv1vn1Zm0RJhnNiJbIgg/jwyW6VeG9/W2\nYNIv+2qvvQuJCQB4cHKjgyuhcb/eXkyE+3XZpy2SJWjaG6tHPwMa0hYKEV73\nT37ifCFmWYEmk9d4vTqFkOZa6K3DfxyfX8pmUnlfTaT/NbPQIgpYdZDT1FdS\nXe+r\r\n=qflz\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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.23.2+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.23.2","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.21.0_1613095042196_0.26756881882768613","host":"s3://npm-registry-packages"}},"2.21.1-alpha.0":{"name":"apollo-server-lambda","version":"2.21.1-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"8a4d223848ccf942b5b18317ec8e9553ccb16fa1","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.21.1-alpha.0.tgz","fileCount":22,"integrity":"sha512-Dlw4dLG51kbQqHJgZy0B8aAjo8tanYJ63TRy9TiPY6zuvmWPGuC/9dRhie8qkno5U6pqfRVnWc5bAEixn1mpdA==","signatures":[{"sig":"MEUCIQDm1Dv+mBwBLI1+lvfh6jD7ZpmfvClHoRZnfHo3Qsx4gQIgLd8bIYQFDlOIbN3Hd/VXrSgOdzhanRZziFn/95Dx+/o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55960,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQs2+CRA9TVsSAnZWagAAubcQAI3ht1IXVU7ULPjNto3U\n/r7rWUCM6cja7xmHDxbwAJjZ7yz86KhGsqaFcD98Psw6h2QeaN/BGUYv0+/D\nJ4A875raynto5F/mN3Let5AAkGInHnlUPsnBhf5HRgLv8qmaloMlcY4dSDc7\nJgvWUEAx2h3zR+cQwpcN4XVxOgWExRU0i/7ORcJ6sBWZIXv66sVxPnR8pj5+\nNDHH6HdogOv4tnhAdxEfBdJJ7tVicID5kob9ZJTPPyWKCMijvUYZl84sCF6X\nzo+iL7XK8GxlthHZrgdoYVAYJ7xgZjR37naMifv2NUEFqvuqKroR/rAv107/\n3y0I7JxOd3kePXd8S7uG2+Zismbrt79dYqY1t5ebPgZ+TrawM78fIZ5et2jB\n5YLQc67jWfQdBIA96YcM0MRNuoR9Xi0U6FcIRpcAVHIQxiph/eT5SnysRdNd\nBJkFTXUtQS9h4irC66zlTOCeY4SBEJCpxLVZcfp5pMO031yF3rgea+p83ZSG\n1RjeRE44jxo6rTBeVbIp1lIvCDtp/ZPI0hWLlfJIJ9K7usLYWti1n+2WUeI8\nIB1ARG/1L4WfGzQyt0ioGI301M6XNAwKHiBag/bEBUFxuWOMvaVp2094evpB\nU0FACOGy8M29GbyZsPkFSRCGPSEG5WCfjZimrvgVCW7vtnCvlYzoEceyWAFX\nBqw+\r\n=zz+7\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.24.0","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.21.1-alpha.0_1614990781695_0.14212991115000673","host":"s3://npm-registry-packages"}},"2.21.1":{"name":"apollo-server-lambda","version":"2.21.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"c3995010df96ffb73ca8e3a2cb7709aa795037ca","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.21.1.tgz","fileCount":22,"integrity":"sha512-5EYCBMBYzE75X8SXjsWelXCFryE2jhoT7sxhX0OSkrestv2eNMS9EMYEOchAGQZYP7BfLw96chQpFYs0xjYPOQ==","signatures":[{"sig":"MEUCICbTadPx0jdxex/5NbhRDTaxDOVx3DVF5Myt2V8XW8yoAiEAlhoEABH1UuDilkScvbtGCVj8f48BqX3a4pTB7zxpxI8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55936,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRmx7CRA9TVsSAnZWagAAFN4QAI0JPQ5+PRNvQPtIENdQ\n+APFjQOWUv4yFbh/MUwt91cERopNCOjyrnopi+IO1j/Z13qAbVfoYZXAcD3y\n55HncaV2Pf/rW0VJrSzxctbbH+55T0QbKaCxb6rvM5DYb00Qgm6uJCFq7nKY\n2RsT2kCp9mHVfUY7fPUZhKnYPIBjwYGYOMpELDpJhFZsKLQF5IupycrwogWV\n+YnHh1kez5M3KRzNLx+ETgNvBq5kGS9ngQRqHYm5KxP93/P0ZjSGzZkig4At\nrpPRULkcLrIl9QqxExIBL6hEXzGoz+tFOT8CKoA1uPTyjGPGzoa+blbfNgO9\nfjTsrOcg0e3qrF3HNZJvcNOpmU7dTBHhHUFEe2bJKif5jHbeNCKCZHaYBnzH\nuwi9Gr4uMzm+wlmkKLps2712QvfHV+wDv30hlXaEcBK5DPp+uH+mut26RRMP\nc2YKGiCB7Cgtj9SwMeJ8o8EGOx31MWsqr21WAD37LYF6TIEiR7nflM7SnJQq\nTOATA4zCTWHSdAeNZGeEO6AvhOd35AdcrfZj4ety6uXf9uVnZegP074A8Hms\nE7aQp7l10v4ZiVPXKjUXfO755PEeC/NcVpNoxMpjIBVLUs5z5E/wqukBGwZM\nezxBFJkhUBxbugs5swjhYblF+3UldYjsKIrC5SxWN+8/U+1l3CbdYp98pk+e\n+aYJ\r\n=jzZF\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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.24.0","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.21.1_1615228027224_0.1978485845209812","host":"s3://npm-registry-packages"}},"2.21.2-alpha.0":{"name":"apollo-server-lambda","version":"2.21.2-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"e20be49b6ec2bea4641a1a7314ee48610ae32284","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.21.2-alpha.0.tgz","fileCount":17,"integrity":"sha512-G21jTBKz7j1J4Blqevv/xtnkIHkmlIdyT5aHzaWHu+yREmcx+CnC4D8pIYdFvGF7kzWPl9b9+8qJbPQ8dcFjdA==","signatures":[{"sig":"MEQCICAp8+Kgj9Bm/TqTZ4qIlXja5ylEdc7rIJqx/Vt6rBFyAiBckyk9OrczyoDy3aJCORjy8+JkKsL0k0SHMXxJ4naUXQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":54722,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUSShCRA9TVsSAnZWagAAIP4P/Roo9aUSEbhgB74mX6VV\n0TuVoSMsyuQEcnlFd75j+pwPhzw9L09PXHNZ+ZFkyrDtLfkUNepo3cdpysjw\nOycEGAqmH2lFCKPZOoAT4Npn/AACle5jgqa6F8V6La+eKMorO74NLQaTgvS0\nN1Raz6Q1NI0xlfXhJYN8AEpGCto9m2E9nC8gR66fELLG1s8uT/1evuvDf16A\nq9+z+YsWh4nm4NvLusjSx212YfauIaTujA8ueyZ7sXvixFARfNipfWUN2tEG\nnHFTOFYWum/qRklJxEFzQE14RqcWd3Nri0yGbV/8ip11f2qAJEWcACRDxBhL\nkhFij7XGI62Gi07liGkhQoGrnNtHSGgWWCDc5lgr5OU8/se0ybOaQl4szrf/\nwn9kD16Z18AXKyXDzylPVsAyOF7rrSZyTdD2Fyig3KntW55Noh3/DX7z8U8y\nObnZBcQL37NmnFUdZdOMhZa/BqfUWlkrhPY5YyxyCKiJSlqrrQjMkVDojzHk\nJs0MuHxodtIJZ4Z21rm3FVloe+S9ZI6cCF//2UwHnw+lqxFEyqs/n4t07aTY\nEy0jKFpE38jC5yy9Ouqm1oXjC+kbq4m2+t+7G/OrLDmQZ5w2m05534KzLioa\n192MKKE0o3/ZRimczk70BNkhNiVSP3qXzR4MxzzKf2bVKMcdxLxj1XkPPk5v\neoAr\r\n=6sb9\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.24.0","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.21.2-alpha.0_1615930529424_0.8383965967057891","host":"s3://npm-registry-packages"}},"2.21.2":{"name":"apollo-server-lambda","version":"2.21.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"99b8f74eaddc875fbc3f54dea6380f667c77d4ea","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.21.2.tgz","fileCount":17,"integrity":"sha512-lpVn+wGvV8SQGusDIl21sJeFokI97TTP136clZoJ8CzI17k9ASOt+Dq97fnEc6uNwCA/RESypMjEwprnE1lvyA==","signatures":[{"sig":"MEYCIQDXYKzqDZYvEKRVVz98XC1Avq1++lz+/lIBacuge+CpBAIhAJizUnKRLvhlazRUqTLthzGgGx1Cc+m2kTnHY4Mncr3c","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":54698,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgU690CRA9TVsSAnZWagAA6b8P/RqRmq+Q+Z9TRDntfpR1\nEGC1kfaEw7FMT9wfJ93QgZYfbao2lb7nrEaYRPFYRvyqa23Os85yr3LY+Hvo\nuJM0nFGDE/NlOeElgnhqjpT6+4CXbnFHAo8UI8cPQvEjsIaKUilK/q0HlrSB\nEUEq/WtcSaoFY9slNChyrwp9i9j3pgIKdvBPNVsvpjqD05wcMzmyX42AuEmP\nno55vpt7mi+JAOHSgz1rE5Lu6SGk9l15ogmBlHwnkJ/iBxBEF80nBCJzFRc4\nF/F1FwHiz6PO+Qy2do5C3pq19oXvZNDrfeI6N9BeBoCNREeAVIdwhrIG7y2M\nMap53E8RxNGc3YzE6ERj7vUdDUKBYZjS8ep8Qmpercu+STHv4bLVz+NYS+fE\nzZgiNO9in+ATRhZ1RwBT70fn+tXkTamTk0bqmervX1Cb34NpDw6p+bU5JT+6\n/goHgK2mCAB7VhKvqg5ly6ygGZhujgpp1ITRzIOwYWdr4qSVd49pnz2A6lVV\nK/t/aWf0iqd2bm4YOZWdqb+EXFnHZn8k0rwGExpIFrwjLNd6oFRFBsIVIg2o\nxzY6J1YD0JclinYfXGVevk3BkxeHrXfjtDyWu94hvcsXNabm8FYr+Hx0rfyM\n7nRBLg8E+0rMRRgA3uJX5DrZL4YRjyoF61T37Q/d8EUPIsoZDBG/jH7Udoi0\nnhJy\r\n=mthz\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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.24.0","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.21.2_1616097140275_0.38639633187809763","host":"s3://npm-registry-packages"}},"2.22.0-alpha.0":{"name":"apollo-server-lambda","version":"2.22.0-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"e5846b9158d03536776cb46500b30082985ac25a","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.22.0-alpha.0.tgz","fileCount":17,"integrity":"sha512-qYypQcUOUOBb4wuKkd45rqzUKpLS9e0EVbf4ComATgPw+ajOh/LgpdLodPNlqdGfHSql+htcWWH04gwvyKQUQg==","signatures":[{"sig":"MEQCIH5lEKh2IMuTe5T9EJVZqCfC4ud/+IHItiaVThr7JD5JAiB1WsA+QRPF3pbvREHfaW8qcZzQA+0aXlfoGV5Tjcjumw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53645,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWRMwCRA9TVsSAnZWagAAfyMQAJyg3/sg0C07I4v5WUc7\n5bekUUv1g5d66oA9b4n1S9ZLsgKvRSN9KNgE1FLdv3z8WWfWA1f2oHoWHTT7\ngRNF08F/AqM2jdqpSst2Gmcw/JEnHZ6SrUlbs21LfHeSfN94ihUNWAx7z+KU\nOrtFWSE5nZIjZNY231Z2m7Usl3pXgKtlxx+AKK5bNXt2kVu30OxJbz4Pm44w\nlGC2LfVogaX6FxABk/f5OVU5AGWQ0BUFTMHvXlq6eMLrdKSY0J0HekShcPiV\nV+VYoAGmYyRopB7tEF480oV7qT2RlbWNs87i25tjQYcfEhPwJfixLZXslWzt\n8rSmHQOS5apSGG9dUQSDDt+iTZGprHIPzhvZyVicz3V5bnRLzVcxP7WF89T0\nWL8f3I8WTgAIkijhnVL1YKLVUNZCf5eXKtuORRw4E7noQ7bb1WNvnvL95AUb\npETB8bT0clS9r9dkC3OgRpjYD904us77atd0amWXtrijLMw/Ip4LD7hdVYLX\nOQ0jFdkUc98mhWRVSPvbiFp/Evs1PGYnmuCwzyS81v7PWXVgRShUQ/AvafQn\nWQ0RZnT+4lACSvN7Nen+yLflRiOyaFLfJf2lVZAYEWTUo0vXoGBbSMD3vItl\n9Ah39NHuxiHOsHlDb/BdxuVTtZUpAUCVDNRizM8+ultnb7Qmsu/nTLY5xTg5\nmRjI\r\n=IyWl\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.24.0","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.22.0-alpha.0_1616450352242_0.5072327570389192","host":"s3://npm-registry-packages"}},"2.22.0":{"name":"apollo-server-lambda","version":"2.22.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"d25c999b204eaebaa976a6df760b6f0ad6c8a999","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.22.0.tgz","fileCount":17,"integrity":"sha512-lr63OD+Mi10xbecp/E0tmG0kF0ktrdfhCO4WlrrEbzQu+15C0jhPXhBpD1eG9HQ3udn/UYImyrh2QJ6832wkCA==","signatures":[{"sig":"MEUCIQD5Bh+VtdJ7E/fdL58RoAxnyiQTFib/H4HTwmKuCazElgIgGnFqHXpvpGV8SC8o0cEHdQQEt3yVvIYK1ANOBrTWFig=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXSqqCRA9TVsSAnZWagAApk0P+QFSOGAHo/m3lXZIZOwZ\nl4JnEckFXFsIKFyiVfnEIQVlAIEPMppd8xE4jHf3+3CfPBZ1vx6uG2wzYjca\nlXjgZO595JCWY6RqP3k4dZQGTFCyrYo+X4pH9cr3uFIIqKBPK9GClCRDMCW8\nC899ktghKqKg+Xn13x/ltQoEafrtWHgKhZrnM9es8aLfi4BlNAXGcyUKMeBt\nn7N77gEiudXb570dAePKNLe1wLIBPzyBI8ge3X9jS2HwyhWyt4LesQGAbJBb\njP9RFGj1TdeLp6xFWKym7oc8kebSLPonSCk2QeLaT0k1bM/ofFrejQxeCMQl\n15LCFxpqgkah3hDl8v51jiT4dy7Mm0+IzvA4R6VcGC+xkCllBumM51uKp5/o\ngm5KyhS8ry49DjQXo5f0B663dbuliWb+HX9ve+Xq5R3woOmElebyxwCPldBA\nqH81eyS9QL6xcmfWs/sIzIuv/Z+rgLaXhy5yUgfAd/jS/9Q6nQ1W4+ZQLotu\n+Pz0N4nxTiHmLGihqVnL1FQc42yeMMz2y51o8ElRdJ4k6FWIdo6047x2XQFs\nSZl+SvdKcfewhGuCJnnJvPCSgQr4qFoCg+a2VTUMa03J90duirbImjSzSJj5\nwh7Ei5M0GsmvsT47wL+DBbQYl764cKT8Vs9dOnvHzJf9dTpgmSP1tdMzWpUn\nJtcQ\r\n=yRjV\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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.24.0","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.22.0_1616718506110_0.23798056116794197","host":"s3://npm-registry-packages"}},"2.22.1":{"name":"apollo-server-lambda","version":"2.22.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"d839b147723acb2c056018e9b12f9c470fce49d4","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.22.1.tgz","fileCount":17,"integrity":"sha512-vwlDUlAsg6QBEwlouoavpw0t5vHuW7PmZ25jbVghaFLGBlvGX1btsF1j0WTXjfvhSnHypyXxWJVWTD3scfYldA==","signatures":[{"sig":"MEYCIQCJcgPGo/fl9avod84gsRtwVyCnq47XpthryaTKXcxy+gIhAPhguuLPVuv38y1wtwoMKWOu/0NM1UA14PkRz3GnNhzL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXWqKCRA9TVsSAnZWagAAIhwP/077U5ky3wyq2PrRS8d+\nw+vm3HScWmuyF+Tn+9YkvhYtLObFnYqDybjS/50T/mqZbtiEcqRs/2p5EDVf\nFsNlITE+5l5Byssqd3HSHQU/lSCwkFDb8uUYWRoQw21ADSXPjcuXQm0oFOv1\nFY5JrQF0IVEFlP8UOE1caqgO5DaO7cnCtT/HzlZWHm5rK7IZrgcDkgSKf+7M\nFrLHt6rNLowdi5sdytbQG4ishjspNZV/SainnDeDOKC33YhlGb14YanuCx/U\nCf7gxyN27/zA9auRFI3tR3uq9SXaPbdqW02wMIvdYhZRZtpN1D4KLBT66lCT\npx2c/lmQioYUFMj+suvL7TnvSGyrK7emH0xlEfE/iIV1MEhu/OkOy6O6/Lgi\n0xhQZCO/Ga+EviEyryYzFqZU0lOaz4m/Uw+whSBmCgb01B42CauCExglkkM+\na+kT/HTBwoVIlZlo0xLeaL9YbhYTRXXjypfFkeYkY+6KVRerBthSaSwn1hwz\nbDiHpUJEkNsFFG9kp/SCVrNZjs3bfLK+hbeH76cz4JsXcPTSiYFMzXN2iRSG\nsMuMt2+7yt5nNb9JCVN/PNTj08c2AionbeZjQdWPpUktjj7kQtji7ieHx6nk\nS7TMtAWF3YT9ZHmsAX/AhB268HXlFuGyynVhcmJpHC9BzV46Ugd1SERCrORL\n6gC1\r\n=WB84\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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.24.0","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.22.1_1616734857602_0.2863991810480926","host":"s3://npm-registry-packages"}},"2.22.2-alpha.0":{"name":"apollo-server-lambda","version":"2.22.2-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"7e085e9909ab4a356d4ffc7c161e1b79fca068a1","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.22.2-alpha.0.tgz","fileCount":17,"integrity":"sha512-L6piWTAq2VQ2CA50bUYS6jCETBJaJjqTcn/AFYF9cgTBv8tRED2aZ1gGF+x6H2Zeu2DJZ4LNUOcSH77b40//Sg==","signatures":[{"sig":"MEQCID+L1NYmrJCoQbVptpz/H4GEfelEt3vMo67GoO1Sq+x7AiAjlx8rWuboZqiK9FFMTBlIB2LuxRrZxA9WygKM1HbmAw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53637,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYinKCRA9TVsSAnZWagAA3dEP/2RBKwclT4wEDSOpfSD/\nSHUjUj4xdbLhBYKVxNxd21Rg5+dnZIgCxAupbanG4mLo69gP5ZHb5DC4JRj+\npWn3BL7zn1DeOcX4fr4qlPecn8IMkQLB2elQAyozWdPNPI4btR+IfxwSEr9w\nrKB02DSJZs6/AOupirx5YtmfRBcLapu8K8AQO+xxXYWGA0nFyEkkil4X5hS2\nZmYwGdN9pIlNptJlQFAygsyi6TPYBJd2sry1+iNea1GhWBiCp8Wc7xGPVgr2\nNewTcqA1emffflrURDCxfwBoDawrRsfi1w0w+bsmJWubQ7FiExXfLNdG1NDQ\nxXJdVqx4xE4ROqBTKdSI6FlaavHerR9Ml3+0ysaxOCayDfoaDw4Tn8WVs8H/\nSWd8QnrnNbUk/tS3S5+ufR/SdPZNK5X271rnhDXHktoAObWFLI9LPne2dBMO\ni6tLT9dSlNSuvJf6qDUxy+1HN18bl1ek6lu4AcG4NMWHe+ntlYi40CgWSjVO\nGo6lKampQc6S2vcFcXcGKkzMB7H+RV0VatlVr4C03vr1FhoUCQLTutXd8DuV\n8CUav/B7Zs39BgzxmcWPInp5B7JyQ5BshNfYVHoWJRZ7iTrcEd5aEVtNQx1E\nJzwMZ1UAKrjj+Dk/LyHPtIhXMX8bg3gBkTE1EsyASJFYFwD1d9hj+ZLA+hiZ\nDV8B\r\n=lENr\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.24.0","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.22.2-alpha.0_1617045962325_0.8576941235511357","host":"s3://npm-registry-packages"}},"2.22.2":{"name":"apollo-server-lambda","version":"2.22.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"8beb0f2cfbb9048ae8dfa609afbfcb8fa42de622","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.22.2.tgz","fileCount":17,"integrity":"sha512-QOVHg6u1+jqnY6c+fb4njUtfQEQr118guerDveZgG3vQP1t8/AtYDT33m03JhsKWRkzZjOgj5cs0RA1iSYw7cg==","signatures":[{"sig":"MEUCIHNGdA4hs/QNLSJrUKA1DyJt7EIIxThJ2PY5gIY3oLOzAiEArGoFpjoZT7tFr/AG9dqoihbKcxj4lZB/ybW4pA2PgZc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYixiCRA9TVsSAnZWagAAJK4QAJHfcm4wVCY6TNqyUKyq\nhjaykCX73HE0eotro0WDswJDR70BBrZzQaMqgCps5Hjl1uSfRUIY7CD/pB4w\nOPAW8P5pmYlwrGgpEdXOvd6GQ4ZiD4IitOKLiWAJcAnhuor6pwrvqctcbMMx\nmDd7zBqtrJ6l33ai8Pt1EP0X7j0Gsyv5JEPPGomqDRQQezoH/iPSY49fjHXT\n0VthZS0nABXN4pdtIwhPYPMtNhBANYpukJgerf94DGCH9Sl0fPluuUIXsfmX\nOF+HbdSydKrjm5igBqmjezZhHWK/3Bn9FZMfAR6nJHWGlwsY1K3DYPx+aBlA\n1kRsXO3NCCoIRd4wPDCGGG4BzJX+wRfelgdPDqXXb4vuYMdoHV4dJcMmSm3h\nZix2qSlVRBZisZiha8paCqryEFPewQ6geNfhrKaIzm10BMJvgn3W21foIz6U\neFR5FsD80oAJL4+Db8AqhdMnVQ1crxhl0FjFGeIC/3r+WJJf2NjrMIqMUZkN\n/eHWu6P4XSvivdLPKxlAk6hFB5tBJWZXPZdRSFHlaqiMFr62glbGCEfnNc3i\nfwTq8TuMUkIQBr9rI7xUnduJgfpFLLDleDuHSYat3k/6PeV00tBECeL2SHFT\nwws25EyifHjb7xOv64GNAJKZ9dvzZY9LJQWoVmpb41P/N98fE2ZdZ1Umq3er\n/1BR\r\n=HFra\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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.24.0","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.22.2_1617046626268_0.04638884343818983","host":"s3://npm-registry-packages"}},"2.23.0-alpha.0":{"name":"apollo-server-lambda","version":"2.23.0-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"8b481ceaa225590bce2e11252ec7f31272beac08","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.23.0-alpha.0.tgz","fileCount":17,"integrity":"sha512-Talwcr1KJ3obGZT8hJL5uyTJbGU6EvlwOJSbCToUwZEfK9bfuGV9VLo8kJzQmSnSquBB+Uh+fIpcS1klED6wnA==","signatures":[{"sig":"MEUCIHMdE02XDZRl5BhDbqADQdaRWCx1meP/1Yx7YSnACbc9AiEArwS1bNu/pXbvBbues2/+igEayD7p/zdewpCmQIUw32E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53637,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgb5suCRA9TVsSAnZWagAAjbQQAKFv2StqX40rtWuhduSW\nh52NrM6nNn1yXuQZfqxSNsGN8iA+y6xOLDx0taZbXQDn8AH2jAD3kRAQYXqk\nolfx1jtZJ/ZgScjJMJhPrQ6Myn3UwqtWqVDf4h3QfgunM9MD/BLuamPjGnu2\nekxet6OtcdbBp7SH5Kmks7e7GyrOX4fWMR04pwBNboDbRF0wsTo8lHk5LE7O\nC4tGM8cXhlIjbSkUw3e19lmEXUe+CtPhoTvYJmVduwkPvuboJnNk8G50do7o\naP2W2FufMIDEbguIYcmSn0n+Z1Bn5VdI/mMlYZk0wTyS8QxuJLq5avYzA/h3\nKkwnQqRsaKFOxJm4GpWyI1xZxz3FQK2aJi9G7Wr692U/xCz6/CADij9UcDMq\nhGr7h85Yjb3ZVOL6zpl7YPuL2OgSuiR4gAKH6FpyKW2tDVSetYxgPExgdDTy\nEny+MrzUNLB9lYpvDyXWUADmyqCkIJywC8Sy2WoeB0ig/dHMg/4z+SZGbjaU\n+Bc+PCoO0pN36ITmNoIkSPTZQNsBw/hp5RlMuB2DKV6MgdmtYw5eaUm0qdm4\npLZFz+E5oj48a5dMDBhKqWRLUPpstvefi032D2H1YpqjQsND+PPfChtNkBWr\nhSASG94OBQuiW/T9G1LbuVRfd8dw6J3plifqRb31ey4xgjnHLzvpl2Gadj1/\nExYz\r\n=AkNc\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"10.24.1","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.23.0-alpha.0_1617926958428_0.3352768641159882","host":"s3://npm-registry-packages"}},"2.23.0-alpha.1":{"name":"apollo-server-lambda","version":"2.23.0-alpha.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"f47c7ddf756af4701f265ddd9b4d06357bc51763","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.23.0-alpha.1.tgz","fileCount":17,"integrity":"sha512-lLh7/rJliu9W1QhMuG2AV50OqebwjmsYcksgVXRIzfprtMurdKY17y7Pyj8EYvfkkKvaXJuFDBHAQJXuhQklbw==","signatures":[{"sig":"MEUCIQC+BMGPe07NrNJQbSUm1qO54pBs0AV+xiM/IMx8ABNysgIgD9ywq+4HBZBtEWkKIWl2Cm1L+pfhM3ISVTlSC18U4Zk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55655,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcLPvCRA9TVsSAnZWagAAOo8P+gIfSy0eAFxMoH7Lmxmg\n3VqXrJhmLmyNBWImO67luVKbw51UsdZ2JarIA0sSDHE6DY0Qi5GU0paAZoOd\ntI4VakwFoqfXPd1rbjz7Kuom70Gv+sZgmpQ3MA0H8pdycYOTStVmwR0QWosM\nTDa+ZDSJBoOzAbE5z72N/E4mYgVQzNVD4KAXddUCsGah122plNucYNu4bVfd\n4LRphDj/YXi8BxzQRgJxtLpkgGpOMj8gXrFYv4khK9sibMdK6n15IOanKCvN\nCDwAIZhU5JOAqe/DHrIMVOyL+voplk2bhwf+VTHiGyWAGprXuWStXMmFt7nn\nnM1gq+GuM3sgbm6XSvuLZmWotWOOoXfmmwK8yyLi4YUJcA3a4LJV5kOtRp50\n6WOeR+T6/5XC/pE1JPfrTyLUfFrhmO4+rkR2YmsLBO2/bncCq1YMW2/seOR3\nubPnflbGAoEmuAms9oURzfO92ahnaAbu2xEWj5KqzSVDRYtFE/2waMjA6y52\njpv22ZlNiQQup/SJrsb/kktIeLiglvgI9k4RaKrvDSedj/2PLAzIE1gcM71H\nEjj8oEXJzuSMt2pYMmrPzbenl2p9x1hykLBSL3lEggKEkPi88veArB3tnTHX\nwi0hwCgTkH1pq3g5/fLZ0Y/Qg7Wsr0x3XrpmWV8PcrSrG+dgo/P0fr22fES9\nSMMC\r\n=Fbh+\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.23.0-alpha.1_1617998831061_0.7988756552343885","host":"s3://npm-registry-packages"}},"2.23.0":{"name":"apollo-server-lambda","version":"2.23.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"7331a1fa5fea6191cc7dae7ff951591a59b757f7","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.23.0.tgz","fileCount":17,"integrity":"sha512-6Ov/q7jO0t6XUjpvHi5rwGFwiOZsviEdfsC+KC9hFIch8Na0dq2nUpFhMD4FBiTZVtlKEKrKCJx4hJ9qv7DYYA==","signatures":[{"sig":"MEUCIDUfmxXWhzW1l6fSoC4vQu96ki5nhFAbbeTINmdWwPaLAiEA3xkib5+hyp88lNYxfKpRPRdaiB9oT8n8+V5U4MDtzKg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55631,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd3l3CRA9TVsSAnZWagAACnMP/1DDYxg4WzepHh//d3HW\nA/EVyc4EqTclK65b5IpA20AwEFz25dSGZDC3fmKQcEGelF/CepZ1bralKgzk\nlIjso87LJeNHGRcqMwt9bMA6o7D3pkpdSw+/I180JVWDqxD7+OMADYV5inAz\nuKdXwpz2aY6eLyNs3mFcjUSdtXMdu56n5WFnBZXTd3x4Hbfkxvf0QW/8bflQ\nsW6gdtUGEs2O4/xwKDi4K6zllGwMrVpLGOyG3WFPWYYdwlhMxn4/wUmCQ96T\ncPLtgsWoWFSmOUEKzGOamphKnnWUNrBgLn9bVrDL6ZYGs3aLLvRsNPt1jt5+\n5CZFHqD/V86S37BOZRKMGcI2UC+WtE5Ki3y9BujpNnb53JsF3POLNuJycGis\nD4DrrzaTh3wi7kwIjclItxbpIP/jOst8a7XQeNE2RYW/DALiYzljxdON5DQZ\nYLkJfvoUjEjcHuF3JizbbR2NEDnaC8xMuhH/nM+y58IU+5zxzATPDeDLj6gJ\n+i20dYZIg9/U/YNH295So7HpRwfxcJNY+5xgpkPYa4VtKV43XUeTJGncAmS9\nzA7clcg7QQsMrZYcxHDWY6N7wNdUOl993k2w+WADL/0emXfmOZJiKRnVy+ly\n2dSOs1CTv5QiyT/SzKV6X1fhrvQilkzSgviSO6/AHtB10G5W7mAZmNy9oUCh\nriQ9\r\n=DVs2\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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.23.0_1618442615238_0.19471761764481865","host":"s3://npm-registry-packages"}},"2.23.1-unified.0":{"name":"apollo-server-lambda","version":"2.23.1-unified.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"32b0982d6bef94ede51c96fd877bf55cde6e0d66","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.23.1-unified.0.tgz","fileCount":17,"integrity":"sha512-RtxTqpIAmt8KwLeHaI+0A/H5bfe1icztD/gv5AIB1Uya0MSpnMVuz65BeduUXsB8TT/t5Mcgr3iaWZRw0w3Qwg==","signatures":[{"sig":"MEUCIF01Z3gaanizP8562buWi6ofjWRvvigtnNxQmJ9RdXaEAiEAj+a61mI3yAY54dtHdOPOKmEtkNxz/e7bpYUh4AAKjGs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggfcuCRA9TVsSAnZWagAAc8MP/26eZn3ksphLTIwTydNN\nxpIeGgYOjBUTp0Pz/wpAWw47K2c9h8Avjjf0e8l7XJSbr8miGXjCRjTw0LX8\nB1pOJ2hMrMR+Cbv3pEw4B6FrpUe8RvMNkKn8U4hYUm/dTVaeW0MPB/+/6ESD\nt2ZyfExJqboARTcW6CIjuqSSooYeDzdI5b8hPZy9l222DnsSeJTLyXB4jSGS\nhoHY50wwdMf4abrd70xDNKNYF+WgWYGCyvjA4Tdc3DQnqzxnYoRpxB+uqiGl\nEq75JNvzmg/Ip/6sr3bF/o0HaxUMRzwL0zaTJZH2Hu1a34dTMDwOYjN9NkGd\n9hEBU8TVB+BcNoIu2slORmku7MsPINifvJC+ljhggwy95csmrk3/uVYwEK3F\n50e2ks1z/2SNQ0lALvrI4f2N8wgBPby19kLCzKToIuDswaWJtUglububH5dm\noSRhwaefr6FobNQq/4gJLTTi3gRvpakjIMXf7saotlo22+C/SUC80OGgJL1a\nB0MUfK8Ep9G+SjUVziN31eJtjrlFlpiio8VnK3L/arwY9p/X+vv4iDKjypG6\nCkiBu7fBlAtKrYPzx0HA9jOV3TZUUfOpNacjXbya82NUDAKft+WzvqAE4de5\n7eQR53sWukZauaoDvqCZ4ovAedzuB5GYcAJ4fCG9dgbjzXFRHcYOo+d+KMGV\ntTJ6\r\n=z3YB\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.23.1-unified.0_1619130157707_0.5962302822743919","host":"s3://npm-registry-packages"}},"2.23.1-unified.2":{"name":"apollo-server-lambda","version":"2.23.1-unified.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"bdd7fd7f43cd45a37eb7444087fd2edff6c875ea","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.23.1-unified.2.tgz","fileCount":17,"integrity":"sha512-vTGQhkSJkV3GPOlNhLdpDz2W5FNmTfZK+3eUiE5rSFkwvrWijViUfXj2h94i8fHgoyrZEI5nXt8U6KOPEI4GGw==","signatures":[{"sig":"MEUCIQCPsBlvpEAoyMR9LTgQJl40MM0neKeFvmaRnnWYjI+AJgIgdorr8Bb9Pp63fEUmsnnQ3ccldY0ndIN/71HvpKuuRuA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgggFMCRA9TVsSAnZWagAA0ugP/3ltnAGf/eHSqa981Se7\n2Ea+SYnQUFs8AEGxurX/DRaguKw0MAaXzF2dMnYHg7fAkvl4/OLggJXWndMN\nZ/MIYcSbHF54OG4P4LooFP/xfzJ3z/ThJwqYQHdXqCOPUwKXIaV+z0O4tVnu\nRt5WnOtZJVyNDTpJHH0lqnjRNfoLy4bQI9/yTybrKR1YjgKtfJ7EMfTS5Uz1\np0UY+D0juccBZcC0HwefRR4zz17LryX57Poflqe6fvYy3oOZTm+HkdaND51C\ncca+SEEAjiOhM+BwOmkg9yrdTad7BIaK7SPKwcdnKH8/1AgFgK5u3wNKAvWU\n/3B9amtCJiPCBSd0UsUKFryX3er/wnoFvjShphBHpbWljG/nbojoM6dMiI9/\nHUk+1QxQvxNXZgohNdfp3Y9Ktz+YomFX3t53deRZxhhZadE2KcjQ1v9x4Oz7\n5WzCTa1AOxr7A8W5c2Z5fa5Jj8DRgK5lWBajR9gt7lCyFKUO6gyY5Soi7uDO\nqPM3L4QfhYoegUaKOfYM+yerY0yEBAr3dqlKEGxux+6/Rsc0LxI9h290LRrM\nUdzSWSxMhzHTUfNT9P/Yfa7U57QuM8urpENn1lNfDG19eDcSqA87r5HGqWkK\nSOf5atuaj5zY0KueRn7/1/iHefYz7FjZ6gqGTql4gZNbtn8EvEhdLbPjYBMn\nEt3+\r\n=k6O8\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.23.1-unified.2_1619132747471_0.5973541719356663","host":"s3://npm-registry-packages"}},"2.23.1-unified2.0":{"name":"apollo-server-lambda","version":"2.23.1-unified2.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"827becd357bb8dc0746aeaf341de55f904492e77","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.23.1-unified2.0.tgz","fileCount":17,"integrity":"sha512-3NZBdvHvn8qIbh76VcEqK4AA9o/rqbgcIogWD6lqiksrZndF252G24taTfH/Eez87NJIzASPBvU/38lytjFVDw==","signatures":[{"sig":"MEQCIGiQSJeC8oZGaL2IQuVve7tAx26rRMPGqL0QRzPsywW7AiBUVKCJ6xbAq4LvbKY7Cehk8tOHLuP0riG9jRA8P3+KRw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgggNiCRA9TVsSAnZWagAAhOEP/2DfsPgIp8HH571iNxPx\nwsiin6rMtVDIYUGXQix5bKE6q3c4j6fqHaxLaAclAzjWheWsE88jRxAPirb4\nFR6D2MzuLzfhfdriWwJ6wU6radDCbMK9+oTFJJenqro3xP1V51d32OvmJIa9\nq+uiquEXoeXBsQpIblQxgB7pr1htEYBiWYeTvbhKJ//0P0Rnhcns8l+FcG5X\nlyJVcb51ou1I9n9VxP0m9W+JBbCbIiKu6tpzs9zUH+XSNPv5vqtEmaVMaPg8\nGcj6vvf0G9ODBH6uTCWp9/chl3nTg7fnhkiGCC3mcZTu4gz+CgwM/j0/fW0L\nsdL/XxvTEhn76YSnzKvTxGUVOg+GTQhNMTdCdHR4c/vXhecJR6CxI/8zA+1L\nXs/S69B76tYXDk48BaBVJtg4jtSIbug9xQGWN+zFlhhGon2C3l4j9w+oxap2\nQE/uKG8bayBImOj32blYyGsuzoR0Si015WCbCWHnrAXkd7Yn3Txvn6LNY89d\nOQgBbBSt9yuoRgSOh21VL9VhyoVi8j1m/55KzcL8UXW8FFDBEm3GRkMLdE+9\n9jyogQBD0kCfYgtvbg6pXp7yrD8AEX8lWePm4eoR0ZWjHCLcgRmNWjyXIGQW\noZ1i5dqcnYiJZSFB3mFAqCNePOl1bnmyg5n0KWLNhpS33ukwK+9l2Z6oddfV\nQtdy\r\n=VQCw\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.23.1-unified2.0_1619133281971_0.8024748721089563","host":"s3://npm-registry-packages"}},"2.23.1-unified2.1":{"name":"apollo-server-lambda","version":"2.23.1-unified2.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"3f8e880ff54b2f557d22bf24cec404eea68cc191","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.23.1-unified2.1.tgz","fileCount":17,"integrity":"sha512-EzsDb1WfzE6y2ICgHwCP0Q9zVngT6Jx3KwA1bEhOB1EoVvOXAlyNc7krAVFOzGAvz/sGdcHlY5EJ6J3osfLhkg==","signatures":[{"sig":"MEUCIQDDwHJgRRF3jWcLuQg0J9ynIPkDDGMRO+fS9krJaNNj1gIgNFBrVCyHDlt+PGqIytKJf4t4xb0AZ8/OxCAR71P1GW4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggl8hCRA9TVsSAnZWagAALa0QAI77xd4rhBbf1OQRxbb0\njDlf4lXrHEsvWP0tXU2hHqbjk7Mqk2CUFuEMDpNB9QJW+YYgttTsdNZsNMzQ\nFshvyVM9zGJbIpA6lQBleuESr/h/q64IXbN9LC+i3hQxrP6FOjK0j3HRfalh\nbI85RxZGx/X8lX18MJQ9XuuA/ZKx9d8obneFFpAu7aVMoRLcjNXjLgdUrNUy\nb6iJcnsbO6iXQ6pKt0GFklKfpFMX1hqudhbzJOqC721Amg9TlNj2X152F+4n\n3PeeC9C52hxHOn9g2JijfFgUF6W1bUVPe4qz727z85gHhQoZasKlLPBRa/AJ\ncv+PmH+yRoT+oIldTxfIvHQGePigTLvEHcdz9B39EOVLdhg5DcF966Krefik\nm3HwT0pt0laDtGmjFbBlewEpQw0chuW8lMUMB1ZKlwNG0lJjy+ziIsKEXv89\nxqT4/ZlQZ0+FLD8Bt4CiMTKbxkN21B5FKU1e5Lyl3kr+s9xMVSvb1EZYubDh\nGT8UOYky1Yp21IMQiqU3HYQdu85D5WuaxxhyZCnk4T7m8O2HX36J2RkjDfvw\n1yuxjySo+v/TYwbvtoo4gtLmJY21forLFsPKS4VvxlzKz04lolMziOPg6G5T\nsoLaCax65DfnFKEheieNx1PJikzqcs40fiqTcCHr0MTMcV+/qxeM66X15sX+\nF8qD\r\n=Jr1Q\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.23.1-unified2.1_1619156768687_0.9483296852727858","host":"s3://npm-registry-packages"}},"2.23.1-unified2.2":{"name":"apollo-server-lambda","version":"2.23.1-unified2.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"a97b6de9396025e3813d34b079f067d5770f4a48","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.23.1-unified2.2.tgz","fileCount":17,"integrity":"sha512-ijIoqwimeuB2F9VhBEFRw+t4ae9GlcRHARUIdxQ6nOEJRnFXAEGnOY+sgIdDibnNyHTowLUecm9/OODjr3RIVg==","signatures":[{"sig":"MEUCICNooD1n8RwNd5oAz9wxmzjeORnLlC4YdBk8N8bb/QUnAiEApIe+dv7gmuMg8Xu7c8qshwn3dB28UGzySWaAEQO0Sz0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiI1kCRA9TVsSAnZWagAAOYgP/0KDbG2sfpOHYFwfrD8D\nsMMaxTd6lKdVlGW1aMB/+dU/vvHOUabOTdEA6zARuKmJzkQxsqofhTefgO+u\nWNL2p3wYzj5aKmZ4If4lhbiH8ZsvZCE4s/EmT81XPPBLvywJbrNfR5OsfRNj\nVOi4cd04+k1Fwi3hoXzFcNqG1Zn7ghvM+AWRxwrHFnT3snf8YNa2yLiVXTRU\nzWE+O3Q8tMKt+2TyG2q0ameg+Ht3ET3ogCn2h7dX+Aip0aFFXkrzf4p6EQLt\nV8AL5k+vqGBaW/R+EzcQ1GZYqVFuBtzVbSyXgYrDqCR9KyGIUBq/kpRejLsb\n4nB2QFpMLorze2QhsAXmVb1APixh5HrCe+xVfGd86AUTwesjSfc3WViC1TGM\nBdJufqBXGMxSRmQXC8rlfVcGOwQNl6u4/yKRiB7w8ANLCRx6Qa6gpnq2c+fd\naoykXxU3xVBbRGf2uDU3CaTljkleoHT0q/2h+/pJEYRUKsAKEreYtXvVe5aT\nFcowl1fVzq7n+GGXRTBrlJYT/RjNKg4reMIu/fFXs1Cplw7SumI6F/HqQ43B\ntnn1djohP5NLtPg753hNuJbMJKRek8aYdoxkvTX2fTpGah0Ag2z4sFv8PHsC\nQVeOK7M00tCjWVUGvpcNXB/ypqSC/deqrr4nsFINYA3k4GIrqbQqWQUtmMdQ\nvl4d\r\n=nU+T\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.23.1-unified2.2_1619561828008_0.6780784825986308","host":"s3://npm-registry-packages"}},"2.23.1-unified2.3":{"name":"apollo-server-lambda","version":"2.23.1-unified2.3","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"2001f088627cda14b67dc13f6eeb1c52352552ee","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.23.1-unified2.3.tgz","fileCount":17,"integrity":"sha512-9H8pLNCp8EBWCF4sZO58742dbEaI0Ak194326B3/waFaVfBBJyz0AHYTjzdVcj1lV9XHH2c64EMkzisYZd00EA==","signatures":[{"sig":"MEUCIC9odZrmmEyrYlM+zzPZeEKHbCsDCTvYRKnRz0tZW1qsAiEAncD6gL2yMmkcftAJeVaqUHyH/Szib1PzzGbetQ4u13A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiJYVCRA9TVsSAnZWagAA9dEQAJAt3xyVdfenmQgEhvls\naYqkLpzYOhiLHoE03OPLRGVD7ih4vBR2lfFutHGve4fV3RDZCgyf5IGtGuLj\nK6Jqfgsxko3zKicsdHmeFWMkQZX1GWXzKCtCIxe6v8Xx/uSDkVw2LpC2O2FC\noRRDR2KycNifmoJDDz58ycp2HKMHRj5NmxU/laFuvDzf0zjL5VwUpSPDJVXv\n+2P6KGxr5iyP8zE8ST3j4QxoK1zNbHeepHM1osMQG9sf7wxxOzR94h0iFcWr\nTA0CGVzzxBqsEKFQ5qlJC0SGW96NrENWdIDuqPtn3Ot2aQ0cmzkc8Vz1E/74\nv6AetFQ79hQgloEp1Bjv1C/gVB+9nrHKx3ilslx5R83ZVbEaJcT5wO/7cM5k\nrnr1z01Uo5WPysV8irFLRVtKF6mn1ZUMQJ72V/zllgiWQoUP8jKj/JQb21jz\nC/0nzE3LAA90Uvpk1YKC4SnZ9egxRl7ll6JIUa0RsPctpQPvMFI+L4yNzXNU\nqlTdHOgPHXcKH7xSrVDqTTpInu/ceZXOeogcaSC9kPS06pW+QZcMC8f/KsZ7\ncf7OTkhy+8WVw8BnqfLPnWMhApSCEjRfoSHy3grG4rwzmkaJoUZA+BMzuw/t\nz7/t3jDoy+RYKJkC/U19gIORs2t7HY730U2tsDX0woOetuUKmADAvZtuc3c8\n/krz\r\n=NmGr\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.23.1-unified2.3_1619564053460_0.36092778048408336","host":"s3://npm-registry-packages"}},"2.24.0-alpha.0":{"name":"apollo-server-lambda","version":"2.24.0-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"2d2d275ac3cd4a30a088191ac446a3fb5b9c6f17","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.24.0-alpha.0.tgz","fileCount":17,"integrity":"sha512-2/EeYUlTtdP+v7HevZvOg6rxg5T+ghMpZYDQ316NXtYKV9NKKMVEZd0T+aY5V5JBQJHdg6hqR4Uvyg5v2Fy1EQ==","signatures":[{"sig":"MEYCIQCt1Rr8C5+mbmLjJ0uVwvKLS9j2o4Iwgz07YMevjJaulwIhAIy0c+qXeY3NB9jv4WVkoZW6MnBJjru2Wc4XcumPFNkZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgic1BCRA9TVsSAnZWagAAR7oQAIrEHz22BnX3s4G4eUn/\n00ZY5XrhGUHPBprOgysnonEyEMsulVCGgm+5dJA2dtiabxTSZMVeT6jo1wfF\nC/0SGtU64p90mwxkMGMkvuyzzndfNhE0qef299QltAZTjJVysqqqK0iKPxKx\n6GbcWnP/qcHalrFWxVwAVQa2Gv+BmFyRqhTy8Jx5VWRMl5FYsyESbmgAr2Eg\nqHD5A+2RhSoTqY+ZfMS54Nj0t9rNdkuhEAfAkHxI/LDxI6svZPDIBUc/cxuL\nhePfC2phe+XiQUpb0pIeZEUtHa9HGx4i248ThP7WCK/PR+5u7ZUknktrJo/K\nINYC3RzwFgbohnuGvunk3+XzTfuNC3BlWhf2Bg/LruMtep/eJXno24ocMQaE\nQXMTUnuWrghG87rnN58AsJVzFl4Obk+qW1PSTg2TW3fe76Oq8adUn5OqXvVB\n0xIBk4P5n0h/j/d6UnOpRYfbP3Jq2Ehs8QyzPiw4ruT7C7iqGtxDyMKTejlM\nX5v2z4rzKIDG6H0UhipulJKMV3r2QESFxSeyaYaYldl5z1wLVAHg43Gglccr\nykktQBi7gs+Mc0ezx2W4+z4RmXPMZkMfU3JVDJIeLBVPVrWZGVerjuke5dc4\nIDND6Q5uaQjRCCWN4yfvQE4Df4Ne+FuSeWu8VQQ/CY4cBqlUDgtzBxDKpg7j\nZYKf\r\n=iA1e\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.24.0-alpha.0_1619643712645_0.05089733052980461","host":"s3://npm-registry-packages"}},"2.24.0-alpha.1":{"name":"apollo-server-lambda","version":"2.24.0-alpha.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"74b227b15840e7e4511453697f5453b6c5db8bdc","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.24.0-alpha.1.tgz","fileCount":17,"integrity":"sha512-xZ0/3h9C1Oo6pXYrTQS98kQHZ/atksfelNkUjntLQx6YSA0WtdesmEKCHNR0xisEL53ZbbgyfK2XK+Z1qv+P/w==","signatures":[{"sig":"MEQCIFPkonE4CRtjPXyxC0u58yrSA53BVmhdKbY1HrsLz5oVAiB9SGeDAMDNZdQGfUpJdkq61chF+V6WOVvtXMzVTWH+sQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgizQwCRA9TVsSAnZWagAAZkUP/0spbzaX6F4h7s3+DTUW\ny1OlEF6e35JfdAhCsdefWKTeHkprpBxZEHh3oUDEak4IQEeKOIo7jQcPtXmW\niMv5RVBZidXBXMQbggWsoApLpjf/3n5pverBgZ1X1DU3bo0e+2bGgR/TRpn7\nTBxtuHfMMsxkJmVq6mrVXK/+80JXvGCNvjiZ6yMvCCiwf68OWFNqAYECG5Np\nRAhQk0rP9NeZiAmX3GoscKiR47ivRclvMbWcr1Mgvu0BdRRXiUapxxLOeAu1\nKy6eMQaG85y0NDINTaxe6ly96MB3sxktKdUlUZgmLE59a1V3UgeBMXBwlsS9\nEp8HuO8R5OJ4sTb8MmIQVmupsI/axviRtTbFPUdrUbWs2JqsdmyqxlhG+OFl\nCdTpY7xEXALXxUp5AJFaAphTmQcWKFThGBrO/F1zr6t4VcQ/Z88goZU/vzVs\nQwGTb1roqLMisj+ETMVkE0EkUqCcE3YSQ+J6xIpyfcjcLpBWS/Z7PJvpzLh6\nRnKbR7KUBhptixfDyPkuqRgA2SOrwAs9gVrO1/LDUJe8G2KxsLaZOlRwgVtz\ntETRlKt0X7WSaaY7Fa8OSP29kLOiVIXZzAzrfLDe9Iw8RGnHb/2xpmirOBWB\nNJM7EsTg9mT4rI0BKc2Zje7hs3lu/979OKzI2pJnqgP1DONGu4LBetVqHwpY\n41D6\r\n=CEwH\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.24.0-alpha.1_1619735600414_0.7485230948747714","host":"s3://npm-registry-packages"}},"2.24.0-alpha.2":{"name":"apollo-server-lambda","version":"2.24.0-alpha.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"da2a4f8677d06d03ee0292aafa37105dcf1c9b50","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.24.0-alpha.2.tgz","fileCount":17,"integrity":"sha512-aaUnV9peG0O817+HZoD4noUeJAOwexqNZpkAKn9qSvUknwRvUMeNUDkXdxLwJlNjmjm2roROam9g7x1WzPGiNg==","signatures":[{"sig":"MEUCIDpm9Elmr4l8AxWNHPtCFoo2vRKXdiQkmSXJho/cQ0viAiEA7nJnkY8YWhCCosAEnoebovzLElYuRkD6OU1LBKeH7jg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjA7kCRA9TVsSAnZWagAA++YP/2CxuWeLrrL9CDNwbvsy\n3j1Jasamy8CW+gOA9ZUoRF792r6zLpUfaULb/ccBiKSTh8SsmxZXBHv2Qv53\neqD57Im64HveO/CoZ8fhsAjDIX7Wyi7KWAWI4JPF8Bh5/Eg0ccaGG36LXsWb\niJtQ6gKJf7fbwe1rePGC2W1Fx8XmEMaNSKDPIhlyKuASnV8yNijm/NBPXW5t\nuRChfDxDDUDSUUSHpR/L3aK9s83ZQzwn1FQf27oUPOzm1mVQatxmwVk9NaKB\nKbFox/fco9J88o/nxrzEnT4coIa8VQtWtr3viUDY6cbAqT1jKzOYeu848oOB\nT9HeuwFlAEd0Mk+bjNRnXLHITaWlKSP6EmbPfB1T6ZPo9N57ZyOj5EYTKuHw\nhZ3Gx7HXXCGgDU0ef1WOlypzObEjrOdxevfvabU2oNGx8VI8bi2jZ9dAFgg3\nbOAda16zMBrcsgyRPCWH0lXwNiXKZKqVbhvIptGOK2mebzeOeyfbkSeHpii9\nZRbZsns3n8Ft8S/iW8tzui0OeFnQYmPBfO00iKZkfCE7ZWrRaU9JMAIfU/jw\nsVLday6RY8Y0cqKgRFUPlCe6J95dOfcro+/cjBf8gfqe1GX5I1XsnRWgm/Yu\n/2wPVM5xrkz3QSneMS/WdW6H1w+pRCSioynmuiOBaFexVzQ/AbKzWhNxbvv1\n5eHZ\r\n=r8IW\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.24.0-alpha.2_1619791588265_0.0506154834778858","host":"s3://npm-registry-packages"}},"2.24.0":{"name":"apollo-server-lambda","version":"2.24.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"5584d871aa2cd88696153cb3a237bc96e83cf223","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.24.0.tgz","fileCount":17,"integrity":"sha512-0BPtbBBfVIss2yQ3QKrkiZCZaMQgE6ZbGa9bnOOuWBemTustGlRYVFC5Xl8hl9bbhTyVsPm9nqDJL2VqeopN6w==","signatures":[{"sig":"MEQCIAcWO+Im0o0rAHOIZl+S+x98cyqLEnv8vl+JqUoCWYAJAiAPMMlwhkDWhWgBtgoa7Hw9D4o+uMeKqc5gYabWIJNyeg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55631,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjEgBCRA9TVsSAnZWagAASPoP/A1GZev+xXILW45HCjRh\nbDx3zkvtqpCyjXU7sZUFUc/himwS+bFPeGu+m/p42rBgYBJvgwh001nqWkbx\no65HAoz1cIcybtiwe5pe6YkOFdzvSycb190jviZvMa7Na7GFUk+ow/slz+B0\nn7B2hH1oWA09zgHHkx2pOy8Ml+0toNE34wDvvxQKSGTkv3FnICnZIsmAUQbN\n9abGXJ9x9ZAHnYNhxffKxOB8r6z33OtJdGAtLCMourDQ+3s7oUPUgzAq13U/\nch2+Hw0IrgSQKPaPQ551KDJBcZeHTWZBfjvuvkUxmjswxfvoFPUqmhfEhfqb\nN6u6QOkcnuhEYb4zK3+Xic32Y+LF7ugjh6/8SkW5D4H3GJQqhdYtfsakKhQX\nF0KVnKgHTwFgv9sQ6uGGYVkXW2BqR3vPOGKv4Cc6+Lj4qTwRHba89eD2pCgs\nw75pkKqliQGhgqg5Tjjfltrqf/sx21UAkKkQzfOZDw1W8/IlAXBkkxtWzGAN\nyfsF+ihjreAlLVuKD9g6TeJo5bnW4zntPeBIffwq1mVGqcKDKFHuiWMQgEIa\n432SbpQQ4+zM59IFySVBECoLrc7yIgyXtTtpAQx11ylB9HIGqxTHJnaEyShb\noJRx9d3nNw0veWXiNSP1hTtfCbjmqjblWkCuYLvmt2LSKtTKBL64lVpCYR7v\nXQXj\r\n=/67Y\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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.24.0_1619806208565_0.9982411099983308","host":"s3://npm-registry-packages"}},"3.0.0-alpha.4":{"name":"apollo-server-lambda","version":"3.0.0-alpha.4","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"c0dffead75ff9f98ae4e1408a59621b96e792797","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.0.0-alpha.4.tgz","fileCount":18,"integrity":"sha512-HbKDpNzVn5PYMcujZ8BNdoLetfW2RLAEJsm/XTFId82Wmxr2XdxAnD7Sl5zzG+7mVprlmuNS55TySrm60AzHjA==","signatures":[{"sig":"MEQCIACkLVPdJBGP75eCpljHnDnygyEZG5ZOvFtBLMOOn7/OAiB4gedmFhCTMlIr64A4Kwn/Ne7+fdnNkuo9PchPG12YMA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":537501,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglFAnCRA9TVsSAnZWagAAmMEP/AiwGzypLs8n1EzS9cex\n0slBivyLv8hPnxOE63vEZP25D1nESGtkiZ/KTMFVKPPgGmrSKPHirOtpZOvy\ncJVWWqKkkQjceQkyEOCBzjlFUcU3RcLopMtbCVs/nUDBpcqRuZgnFbFiGt2V\nRVtvyuz7RRrDjPvN+tjsGs7TQMwFszJ6iQES1WA/5P/em1PTSY2jWb9OI2VO\now9yT80a3vAGIZH7AUCOrMYhm5WhAex+txCWAvsAOlJEjBTXaWTLnHlrVPGV\nIzNGRZXBElmpmqFTtKTPNxQCIZ8/+5Plb8+SGnc57NkDueLTIwO4nitL8YSm\nY4WmJ6iXhSGwq3sFpjYbOjpiWhUpef26UNMrMl3Cy4PfGmczrQTQnFw6y3VN\nvq5tEseADv/TLbVyKWg3nF0VF7K7DtQkkVlqTxRMGJo4y8r4u2xDRxsostq4\nGwYFpI6Yjn4+Wb+aLEjxMbR4pywpGjWtk03OexWWwiUImUBr4dSijkw5HEk+\n4pNzOOFjcyyiw11KUa9sSu/9Fxqp6lHV+GojzX1sTHmqsdCAJ+oT8NjVwRt4\nqQ25WVz9Og4qN6J6M99BFY/+3vRyqMog/dLTFwFWU0DQSc5zzcNNllDyA5+a\nTdI9To5nCDUE9ZbVYVswg25dq5N9EvFAHDmtVLriwSh0F/VQwm6GcWrbMmt8\ndgRq\r\n=1MW8\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"@types/aws-lambda":"^8.10.59","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-lambda_3.0.0-alpha.4_1620332583556_0.5417921915817996","host":"s3://npm-registry-packages"}},"3.0.0-lambda.0":{"name":"apollo-server-lambda","version":"3.0.0-lambda.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"1edf15f446b848b6d95ecda61d09b82377bc92aa","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.0.0-lambda.0.tgz","fileCount":18,"integrity":"sha512-hk9CSTS3Qgeqhiyvo0xOuWnA6bxcOq631zh+S+yXSxc+87D4c2fevpyylGU8ovIPRdOb1Oz1rSP2U841bN0M9Q==","signatures":[{"sig":"MEQCIEs9uCh3RGJSvr9ljlWu4rsFrtANjnuULuDsfV8asmnvAiAxM3W26mEWVQ/sSSH0Yoym38Vst/hFozqd1gpfMbAirQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":548797,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnYG3CRA9TVsSAnZWagAALycP/3nltUNGvt5K3YnExTnR\nJxxs0Dl1zIhepfWHA95fQkmLej6HGT61fc5a4eytSKj0tXjPzM0nd9sO4pDn\n77oCBGqTu4XeqLj3oX5nGLQrkIknIDVRKzHtf/JUY6yp2sI64DLyYbXowtUa\nsfSkTdAkux7sj6y2wPNqjd+QFc9DdZzvo2H7nmJVbofMyHAQrdROcxtVnbJj\nb5eMGpX0LKounG/WD+9eY11RfpqpIJmNeKWehT7DVZIBvlPVmWDlmT5Lnmm4\nEvG3H4GP10MM0S6/JtA5Jdgy5G365BG/UCC36Oi2LSK/mN9P4nBT+ZIjkFb1\nuJNkYscImLQPO3VUxVXw+tumVcw60EnKNnfrOix1+L8Hjl/J3peC3f2BdT9A\nQ5mNJ5UyaG6KTifsXb4hMKU6UumBfFRMPSfe+eyzJitweZ53NQSx+uOSDZ/b\nQQcuDOeEEUaMRLDiWzSGIb59QlHW7zmJDozeMpT7TC9FT67vOrtIMv1lTRx8\n98J3pP0nwyjF5wYhiX19QJmoiLrKql7td8tr27xI6qdsN95M60/mwOwPrrBM\nOcCPDNkAYDSh3DLamDt7MQT0WvsJ0Fc4oW0rKYGmtSDCa9usI2ZsVCM7jHky\nUVGiTYwcZitb7JD9c0KAvOkHyvFhEva0Nwr/xC0zSYkI5u6B37tKGGzHHx/h\na7D7\r\n=2nQa\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\nFIXME see what needs to be improved\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.0.0-lambda.0","apollo-server-express":"^3.0.0-lambda.0","@vendia/serverless-express":"^4.3.7"},"_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-lambda_3.0.0-lambda.0_1620935094678_0.11160127581682411","host":"s3://npm-registry-packages"}},"2.24.1":{"name":"apollo-server-lambda","version":"2.24.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"a63ac2cc37e58a40b41da162eea9e927bf408c65","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.24.1.tgz","fileCount":17,"integrity":"sha512-NzkjZ+KXCMVbFoLecA+/hnL5JZybIo1mFxjd539aDr5EPwmpSq2sPcOwRe8qLxUwyKjWxwii8wOiEV4YEdF25Q==","signatures":[{"sig":"MEUCIQCwvFMU61mw///pWW9vM3IaMcMaAss6aW7VtNITMKLBLAIgXjWIBXI0yBiEzUIa+wFYjTIaQpsKzd100rmVwUAXjOk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55631,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpER4CRA9TVsSAnZWagAABIoP/1jRVgVh+tdBh/szGDtd\nxEgkWh6HHF4nK/roKHxZ2sSJU0oR9DvOCnuvP5Uk/Nm1wYXHG+N52991YZ4H\nZ79j50ayoEkxQqPPwdPWYyKKYiBxqnjddJ8Z+wgeN6NW/Im4RPwR6irQEqM5\nuM4qEqV0zhVFsYlGAqxp+/4iuB+j6ftWW86UsotJopoLPLFWF2iv9qKVPVuL\nF0nXO9LArMsE5cQqKUq8QxWz//fexwVS05yKBn7VmgzmoNIrOffflNn5OJTo\n9i8sQU+IDu8xrjdgvv5xJTn4MqF0GthM79VSIlMC81Wll1HOYDFfwFwmkMAM\nRem98KGhTtLXQ9Egup8X80BukSrNP5ZSlAJov7QYiv2qdWWT5zdUqdolfjhg\nAHLqpAtOJq0WTxpaVZWPDbDcQVCtyHslLPH0Gqzj2tvHSfHe4SliODgHKI+1\nwt7j0PTh4MIyD+g1ZXH7S+MRtfKnIfb3YKxhzKf62bXP+eWBIj6WOVEagmzq\nEYWTYjDkD2wJiuJgkNKOOMLtllDm/DpwOJuIl7zgvjJirBgzxk/O+M+OPKIx\nILIk94rnjJMvXjjmvDIdaodeKTmJ+4dn7wVGdLmW2ZN7xyWp0sTM1g0ZK416\nMa4JNr48jmLywK0GYR9+21aCKf91N2eVGKrCm3tnzRvG2kLv6Wv1yitMdkSw\naTpZ\r\n=x2wY\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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.24.1_1621378168400_0.4194925987950926","host":"s3://npm-registry-packages"}},"3.0.0-html.0":{"name":"apollo-server-lambda","version":"3.0.0-html.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"56047d712a941d81d827245e98338b813c494994","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.0.0-html.0.tgz","fileCount":18,"integrity":"sha512-9wMvoH6fldNcihpITIBRdtM2gaWpi9+4aLC8cFNBk69ZOVCLW99Af3t5IwzdLza0UsMWDIMfVtlg8p0T0AguLA==","signatures":[{"sig":"MEUCIQDmDDzaHuTdzsY6avOvLdtXn3NyK0A532P5qduWQtJN0AIgPC6g/m0iPP4gIWuDuM2n4ob8N58iyneZLU75TGRElIk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":553794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrH6QCRA9TVsSAnZWagAALPwP/2YQCEdD77eUZLUgy+Oq\n36gowW/X829Gw2zpKASTJONsv8FeGoWL0H3mv6+boIspX2wtmXy0ou6LlxPF\nFiyckxj3HYcrdF2R5ROH6iB7wLR1lXZ420pHMsPYUiLHqchpJDl2D3u2U4GL\n5HSoJboSztK+Gps81i23infRkLU5hHyKN7gQC1r/HMAFtvWdW/1ydm31UL10\nJAC0UM9pbUXPYvtFlELWWTnsoULhN0dXxei/F2X9w7QVaPZkKcO4jS7b0GDk\n5DUy32afRYVZcweFVT/xBA9giGPzR/jrncJO4R5Prc0MF6antZC13HSnoO8m\n/3OcJS9Y9SFwVbbvxhJ64le8rAeY1WiEnIgVovilZv4UKAgA/+a9GB1MUPgx\ntSFphhIS+qnFDGVpdVT56dkL3II+l486gRTQaOr2OdSkxPcQT7eRSZtZvTkG\nP5e3E3MiyTNhSqW5KBvZCILy5zRtmfGegr0dLc3I8MHAt5z5o9caDDAcBfyq\n0vxYRF33VXr5xgJQne6FpuV29b2/INfGD/tGAvS0T+7m+VeUOzbIzKImmQke\nSFmIZcK8/a2d/UC/r0fhUIZ8anf+yGP0y+WeH1un9aJcBbdS+ISg/WAZdOV+\nsl8Vx3hvpREb+N5tVbgycwJaPKj25KOLuFLAXNKNcv4/PaQsjKbvDbBViBzh\ngoFw\r\n=1Q32\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs14.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n\n## Customizing HTTP serving\n\n`apollo-server-lambda` is built on top of `apollo-server-express`. It combines the HTTP server framework `express` with a package called `@vendia/serverless-express` that translates between Lambda events and Express requests. By default, this is entirely behind the scenes, but you can also provide your own express app with the `expressAppFromMiddleware` option to `createHandler`:\n\n```js\nconst { ApolloServer } = require('apollo-server-lambda');\nconst express = require('express');\n\nexports.handler = server.createHandler({\n  expressAppFromMiddleware(middleware) {\n    const app = express();\n    app.use(someOtherMiddleware);\n    app.use(middleware);\n    return app;\n  }\n});\n```\n\n## Getting request info\n\nYour ApolloServer's `context` function can read information about the current operation from both the original Lambda data structures and the Express request and response created by `@vendia/serverless-express`. These are provided to your `context` function on the `lambda` and `express` options respectively.\n\n`lambda` contains an `event` field which contains the API Gateway event (HTTP headers, HTTP method, body, path, ...) and a `context` field with the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...). `express` contains `req` and `res` fields with the Express request and response. The object returned from your `context` function is provided to all of your schema resolvers in the third `context` argument.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ lambda, express }) => ({\n    headers: lambda.event.headers,\n    functionName: lambda.context.functionName,\n    event: lambda.event,\n    context: lambda.context,\n    expressRequest: express.req,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: '*',\n      credentials: true,\n    }\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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: true,\n      credentials: true,\n    }\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.0.0-html.0","apollo-server-express":"^3.0.0-html.0","@vendia/serverless-express":"^4.3.7"},"_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-lambda_3.0.0-html.0_1621917328594_0.5786709871335418","host":"s3://npm-registry-packages"}},"3.0.0-html.2":{"name":"apollo-server-lambda","version":"3.0.0-html.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"a261251f8ad188e2bdba3a5d657a5698c36eaa89","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.0.0-html.2.tgz","fileCount":18,"integrity":"sha512-5dod034zb7QxqUDYiyLgZ75BEVStM+ivjP3FJyzv2ySYE6ntwtssW532xmmdo9BwACZRam9G8HqHcc15O9bLBA==","signatures":[{"sig":"MEQCIBHXhnRO7js0f69VW/wvcwg2brj/23k8X61/wf3P8k9EAiAdCtbaxWpgoYPRtNhu7+RhMjlvs/nbAad97p9a7GKZcw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":553791,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrIj/CRA9TVsSAnZWagAA6cQP/27PVvj9r3IVxMi3bqnc\nytsBuI3/uFaATUMRIXFMkVRjalSHFQJVv0EhN1z/tsNIQFB4JXjCOK2xkdBn\nGLF9UzhsoYhoK2/Qb7VRcZXjNWMOq6EUNHQJZADlX3E/w/n6ThE/vH/qzuOj\nbVBT3XwCO7zcd0Y4A0f2+RnFJd/ElE6/KCI9HjVOV5bBt/QxYLeFwLRv1xIR\nyYKpvh9WvWapsUITACGTVqLoYEwUTIZ1lwxkosze9nN7/O8E0UiciCVrEgIX\nIKt/IO00GVtJ9+D6DNy8aqEjq5J1+bDIgnNtmhnujrAlyLiCGm944DcNeeho\nl4Wq8zbyI/4Hc5vgiu1z99SvLX+RrI+l2gkwrLcqu4Ttno4INcLE2bO5VrKp\nhY1ckrjGoW/WbTx80MsJ8McibLkJ3PtAc3myJ9tKzFTteA5ZoDdpjDrac8sb\n1rnLbV0ypOg5gyLRoAyekYBJO7CxdmLMvOYQQTmA9AOeCVGlZ4QARm6XKbO6\nrOioC0b/MC1V96MlPpP1PdWYEXhRvF2ZKDkSlQTRkxBawi4nUx4RmBID8PeL\njJ/evu1cf7Xa2PSEzPbRBPyP9WFsFKb/5rHCH04YmAUNHFtVDsG5x3tMjlWI\nsm7wQ5y1k88npRt1AEXKLkkB1Hmzb2aP+CBI+GKOHwRddENRUZN7n0HB6+gC\nW/f3\r\n=WSVq\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda) [![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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs14.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n\n## Customizing HTTP serving\n\n`apollo-server-lambda` is built on top of `apollo-server-express`. It combines the HTTP server framework `express` with a package called `@vendia/serverless-express` that translates between Lambda events and Express requests. By default, this is entirely behind the scenes, but you can also provide your own express app with the `expressAppFromMiddleware` option to `createHandler`:\n\n```js\nconst { ApolloServer } = require('apollo-server-lambda');\nconst express = require('express');\n\nexports.handler = server.createHandler({\n  expressAppFromMiddleware(middleware) {\n    const app = express();\n    app.use(someOtherMiddleware);\n    app.use(middleware);\n    return app;\n  }\n});\n```\n\n## Getting request info\n\nYour ApolloServer's `context` function can read information about the current operation from both the original Lambda data structures and the Express request and response created by `@vendia/serverless-express`. These are provided to your `context` function on the `lambda` and `express` options respectively.\n\n`lambda` contains an `event` field which contains the API Gateway event (HTTP headers, HTTP method, body, path, ...) and a `context` field with the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...). `express` contains `req` and `res` fields with the Express request and response. The object returned from your `context` function is provided to all of your schema resolvers in the third `context` argument.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ lambda, express }) => ({\n    headers: lambda.event.headers,\n    functionName: lambda.context.functionName,\n    event: lambda.event,\n    context: lambda.context,\n    expressRequest: express.req,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: '*',\n      credentials: true,\n    }\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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: true,\n      credentials: true,\n    }\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"3.0.0-html.2","apollo-server-express":"3.0.0-html.2","@vendia/serverless-express":"^4.3.7"},"_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-lambda_3.0.0-html.2_1621919999253_0.4360254774539092","host":"s3://npm-registry-packages"}},"2.25.0-alpha.0":{"name":"apollo-server-lambda","version":"2.25.0-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"b38b8763c344e2d94e235fe2b0e44cf8072235f8","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.25.0-alpha.0.tgz","fileCount":17,"integrity":"sha512-O4osfUF1h1zWrKTDXu8P5NzA7hRxZwLfjGEIHgr6A78/Q4Um0YCN4r/ENbpWR42aG0FBOQAdnpWzxWT+V5+pLQ==","signatures":[{"sig":"MEUCIQDXxazPv3T4/LikERNkv0iIqxDX0g9DqzzhvtkKG2yoOgIgbXs57WKMyvcdI2yMd98cz/NGTFo6QOQ4lsHZs8t1Oew=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrsxCCRA9TVsSAnZWagAA+9gP/i6SCmfLIVW9+R0O77OY\nTkJkCaseVA42AUHSv4EfWkENrHRowflq+1gsEIGUDkIzC/2+oG7XTtryCJ20\nnJOvXc51nnoZoVrFAEXLmDHgrTpNx3yAUdEo7uIbH2NL+vV5J1gmDm23zC40\nydbIsE3GVy5Te7cyf3R1uvm8+WIzaK/ZN+XNcdgnYd5E+0bRGo/cFuFY5xqf\niF39qIarKV8R4SYxC3ql15e0yOtluDpSXs9FQezhucdXP4GSlLSrRnbbF/il\nCCUTdXoDuzVdSwftV0n9rS92cSETu/Ud1eNBu2qQ8HfUafye8nDpBSj8ncWe\npnHdAouLEw4uDuq+t6M0U4xnCXU5m53lLze0cQq+80xHso9BHj4yE3l5fSpG\nxywScmjFrAIGG/0UDsDy7gwiMWZyHqENCLAEFAhgA92up7xO9I3sw7mmKiS7\npAwr2HQpBP+p2wYrQIqnrx1paaWBHrZ5wtmQBOiz4o88/KICz2NIT3UM+p7U\nml+bwKsTTRdSN0eHmWC2cq/3YEMEsrA53zAzulGk+SAofGU+sfBLYSdH55oz\n5pGjymp0yEZcJfgdybtG7Z6wyNfIemBiS6NqzV5jPqIfs7nzGFIkh7LL6Jia\ndWT/N+hIUGF8KC5+mdyFPpsRVCD8RDQFmliOnPBtNWwzSJRElFIwo5ipnJ2n\nnTUK\r\n=r7Gr\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.25.0-alpha.0_1622068290548_0.5101191810918888","host":"s3://npm-registry-packages"}},"2.25.0-alpha.1":{"name":"apollo-server-lambda","version":"2.25.0-alpha.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"715fc80d2c94e8f15a0368f8bc20ab2f8755cd5d","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.25.0-alpha.1.tgz","fileCount":17,"integrity":"sha512-xvjccN/olFxpj4vuQ126UQBmAor+5p5ecr0trHqok6wkgB2PXgFaVgH6RoSYjp+Qleij0/y6FcAMlYVzppYa1A==","signatures":[{"sig":"MEUCIQCW3M+Gd41R/10b0zajkiw7fq8tcG+n0D2i8J4zX+qEUwIgD6cZ5Q4MVRsoIkxVTBms27Z31pkVvXwtAbQgSCInqS8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr6htCRA9TVsSAnZWagAAdA4P/R6EWxGx8eAObquLzZl5\nnKnnJ28dtVflqrjOaxi3BdhP6kL5gCvMoRKDJgTla5IwPZGSkniQ9zwIVY9p\nJqSf+zmyE2tH3AhaUSka1I3tgsY2zW+BrsXK/M22Z+lim39jK21ghNsNQwy+\naV23aY5+n8u2fwZAE6PRCm5kYTyidgFqh83X95h/ygP1s319e71aZF3NKAWv\nUhbkP+b7odkTtkNf4BYpZ/XJSZLvNif1a5RZuYOCqzvyPnR7clgfQkhezpIH\nWXPPOLAVVAhNvJFCflgmWjiMSG8LZZMNdg0LIQs+WFWS4HM48umu6wDmsH2S\nGj9OnhXKJlLdGGkTHTIt1dO8+MquvFqzjlBu8D39xU7V3uCrmoBBnRds6S4E\n5C8zySspf7OkZWe3xdHkpua9q18ojvWrC/Ssb6jqHF1f8wsPY6Gq5F6i3hUA\nIyDISB0TU1wD1aK//DYPkwr9e1Tt+SxXVMdgyz5EUfz26UeWEP0BauxNmPsi\ndVCcmCdAhj3vQ2XY+nTztS97FAt/nfptmtSzq9piuz3cOsAq7DJYr+A0+Ng5\nZJYCHLNEMdJb3bW9kRMKVpGtuTMgzqsaIFd0zM91Suy8ETGJ+z49yQ4OXU+n\ncHPQIm9Yw2wPG/3iv0OwSjb+7z3HNIO3ck0SNJCADUA1JUGcpuBF9zJ53C1h\nYvBa\r\n=TLNO\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.25.0-alpha.1_1622124653033_0.25581037787694383","host":"s3://npm-registry-packages"}},"2.25.0":{"name":"apollo-server-lambda","version":"2.25.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"21fc2f098c9b6a20c3ecd6972ee21b816b4ffbba","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.25.0.tgz","fileCount":17,"integrity":"sha512-YpRO+QLsab6hKNElAfilSlb9Sg+3W2i5cyt0rDNthI/RR8PpkNFxXAuw3vZRQ5Nf9K8Dv1N4gqBHUMc5P9n8mw==","signatures":[{"sig":"MEUCIQDgmuhGiul6Uxv/uO+DciBvIrInX7wM8kx3CCg+A9vJrwIgSV+JWibVtcR+fl6Dcbf7e+RoQ/oiqQMohjjs6YhbHfY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr69eCRA9TVsSAnZWagAA+ngP/j2U8KCyYTWGwReYQDGF\nRf5XaXg23hm34cUE8HgHipJ+39jTbhq2ZyvMhCwbCoGJx53H884ZMBEERiz8\nCKvXbphKRMUDElL/BWELgZ51V3oC9Zvh4VI5J27hzrtQiItmNwlUgFYSV3wS\n+bcd8d5qym3dJ4nv6cxePt616AmKFqkEuRzgPqLsLksR46hWbUT7SWvcy3Jx\nqRimu1bWYkbHdf9K5nMTkm8ZCM5EXdBDwSdM66U+hXKNTAYw4uZ22FUhkbVu\nBtpARDdkDyp/LFvtfpbXe73ZdUf4+mmgv/+tL6/D7kYziySc0cAP+LASmBcf\njVcH78eUfQfvijHTXSyZwAb7umhb0rGLLV0NdXseTglF+zdIs6jtM59+ufR8\nbdHfKAgM1HrZXraNxb6EZyN61SvFHNvsfiIhdr0UMs1SZqbNSYoXzc5TGHRS\nJBRfT9tta/s9k1Vbq3jMgT9AaK+qaOXfF2TWXmdvUl+jXD5lbAZEfPjlzUCz\neuRMVTnVr0npjIwzbYcKy/PJHIkZJnGQp2DzcWnMs/loknqjGD0t/Fo02tjO\nBYr4m3HHmdHomnYr+/BrMNeBcd8DK+CARqpdEVk6HAapI9jtrWDMrofvRiwT\nKGsItrfaoa1DPeeCec7wXIDoOtYZxnwiccUve/hFjmhgYZAi2B19KOiWf8p4\nlvxw\r\n=ESB+\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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.25.0_1622126430234_0.4357465386784585","host":"s3://npm-registry-packages"}},"3.0.0-preview.0":{"name":"apollo-server-lambda","version":"3.0.0-preview.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"2e10f34bed19625454d4ddd3e72f7d8d46b4ae12","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.0.0-preview.0.tgz","fileCount":18,"integrity":"sha512-s2RohE1jDLxiQyHx08S1K015paNw5XGlJI2pVtI39I4UkI3dLhv2cpmAJh3xWYZCsGEZpRJutDpHimyU4XnRNw==","signatures":[{"sig":"MEUCIQDc38J75h6apqOU3qoa1wzr+9+ZC9le0iUmwA5OKVZ26AIgOgwqmDqkqjuQlaJQ4ARd2RGY8YSjnKUUdAQlJMs4khc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":540252,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtcvwCRA9TVsSAnZWagAABmwQAIsgz9y27mmBQSAE2eUE\nrOlQkzcO02B4G3WunlkfvIlE9fRJoTBmnOq/W9x9kosTgZojz6d7xF68voVV\ni9eOL2XAaAZ320igBIDUyyb8iq2Kd7KNR6mdinLUW8AgqqZOkEGEu5FYhXXi\n7Vr+hbcE+Hpm2T1kKPQ2d4Ue6cfxB+vrzBrXE0qU/Cm1an5YydY8eWeWlcQH\n8nFPIqYdRNLRr8bA8WzV1p6QWElyZhg4t/wGlmURfYKNom2vYncAkjijzaeg\nY4fbfV01SPIf81Vubjw6rVTomWMjZ8cCtnYVFNI0B0BSwJHgnWtF4ow8v09S\nRuESF3TmD5tj0m1TvwspnUViYvkoVP1Ps21saj2rhEqKw4f3/CIKLvHB9M3U\n9y0daYPSfqj5GE0ar3RneTS4dlOjeZ85uB7DrphTBmSEg+2RsFXvySyixSxx\nm+ko4If1/vbTy4Kt9I3vKuI25sZz08Oc7zPtgK6R5nLgV0lTmHKSoMIrLUKy\nr+fUyUj1vGPRUWK4kpvs/kSt/b674g/XtkxSLrd/PN5GZL7F4m0LmuGODQf1\nlVH7I2qnBi7o6PUeEM05FOJBN9zslYaUQ+p3fVrDs1y8crAl0yzgolga9B++\n6IKEtkNGcaoIWQC74PdsRIa15+dn90nUILu+NfivMKT8cOmKSSrEKiQjw+h6\nGFoX\r\n=L0P6\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\nconst { ApolloServerPluginFrontendGraphQLPlayground } = require('apollo-server-core');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // install the Playground plugin and set the `introspection` option explicitly to `true`.\n  introspection: true,\n  plugins: [ApolloServerPluginFrontendGraphQLPlayground()],\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs14.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n\n## Customizing HTTP serving\n\n`apollo-server-lambda` is built on top of `apollo-server-express`. It combines the HTTP server framework `express` with a package called `@vendia/serverless-express` that translates between Lambda events and Express requests. By default, this is entirely behind the scenes, but you can also provide your own express app with the `expressAppFromMiddleware` option to `createHandler`:\n\n```js\nconst { ApolloServer } = require('apollo-server-lambda');\nconst express = require('express');\n\nexports.handler = server.createHandler({\n  expressAppFromMiddleware(middleware) {\n    const app = express();\n    app.use(someOtherMiddleware);\n    app.use(middleware);\n    return app;\n  }\n});\n```\n\n## Getting request info\n\nYour ApolloServer's `context` function can read information about the current operation from both the original Lambda data structures and the Express request and response created by `@vendia/serverless-express`. These are provided to your `context` function as `event`, `context`, and `express` options.\n\nThe `event` object contains the API Gateway event (HTTP headers, HTTP method, body, path, ...). The `context` object (not to be confused with the `context` function itself!) contains the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...). `express` contains `req` and `res` fields with the Express request and response. The object returned from your `context` function is provided to all of your schema resolvers in the third `context` argument.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context, express }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n    expressRequest: express.req,\n  }),\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: '*',\n      credentials: true,\n    }\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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: true,\n      credentials: true,\n    }\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.0.0-preview.0","apollo-server-express":"^3.0.0-preview.0","@vendia/serverless-express":"^4.3.7"},"_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-lambda_3.0.0-preview.0_1622526960147_0.9480223840941158","host":"s3://npm-registry-packages"}},"2.25.1":{"name":"apollo-server-lambda","version":"2.25.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"323d090f2629cfb979eb9944f91b7833cece3972","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.25.1.tgz","fileCount":17,"integrity":"sha512-BE2r1bOGMXDganVIFTtHqr24XmtOmwM+Zij81pkWi5tcmummH8/zl5X3bTAxF7Wu/vSXNzTbjkuegc6m1j3w/A==","signatures":[{"sig":"MEUCIQDoax3QGF3ivRh3+WTw5A9paIDbLutGgg3WjklXEbwvcQIge6Dr8v8q47F4n2JROZ2CRjkmp08xcGal967JSq/O8ek=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgv9vGCRA9TVsSAnZWagAAegkP/38CJYo0fyrJf1vQhep0\n78jdOdpqvYDIg2gzwoZeBvva9h93XKeTQ8P+37erMfAed9LMlMeXGOoP7kJt\nmelt+RIjQkwa4gVjx8uVxEEAWXhU8agMS6pfabhDtzxCggmfRUwgVOdCC0rV\nFaMr52IwlaXnDtwB8opROZtFqVNBXlilDP8N4gmoqDaeL041XzSZ667pFapS\n9S2oazLNKuwGJxfZFTDNNudieQSh5+NWKr6bZzOOPXnD2exU3vZzSdDRhIIG\nr0KNH9fj/Wpws9E8gD1b+Zhuf8ET5uNjuaRuIAQKsJVf+P1mRmA9MA0uHgTb\nngyDjhZxHnwPgsvij774lTtwbet1jqlX+383cvzNHvoW8vflIcZwjgd5m1II\nDYXbx0njNgNUAxqvCS4c+eg3fyNA7/uz+eOs04FRQNpr8ZxIPxf7eqn4Tzjr\nsPMmHxGcFxi+t45a0JYLzQ+2vQiE8Z6Q6ruf0Weso2lpMrJ/1uQtfyw6CToH\nGz4d88DPlBOPkji+dc92XNbwlAWpyX7JBIc/93qZOQYKzV+4LqcsbsZDHPBr\nFHn3Jbn8QGDOCAicGsViA7+7zDeaKJDh0gh5HwVbR6/7v+N3NqPfyr1iDVa5\nFLhqleNVQiiyAwYiwpnT8KUhDvhKBSV15Q8cYFiZQJazSv1hfx5ECr536KAk\ncIzA\r\n=MfxT\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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.25.1_1623186374808_0.8795472665231008","host":"s3://npm-registry-packages"}},"3.0.0-preview.1":{"name":"apollo-server-lambda","version":"3.0.0-preview.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"78b630572ad158fd84ae3ea84d2550144627c9aa","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.0.0-preview.1.tgz","fileCount":19,"integrity":"sha512-frLvVQ/KFdF1iA8iMaQCNxBTDbEPdmEEkvo6BBYyCTD+PuLq5nGar1sl50FnVkX72399G8oozdOaijRMxcBdXQ==","signatures":[{"sig":"MEYCIQCmgResFsTKTTIqWf2gzkB1f0krNh2aSr8aRJ+Gqzd+twIhAJOBR0CdLdXoR19gemTf+c1/Ttw+/jFpe2TX/XbKNs5v","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":91714,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyZM9CRA9TVsSAnZWagAArMQP/i51lH3krUvUB8pYoZiQ\ni8CQGfyY9i25AuzvvcxQwk/vRYDxr7SqTMzm7fOm3X2Xkm27+kTaQiFmGXKW\nj1AJIldMq4/WUpxp6Yg9fd/vrE5s7WRMPZ44zZN4Tz4wKpUQrCxa9fg4vAee\n/MEaNMgUfhsFX9/Vm61h8jtQp4knJjQmDww7ajk23sNFhmKkIugv6y91QzKJ\nu0va0xmZkNuM3zPMRO5z0gcQRfJMMmp9QzC56eKRVIb9xbZfCO0f5Ik+8KwO\nVnZyetmn8h8uwbO7EWkUfNA0ElnSRLDDuvoi4wXvr7jOwhbrOoO6wzyrnzot\nFBSsrACOjf+sUNlPb5NROfFx+w34o9kBGLNYF7v5p7J8jSRgAElbtNGf2nlE\ni06HI5M6IPOo6B9pKnQrfL4dAHOc1BrPZg7hfecNDA1lGvR5c+FzOuL4QYsr\n9+zFHr+bqOgHffVG3NdS6epLQNzBXXJ8JjJBbpLIF9tFyyv23yob/WDMwhIt\n5C3BuD4noBQtXMQwZtjxi3L+6ToxD7vEOvvKzqPmIGpL+f4P4GgsVO8ZMejv\n3QQG9VUX9haMan/6OaZjyYVFK24MYTe6zdZWUBl2EH44KkiWkTy/YLphqfvU\nyfA8+IslAlIGnd8aX8ltUwf7iirzO4ppFuju5r3EG6+gnYg4nnN8vtn6JsQI\ncSEx\r\n=RXVo\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\nconst { ApolloServerPluginLandingPageGraphQLPlayground } = require('apollo-server-core');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // install the Playground plugin and set the `introspection` option explicitly to `true`.\n  introspection: true,\n  plugins: [ApolloServerPluginLandingPageGraphQLPlayground()],\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs14.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n\n## Customizing HTTP serving\n\n`apollo-server-lambda` is built on top of `apollo-server-express`. It combines the HTTP server framework `express` with a package called `@vendia/serverless-express` that translates between Lambda events and Express requests. By default, this is entirely behind the scenes, but you can also provide your own express app with the `expressAppFromMiddleware` option to `createHandler`:\n\n```js\nconst { ApolloServer } = require('apollo-server-lambda');\nconst express = require('express');\n\nexports.handler = server.createHandler({\n  expressAppFromMiddleware(middleware) {\n    const app = express();\n    app.use(someOtherMiddleware);\n    app.use(middleware);\n    return app;\n  }\n});\n```\n\n## Getting request info\n\nYour ApolloServer's `context` function can read information about the current operation from both the original Lambda data structures and the Express request and response created by `@vendia/serverless-express`. These are provided to your `context` function as `event`, `context`, and `express` options.\n\nThe `event` object contains the API Gateway event (HTTP headers, HTTP method, body, path, ...). The `context` object (not to be confused with the `context` function itself!) contains the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...). `express` contains `req` and `res` fields with the Express request and response. The object returned from your `context` function is provided to all of your schema resolvers in the third `context` argument.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context, express }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n    expressRequest: express.req,\n  }),\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: '*',\n      credentials: true,\n    }\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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: true,\n      credentials: true,\n    }\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":"f23a4eb1aa5c5ae8cf83a1f41bd9bae3a03d3360","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.0.0-preview.1","apollo-server-express":"^3.0.0-preview.1","@vendia/serverless-express":"^4.3.9"},"_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-lambda_3.0.0-preview.1_1623823164997_0.27308300842761013","host":"s3://npm-registry-packages"}},"3.0.0-preview.2":{"name":"apollo-server-lambda","version":"3.0.0-preview.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"1639c6da53323ad71c3d24cfe089f2a14b81caed","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.0.0-preview.2.tgz","fileCount":19,"integrity":"sha512-CPyJXb0lyBEX8XCvE9k4SSRtSmmyc9wv0FXeBBbsTTnvxpWgbQ7MG6RnTJDQeqOmAJGLyd/32qf8m3QWQF4hMg==","signatures":[{"sig":"MEUCIFbjwijgYvYFHD2aqQw3Y/izb+teFZvmurVoGgqhvcI3AiEAxQVIrm9CDhe8Tcqt/1JjpCsG9ZsA7OLwZTptUdesj3Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":91714,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyZcPCRA9TVsSAnZWagAANeYP/1m4UVL82qT6WV6GTWea\nkUeSegsDD6d/o/xlLTqsBHrefO7DPOXDiCSUx3nvOON+5sswQbxUDSwZNH/8\n3xDU3OhKDTMBx/zkGVBaJpSJ+I/Dg0i6j1lAKQT/vU+GP+vYDMFGAAo/kL/9\nM799lLu7+Bj3F7gHM7AQ20LJZroKeJ1keREk9rnfgUN/tEBiwsJnxVCEzs6V\nv3s06SlgpILCR/wqGIA7EgQZh8FQeaH8R4UFXPb5jIN4EsJtSEAx8ziBfr8V\nCNrU1s/mhA+4Mo7CABJru5C1FuyKnIRAQiuI9STn6nI4lf8MGUJ4ZP967Ft8\nWKP9q/5TJ4Ds8RSG+ooa6bVxwzsYPT7uzowUCn8vEjpfv/Q5jB2kWCPnA9hT\njTq3snIZnIFC7w6HUAxJFZrEtMOi82u65zs7uYBIGldDvyIsQmpls4GO+nbv\n9wrd7zt331sbI/Bs1dAl2EOfHDvJY96svxs/hziOs4ATlnLIhmfbX63aUwoj\nZJB4zc3yiLcHn+EzVB4XbKSh5wYZ9yHidG5tSa0h7GhwzswkbbkoIZQkEHz+\nQcqyXqiwdA/8yA1z/+pSz0iK9cyVVZLlt5hPcaCGVyX4TIv82BR8gzDV7u8X\n/mKYCMJShziTaE7FClq01J0KDP0XXXw6B1thLGjkHFKJyDqN8FtYld/tINy6\nAiNk\r\n=YGz0\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\nconst { ApolloServerPluginLandingPageGraphQLPlayground } = require('apollo-server-core');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // install the Playground plugin and set the `introspection` option explicitly to `true`.\n  introspection: true,\n  plugins: [ApolloServerPluginLandingPageGraphQLPlayground()],\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs14.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n\n## Customizing HTTP serving\n\n`apollo-server-lambda` is built on top of `apollo-server-express`. It combines the HTTP server framework `express` with a package called `@vendia/serverless-express` that translates between Lambda events and Express requests. By default, this is entirely behind the scenes, but you can also provide your own express app with the `expressAppFromMiddleware` option to `createHandler`:\n\n```js\nconst { ApolloServer } = require('apollo-server-lambda');\nconst express = require('express');\n\nexports.handler = server.createHandler({\n  expressAppFromMiddleware(middleware) {\n    const app = express();\n    app.use(someOtherMiddleware);\n    app.use(middleware);\n    return app;\n  }\n});\n```\n\n## Getting request info\n\nYour ApolloServer's `context` function can read information about the current operation from both the original Lambda data structures and the Express request and response created by `@vendia/serverless-express`. These are provided to your `context` function as `event`, `context`, and `express` options.\n\nThe `event` object contains the API Gateway event (HTTP headers, HTTP method, body, path, ...). The `context` object (not to be confused with the `context` function itself!) contains the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...). `express` contains `req` and `res` fields with the Express request and response. The object returned from your `context` function is provided to all of your schema resolvers in the third `context` argument.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context, express }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n    expressRequest: express.req,\n  }),\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: '*',\n      credentials: true,\n    }\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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: true,\n      credentials: true,\n    }\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":"09dbe3e7029ea3ccdf16538699848f08bbed3904","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.0.0-preview.2","apollo-server-express":"^3.0.0-preview.2","@vendia/serverless-express":"^4.3.9"},"_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-lambda_3.0.0-preview.2_1623824143101_0.16116877207800173","host":"s3://npm-registry-packages"}},"2.25.2":{"name":"apollo-server-lambda","version":"2.25.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"d5c9d2033ae447d5f4bc0340f9019507dd93b726","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.25.2.tgz","fileCount":17,"integrity":"sha512-cx9MLkBaf+UDYgH4FId+EG1JwTYsPfID8bDpXBszjINocz4RXWTkM+TZIJUv4tnOaVSCd5l7X7/TKNJk9picBA==","signatures":[{"sig":"MEUCIQCw+pYGjUsnOruek5kpbvGx0s4pU6Th+d2DHKHsFbHSDAIgTn5BfrsJYXzzeWiVpAD9J0wefuyJf5UPNqHhgNTamzA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0j/YCRA9TVsSAnZWagAA2bsP/0ufrxZW6rnYoFneN5Jz\nQNv6hLN9KupmQAJY/pTPBbQTRwzsNA5ypga4Yk7EWAqOvapO6rv1KeljQrc0\nGa9/l/v934rWcVN3gMCFNNQnZlJbjdrxOFtt4/yt27YKM+ZXORTDUv22zpWl\nDSdC8Sd2bfOUSXHi+fj230bxtC7U81m2g1THiQUT9piRvAB4OUcBKEzGShns\noBd/0hxCK7ztvpISjYCgd+3qfrVtr7ZKmOLdXZ9NnMRXQqo3sNNCPaOdqxj9\nMl5gq9NqZtVhwcfP7Z0VvzfJIZjTo7B55wAMZP62heHc1Yyn+2cc73sE8/Bc\nxbV4qxk20BBlsef8gGApMvV97+8gw7M+8gZkld+C4hIZhj0rFAVFFOKlOtiv\n/5Epr1J15vQC+TG7w77LZf5XrW0xteoydNRyqCAtBK9ZJ/nJfH8eDB4F1noS\nB/vkuU4Fs7WdiaXsYx9JzeCBKF9wmDtxm2ddBmuPoA+NFVCl6mQZ4PxAqJGG\nWekI3MG5xkP+8qCogKOYLiiQT71zBOtCmFmvlLcUlyEJ2IixeIXdsx/GAxTH\nFPsBSCRMC/4O63FVEE+gDDoQbQrcV8kCrwFXgCoAGHBn4H8+y3OV8MfLLK/E\n5CG/p+OrL2oxhgsjf9lqAVkRU1+bCThjbotiY13dY/VT0GiZzs1hCOj+6ews\nMFgJ\r\n=bCT3\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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.25.2_1624391640431_0.34371098961394786","host":"s3://npm-registry-packages"}},"3.0.0-preview.3":{"name":"apollo-server-lambda","version":"3.0.0-preview.3","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"69167f3c607730dd89529eaaed0c47f3f5b00ef3","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.0.0-preview.3.tgz","fileCount":19,"integrity":"sha512-piNE2sum8jdMILa3QS06sb2KHoa/JwQ0wdw1ffLU1Gr5SvLAfAOEbIm6FB3Vv0q2TOp6mvWDQsvhYt3JfZfJtg==","signatures":[{"sig":"MEYCIQC3lXHPHTwFV/i0/97IU8ToGzVu/lnAPCNquCpnko/xqQIhAMkqGaS1oWFpEXOpIv6HFVq2FIRqls6fJfGtKYakcHqs","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":91761,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1r57CRA9TVsSAnZWagAAswsP/1DZLvG7hd0L4BhpxuDC\nhzcVVSyxRR2Y+TDyOBDMEJZZEb8QcWL9J95SWIUGgQwt+ES1057TH+NT8CZE\nZX0YwcfHgWJRgySfpOlsnbeMPJcPmzalV73hv2TTMIW2YniWTEHHrJlnoLh9\n9rqHefsK52T3XGwlRE2ifFuAccMZgf4rql4LYpFGALWOx96s4dq5Mr3RTNaW\nFBzYmXFXG7LHlEj7s0bErgxG0d4Low0hVUwmJc+3N6nkPls5qo9fY/nPCX28\nrrFXRgWCW1OUkpwGmg1t0EdogqgvlTajA3o4hLdnr4TawqaVmYIPQ8xjkaXC\nZ7lVe5PNTlc3jYmfNdmA1WB/auoNkZ39NU1recE2hvE+rzE09R091b6fdlEC\nJmr8oHCYtY5WwXNqAGHuksVZNeJhkQcecPxiWW8hEqaItlA0Z6McFj8SFbEU\nl5MZfpqXfNITZXMjl75G5yCRNAMpW/NOLeI+6eqQOa3Jv6dRcVF+Iu94WEJK\n5sXobFY7gwde7HgR5tdzWHk0L0gI7DQG4K51zibKcExNyQnoZ+r7PlVKuQJq\nv5W0xG4fryaW4nHxUhUCPLgXn09/gPm0EY4RFSL+PJQ+O7VjjPnanHZ25Qm6\n9lvy1h0CGMxbhGcoBp8CR/vt4CmgV1JtI2S+SJ/nSL+QfxWDgMBiDvPa48EO\nbHeG\r\n=7Jue\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\nconst { ApolloServerPluginLandingPageGraphQLPlayground } = require('apollo-server-core');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // install the Playground plugin and set the `introspection` option explicitly to `true`.\n  introspection: true,\n  plugins: [ApolloServerPluginLandingPageGraphQLPlayground()],\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs14.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n\n## Customizing HTTP serving\n\n`apollo-server-lambda` is built on top of `apollo-server-express`. It combines the HTTP server framework `express` with a package called `@vendia/serverless-express` that translates between Lambda events and Express requests. By default, this is entirely behind the scenes, but you can also provide your own express app with the `expressAppFromMiddleware` option to `createHandler`:\n\n```js\nconst { ApolloServer } = require('apollo-server-lambda');\nconst express = require('express');\n\nexports.handler = server.createHandler({\n  expressAppFromMiddleware(middleware) {\n    const app = express();\n    app.use(someOtherMiddleware);\n    app.use(middleware);\n    return app;\n  }\n});\n```\n\n## Getting request info\n\nYour ApolloServer's `context` function can read information about the current operation from both the original Lambda data structures and the Express request and response created by `@vendia/serverless-express`. These are provided to your `context` function as `event`, `context`, and `express` options.\n\nThe `event` object contains the API Gateway event (HTTP headers, HTTP method, body, path, ...). The `context` object (not to be confused with the `context` function itself!) contains the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...). `express` contains `req` and `res` fields with the Express request and response. The object returned from your `context` function is provided to all of your schema resolvers in the third `context` argument.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context, express }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n    expressRequest: express.req,\n  }),\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: '*',\n      credentials: true,\n    }\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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: true,\n      credentials: true,\n    }\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":"16c00c982b11cf91ab8f208f88cf587622fc5dd7","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.0.0-preview.3","apollo-server-express":"^3.0.0-preview.3","@vendia/serverless-express":"^4.3.9"},"_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-lambda_3.0.0-preview.3_1624686203239_0.855789935920082","host":"s3://npm-registry-packages"}},"3.0.0-preview.4":{"name":"apollo-server-lambda","version":"3.0.0-preview.4","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"97713347f751c20dd3b4ae8d64b5a107807d7dc5","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.0.0-preview.4.tgz","fileCount":19,"integrity":"sha512-GcNShIZ1jonr9uHtautk7LlQDxPHtLeC1KQwYVQiverf2bb8ROypboZ7i5n1xuapd74aJxEoR5dxys9qCOnhyw==","signatures":[{"sig":"MEUCIQDunm3CXcdWGEv/uCopVxrhbYEoNv+jaZPfKx5v/V4ALQIgDuHMXQdlVXRen1S3Ks5UYXP6mH4H6FklMQyXQP9ynnc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":91761,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3NzDCRA9TVsSAnZWagAAxqoP/135Hfdi9j4A3H5xJ/fd\nBqIxDDjSdBaeX81PqRKT9pMXVQlJxCMmMxvZqlTqOPDca+Y9jlPTuZosuc3M\n/E1M2WT21ovro8IFoCe4beF/14ryld9XTFS5BpO/zxMMsCkCU8GKDfdKgEkH\nyC9RmsQjXvKtI3TrrNdemSoT8Vg3lYXV7l5cTuFtzgq3nrv0hE85GNHPXuCK\nlIjZGB2pbYicAGOm7SyngtnQdjstQxzN6pPoZDRXYJtGJxWSTTaRdL1/563Z\n0tpK3tGekXWkM9fo4aW3Et8vqXT92aRBI8QINjo9RwaDqXzBbWBQCINDWOCL\nvo9I7LHGfRUBOakb6+C1qinsAwXw/caEMKQ5y3ymK0lcU6NOh59EHGDps4NX\niXROUrhlCFPlVplXdqcNZ1zImNvxcvXH+Clrc7xhGhB7lC7yZ9XqdTxykT8M\nQfglCG7U1w0iZAiL22uOm7Tv8j9SMbSzolYlW16/0/HrV0U5l3mcL4Z2MisV\nZWz1WjdbQpfozHwYle7F8PTXTy2fgokD6ZLrjuLcQLAQeKLDj8W8ygMEBbA7\nzLabJ6VevlWjXEdR7ESYtxNDsTU32JXoJFfWM4YyLVZ0NVTfUSstsxD7Rxvd\nD24LtW1DHN02BmX0Bi8jH0xB59mDJTfbKWEPlr7veJbhRUbL1YYyXnmlSU03\nTvoS\r\n=O53D\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\nconst { ApolloServerPluginLandingPageGraphQLPlayground } = require('apollo-server-core');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // install the Playground plugin and set the `introspection` option explicitly to `true`.\n  introspection: true,\n  plugins: [ApolloServerPluginLandingPageGraphQLPlayground()],\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs14.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n\n## Customizing HTTP serving\n\n`apollo-server-lambda` is built on top of `apollo-server-express`. It combines the HTTP server framework `express` with a package called `@vendia/serverless-express` that translates between Lambda events and Express requests. By default, this is entirely behind the scenes, but you can also provide your own express app with the `expressAppFromMiddleware` option to `createHandler`:\n\n```js\nconst { ApolloServer } = require('apollo-server-lambda');\nconst express = require('express');\n\nexports.handler = server.createHandler({\n  expressAppFromMiddleware(middleware) {\n    const app = express();\n    app.use(someOtherMiddleware);\n    app.use(middleware);\n    return app;\n  }\n});\n```\n\n## Getting request info\n\nYour ApolloServer's `context` function can read information about the current operation from both the original Lambda data structures and the Express request and response created by `@vendia/serverless-express`. These are provided to your `context` function as `event`, `context`, and `express` options.\n\nThe `event` object contains the API Gateway event (HTTP headers, HTTP method, body, path, ...). The `context` object (not to be confused with the `context` function itself!) contains the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...). `express` contains `req` and `res` fields with the Express request and response. The object returned from your `context` function is provided to all of your schema resolvers in the third `context` argument.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context, express }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n    expressRequest: express.req,\n  }),\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: '*',\n      credentials: true,\n    }\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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: true,\n      credentials: true,\n    }\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":"4669d1aafb6fb6571de1d5789ee4375aa25eacf5","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.0.0-preview.4","apollo-server-express":"^3.0.0-preview.4","@vendia/serverless-express":"^4.3.9"},"_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-lambda_3.0.0-preview.4_1625087170738_0.27341340698338734","host":"s3://npm-registry-packages"}},"3.0.0-rc.0":{"name":"apollo-server-lambda","version":"3.0.0-rc.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"bd0773a1a276dbfc72e1bae922f3f8cd33c924d0","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.0.0-rc.0.tgz","fileCount":19,"integrity":"sha512-T1s2gRzV01GtH3w/soNw8sLPz8Wn5Y0uwMmDGrwo95bUTYwbYPTrvj4S0ovSgnfoGsg+7p7GqG4VXBWsj+vbTg==","signatures":[{"sig":"MEUCIEL5QIn2dvPzY3MiNFvQzQHUS8xM3yTFZf8OfoYlAPiJAiEAq7eO+ReaEM6KLlbyMYb01VjiS8Is7aaXNo3Cgwp4AX0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":91741,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3lLbCRA9TVsSAnZWagAAcPkP+wb9t6vC7cGULCG5+UAt\nowk+4seDMJcogBZ3LB4N9XFN60mnFMtuzKCvDFYhXEtCYnTRew8M7mjvhRQe\nMShU0TxAlzIj7sEav21pc60nsdRON1Dd5GPblbbjFkYfGLZIqAsoUIslQFuq\n71Xu0YPiV8ODgmx8Cx+Jqg+N6wA5f0d8D6iTdsAgnJkf1n9rEM18WoIcHmnI\nGfvrHw68HaxXTbemMrPvG3cqOVhYAhUkfUdCKt+JtHa1FxoySoB9qEtW3cCc\nM97zTg78OTGL4B4lKCKGv5KiW8/XBk4UcMpggKq4HuqKdFc4xUJhNvyTxa32\numFj5kUeNL803iEksD5UhtH5zVMJ+p5AUoKaKfE0Z1zQkRvCrm22hAzLU02r\n8qy5SiLA4/y+WPRIFgkQXvaghHRqLUz4arQV5f2Ge2tvoJVIlVgZafv24v2s\nGeqsBp1IZrY7kPqIqnuk4nJeSzfVSFBRHXMeyHUKw/GomPCe9PoRgRnFPy1I\nyz9zXxcNUFf6v5yya5VrDXfpq+HYS+Xj7l1QMgYLr38gFbn51LQ2za7q18L3\noiQsQoOsdHofCGF6fZeGhwlouv5norHb/BDNu9fuAFmmJz+1uS9fkGj8+NhN\n0AP/rHaZ61+FRKQj4pp8j9JRMUIT3pAYcBcc5Fa2qKhKHdfYJM0UYwBs7rHf\naEXw\r\n=RrfU\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\nconst { ApolloServerPluginLandingPageGraphQLPlayground } = require('apollo-server-core');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // install the Playground plugin and set the `introspection` option explicitly to `true`.\n  introspection: true,\n  plugins: [ApolloServerPluginLandingPageGraphQLPlayground()],\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs14.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n\n## Customizing HTTP serving\n\n`apollo-server-lambda` is built on top of `apollo-server-express`. It combines the HTTP server framework `express` with a package called `@vendia/serverless-express` that translates between Lambda events and Express requests. By default, this is entirely behind the scenes, but you can also provide your own express app with the `expressAppFromMiddleware` option to `createHandler`:\n\n```js\nconst { ApolloServer } = require('apollo-server-lambda');\nconst express = require('express');\n\nexports.handler = server.createHandler({\n  expressAppFromMiddleware(middleware) {\n    const app = express();\n    app.use(someOtherMiddleware);\n    app.use(middleware);\n    return app;\n  }\n});\n```\n\n## Getting request info\n\nYour ApolloServer's `context` function can read information about the current operation from both the original Lambda data structures and the Express request and response created by `@vendia/serverless-express`. These are provided to your `context` function as `event`, `context`, and `express` options.\n\nThe `event` object contains the API Gateway event (HTTP headers, HTTP method, body, path, ...). The `context` object (not to be confused with the `context` function itself!) contains the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...). `express` contains `req` and `res` fields with the Express request and response. The object returned from your `context` function is provided to all of your schema resolvers in the third `context` argument.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context, express }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n    expressRequest: express.req,\n  }),\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: '*',\n      credentials: true,\n    }\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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: true,\n      credentials: true,\n    }\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":"b2c2097ddd58623815112c0e084761f426d2e435","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.0.0-rc.0","apollo-server-express":"^3.0.0-rc.0","@vendia/serverless-express":"^4.3.9"},"_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-lambda_3.0.0-rc.0_1625182938955_0.8890972745197614","host":"s3://npm-registry-packages"}},"3.0.0-rc.1":{"name":"apollo-server-lambda","version":"3.0.0-rc.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"4ae15d8ec5ec3db4844dcc1d6ab125ac61881c69","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.0.0-rc.1.tgz","fileCount":19,"integrity":"sha512-q9nT2Tqvf1iZzRHJjrOuR1B3YFG9kBLhqiPuN47khJbBQh2P3VYYxHDnRCUmmvaDofPA6k0fltWqTKG1M8p8Tw==","signatures":[{"sig":"MEUCIFIEUr5UL/jDm7r4LZPQP+9JnafpVwYMvyH+n/8v6TQvAiEA/0SM89dbM92ho/nwr8S8LU5BwydI6YQtq99XMAStVtc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":91741,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg34m8CRA9TVsSAnZWagAAFdAP/1sa/vuGIJHlUC4jy9j6\nyUzw7g4oWNHSjtc2Fc9GbPgKix3+mHIe1cGVkD2IE9BPotKw96bNlnvF2ZY+\n0muwxZH9fjZyasVlL0+406SyzhPlIGV5HN3jp5cZqdm4MqifajZWQpkm5Mco\nxeDaPVDu01mXnc4Cc5HlZilOy1Qbc4i7sGOCuN7YOEwPAXjv3OGPq0oFchgl\nNhw1e91x2SdhZU/3Iq1tgXoU06Mp/VTt9ovlt1uXwWK6p3/F8CC37hJdbtPf\n055bl3TP3c30s2RwQkoGzLmJovhQKmRYIMqY9FTvVsuObcE2KJr4+rd+niP8\nCkhnhRw8wPlZCaZQwUl6HNmcRKZrUJLK90uy/+Ut14ZGrnyXljIXYnbl23ir\ndOs4ag+Y508z+3DjlncF6Fs4BfSorke8vWjr2S1yJFnF4OkcJ42FV/4KC8tN\nntC8S2JSuUUu04zwJw8N+RuJ1ucMa/8YgIAIIOjv4vthCF1hG4/6pWEegg1V\nnApn5k0Fh0qtaebt7/mv5J4p8FSCH1nqDKlxvU16+xVY4hLBdiF11Tba2rY/\nbUwCNJpANeMQ/QSP962TF8fs9IuraZ4BnlMFh6pNemC6U3ZUXSHQ3wfKJ3w2\n4p7aa1CzfIYTly4Hv++BhZ+Ge75NFbvqUltGLCxYqfzW/8sn/FjKQkQfxbxE\n117c\r\n=JYw0\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\nconst { ApolloServerPluginLandingPageGraphQLPlayground } = require('apollo-server-core');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // install the Playground plugin and set the `introspection` option explicitly to `true`.\n  introspection: true,\n  plugins: [ApolloServerPluginLandingPageGraphQLPlayground()],\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs14.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n\n## Customizing HTTP serving\n\n`apollo-server-lambda` is built on top of `apollo-server-express`. It combines the HTTP server framework `express` with a package called `@vendia/serverless-express` that translates between Lambda events and Express requests. By default, this is entirely behind the scenes, but you can also provide your own express app with the `expressAppFromMiddleware` option to `createHandler`:\n\n```js\nconst { ApolloServer } = require('apollo-server-lambda');\nconst express = require('express');\n\nexports.handler = server.createHandler({\n  expressAppFromMiddleware(middleware) {\n    const app = express();\n    app.use(someOtherMiddleware);\n    app.use(middleware);\n    return app;\n  }\n});\n```\n\n## Getting request info\n\nYour ApolloServer's `context` function can read information about the current operation from both the original Lambda data structures and the Express request and response created by `@vendia/serverless-express`. These are provided to your `context` function as `event`, `context`, and `express` options.\n\nThe `event` object contains the API Gateway event (HTTP headers, HTTP method, body, path, ...). The `context` object (not to be confused with the `context` function itself!) contains the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...). `express` contains `req` and `res` fields with the Express request and response. The object returned from your `context` function is provided to all of your schema resolvers in the third `context` argument.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context, express }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n    expressRequest: express.req,\n  }),\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: '*',\n      credentials: true,\n    }\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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: true,\n      credentials: true,\n    }\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":"ad2cdb557da704acbb42bcbb36086e35264074db","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.0.0-rc.1","apollo-server-express":"^3.0.0-rc.1","@vendia/serverless-express":"^4.3.9"},"_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-lambda_3.0.0-rc.1_1625262524274_0.655333558099211","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"apollo-server-lambda","version":"3.0.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"5d5edc8619303ea2486b102c229de63ea2d7df24","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.0.0.tgz","fileCount":19,"integrity":"sha512-3ojhi0TskjPrwXK7CEGg5gljwo/NsXJSKHiepbuLI5oiLIbcPDZG4JH0mR0P2tF7sqaDNzPGDwhGzxV28SYt0Q==","signatures":[{"sig":"MEUCIQC/JSsTBlqqxGHFfchP6suG9XEkX5BMsYe39smqe3YgTgIgRfG0+QDddd/4z0/s+p2uTB5/nQtU50Ie1zPq+N0+69s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":91725,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5e/XCRA9TVsSAnZWagAA7BUP/2t4+EuZhl1WwtHIdUN3\noAHSbZHzHpiE5Zds7JSMSQEb9G+qgfkx1QHUpuO6/QJw15VsA1OcEi76lOCm\n+MaBvWDfUlcFOpbbAfO3z7nmoxb9ESmMLT5EYsx0mky0x8uAdcsifsKlb+Lx\niN9Uw8A7oNzb3S9JwSA9/KyZqeEnM2FVHtor8diozuChOSsjPcRIBEZiGJYX\njd5wROumAd5gO2GUB/Xi0Ib4pzwkE4ezd75AMqW6Q3G+EjCorEw7Tjso6nKw\nwCUajuOEWyIltgeGWdOfdTrfH2nuzDT5t4QEyKT3B/ybsApwjCk8OjH4aAbf\n61LGUsCo65AkH1R0+zeTCc9pkJvSuYwola8QOVfuxXAtudtgSxctYzYk8vgy\nj4Mgs/fot0z4l1h+jKkBqntjgRv7SFCgTebZgzx3R5GwUZqPA4dj+xAFdiuj\nLjUvCCC7wT0v4SyeGJbNp9pIbxBiimQOQxF6i914CoJgiCverIewai0HxiVq\nCgM4yXRAjrDeK6+O78yFe2H9K7keDMhvTmS1whAOs0gkeDny4WiuvmCbxLhZ\n+ihT8cEQVRy1eQeyBjSnlrlZfMvZVhgdS2S5LkOKQuhTBMp+8MwMQpEm9k2M\nWtoYsAZSKgIJMavP4J5Pz+DncIaXpys59c2TVPwveK/Zj2xZKZYwx04uCfbk\nJCGg\r\n=axja\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda@3.x graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\nconst { ApolloServerPluginLandingPageGraphQLPlayground } = require('apollo-server-core');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // install the Playground plugin and set the `introspection` option explicitly to `true`.\n  introspection: true,\n  plugins: [ApolloServerPluginLandingPageGraphQLPlayground()],\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs14.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n\n## Customizing HTTP serving\n\n`apollo-server-lambda` is built on top of `apollo-server-express`. It combines the HTTP server framework `express` with a package called `@vendia/serverless-express` that translates between Lambda events and Express requests. By default, this is entirely behind the scenes, but you can also provide your own express app with the `expressAppFromMiddleware` option to `createHandler`:\n\n```js\nconst { ApolloServer } = require('apollo-server-lambda');\nconst express = require('express');\n\nexports.handler = server.createHandler({\n  expressAppFromMiddleware(middleware) {\n    const app = express();\n    app.use(someOtherMiddleware);\n    app.use(middleware);\n    return app;\n  }\n});\n```\n\n## Getting request info\n\nYour ApolloServer's `context` function can read information about the current operation from both the original Lambda data structures and the Express request and response created by `@vendia/serverless-express`. These are provided to your `context` function as `event`, `context`, and `express` options.\n\nThe `event` object contains the API Gateway event (HTTP headers, HTTP method, body, path, ...). The `context` object (not to be confused with the `context` function itself!) contains the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...). `express` contains `req` and `res` fields with the Express request and response. The object returned from your `context` function is provided to all of your schema resolvers in the third `context` argument.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context, express }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n    expressRequest: express.req,\n  }),\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: '*',\n      credentials: true,\n    }\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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: true,\n      credentials: true,\n    }\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":"bcfd36cdd01f9d26d0a225aa62a79c6642cd743f","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.1","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.0.0","apollo-server-express":"^3.0.0","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.0.0"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.0.0_1625681878967_0.7129044615939908","host":"s3://npm-registry-packages"}},"3.0.1":{"name":"apollo-server-lambda","version":"3.0.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"81f7254124576980da86bce3705ebb6cfe8372d0","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.0.1.tgz","fileCount":19,"integrity":"sha512-IQ0oxmV+JUI4aqW0jowgtx8RncuM5KnJ53+MY1CrhcLpgsnVxGTTS9Q9DyT8wGJZKR2WdtVLsIt5jABG4YE3Pg==","signatures":[{"sig":"MEYCIQDir1iZNaIkSh8z1/tQkxL7auxBVoEQ6IQcFEDXEpr3sAIhAKlp9I3wJZ+0okibdvt2rQsUvCm27EdmutjI/p54YEBx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":94661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8gv2CRA9TVsSAnZWagAAZuIP/3fDTfQ/U2rbrNN2lt48\nx9e/QmO5dUwGUvcLrvWzdSMOFNriEu+6x9f1AfwBQ1867i+N3D0USOn5lqwz\nyQhXr6IBJTwO0MY/vfXA/utteDhcBhqz6SiyUlEDrp2ly6WoMv+52osK3JFB\nZK1M0xa8vH5PTJ46q0/nirnzcuNjT7yHHAG22iROMTsaiP+hcW/quCE3q0qi\no5+OGQxz4Aq0X6PO7HU/2QL4RlbRfVn8BDHTyVlN6xoI+hUIsTqq3Xz8qCIv\nsZ621w6RxQ6OrHhBIPHO/c+KnNFjOVPY6e2og263FbLOSZTJUzyhy/isnOC2\nF/DctKWJOqH7P4jCPOgWpwHkzyHU2RSx5Np5bq4uGNvnFpjv1Iw5ttuvCL97\nd0utVm1PreJRMhuFdanzGE4FmBWOrbfSWhhcMpeXF19wthQ33kCw0SDNCdvv\nuEJlMVokQftVAFrAIPRGl+RhqlHUci8U6zCdWhFy86lP+FRL1XXzQEGYFI8A\nODBSto3QAybGcLJl2h/xsW/ypUz8/CxEgjMvZbOAx670V5HQ2qPGz3URqwD2\n6RCWwFusxG/OGcpjhPU+YlvoTns7yMU2mljqDnZykan+7AoAQAYLkV51nM7m\nJ5FrtxD76Ter37tXHmPw65rrL5TlOcxb337pphAeM0zAEH7SJBhONKXPJeKp\nnoUY\r\n=kCAV\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.3+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.3","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.0.1","apollo-server-express":"^3.0.1","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.0.1"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.0.1_1626475509938_0.8852748238764421","host":"s3://npm-registry-packages"}},"3.0.2":{"name":"apollo-server-lambda","version":"3.0.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"75dd65407fed0ab3e98a7df5acff0d2efd729695","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.0.2.tgz","fileCount":19,"integrity":"sha512-K5sHcaeiaT3eMkbYCOJi2a99msoBAxgNzeMvhNPDtzKJ2rm3uA+WgY1lajP4PucReJRepzx2fDu10MWguiRbhQ==","signatures":[{"sig":"MEUCIDV4ja3Ph36R6bbVYUmDdm6FAwcUPcYVD6+NnFYCT775AiEAm3OMxcoK3MFsHAr/X+QkBJ5DGpon8DjzflzuE+o/s18=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":94510,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9wepCRA9TVsSAnZWagAAXFUP/2BSaVNnUnHnYvp7zG58\nXnUWzJTQF2DPlxeT5GTdOu+018p9qX4KzUlrEvlo3ZD15wps2Iiu3ozAAuqR\njvCf/10tVMKrWCxOh86r2Dkv7DqygwCNksnBpewIkNo9U/+mvGcH/pc733Pm\n0V594ISTMZzipcnjSqX/FjfI7sLxsYqtoy6q5cVEW1FYdsXMsbXYFtLS4LTv\nKcJD0TByExYFJsaiVlo5Fu4CYcBCnf8CHL6qpmUA5uSeJ6Jqw/Nlg2PBMTWo\n5KVvnhANyWw72Y3qY0TYFz2SFsOa2ZeCV1xiik1OtNHgGnWDKHLqQYciUm2r\nVdOXI3a2TvC5AmFuPw1YnlG7h+CmrE013IOYk0CsgcTSLql/mh8j1/jFM3XC\nQJJgHTDPzQcOk9psNFpQzdg1UUmnjYftLRu6+XjlBW1sKTvq/RoC+BWysX4R\nqwjjJG1aenSksukwnfUIiB+SP/CpEuFuO8ducTQIv9I1o4N0euOCSMwKp7pH\nyHgaw/92WEONVAGl7xOt/Gkw/jiT3z27RwDxWm/mQ0PQu2+nqvIffvm9UcrB\nJXBC7jPtYjv/ajvIynMRQB4PIbv/kyveHpGsvZn8BIJkKNpYMAhTd2VGr4Uh\nAUt252lYyFjFKibAS2TDUAgcQCPBW1Qcn9dPrH9ZgUZf7LZG7qNICy6gULIC\nn7KR\r\n=YWev\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.3+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.3","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.0.2","apollo-server-express":"^3.0.2","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.0.2"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.0.2_1626802089162_0.5078569723516162","host":"s3://npm-registry-packages"}},"3.1.0-alpha.0":{"name":"apollo-server-lambda","version":"3.1.0-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"3e7a33f2f69ae6efa4d9622d0b3266fea56c280a","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.1.0-alpha.0.tgz","fileCount":19,"integrity":"sha512-d9QRtCXgIuXyaVV6mD3xxHLMxjojYI3PW9q4iMzV0nwO+oZ+kcKwKtg2VlFX2vSOVYe4gXIghkvpr+6cbmyi7g==","signatures":[{"sig":"MEUCIQDyJyovx98sCur8HMduuiYlf0Kv6VHsLxMi2qat5Wvm1AIgctxRVf7z6ZSF4z3Gf+jrBRpSrjRlWg/yIjDPfR27J7M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":94546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+dO2CRA9TVsSAnZWagAAzrsP+gMNPayNNZWpKMiJuCz/\nD1TJFiNnMGj2sDl7dPWWLG0XBe9ar0AOz204ZsavDIwfNeZp3gALsA3DqrGN\nBW+Vj9lo8p1q2hxZ/+WwT0SGGffyeeR5A5oM8qVp/W0YXjSLn6AQ9kI/Udpz\nRQLLZEJp/imP70LqEnn6ierbSdyF7kyWgVrh8cWahBbwTDowpSbRs2aSsDZ3\n0H1vUP3sln+O2gzhJ/s8XJOrjYpJe/7t0dJ2IHOQqL9sdjIDCdwiTbI1TcdR\npc9cIMgjC/PoCBM810ykafiMjQlkP7caLocVUCPn0ugj6M6ZjggJggm0hOnE\nhV/vJP2YZ7FAurjWaVOllMcBLi+0rkiTf0xAmfvrHetwI3iPXCFM1KApr3Bu\n3qv6qxZDiu4O4c9lzTn7FTFj+cqIRiYZKMgm/JCGU8Cbf8C6/LOuoaM5/SB9\nEbEtep81D4tAoUx/ZbvQ9zU6jJ0WV1oXBH+g7pNSI5Ck9rB6IE8MvyL9sVXx\n6cX6P+huun3w4szsgYZ1r7pVxZor50vYb0EypkBxl8R0g5RFqFhkzWxrHrtP\nrFTu1840uPow9dEysN7/oDsUZcc4H7T5yEG53Jicjn4gWklT76gk268jq6kN\nI/HWvBxFYVjZLxWyFhWeT6LYulhrAR666tE94OUGP5qtgtoX+G9ktQ7zLyhW\n0fC7\r\n=7/i4\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\nconst { ApolloServerPluginLandingPageGraphQLPlayground } = require('apollo-server-core');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // install the Playground plugin and set the `introspection` option explicitly to `true`.\n  introspection: true,\n  plugins: [ApolloServerPluginLandingPageGraphQLPlayground()],\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs14.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n\n## Customizing HTTP serving\n\n`apollo-server-lambda` is built on top of `apollo-server-express`. It combines the HTTP server framework `express` with a package called `@vendia/serverless-express` that translates between Lambda events and Express requests. By default, this is entirely behind the scenes, but you can also provide your own express app with the `expressAppFromMiddleware` option to `createHandler`:\n\n```js\nconst { ApolloServer } = require('apollo-server-lambda');\nconst express = require('express');\n\nexports.handler = server.createHandler({\n  expressAppFromMiddleware(middleware) {\n    const app = express();\n    app.use(someOtherMiddleware);\n    app.use(middleware);\n    return app;\n  }\n});\n```\n\n## Getting request info\n\nYour ApolloServer's `context` function can read information about the current operation from both the original Lambda data structures and the Express request and response created by `@vendia/serverless-express`. These are provided to your `context` function as `event`, `context`, and `express` options.\n\nThe `event` object contains the API Gateway event (HTTP headers, HTTP method, body, path, ...). The `context` object (not to be confused with the `context` function itself!) contains the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...). `express` contains `req` and `res` fields with the Express request and response. The object returned from your `context` function is provided to all of your schema resolvers in the third `context` argument.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context, express }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n    expressRequest: express.req,\n  }),\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: '*',\n      credentials: true,\n    }\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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: true,\n      credentials: true,\n    }\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":"4b0722e23503f776dab3e98088a0dc77436fe474","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.3+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.3","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.1.0-alpha.0","apollo-server-express":"^3.1.0-alpha.0","@vendia/serverless-express":"^4.3.9"},"_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-lambda_3.1.0-alpha.0_1626985398314_0.7990343798091364","host":"s3://npm-registry-packages"}},"3.1.0-alpha.1":{"name":"apollo-server-lambda","version":"3.1.0-alpha.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"bdae208fb3cc0a69758b5e84e42ab752bbef18fd","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.1.0-alpha.1.tgz","fileCount":19,"integrity":"sha512-CD6MBrngQ61qWvMbnlzrXjYzh4emNseF7cblO9Kdo04Pgz5e+1uO4f6nuQlmoNDJOCXrWxQR0QBFYnKWIch7+Q==","signatures":[{"sig":"MEUCIAqTqj5DeBkO6+MXTlqMN8oDy40LD7nWmNlxT3SEgsnHAiEAv9rWVh04snRoh0YF9CK/Yjg3GdAWNpSRKSbI+UZA76I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":94546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+l5RCRA9TVsSAnZWagAAgWMQAKR1HEgmn5B7qwxphhD7\nIqs6t3BAtqzAnYBLbH6wwaaVtK5d54J3Dna0Yx3gcHZQeKBTUX/S0BD8kJdP\n/v6l7BNBaykh97wZ8Sn7VFqeTr7fZuyJh749+OGQv9GhU8MYGTFlXwy4Dn7n\nFw9zA/Y56qk1DhLIKotUD3ePNFUmYbJE8jSRjknW2yYS4xc/nfsl0GnuGB74\nxalF8/aGX/KoDagXAaaEh9wEp47xf3hB7Uz/l6PQH8tCkSh0GNcT8TPsvdZb\nTUM9OLfBvDJb2lNfFT6rAeYkCfdB2t66a2ugRnZ7xPQELhCF+7c8uXBAGI/y\nghjBkZ10T3J9uUXU3gPBf7qviJNVRx5p2lMEtvftBvmt1NaacQ86qODkv0qX\nRmFtLG6YMYHYGEWmiv8Nfcy47P9wbN8J94Kc6HZoDJJUD3oHuAWN0rswcAaO\nqnSfDcfCktQlyKzTAU25PYj/BXC2XpARsn2g74Cg5jtZBKoNzUZgVN7P+5mw\nkRCZ0H73ysJ8CbQKHvmfX0bXfMShRcp5fmcl3wPxnEr7eJhNY/4n2BFgBqcy\nTjl1ctB7Z6qkkypd07Yte8HfU9+/wv7UFQBRyNeNH/K2b3VGUhYpxpNlv5Dm\nfA9vpLoe6sX8mbsWxR83xisIuCwYGVxx7L9QDdDkwg98bPK4gi9vueQngjLz\n27XY\r\n=X9L8\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\nconst { ApolloServerPluginLandingPageGraphQLPlayground } = require('apollo-server-core');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // install the Playground plugin and set the `introspection` option explicitly to `true`.\n  introspection: true,\n  plugins: [ApolloServerPluginLandingPageGraphQLPlayground()],\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs14.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n\n## Customizing HTTP serving\n\n`apollo-server-lambda` is built on top of `apollo-server-express`. It combines the HTTP server framework `express` with a package called `@vendia/serverless-express` that translates between Lambda events and Express requests. By default, this is entirely behind the scenes, but you can also provide your own express app with the `expressAppFromMiddleware` option to `createHandler`:\n\n```js\nconst { ApolloServer } = require('apollo-server-lambda');\nconst express = require('express');\n\nexports.handler = server.createHandler({\n  expressAppFromMiddleware(middleware) {\n    const app = express();\n    app.use(someOtherMiddleware);\n    app.use(middleware);\n    return app;\n  }\n});\n```\n\n## Getting request info\n\nYour ApolloServer's `context` function can read information about the current operation from both the original Lambda data structures and the Express request and response created by `@vendia/serverless-express`. These are provided to your `context` function as `event`, `context`, and `express` options.\n\nThe `event` object contains the API Gateway event (HTTP headers, HTTP method, body, path, ...). The `context` object (not to be confused with the `context` function itself!) contains the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...). `express` contains `req` and `res` fields with the Express request and response. The object returned from your `context` function is provided to all of your schema resolvers in the third `context` argument.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context, express }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n    expressRequest: express.req,\n  }),\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: '*',\n      credentials: true,\n    }\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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: true,\n      credentials: true,\n    }\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":"a383a6d546e69027ce6f0e976f8e6dfffde51dce","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.3+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.3","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.1.0-alpha.1","apollo-server-express":"^3.1.0-alpha.1","@vendia/serverless-express":"^4.3.9"},"_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-lambda_3.1.0-alpha.1_1627020881568_0.10953834100944593","host":"s3://npm-registry-packages"}},"3.1.0":{"name":"apollo-server-lambda","version":"3.1.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"8f471760bb1e588f41f34c2524c164b4cae8638a","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.1.0.tgz","fileCount":19,"integrity":"sha512-JfjNW9A1sbuoJxq45C3tmodjl8yYp1f2EOJ29jQmUGC2yws5ZEn3pzj56fzfjViKdfVn4PX+MWWvS04v8eYQNg==","signatures":[{"sig":"MEYCIQDhdotQUHBnrC2+6CtN9ArURpxLlHdmE9jyQFgzPKxVOwIhANljPhWvPKJyU6TkiZGFyM9qoQYmGZ2i5eG6aXzbtYGf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":94514,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/wjLCRA9TVsSAnZWagAAm4UQAJu34aQJ5TcopGJIW1RF\nqiLmJJf1lcGkRO/e1gerW9qgqGClcMPq4P5B6DhvUtbqxYHLvdk1ytS39n6l\n+lJEt/qdNadLxfPB08F9tXWLuou2KECq6t5ncEDHNb6yadf5xa3eDudnY5bX\nLtYV6w4ZNJFEFe/1YoBateGNPbGOkYmTkVwbfFmaZVv/HLM8N61SRapUkKzF\nzBadujI64VVaQ6BNtej0aiG2Ag+do4MCZXZbnsQZJKDk5yISo/sPqSqqS+vi\n7HJJ+GAidzHrDqoEzGljxSgVrRjyU77FgJ70hG2hv0a3ZE5Zg1YjnP4Q+Xyz\noDCzafzCQdvIcHWvUyDSLsM/5L8FrK0l7ywpG+7ZEpd5cFPebZU26STbsn42\nAepx7CKEEqUoQmnJ4p1VXYvnQYgxW6picjv2G2vooKcyMQJUMGwktGmOFzVg\ngWMKtJOa/hhgqvamm81KFppa6LQSTM12rFzcP5arDh4CZNi6u+bAe4pkjuyt\n7C6WDxLAIqic9SEXvEQp3xG5wR5YKnKjkEN21ebi3W1X4FTnbuSAERU5raif\n7j8UAN0BILmi7dRbuYDnzIOFct3KqNfkJnKYYds9u/50yQRyKTggrFXsL+4+\nanE9squs9eBkpiUnqJDKfrfcFsk2sGxNP79E1sM979tT7Tw401fnYMaf56gS\nHMm8\r\n=BYB6\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\nconst { ApolloServerPluginLandingPageGraphQLPlayground } = require('apollo-server-core');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // install the Playground plugin and set the `introspection` option explicitly to `true`.\n  introspection: true,\n  plugins: [ApolloServerPluginLandingPageGraphQLPlayground()],\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs14.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n\n## Customizing HTTP serving\n\n`apollo-server-lambda` is built on top of `apollo-server-express`. It combines the HTTP server framework `express` with a package called `@vendia/serverless-express` that translates between Lambda events and Express requests. By default, this is entirely behind the scenes, but you can also provide your own express app with the `expressAppFromMiddleware` option to `createHandler`:\n\n```js\nconst { ApolloServer } = require('apollo-server-lambda');\nconst express = require('express');\n\nexports.handler = server.createHandler({\n  expressAppFromMiddleware(middleware) {\n    const app = express();\n    app.use(someOtherMiddleware);\n    app.use(middleware);\n    return app;\n  }\n});\n```\n\n## Getting request info\n\nYour ApolloServer's `context` function can read information about the current operation from both the original Lambda data structures and the Express request and response created by `@vendia/serverless-express`. These are provided to your `context` function as `event`, `context`, and `express` options.\n\nThe `event` object contains the API Gateway event (HTTP headers, HTTP method, body, path, ...). The `context` object (not to be confused with the `context` function itself!) contains the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...). `express` contains `req` and `res` fields with the Express request and response. The object returned from your `context` function is provided to all of your schema resolvers in the third `context` argument.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context, express }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n    expressRequest: express.req,\n  }),\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: '*',\n      credentials: true,\n    }\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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: true,\n      credentials: true,\n    }\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":"d22ffd33da9fa2972e6d055ebc4b346ad329edff","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.3+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.3","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.1.0","apollo-server-express":"^3.1.0","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.1.0"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.1.0_1627326667785_0.22103364160223915","host":"s3://npm-registry-packages"}},"3.1.1":{"name":"apollo-server-lambda","version":"3.1.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"a6c66e9172353656d69c10a055cd81f06e8675b4","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.1.1.tgz","fileCount":19,"integrity":"sha512-Zp+wE1dFFeZLxZsK1aqr4FuBTz74Yd7WSXYGGZuhjeAYXOnD9zB64078g8NVkBH3HDVCWEhmAuvSdNWVrazKyw==","signatures":[{"sig":"MEYCIQDBeJCt4JW4xB1pAkYFIqb5n4lJczWJ2XRsFZqsg9nCgQIhALCEcgKnIfjICKp0b8U+6Y1POaMCRrCXAEFXo1rRCSBk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":94514,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/xJICRA9TVsSAnZWagAAer0P/23dho+wdQ2n8JfZ4wCq\nUyx3ycgQtpGzbOtDgB6cytlnPK7yrN5tBc945vNNi41PoHB6My94pPNkDIuJ\nTw3ZYtnGe0xsoGaztNS/IZOOWIn4moH7emL+McIKB86AeiqS5xLAbmEaqrdD\nwe0nO7g/kRtWcW1vYJQoWmb01Tcs/3ba0feVXe2zmLQrVdKzSw9TK2Dzrk5c\nyjb32wvalRbQvkl6ljz0RddNri1wwQYJjNqXHHJAin05bOG7ZwIRbleLkHkp\nm2Df37fq8Ek27v591qIEWWYCMZnjUYE0wzwNeNnjIlcUdez26T7TkgOV1VxK\nnDOVuSSj+BvPi+oF9HXgwMA2gnffLtuNaGOznM6bWQ6PmFD9PsHXN4AqZqdq\nocXPXoxXVVuLTQueqYycoB6EkwD4lrK8kmejDk2VYiJDdrQR7mbioIcc2/nX\noowh/cdatYN7HNJkbRJjY98Okf53yYr5HJ7NveiOCijbAgInNtBc/HZIsGh9\nLyt6CQsFD5sGwaiaasI3JK0pzCzBXXbTioEEaxYSiGJf05nF4v+B/tjYx6iV\nSxrMS30afOqGxx/0OXWoCUIVjkM/HBZjMUmJP2KMSSqyQxfKvBH6qtwgA8vj\nP2rLaJLWmBlRH/1haQCSEahCD+abbeLefZ8fjct4n+PPIAHInSXZm5hYnocK\nXTXS\r\n=BCiA\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\nconst { ApolloServerPluginLandingPageGraphQLPlayground } = require('apollo-server-core');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // install the Playground plugin and set the `introspection` option explicitly to `true`.\n  introspection: true,\n  plugins: [ApolloServerPluginLandingPageGraphQLPlayground()],\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs14.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n\n## Customizing HTTP serving\n\n`apollo-server-lambda` is built on top of `apollo-server-express`. It combines the HTTP server framework `express` with a package called `@vendia/serverless-express` that translates between Lambda events and Express requests. By default, this is entirely behind the scenes, but you can also provide your own express app with the `expressAppFromMiddleware` option to `createHandler`:\n\n```js\nconst { ApolloServer } = require('apollo-server-lambda');\nconst express = require('express');\n\nexports.handler = server.createHandler({\n  expressAppFromMiddleware(middleware) {\n    const app = express();\n    app.use(someOtherMiddleware);\n    app.use(middleware);\n    return app;\n  }\n});\n```\n\n## Getting request info\n\nYour ApolloServer's `context` function can read information about the current operation from both the original Lambda data structures and the Express request and response created by `@vendia/serverless-express`. These are provided to your `context` function as `event`, `context`, and `express` options.\n\nThe `event` object contains the API Gateway event (HTTP headers, HTTP method, body, path, ...). The `context` object (not to be confused with the `context` function itself!) contains the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...). `express` contains `req` and `res` fields with the Express request and response. The object returned from your `context` function is provided to all of your schema resolvers in the third `context` argument.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context, express }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n    expressRequest: express.req,\n  }),\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: '*',\n      credentials: true,\n    }\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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: true,\n      credentials: true,\n    }\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":"eb06724ca43042fcbf6e04e1de1dc2e5acfadf33","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.3+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.3","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.1.1","apollo-server-express":"^3.1.1","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.1.1"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.1.1_1627329096229_0.5693278485925528","host":"s3://npm-registry-packages"}},"3.1.2":{"name":"apollo-server-lambda","version":"3.1.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"db6eabce24e76dad88fe8d84bf5b827f577cba5b","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.1.2.tgz","fileCount":19,"integrity":"sha512-jGWvrigreC2JbIYc7OL+FY43MOKeMuu/Bb3KxjVdmFSS3KQIeqRbSCpu8XcS4g8kMcBjkztwDKhsRzbWij8b1Q==","signatures":[{"sig":"MEQCIEo4QtxR4bmBaCnrZbS3EvmQUQeedW51broKu3R4VGK0AiA420XcVIeJGLjSRxZ0T8Q0u4eXdx54HR8JQk9M1YERQw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":93625,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCI8BCRA9TVsSAnZWagAAZTwP+gJwg3HElgFoV71/IVWA\nHSH0nM1sk13QYDKIhGfLXDBkQ13A2m5A+SfLToq4Xx9XJYbsDgk7089tQSm6\ndcBpIU4L3lnVMN+tTitY1+phEzPdWMqp9V2ApmTRMQPuROF3s2JY4lMqeFxW\nKFk9mN36BnCGGaoPZcx5qTIBr7dUkdP56Nb7EqA+cvms8HzQGN4bLJ+GRYBY\nSJO+iaHk8JORFcbJ5JfQef0U9hYDGkUw7Ph360mFI2ZASx1jjZa+n8i1twLJ\nwJugYBlh9zxQZPL6K6mCxY2ULmt9lTqCEHusdvlvHtZW2wo3hlki0SNMz1G7\nnvY0AQEGNtLbk4LU6yfFxASjya3KxhfhW5Fwp3eIco3qzsWWJAT+vBHggOiX\nEVPxbBCmUbPPJ6Elg+Xe0snna8fHACIaZslU8h07jFtcrCA+SYSg45J8QFzM\nrS/64abhUqME+Jmm592IIkkgEVyxJByox00svbP1r8wg8gXaFeLlTlkjMEzV\njEwBwo11burWMFeKpXVD3PxeKxGWOEmtLHuEMr+/iq0iulbrC/yaYXTepF31\n/ibZz/Jc7/gBAvYoiwdomrv0QIUmC8/XQz8cvQHEr/EM8yhuOAe7HUQybJO8\nqsS0dHa16DTOV028M8KnXp5aH+5GswNC0XPqNkSEwy4Di0XLhaRCaoWuyS38\nA/hY\r\n=tcEq\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.4+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.4","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.1.2","apollo-server-express":"^3.1.2","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.1.2"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.1.2_1627950849618_0.4622611515756141","host":"s3://npm-registry-packages"}},"3.2.0-alpha.0":{"name":"apollo-server-lambda","version":"3.2.0-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"3eeee5df34f5894e35956d2c44cd83c204e90803","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.2.0-alpha.0.tgz","fileCount":19,"integrity":"sha512-i/7PBXTQ5Iez2+4UDHoVMFvq6d4/yokTg7FJIUky7LVivg2Zf7l0zQIant9ykrQyALo2/gu81yIVS85bl+PTEg==","signatures":[{"sig":"MEUCIQCt9DTVS5ab0TYqnv0iV9L6Z0EM43bsHtEZZDFqLc0wCAIgTqf81WebIuqp9wQNwxtG8p6rn3ep7f2FkZp1JQGOc+M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":94642,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhIEENCRA9TVsSAnZWagAAbWQP/jsTq4YUamHWXF7B76e/\nyS8WGTB/UMntnwRDbIyzQ2MVGDa9D/sFMjzRlWDKYjuQsyQYZPugwmjLcBTq\nqPsitWJ9ErjGbbNX2tzpoTAVTalAaZhbj9XGx303CFWK5McDu+UEO0t4H0sW\nRm/VBhTiEWC1mYdkKlsUeueQey3YF1SarSFK+yDQwWievG8P5GkeheZRK6ME\nmgRnCZYsiWLt/jPShBRvKMIZnWNDuoUzO8RN8Zzda4Q56lm7d3csddWabSmN\n7MbMhVgqgpqwi2EufQ59Ls8WbJn5MaOhg4TP2i5DtiPMVHjfPt0rkH4QjgTu\n1CZ2eNz6hoxDA9XyTNZRCIkSH8ukocXAlqe8PLZn2bYXvcujgpIBm/8kPVfs\n9Uix+vHEZlUvB18wl/3g0AMiS8EcdYLxOFpyfC6ZQiTKdAueX6bqFmjaTRIc\nrWpCHa0J8gI/2S6mg68juWc4t5bt88lG5fCI3z0T8y+Q7gw9+K6jpgndDRoe\njpXgbfwBrRW8y1NwmLB++Ga1GXYn+Rn9mIyEGbstekbhpQxINeE8yDbMzW2K\nsjZRX/Ri7hGbpe+DN02/UD6SKHjaW+KxPWerkhI6n/UDE3s5rlsx6MRrAaVL\n7Jzkf28C3f4Yim2sxEb5H6pvcj5wmWacffCmytUFYWTw6elN4tP5gYRG/mQg\nT5FY\r\n=ONjE\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\nconst { ApolloServerPluginLandingPageGraphQLPlayground } = require('apollo-server-core');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // install the Playground plugin and set the `introspection` option explicitly to `true`.\n  introspection: true,\n  plugins: [ApolloServerPluginLandingPageGraphQLPlayground()],\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs14.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n\n## Customizing HTTP serving\n\n`apollo-server-lambda` is built on top of `apollo-server-express`. It combines the HTTP server framework `express` with a package called `@vendia/serverless-express` that translates between Lambda events and Express requests. By default, this is entirely behind the scenes, but you can also provide your own express app with the `expressAppFromMiddleware` option to `createHandler`:\n\n```js\nconst { ApolloServer } = require('apollo-server-lambda');\nconst express = require('express');\n\nexports.handler = server.createHandler({\n  expressAppFromMiddleware(middleware) {\n    const app = express();\n    app.use(someOtherMiddleware);\n    app.use(middleware);\n    return app;\n  }\n});\n```\n\n## Getting request info\n\nYour ApolloServer's `context` function can read information about the current operation from both the original Lambda data structures and the Express request and response created by `@vendia/serverless-express`. These are provided to your `context` function as `event`, `context`, and `express` options.\n\nThe `event` object contains the API Gateway event (HTTP headers, HTTP method, body, path, ...). The `context` object (not to be confused with the `context` function itself!) contains the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...). `express` contains `req` and `res` fields with the Express request and response. The object returned from your `context` function is provided to all of your schema resolvers in the third `context` argument.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context, express }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n    expressRequest: express.req,\n  }),\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: '*',\n      credentials: true,\n    }\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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: true,\n      credentials: true,\n    }\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":"211cd84ce3d2c9be90248e6a69c8c26bf8d1cc17","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.5+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.5","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.2.0-alpha.0","apollo-server-express":"^3.2.0-alpha.0","@vendia/serverless-express":"^4.3.9"},"_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-lambda_3.2.0-alpha.0_1629503757095_0.0872373311789556","host":"s3://npm-registry-packages"}},"3.2.0":{"name":"apollo-server-lambda","version":"3.2.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"4b145729fe20004b08b1bbcaa94792ec2fbf6b1b","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.2.0.tgz","fileCount":19,"integrity":"sha512-9Txgks8Mrk4cwQy3588tkoRkv8bnDSfylKHlrVVE/YYhk08UYnTlAI50AL7e1nztD6edgpECEZQCUen/UYVb0g==","signatures":[{"sig":"MEUCIQC+r6a9BZoTDgruUm07bka1nhEBWo98gl+3dHNoXYkGDAIgWt929WJXYHLhRDi6g6M6L5OTtSjBE+o7FkiCQCgjpOI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":94787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJDRVCRA9TVsSAnZWagAASfsP/jLrYKOjaMhyiq+/ieHR\nLSadiqxHLv80AX45CckBO2ygnKgJGFGGcHi5xf7C6jQQcdryX2zH/v8Ojv1h\nRQFgYjccZD138nm6HuH+xUGtMV6pd2SbcAjndZyH82AT5oGBRoyxujFL8OCM\ntgCQiO4FDgtR/PJDpldpsK5jEcC+ycieAfM7suUsKW04dfIH2BhXVYCUIKtz\n94DU6JiCcZYzqh7Wd6j7cGGg5J2Es6TTZs/togGOhTI2ZKV+N6TXuFA7UCgR\n4MStpef5NHwNaqkd7RGWFKksBRHVWOAVNJP5z2v9QWYMbqtn4i4tFHebmXOw\nVWGRNwstAj8wqT1wEov9marWcakYr0AfJK+ssa1JQC87ccGGRdUOeISAsVBG\nRECbHQCJoIlkPPXO5HvBkJILSQmepbY8HNkf1QMzXL+hhDBRNaZkpehWyKeY\npgtlDIxkZ7fa3CO4Mk5fptkmP/3PYXs71dtqhY9DpXtkAHmuxC43mzRXl8VR\nGytTPk+cHXsNkW0kPFEtbQx9d35Kv2wDHZdv+V7xMvceO9U/pB8fLVkTwhl/\nFPMzRbJXBRQh2IATNa8kwiFo9CAhb5xSyNtQwZsLqI+3PCePNigFSYtqDyXh\n7B/3BsCq6yK0ct3iqa+GOLua72+BADXf3jSwQwvsRNoqbvhh553Cx7zJj4GZ\nVVIh\r\n=aCkC\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\nconst { ApolloServerPluginLandingPageGraphQLPlayground } = require('apollo-server-core');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // install the Playground plugin and set the `introspection` option explicitly to `true`.\n  introspection: true,\n  plugins: [ApolloServerPluginLandingPageGraphQLPlayground()],\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs14.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n\n## Customizing HTTP serving\n\n`apollo-server-lambda` is built on top of `apollo-server-express`. It combines the HTTP server framework `express` with a package called `@vendia/serverless-express` that translates between Lambda events and Express requests. By default, this is entirely behind the scenes, but you can also provide your own express app with the `expressAppFromMiddleware` option to `createHandler`:\n\n```js\nconst { ApolloServer } = require('apollo-server-lambda');\nconst express = require('express');\n\nexports.handler = server.createHandler({\n  expressAppFromMiddleware(middleware) {\n    const app = express();\n    app.use(someOtherMiddleware);\n    app.use(middleware);\n    return app;\n  }\n});\n```\n\n## Getting request info\n\nYour ApolloServer's `context` function can read information about the current operation from both the original Lambda data structures and the Express request and response created by `@vendia/serverless-express`. These are provided to your `context` function as `event`, `context`, and `express` options.\n\nThe `event` object contains the API Gateway event (HTTP headers, HTTP method, body, path, ...). The `context` object (not to be confused with the `context` function itself!) contains the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...). `express` contains `req` and `res` fields with the Express request and response. The object returned from your `context` function is provided to all of your schema resolvers in the third `context` argument.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context, express }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n    expressRequest: express.req,\n  }),\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: '*',\n      credentials: true,\n    }\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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: true,\n      credentials: true,\n    }\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":"4dc19131aaea2416b5b2ccab295b06272f94c996","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.5+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.5","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.2.0","apollo-server-express":"^3.2.0","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"apollo-server-integration-testsuite":"^3.2.0"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.2.0_1629762645663_0.48124299525995484","host":"s3://npm-registry-packages"}},"3.3.0":{"name":"apollo-server-lambda","version":"3.3.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"86ac3299c18e536dcb394d4e788a2c08a930c7db","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.3.0.tgz","fileCount":19,"integrity":"sha512-3B9aNFghf41PopMpcKDkrjbiouQuu4C7/eHRDjOV13vwxE2KRD6Gek5GfyHNhx4+yvGn7v0NjIc4YEv5TAn9XA==","signatures":[{"sig":"MEUCIC/VmEPWAVpSJCEExPGlUZL9w2XX8sWhSlkIFRpBS3SJAiEAhyRECZnzJdPorpX/KpZ0SzNvUvRrGiYmo/4WyTlx8Io=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":94705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJs7oCRA9TVsSAnZWagAAsF8P/2gWzGWNRb4s9nWY/dju\nUAaZTH+Tmnc4Py08s+CGw5UlzUj46e03nNxN1BlSzSgZP6g2oiv31hmg64Y1\nLnyBErRm4bSRKhhe3mcnZCzN/T0pk5FxPVgAeC+JUAKjHFmTYCqseVWtOXXj\nwioHrmBj9GrB0DymGjY8Qy0MlhWtF0zu2N87Q3oKynHF7W1u9io75tu5rNaR\ntjPAxHxwrKe244a7cyn9ZIme/vgukVQt0k8FqOOCW1wNktV1A8Kr2sqQDaxp\nBrD9vEeAEaUb/Y04YvvQZkjWflWAYHKLZB4u76DM1/NGiboUA2plinFPXECL\neydSVd+19ZvdgBKdRESHt64sHL0SqTPvcz8rXUK6ZWtcetLo5bvMQLCcTI0s\nz3yyYa8o0ywEF6ppxIORfBedNkQEorgifb0QYhu8JAxXotFW5mBxjsbAEpLS\n1VLN9J7mFIQZiEr+y/7LRmRaIpOjtH4001lvUCEH1iXQIvcrLn4eQ3DM8M9z\nlJuIoGJeZAX2+NnMekWpq6bSZQG6+8XYYTArvuI2I6vpniOx/Yu+duLr8kwq\njUcFQfscDIjgtpHIRNA2xsnPowrd10B3x0AVLz3KoVboiPue872YTighUbgS\ngSAgsAOThisp2EZ281x1uw8dyBS+w3k0ShQgSduf8j0aat0tbVLk+s/3qPFd\nsTda\r\n=B/LT\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.5+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.5","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.3.0","apollo-server-express":"^3.3.0","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.3.0"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.3.0_1629933288856_0.5914595493178387","host":"s3://npm-registry-packages"}},"3.4.0-alpha.0":{"name":"apollo-server-lambda","version":"3.4.0-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"7d832c6a6c9febb69118dfea66c482db105932ce","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.4.0-alpha.0.tgz","fileCount":13,"integrity":"sha512-hLtfxiz6DE7YWPEWnEZ913ZV8OPBzFWUYeE43k2wFI4HRyRmUKRZGyZO5uVlhYoqw6FBPtlvtkQzMJ8qUop4Uw==","signatures":[{"sig":"MEUCIQDHELm0PCulsB0h7qKJvK+1T5H8FPCzXUiySL+fC8i6DAIgdXpzHULbvYHvO3GrvgcNY4DFvKgJfOghzZ8Xeqvcr8k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21848},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\nconst { ApolloServerPluginLandingPageGraphQLPlayground } = require('apollo-server-core');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // install the Playground plugin and set the `introspection` option explicitly to `true`.\n  introspection: true,\n  plugins: [ApolloServerPluginLandingPageGraphQLPlayground()],\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs14.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n\n## Customizing HTTP serving\n\n`apollo-server-lambda` is built on top of `apollo-server-express`. It combines the HTTP server framework `express` with a package called `@vendia/serverless-express` that translates between Lambda events and Express requests. By default, this is entirely behind the scenes, but you can also provide your own express app with the `expressAppFromMiddleware` option to `createHandler`:\n\n```js\nconst { ApolloServer } = require('apollo-server-lambda');\nconst express = require('express');\n\nexports.handler = server.createHandler({\n  expressAppFromMiddleware(middleware) {\n    const app = express();\n    app.use(someOtherMiddleware);\n    app.use(middleware);\n    return app;\n  }\n});\n```\n\n## Getting request info\n\nYour ApolloServer's `context` function can read information about the current operation from both the original Lambda data structures and the Express request and response created by `@vendia/serverless-express`. These are provided to your `context` function as `event`, `context`, and `express` options.\n\nThe `event` object contains the API Gateway event (HTTP headers, HTTP method, body, path, ...). The `context` object (not to be confused with the `context` function itself!) contains the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...). `express` contains `req` and `res` fields with the Express request and response. The object returned from your `context` function is provided to all of your schema resolvers in the third `context` argument.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context, express }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n    expressRequest: express.req,\n  }),\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: '*',\n      credentials: true,\n    }\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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: true,\n      credentials: true,\n    }\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":"119dac4fbe357661cad7163dfa643b02ab479b96","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.6+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.6","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.4.0-alpha.0","apollo-server-express":"^3.4.0-alpha.0","@vendia/serverless-express":"^4.3.9"},"_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-lambda_3.4.0-alpha.0_1633739903139_0.6494552808402898","host":"s3://npm-registry-packages"}},"3.4.0":{"name":"apollo-server-lambda","version":"3.4.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"c7e3475f58a1394b0871fe8847674224936f033a","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.4.0.tgz","fileCount":13,"integrity":"sha512-0py01OU5DhvnD48B6wt2zRBYzihwk6AzwrdPPBXeS6sb6fOmh3Ow4PLtP8HZX7wHqwO6LeusuoyuDT6/iGsq3Q==","signatures":[{"sig":"MEYCIQDVyHPHBj2DQZ528WufMwoH7RzMausQLWuwcYT1nDG2UgIhAOZkDg2p9ocMIA3Yh5ooAAkHPGb93Av9wCwxKv9zhUHf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21816},"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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.6+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.6","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.4.0","apollo-server-express":"^3.4.0","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.4.0"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.4.0_1633985920128_0.37247579880863224","host":"s3://npm-registry-packages"}},"2.25.3":{"name":"apollo-server-lambda","version":"2.25.3","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"ea26df7d501a7dd66556a06f33f40024d96287bd","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.25.3.tgz","fileCount":17,"integrity":"sha512-K2PAhSmjeFtrmce8TpT84ln79my7WY/1Z7Ah63oyGRkgoVZHZZI5kGJnISY094X51QKeIdrYj2tsDUX+VsfcHA==","signatures":[{"sig":"MEYCIQDfFoo+Q91mLF4NacYqcV8tBYXFJW9o40cr9uclBdFxuwIhAMwcx0ez27dotX+ZuF9RFvcfxe55IJWi6jH6oZMw8wWu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55654},"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-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.25.3_1636049067459_0.4185123996565212","host":"s3://npm-registry-packages"}},"3.4.1":{"name":"apollo-server-lambda","version":"3.4.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"4f4abb74440818b0ac7f7f908cafca35897db0d7","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.4.1.tgz","fileCount":13,"integrity":"sha512-k7pmeCTJiW5ulHhwzQdRBgr5tApwNG0PYa+vj+KuWeQBxGy+4oRJq7+HuUojr9U6cM+cArpl3uTvstZCP11zyw==","signatures":[{"sig":"MEYCIQD2k3SULbVPJ7C5CYFXw1wlUW6MwLgAUA2kXRlfxij5sgIhAKHBwRd5k8QDELm7yqdTRtm6Lk7ymZm+nWnvbJpuMOoz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21816},"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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.4.1","apollo-server-express":"^3.4.1","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.4.1"},"peerDependencies":{"graphql":"^15.3.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.4.1_1636049200960_0.2318812424554617","host":"s3://npm-registry-packages"}},"3.5.0":{"name":"apollo-server-lambda","version":"3.5.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"b4baf9081403e22d312b14e291b1b5dc6d5416a1","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.5.0.tgz","fileCount":13,"integrity":"sha512-thFcD8q57bqkkgAXWcc4vBpuU+0xvfSRLag07l8vu0zt0VN9N1WF4RA5EUP6ic7UJYgsFcCqYrR9qLPl++H/Sg==","signatures":[{"sig":"MEUCIQCMN8Fd32ESjOgADK3fa5Kr/7sexw6o/NxsxTM3sOH4jwIgaov63jeBwH7F3Xj1Hx/W58Ms87QDZYwKJ+x4Z4WTuXE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21825},"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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.5.0","apollo-server-express":"^3.5.0","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.5.0"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.5.0_1636134883405_0.6985628305916214","host":"s3://npm-registry-packages"}},"3.6.0-alpha.0":{"name":"apollo-server-lambda","version":"3.6.0-alpha.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"aba5ea9fa6811a5a2ee91f68826a88402ab5294c","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.6.0-alpha.0.tgz","fileCount":13,"integrity":"sha512-RftEbzJBoBRIeApW/hpANUAhnslS8kA4sUU1OUgipBgws6s+YBRoCF0t3WtFUwy4dV9r/PZN8vNmZhBOd0HavA==","signatures":[{"sig":"MEYCIQDs1Otmw5x/7W1Gktj6XMDUOt9xS7Mh77cfVUkHl/FIGwIhAK63xMYDw619XWcIff/XmJgj/x9jjiP01dKVx7QMQevk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21857,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhvQfrCRA9TVsSAnZWagAArqEP/0O80jRj9Y+o5CeCYK/N\nfatXOpVAyK6dJQ1EfdWGQSlVUjxxwkTDjKgkPqoaRHkTDkvXBDf3giFzJ1F8\nCBsvJ8CK5btqp2CldoCEpALBLTGjXg+5RNuiN95/RmaQAPX1Xj0K0Cw1RBli\nz9V5VPHzfqyLUNyCKM8b8mgilz26TN51YZTzJt04lC9HOavXG5xFJIyyzHW+\nzoWdGeBM0mrxxbwa3byFN7GTr6bJ1YQcpPBRjmQ4n0aCsyNNs/ATFeuyR/ZN\ncDH8KWDOW8/I2fhkKonSIP/ozJlUm0/72epctTTvU96qVtw5AKQ7AGZId/dY\nZYbiHk3yt7Mndvdbc0PJFxI4/nzUPLqgUnjI+5VDgwf675wDx9i5wHrp9p5H\nnBoRe/HCKMSVHTj41WrZ/3K8EdUNK2JBJbjjPitZUd5VDMqZeBfJb8DSbGXY\nWAhx10Ma+t3gAl7hfjOXHn9w2IXB7lYxTrMIX23T2nwGlg4evv1VxwTy1maX\ni/A1yeBrkb37x1/Uh/Q9L69QyGqEdIS7kkX7bjvjeAlLnixAajlx24tcOPyV\ncmsUMnnSE1kYOU+Zy403jervQ8R92XZfCC7rXIrIz6ZqIF4L96yIR6YRnUHl\nP/a4IReupp01lpmEoK2PmKXstumvy159NFOxwtoJnccSysGa4OrrNQQ+DAhv\nmE4f\r\n=si01\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\nconst { ApolloServerPluginLandingPageGraphQLPlayground } = require('apollo-server-core');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // install the Playground plugin and set the `introspection` option explicitly to `true`.\n  introspection: true,\n  plugins: [ApolloServerPluginLandingPageGraphQLPlayground()],\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs14.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n\n## Customizing HTTP serving\n\n`apollo-server-lambda` is built on top of `apollo-server-express`. It combines the HTTP server framework `express` with a package called `@vendia/serverless-express` that translates between Lambda events and Express requests. By default, this is entirely behind the scenes, but you can also provide your own express app with the `expressAppFromMiddleware` option to `createHandler`:\n\n```js\nconst { ApolloServer } = require('apollo-server-lambda');\nconst express = require('express');\n\nexports.handler = server.createHandler({\n  expressAppFromMiddleware(middleware) {\n    const app = express();\n    app.use(someOtherMiddleware);\n    app.use(middleware);\n    return app;\n  }\n});\n```\n\n## Getting request info\n\nYour ApolloServer's `context` function can read information about the current operation from both the original Lambda data structures and the Express request and response created by `@vendia/serverless-express`. These are provided to your `context` function as `event`, `context`, and `express` options.\n\nThe `event` object contains the API Gateway event (HTTP headers, HTTP method, body, path, ...). The `context` object (not to be confused with the `context` function itself!) contains the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...). `express` contains `req` and `res` fields with the Express request and response. The object returned from your `context` function is provided to all of your schema resolvers in the third `context` argument.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context, express }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n    expressRequest: express.req,\n  }),\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: '*',\n      credentials: true,\n    }\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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: true,\n      credentials: true,\n    }\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":"2c352a9e0c5a48b8cfec145bec52cad2f0a73fa4","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.6.0-alpha.0","apollo-server-express":"^3.6.0-alpha.0","@vendia/serverless-express":"^4.3.9"},"_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-lambda_3.6.0-alpha.0_1639778283567_0.9965115430097571","host":"s3://npm-registry-packages"}},"3.6.0-alpha.1":{"name":"apollo-server-lambda","version":"3.6.0-alpha.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"51780d7b8b38b337a114c46aa5a504f0aa7e06af","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.6.0-alpha.1.tgz","fileCount":13,"integrity":"sha512-W9bRLkMHODOfMyyDqJf20WPpRgCvd1nzF1FTFum8WAsV5Mm1dhEq4t4UZgTkum+7DwVXf9PrRpfkOm5dRtX9sg==","signatures":[{"sig":"MEQCIBJcZLykTNpILmSNCq26mv8xsKzZsM6rdHXhulf0U2pHAiAuW3JqTe34tg+Bp214A3q2gfCxch5E5sQ392IRH1dV/Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21857,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhyoBTCRA9TVsSAnZWagAAuNMP/11D+lK+ufkTgBcxgl6b\nXwCZZ8ZqsBiY4qHKEjntqk96xzFZTMoHDc3A5AYU7DjWrEo/7wEnr19OIY+L\n4V9blswFjzRoCw28KcurzjRmNxV6ijlYEjRAYnXu+BmzpjgAAuOdTmSGjm3a\nqNwEu7LY8nMYusOyMyqKmqQ9hJKImMV7/NeSoKeMyJSwztBWlcbw1/llje9a\nEqHS+7lpepvMvijya9tQvJ3azmEn8zFceDpNtGBaMcp42EosfPrO0uPl52No\nmpEhbrW05WDyPl1ZnRzCQm822LLTolJDVDo9XVkG+A/tmEa5E6sPCRaGtte1\nnJ/ZbTF40aKHHC6gb0YUVSDKbVC7ydUK4Dc6IS9fJyPpHn1htb3UgdcW5f6V\nGWeDB35W6jNawfqJ5U1Ws1PjkmEiux8iULKA3k9e9am9Mvuq2Cx7Q2TVyWWW\nsQDF98m+0v7UBuXFWX8Ech3f5SOI3RubQYu9qdJJ0dhDyKX/lsYQdGbKvzio\nLJayGglhRgiFUg32qKRMfbYaY7I2Im//42a4uaS2YCMDXTC4v1/fJrti+VYy\nH/DAswW7Gdkq7JFdcGReoU/l5gjlWCA9KykLm8OY4SjrhOP5AYn60S5MH6S5\nQHx48D6QTzWgmCo3GSVRte2WCqV8FVjuQbLEibdnehxGc3YBvEFG+9w7VKuq\nyaPM\r\n=aVRm\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\nconst { ApolloServerPluginLandingPageGraphQLPlayground } = require('apollo-server-core');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // install the Playground plugin and set the `introspection` option explicitly to `true`.\n  introspection: true,\n  plugins: [ApolloServerPluginLandingPageGraphQLPlayground()],\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs14.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n\n## Customizing HTTP serving\n\n`apollo-server-lambda` is built on top of `apollo-server-express`. It combines the HTTP server framework `express` with a package called `@vendia/serverless-express` that translates between Lambda events and Express requests. By default, this is entirely behind the scenes, but you can also provide your own express app with the `expressAppFromMiddleware` option to `createHandler`:\n\n```js\nconst { ApolloServer } = require('apollo-server-lambda');\nconst express = require('express');\n\nexports.handler = server.createHandler({\n  expressAppFromMiddleware(middleware) {\n    const app = express();\n    app.use(someOtherMiddleware);\n    app.use(middleware);\n    return app;\n  }\n});\n```\n\n## Getting request info\n\nYour ApolloServer's `context` function can read information about the current operation from both the original Lambda data structures and the Express request and response created by `@vendia/serverless-express`. These are provided to your `context` function as `event`, `context`, and `express` options.\n\nThe `event` object contains the API Gateway event (HTTP headers, HTTP method, body, path, ...). The `context` object (not to be confused with the `context` function itself!) contains the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...). `express` contains `req` and `res` fields with the Express request and response. The object returned from your `context` function is provided to all of your schema resolvers in the third `context` argument.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context, express }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n    expressRequest: express.req,\n  }),\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: '*',\n      credentials: true,\n    }\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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: true,\n      credentials: true,\n    }\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":"1361265ba3d573b7e7cac348c81f923ab32fbc6b","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.6.0-alpha.1","apollo-server-express":"^3.6.0-alpha.1","@vendia/serverless-express":"^4.3.9"},"_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-lambda_3.6.0-alpha.1_1640661075740_0.062133808195185214","host":"s3://npm-registry-packages"}},"3.6.0":{"name":"apollo-server-lambda","version":"3.6.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"990fbf2e303e5c30a3f6dc1722483b0964d9243d","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.6.0.tgz","fileCount":13,"integrity":"sha512-RskxAn7XY0Hq/30fuBvoHFWUBotA9ixDAvPc1RmuZEeDcULkqwd10CMi7g2SIK66zpmjXNooQGt8meR46A1mMQ==","signatures":[{"sig":"MEQCIA/lvLINFyclmmTZ3xqGYiuY/Lgbgwf8uNugWWVuAXMoAiAUVGrHeLwLVzFMdLUs4/GGncv+0/dJZn81cQdpRxnD3w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21825,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzfm3CRA9TVsSAnZWagAAUMwP/1GTDnmwMckajHxWsvfG\nMMGttwShlCk+1oJfuALJ4biQPKGEQW3AJnRCZDdUWGFnOW4KicytJk/Bvi8e\nwPqOxvL8j1VCbOWq+OFN9Hk9B1P/UEq5zhpMttxERWe7q2WmwL66r45Jeaus\ngkYJ3ioi/4RwkAp22oHhBeJTUcy8dM6vsHnRXtxN8SsCp46irG8y9ZuyjmkR\nu/Bq8pyny3J24oMPP3KAAdufqwkxDQJnTP0gEPX7V83ljJE0CpUh0etk3tuS\nXXBrl+aZqXKGZhR9xjrGytMhnHbYOyeMcmWXoVmVLRBjYJEyWgBe16Nv6ga8\nIlauU6ecOpdUAeW09OxgBsil5WchkgmtVbvJBNsnGIPQYA7cVigESgvw4ce3\nXys/BlKU0MIGpC72C/ixhCkOnAR4xqgw1jsx1/IY6FazpREGaO1TKQTpklwE\nT0wTpR/QRmcGqFbr3PzasiHTTml3SnrqmV/EvJSOzrg7mPwFqqPMqp3wLAtA\nERvBYFd9KN4vvqNlaEoMBsRM4YhfgVpCI+DaDQIg8JwmeKaztg2qXs+TpCss\n54YEhuMO8ZbuTkpJqW9j6hHzPh1U/39sbmr6QXFteO0LcXnimxazULZ2RDIB\nUuO1TyssLQ7ODAB357BXyzqWjDMBN3FimL1/+sU6x5vRPhTqNDMBQEMwK0si\nAm3G\r\n=Vrhw\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.6.0","apollo-server-express":"^3.6.0","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.6.0"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.6.0_1640888759367_0.5635581523963109","host":"s3://npm-registry-packages"}},"3.6.1":{"name":"apollo-server-lambda","version":"3.6.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"9a94a28daeb002c145bd5452e3a5048e55aab46d","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.6.1.tgz","fileCount":13,"integrity":"sha512-VXEu7P1aNzYb/8dh8PKV5rOsu+Li9Br1kn0HgbFYipry7uiFhF7wYX0Yay9czZgwA85fBYsMzL5bYGf+SMBSKw==","signatures":[{"sig":"MEUCIFaWhYBX4upTP4aqq0Z6aez0rRPds3SI7vIi+Sn4m4obAiEAqGQi1ICIj8vq5hWCDiBanmCfdexFb8ArSq3ZvGRZC5o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21825,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzyh+CRA9TVsSAnZWagAAmv8QAICTB9ahKkv148O78dc2\nVngZqpvFGwRe6shqzq2zpy9zMmCh4knmBLsAhtEHJo235z/3tjAO950Dfm9B\nVykxTyFcVj4sikbP2NE9+A3li2Z8I8b/MhU5npsB/vJ0DbLz+qlbikJJfSjf\naHZYbIxM7EUzxCdZ6q3z8yKhJjHbss/R1HLojENhHgea/JM9V9DO5TVskMRj\nbK1sJgqmJ16sBEdnp1QiSMQkgAHfI6cTxwieYAGCTB5Ws7MrkzgqAmThPVdU\nmz5bWdQKx+VDb8pw5S6FI6ya6Ht5flAFYCnS9kkC64WqLFouCvvBDh4+smnw\nYjGIo5pJ2WDRMFROHFVjuD0kdJf1+AWhOe/D7nBxQgqwFterVdpJQMvgEVZj\nk311kXYp2zBvUkcgt7fjVpSXIlgMv3cJbYrTTkP7Ux5p13xNz36zySMI2ZHJ\nUFwpNl17qgPs19g8XDilHnnH2qPUjROwN8itL7iVO12s+z7uDruHhz0Oj+Za\ntnjzAuN6MWZbW/oSyxZlOZPpgZNs8lDfo6nckHUVNmWm3VEncTX8+VeRMrFA\njf2iQeCyQuFFjpq/a41X0ZQ5z5qT+FuIyLYcANslOFUW4XQBzTohRCeyYQhd\nVbFZL4AmQsjrY+oNsjhZLhGkAmgVwWcXX6u2yjsuL+JPNeVzvSKzmuNaaQ1k\nMkRf\r\n=DQyY\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.6.1","apollo-server-express":"^3.6.1","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.6.1"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.6.1_1640966270223_0.34315315358452003","host":"s3://npm-registry-packages"}},"3.6.2":{"name":"apollo-server-lambda","version":"3.6.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"d17debd3af3cf32e95664c3c60d8b01e0e74159c","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.6.2.tgz","fileCount":13,"integrity":"sha512-ga4boEPnpVG7YJ3A+4ChK2gT7qim/GtKOXDcPVafyRXwTpjC5A1vN4c7gA2H7T4LWtrdEy/q8GDeouRRZv92bw==","signatures":[{"sig":"MEUCIEGUrJ/dtvTAhH6/2Co4AFtVj10NuopzYk+7RE7vSdFyAiEA2fHvJyPL91jTw5ytEZ8Tb86p/fdQAq8GNdlkDjtnpFU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21825,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5yy3CRA9TVsSAnZWagAAH3QP/juBwVYTp8P3gTBpPBVn\nRVrpZ/OwnfpkVKJqHhrztpaZW84mUa0GP1pIkkNEhCyvTgX5Ufk1Vrom9Ol4\nvy2zzT3WHp0voqJQFDXsN0Z4dSdra8R+cmI+hrxsD+iHMnAhFMkZ9WQaLv6W\nDnRay6B7UaKS9vedk1y9UD5L+GaHngzSiUV2ANuj3XSUsk01x1m2gJVflJUg\nibDTaO/gI1wGGMhRXiKt2RWud2RPmO0zR0rM+4jPCRNg0AC9MJkPmAvR0oTY\nITVX1eNW17fWst9UkYLfwDw9Z+HU+rl6m43LYpWtNV5B6FOEIlhNdgFAm6es\nHYH7MtlxsXk05xSsdpOasTuIhVzN3yXRoLM5KICXDCbiM6z/2qg8HJwu6wXg\nVCkdeb3UoLSwvYX1ksbJ2h9CIpbKg8yDYp8If6FzfwALXAjL6vmhmbeKybrr\n9kKS1pZH5VcJpyXnLWOjdHgTfB/bEHb6ERP+M2ocmKd3YIspVv5Q4bsWYYOM\nmCFKqfyqveB/DoNrehai+RrsIWaxJ14Ky8cQh+VgLatlGE5cyypsWCzrcyl6\nuGj79Ud2lh9Eqwd38bFI6y83JUEFydRqP3tkqF8ApDEaP+y3MiwmYwuDkCCk\nQCPD0VUW2jBWx9LBVLVJzkrFU5lTOZp2QP184GsRzhaRLK9ySfRyNUxPBpsr\nrziw\r\n=9MfA\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.6.2","apollo-server-express":"^3.6.2","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.6.2"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.6.2_1642540214993_0.6812279757539725","host":"s3://npm-registry-packages"}},"3.6.3":{"name":"apollo-server-lambda","version":"3.6.3","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"6650b5c42cdc38f7db4265e64135b208e59e9d33","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.6.3.tgz","fileCount":13,"integrity":"sha512-ImQoXudxXhsR0wVSSA6oPxG+eDeekDq9ooE2I7OTGoEHS+31wj5Rx39KKtql36NLVodhl9ubjr0Et0HGQYae6Q==","signatures":[{"sig":"MEUCIEPGShIcKX/X3IQ/+khY010ffY4iPaHmpzlC6n4XT6niAiEAvT15AzlNxBZ7u0TBzH+KamaNJFVDzCpWeulZHVkHzCw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21825,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiAsFWCRA9TVsSAnZWagAAT9cP/j2l5RzG3YdKVVMl24fW\n0Y27QrI8piL22bttoQy6ztJDOLuMVKeHqQx+SuqaboezCn7nSRiPEiQP7ji/\nPFrf04TG3bZo4PCcbFwKtOU5NAd7k52ZKMOMxYUJgrrwKC1MevvSv0htTSKF\nsE824dms6Yr0vodzZKnU+0bBULkiEmBkqtAtwUF3Pt+7F52SqPBxcjH6ykK2\nWX7hj9vuSVEiJEQMevm/ml3fFy1zuzo6OmrK5QYc4X7dJ5J/rDLgeN32I1Po\n/pbmKXCJfyZikI/mq/6GGZXONg6Zquf/fGBHGW8OaIrNr35vNXvOuD9PUOh8\ndsQXl+sP+LNrGgsnAtEu3JqQY3p/H8hwnH+m/4Eb/OUG2wiB4mYRR0axXPWr\nxKEkoXUN67kmmciYcUq2aO/ofPhoZzW+NTxa5CwVpVQxCRcRwurrGSvIi0YT\nTp57XRNVjWeEBQzWhS6F8GMrMPyXaZSbHFO3363yXeHF3ZXZUxWnWPnuFFuq\nqu5fZueACN8+ov+80ZnevrlnQB8u/EO6TrdFXEiLrdDE7NUkVd1RpFEhTFnV\nAhUh7s596RPFhH0luuM8lzrl5IsEoz/FIcJPVFN3CDDalmiwTVfs3U6xVBvV\nKfX+6oOBpphRB5tQFTDUq3NQ79vvjl1ZMq14iq+aGtl4NBA48iWMEuCfowIc\nSZgl\r\n=ye7x\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.6.3","apollo-server-express":"^3.6.3","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.6.3"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.6.3_1644347734857_0.5320886962305813","host":"s3://npm-registry-packages"}},"3.6.4":{"name":"apollo-server-lambda","version":"3.6.4","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"2a7b5d1475559946904c836b67be227ce82f90b5","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.6.4.tgz","fileCount":13,"integrity":"sha512-R/yYbRzsReD6nXLkSn491T8nOokZFgO8fstCF5COibnxsqek9Y8PHSoa0zgAmIiUui8wR3pmALnh1QEn3U/dng==","signatures":[{"sig":"MEYCIQDxIQ3IpwKy+9GlrdZ3+9U4n6y+dVlryTPD8KzAHGK0fgIhAOjtamLh+j3PJpAnBkYSCMRZ1ZiYpbENl8t3Df3p/NEo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKkicACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrsVw/7BPxtFy8wFbREHnm1LhsvVG3w8BwTOUyMsxdp4isheX5Nja/L\r\nqp22tNBeFdD3PywyL6CMWZSIGwOdBpGvZ1XwGjAeGfUZXcCbxQu1Gt6gmObf\r\nghyQmB7Cm2ejzm7T7vVVFTWmL+2oJwnSHVpRAKKchAXZDRn4zmCGwhFmK9bC\r\nf0h3boZ350mMOuehn+JAFYdIy8fXmVkyOXo+pL4giHFQ345GDvwPBm0f0QOR\r\nMR0uoJd/lpKRv7iec2QikAQOLGs6WRjAVJFkd+Azz/wp2VguScEsUeFg2wOm\r\nuTx/8msJiXdOPJoVIUMYG/AlJj7Be89WUB6BmoOLez3FzG1t7Fc/SysCVWE7\r\nM7tJisLzubHDfGVD60Ol9q11eP/LhU7P2qTDMuY1iXF+SkC1GnEx7OgIU25Z\r\nWMiC/VnEaN1LvZDUPeZ80n5jwViuq82OHONX8AhO1wfDp95FzqkXQs+q8vYw\r\nMCGo4X9vLKuGJfOi/Gtz/rS3oB9rBBIvPkK6LXLUzlAZlXHhwAd2fK2wskqZ\r\nHUkBWibc/Pr3HUPcVADT4FmGr6YiGe+jyWJ4sYcAySfOzyneu4AWQcq7F8YD\r\nLbSwyBbDvCGhu7cGG1oypNl6QJh7IGAcICP2XULMi9yfhHSsUS9fSi4R1fHR\r\nS61sq4TMxDITut0xmypdqE4hauRoRLI1kzs=\r\n=Yryq\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.6.4","apollo-server-express":"^3.6.4","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.6.4"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.6.4_1646938268815_0.9737113524099439","host":"s3://npm-registry-packages"}},"3.6.5":{"name":"apollo-server-lambda","version":"3.6.5","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"0fe16ed71035af858cf13c766e004b7a45a40d5f","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.6.5.tgz","fileCount":13,"integrity":"sha512-RQd9Yf++sVoWnq3D8xYUhrB3zhfLObjT8LxZGG5XFg+P/WrUrTjNMReiwAl/QP3k7xVWt27Sdtz8WHgyFDZCbw==","signatures":[{"sig":"MEYCIQCJr+OBtPTFkcFSckHgE0Fqnl92AyWg9FqTc0gjAJRHKAIhAOGFOVBQArFzfXQexyvaPazjUa6XFJMFZmTMHtBHVA03","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOM6SACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpQ0xAAjMO79dFvgcjVYFP2BaZg1lhyHhXqx0VT+lAw4RZBdk0CP1YQ\r\nIbr75qB+vBdpqCsp0OzY7P5t6Wex1w+FvW6SNL19VHloCpKdawelHqFF/a1E\r\nvlFex+ThG/BZXq+736lJwhD9qcmiKkVsWt9Ul+SLW7V2lTmhSoq+tU6YcpaS\r\nW6Z1uOPcZ4IE8/LVKIXPu6KukwV4Zj4jg+CtBSposO93R5+Kv1mkT3wzmHHp\r\n8S09Pi5tqgdomVzdzcm+EkOj4koeCsYa54JDQcIEoDj4ofbxi6wBSS3nPx6+\r\n0zQpsHobMiTAwccVevorsnRGN3NQ6mECOsSJEX6PiXnR24fcWRcLTHUWlAQ6\r\nxssOb+0z1WmhTXHifhUWLOcR5cGoubQ+R9V3aX9OnLDPt1seouPAzNlxI7pl\r\n5C851G1xKZju+wg59fMDxEu0YmxMzwc+2VhGJSLsKdGsYrEJ/HxcuNOQ4Hnn\r\nUga2Zq22pcqxqPFfwCH2S2qhCvZiTse6tcNk29bR8bitdY6GysJbANPWfk/Y\r\nr+lJ2PL1t4cD3sEyq75EhYwBg52N6xXj1kBQpfNCjDjb4yIJwe2uyunHYgJ1\r\nYTX8Gv87/UI0sDykGQN6wulEEBdrkjovaFffD6yZHSRc2FazKafluy2/nO4S\r\nEJtkZ2k47BJGNDV+luXFq+rbm/eQ9bxENM0=\r\n=k4Bm\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.6.5","apollo-server-express":"^3.6.5","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.6.5"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.6.5_1647890066841_0.9601233458749856","host":"s3://npm-registry-packages"}},"3.6.6":{"name":"apollo-server-lambda","version":"3.6.6","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"ae9e0855086bdd847d0e955638bab6ebe24fcf24","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.6.6.tgz","fileCount":13,"integrity":"sha512-7Zn5/4G+Gzrah2lzWa7D7FsbxYSL4lJ485KSRSGJ87Z7iuE6qK1dFp2T6Ls9vBcvjFPYlOuLJUkKRa8wuBawjg==","signatures":[{"sig":"MEQCIHqEGSuiX2CEYjZbq7meZ9BD1eNfIG6wQF9OsvuYShTrAiBWfsProh0Sj++QiLUPfGXlp71HcSiGuNdIXJl71hqt/Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPNKYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpWXw//e1SLC6b4Jg512aolhWaGNieXaQJiFj3Iz2NjU2leB+CUknoL\r\nTlV7Swxps9phFaGuQdzR+nDQ+IGTZE+if+vLi/j3ticSycua9IQOkU982MkG\r\ndQ7RoDr9LEp7ivnOInB8Xj3nMY1FU2eDlUyF60wzh/KAEXr6/KRRpB6ajVbr\r\nTlXVAOgwIr2BjqeTBuvIj0kzWPbnA/y0A451OEWdOOo05qq48oBT8MwGugOB\r\nVcJECLzi3A/+i52zeH6ZbscXDF3gImSXDA5f7dkw5a1AtdRpinqEn3Ktrmke\r\naXdU42CST22mtzCwMV0bCVn+nClUb3f2abGm8bmra5xNjyQku874pO8YHQHd\r\n4NE1azcKGbVDdIXhjO/lMCUt0kurE/q/Z1d3B3+H8drkNioEuILFKFG+TqVv\r\nfSwYq8J2VJzZlkWUw47MevblwDpuj2XjpIPfwS6eBJimX6VRTX0dsWHszKc+\r\n5F/LulKJxKvq1pj0CpMWN0pY3xHdBCp/nbHZ/EKl6MIjPfCDylnAcn+EV+XM\r\nhY42ZfsGQ3BjMib4ZjFc8Fcn9228pmJI1OLCbskVkJT5U7MMsDlmOAFbhkvn\r\nECTE9+L5xMohZEa9sJgdLgH0U6pf/DYuWC/ln51X1FFoSsSCBg6SPmZ/PVim\r\nkjNdcP0dRcHHGafEYyXbhJazgXAERl762xg=\r\n=wSbM\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.6.6","apollo-server-express":"^3.6.6","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.6.6"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.6.6_1648153240838_0.4626653859434946","host":"s3://npm-registry-packages"}},"3.6.7":{"name":"apollo-server-lambda","version":"3.6.7","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"1fe9e680c06732bf3ca01bb9b4ccfd256fc5f2a3","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.6.7.tgz","fileCount":13,"integrity":"sha512-HMzGzk2EuGGd1XNDafX9Oxfkwy5SV+oOwckSn4hUz0VGNHt0dqOEi2GN9x7fKzjdPdq5F5sb9XsSB+3PrO/kVg==","signatures":[{"sig":"MEYCIQDjDZLz0XmOYH0bOavJhuqHOfqoHFbiCy5iz66UOY3vKgIhAMqgXXOQUssj5bHQX3ZX3343yHeo3V87LSs94QTrVKF/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQ5wxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoNcQ/+KLqNrqw6TsUg1vEHaLiKYwH6bGwTd6Oq2xMZxTKPsGKmSfZF\r\n9oFxZRkcLEOy20/w3sB4vOjJwgvtm4NelC0q9RkX4CgFTldxUlroqPG5l+K7\r\nzhchz7GkRIGRWHte8TyNRVXKG4fYCrghTai5kA+mnSP9hHKeva4/P7zO2FV5\r\nsrrq7SGG3o6YAkqaPizMNIa7fuedEO0EwKZrdp669pTkjtIjCi1KsS8akGFC\r\najkYqVgWWjrFAxAhQI5/EY1spBNpQOttlm9CrxGTxuO+BBHAzxW5hMShLjKk\r\nhVpKF76+DsBA16QLYi7/Jj6NCwD0ESSwJS2z8YI7sB4HWf5JNHelAYT3C6/J\r\nkEgDX33tn5uRt5Ve0fmkHSTACyXdOWIJHq2gTPVs4fxPg4GEZVYyvpuX2ACV\r\nw1OrNutBX4kvjTqFtDbghU5ci2VfwCJpXSa3h3Q2UT1m5oXoltJGyhxsNYNe\r\n5JBRt72cKg0N4xFXrC8KxelSIN4VDLl4hPq0SuIMZe2z3uHPPXRQnUziTbya\r\nF+h7bDg4G33+bB1auM6+sNhHoLcLKXP6wDH5khU6ISvYmQBhFJl+/jro7t9Y\r\nzdvb73OcEwAQrZ8sMK567gD+ACNSN50uVKRKEX9x/gqdNTuvfosjRFcQ9wOO\r\nFrIM1XfrOj4VTl1dr6NYHMBUGupk44SuOA0=\r\n=ELAr\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.6.7","apollo-server-express":"^3.6.7","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.6.7"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.6.7_1648598065426_0.09173289302628129","host":"s3://npm-registry-packages"}},"3.6.8":{"name":"apollo-server-lambda","version":"3.6.8","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"d572b7b3d2202b45bfe2dd1196642ede5d6c4853","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.6.8.tgz","fileCount":13,"integrity":"sha512-Fu79vZSxzdv5YKhbuTt/a7tIvAnw16P5Mbiiemgrxj0Pm+xsYS/Wr+5N83MgaCak732GSQ085IDcII/55K+5Xw==","signatures":[{"sig":"MEUCIHUDwTsSoYHk65clcOYU6Uv1WVu4JBChh1pKITUzqpRfAiEAnLVRGydx/Ct18NAHO1CAr/oDDxaZQXw90bPuFw1bCgw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJic/LOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpAiA/+ICHN9l0U/EaNXgjdidGBYld/s67Gfq8/94OmimP8Ac4EilMi\r\nd6O4POHXKeSbrDfHZuUSQ9GtsBh14PpnB8M8kbIQUffqTuqOyz0Cnh4x6Yiw\r\nszs/ZnGASpcJ7BMJxUKksIcwdFKub8biBGXoykEJ+JlJpE+oOfxCjUG5hVcF\r\nsI/25xAoIkf3GeAgRScnt0+5CLiqnKtoXN8dC9Un374PT0m3tRa/9ijYg7ey\r\nVfCORdTLvX59UsxGOxhaMnsYySm/46ehJ6JwKSgIvc4GXvOjTBEaH7Jsw0C3\r\nvdVyHo+qjAPNbFIq4Gh5Sni+LulxWXt161zTp0lOjc4X5tLBakisM+SZQGSL\r\n1Fho/lugMBaSfdyqw6EEQMqkYA3QbiVP1NwWxfoEB4bub4jJGmjyxgxlZsCD\r\nRuqdsN5fPQkpPg1CnZzB+cAfvjrpbsZILGaftwDjnDUf5li0RpfU55Fri+05\r\nrWM7LUQbOIqEMSIUQ8mkanM8dywlfZrAtS/qnJrcHP4JhKb5NS27uCcRhQZ9\r\nz3yAodTZPCu/mro3b6YRFDl9nhIILVlt3kZClGp7/+uKO/oEKVPC0VkIIp7f\r\neN4MjLqyZDGm8+A/CQRnAj2Qq6oA/r5TqpfNJZiNkhTOp5oM+XhFIGafYasP\r\n0/um578AtAgQxKzT41NIKpdJFQP8RTuV0FM=\r\n=dEf/\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.6.8","apollo-server-express":"^3.6.8","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.6.8"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.6.8_1651765966763_0.677412818931538","host":"s3://npm-registry-packages"}},"3.7.0":{"name":"apollo-server-lambda","version":"3.7.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"9e23ab9e17a287dd9a1b3b6e7bae5b596c705ab1","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.7.0.tgz","fileCount":13,"integrity":"sha512-4WWSnV01MGSHtFVGwNfQoNvVddaJLEq/+CXF4YSPY16qESLx381WaeYXKPOWLBJrJnvBwDyVtcD9k8v0vce6eQ==","signatures":[{"sig":"MEQCIHoijx3WEcwGP/PtlCuiGkv0kETZ8X0DvTJg7i+LWahEAiAlubL2GuDYpoRKaDu4IyzvCEG7W4wBR9uoED1pXGwdIQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJidACfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrfgxAAjXxbRdDtGwr0SWfxRHymawBwmKgeYqr+Q7EhEftgSjOMtLnU\r\nbjIeOQuVQpXtGhKcL+Rsr4Jp7MPcXbuY3q4heCPUSC9ht3Ea8CjduzRiuspi\r\n32Kuc9D3pr64xDfWCr18aMbJxwiAIHhWCUFOJPn2EJtBGOBHn4/oYVFdXEsd\r\n28K1fml9rfkgqoDKIxYSJ/2dFJGiWsJBnLRDvW/s4LfhK2FqF/5CofLFrSd6\r\nFoKUdka7UedlTwsmRA4UeCHC3tClp8b7PFw+BDezhI45VhO+pQDBnKajcAMF\r\nj1m4pKxK6qwvu2el0tCQoZsCh5wyKlhVqcmhU9JaqEe2rMi0fXCDfNdrP+bH\r\n9dbyhZD0XKtMUD7+R8F5NTdX6IOj1L/G31FkYuTp1RdPq2D0vh2Xzd1IbeFr\r\nNMqrFpYoDwBH9SVe8lAgZ59lV4QcZRoEisFjErVIqy6Vpl3aQzz2PceBrsiP\r\nlZkmxC5jmE00wtTegUjq24iUaP2agMZzjAdWYECUh9uq37jddsmXo9UUNRnh\r\nM0gmKIwS2FjL6QEb+crZDrUUPPHxFUfwPr1fTgmOSTlcEHpSB43t0V9ES+TI\r\nuvmVaIjU4MYuPJnVWS1Nx8eND2Twk8lWjGlukr/JrGVwy8c774pU2i5TN4Fm\r\nuNwTxRHS20quYUPSlnDBctldnBcVl5QIYmU=\r\n=2gF4\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.7.0","apollo-server-express":"^3.7.0","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.7.0"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.7.0_1651769503700_0.03812102913808246","host":"s3://npm-registry-packages"}},"3.8.0":{"name":"apollo-server-lambda","version":"3.8.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"e68c6f4988aed5b85c794566f7dcd08f507abdf8","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.8.0.tgz","fileCount":13,"integrity":"sha512-I4e3MdhfZClVO9mdydlashmYqHiLj10Afc3a5wTdviz7huNczClSc50k+fGA1evFL1sF5vNauE+qY813a9zGMA==","signatures":[{"sig":"MEUCIGUefU9LeUD/N/HY/bVeYc2riN5OfU2JjtU+5JysdxFMAiEAyiyE5N7DTFf1ccgYFFWe4zoWJB7Nz6y3bpuw02epVsQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJijB+8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqTpw/9Gew43vB6jgD1+3G8+4EiCiW41QaWv5bwBzPayB9wfET8hoYf\r\nog1HhmZUqdpmjsLWxYECyNQNqhAfvr6StG5xGlDaYAtLbASEWIIGq62olYPg\r\ngpY4pab9nX8IBLZUq7Y3ubmWlTrQXfkPrpnVc9b84KUqm7QWL7a9SuECp9Su\r\ngfE0AHTTHsVVaMo2vMXQxHvWOlRtUSa9gdGnujdystnWLA8d1yAr3HpJMmLi\r\nuSeTDpDlJPFXbm+gEPEE+jlOuOLhDxMPj2j2e4XOUHD0NkLtjKGsgN8BqVLr\r\nQg1n0mbEIbi7fEj5i8GMRcCI0aru7gw57NmEDT3mQhQr0gIosWBWKGsHUEKC\r\nwT6cCOLbaT3/FgwjD6kiimR2XibDJ1tts0R+MztBDcY5wpZNsujUSjqtVo2d\r\nYOowPVKl1OWm5+s9YYRLjjqLI2dmZWExd5UuMkpHnUmbrr0IYqnXBWC0Mhk4\r\n3R0xzVf8uufvrkxI5sxT8Qy9DnIZnc7h3L5nQAmuV9i9ozmlSTuEY1L2iLJZ\r\nfYQMprJoNLyU31ObfXWJSmo6lUTcz4gi/c59hvO4LAXSPad1rZCC8+5cyMEi\r\nBnlGnDv0a8onKvxzAEHKJlJ01vSlWRxESRo3dOAp580bTjwaG2D4GpBWjPLc\r\nurjmefiHV1mxC8YO9RLzYq3OZqRG9XlPL/0=\r\n=MYlx\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.8.0","apollo-server-express":"^3.8.0","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.8.0"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.8.0_1653350331842_0.7368380886704322","host":"s3://npm-registry-packages"}},"3.8.1":{"name":"apollo-server-lambda","version":"3.8.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"1fc39af617a91b6013e4dac0a3451c83eda83b18","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.8.1.tgz","fileCount":13,"integrity":"sha512-Ip5JCH+fmucqa0dDawSB9NPWg8lGaT4zseK+wrw5H5gJmC8VLc3q1L98Yy0pmkwVUEBx4HiMH2QWUSsF3l7SQw==","signatures":[{"sig":"MEQCICXPsSd9p1RurADeXKRxq/io9BfMkK8dCjYokbYhRV75AiBYQ8Bmq09MozN+fgfMny07eUB6+tDdllO1ttNaJInHIA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJijFsRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoiiA/6Apxtd/x2zx1KJDGSGy+s5t/s+sCI8uAtYEFd+chmJr/KKrAQ\r\nNq9CYM3ZaUwhSZ/Mm4Pg4dihjWu/nH11tedRCWyiFC+xZUVx4YobqNxiB770\r\nRUgK+T9xRxmbVUuLAC8Bt2+9kn9eAibGbmKQqFtLT/yrj+bZoS53WdTwb3Mm\r\nDpdpO1PrjME7W2TOyN5VZ4fXOSzNaKwMzFA58zf62dpxWavxtJbv7qKO/1sa\r\nJLHMMPhtT7MCsRukz1/eKYMKADl4BhhYC/I83Q5NQ+zsHVz/jiCvh49hInW6\r\nYiHPcCD/p5zw7u0qq/sr1ax34Q+YOJAiR12p+jTOadidwQDyho7m0Lo2bOGn\r\nVgMYW5f9jOsa/tB+9Z10a2AhWaM6P45i3jkFTYbbuViss8fEKC1b+ZgIIFhh\r\nxcNwgO7kiA3U/ngI1zCcw1dd1vRPvVGgyym8W/egRuDT2rAMZ3JSsd1i6gT5\r\nzJQ1/4PD4EeJ/qtnW/Cgf9KfnaOKZ9qb8zPRhjVmIqlPmqfLzm0Jbi8HDamM\r\nFm2Fcfa91YVgnSU9UCigA/Frid41ik2M02EsFB/BqE6zTFKZhJ5xJFB1E4EW\r\nqbZW6OYXAkwyH3EYsi9cXgQGWWosqX5U1YBpKH4/pOwzgbfir4Gw1RU/1xYY\r\n4d7WvpwVPfI4w0+GSzJFX2Spb8r10UOzuXs=\r\n=c9ff\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.8.1","apollo-server-express":"^3.8.1","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.8.1"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.8.1_1653365521173_0.8923237309670189","host":"s3://npm-registry-packages"}},"2.25.4":{"name":"apollo-server-lambda","version":"2.25.4","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"72b8a1df8a57709565533c1d369b86d0ae9ee846","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.25.4.tgz","fileCount":17,"integrity":"sha512-DyzlhhLHThzb0F/Ig1GfVAflnqwLgV99nchKhOC+m5DlEjLFC4/MVp2XAKRKqtRRMQ7yknMYItfpDhKhCXGM/Q==","signatures":[{"sig":"MEUCIEAdSHLIHmXG3C4AeES+NfFuDow6qyx5PFUdTeVGkY6qAiEAtmK3RFl48cpRdUPNdmz4UScbKp8TTILiP2lM3MvmVjY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55736,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJijmdIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq9uA/9EnTplFTXt5DKx36Hx2HOJ53KaZEDhZ+G9egNA3OCZQpqSC5d\r\n5DTYS2O5DOIQEF+ZxaW+WvFSfNnjXy6pF8xXlrQ8ilZE9Lj0RPYTa3fqEQcK\r\nicfQD/elbch6GWr8pY1PHnmc7s4RNSfMdyuMA2UE9+vhBRue7qawtvZzqqeP\r\nyiMNEk7qIWbcKQQ5ytgJfqcXPnS4lBzWOh6b2hNZbf1KCl2SujMn6ggtEDmj\r\n+Nh1ZaLkEr3nPhI9optCz0tZSXgAf6bARBZMlMWJ6GHm4p3a8OEzAa4QMq2V\r\nW7X5MhEWYYXsh2dw4fA41G6jW4t4plZdXLBLf77jZd/+TsKNQHzPWuVuF91C\r\nsYQy1iZPSdsgMjkLrTa/GM+8Ls5Qui/Ul1E8oAwjjATTXnb24JCcJh9+hUpE\r\nA3wcM5sD8KhO5wImGdoy98je1VCRA4jZzYbfIzpwcezxu9u1WtTzcuQ0jBWU\r\nHRfQOJnKMTPOhdrYUcM3m0ObbXP0Jun21dz2A9tc6zJHxfRbJCjj3yQZbDH4\r\nWHGDUtAXbzHXWkR7eZRYkajDQWGQI+okwzkb08tKttctK575cCfWNmJ0/Nop\r\nuZfGl0GiU8lK98pxkFRUlUfOFl8US5BJbgd4YijGWWvJ26vQGwmvolmxIiBK\r\nQuMC7aANhoIFQn62nRr6t3ipj2akvG97HZ0=\r\n=8M1G\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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":"ae444b2916deb2fa37dbd8fa091201235dc2ec6d","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.25.4_1653499720659_0.9495444812370917","host":"s3://npm-registry-packages"}},"3.8.2":{"name":"apollo-server-lambda","version":"3.8.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"97cf756d364f1a976ac137a35a88e8db127f0c54","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.8.2.tgz","fileCount":13,"integrity":"sha512-8KWp/YYM9yctWwAv0oMERKHM91MQmpJCOnS1TykWC4p1JwrSgt1vln9TJK5FRCD4rFGgSlPvhc3TItXjdDVVAw==","signatures":[{"sig":"MEQCICPMhG6MnOY5q+wCswL15u93ipV9ZUCmHLx6cNRdQIrdAiA9qGwFgADFlgWHuyv9uPLqZgRTozjOb3mXry9GJapBxQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJimq2tACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmroaA/9FB83C5fWkw3fe1/wH8ldge7qViDzeRfnT1ntT+yCWUwk+yw9\r\nMgn+Ua0PkWzdFT6eFMJghOsnEuhNUID7dhtt1vxW5xeb7zJ2YuXEAzsksQGf\r\n55Zixtl5cX/SJdXhwPkxJ4cYIg1rEW98CtB7q4Z5xrj5FHbdJVC7cCenOvsn\r\nxAZ3eCM+KsMS20MuslR0nCpwzDSzGwN2LKib/Clo8ZQTzqGESVUegs3h+93h\r\nJxfUhpNcrcS3ypdv9by0razNFcJRp8IhYjqRA543D4prZoOV6t83F097KZW0\r\nIgu4vJ0+l/YhjlekmSxwmWnQCmPaUzEhO1CR5RpDgVCcc6lD9ISr+AYMGxwi\r\nkaFdcZJ5yRAA87Zv3OVkcs/8Km9+5d6aKAcSZYEaNKztTbcdOKkt9dQI32+/\r\nz8apeE/q51fapo9cj/d7Jtx/YM4AxYWbUBzKap/gDxdcqIiHvfEyAKemZi+9\r\njj5rd1AjTE0KUrvl5XFM5zDgyqA0bk6hjqRY8WQMPiEZy7q9iw63SziGIYH+\r\nK29erQ2yaCbYC5E3NS7sQJDYInAo3aseooy4nVVvyL1+rYBfOHsddAORrWkQ\r\nltzX613RSIwZdBY2JIq5qAi8cpWgwpGqnXsW3EDm+4+Z0XfGaohPCi4HDpIc\r\njmPTS4zJ+1jkSvm320tmdH8sZXXTvgnarsY=\r\n=5C8c\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.8.2","apollo-server-express":"^3.8.2","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.8.2"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.8.2_1654304173388_0.4412145527306439","host":"s3://npm-registry-packages"}},"3.9.0":{"name":"apollo-server-lambda","version":"3.9.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"6bd85df40ac80318b90c27a3dbbeecee6390b879","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.9.0.tgz","fileCount":13,"integrity":"sha512-AutBHrzmpcdtBTgM9e7a9g5ORxPpl3Uud/uYr0DdaUyJTC3OnDzYbIwFSh7wcLu5HAB+rkhp3pj55FKo5z2Pug==","signatures":[{"sig":"MEYCIQD7X1Qu4lQMSsv6PDrq10eUkps9IEW89AOhdSm8lBRUywIhAPH+xGIR6W/LC3YXisMJ7k2IUCMPvYuYo/35yuZYDRqH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiqg7rACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpG5w/9FXjH+OCmrrZ1sCk9fJyFJ7LCllmONC83MdVq7L+sNuHdar63\r\n9kIVTMtSlHdEgRRPxu8WH2SdGjHQsQqzAy+O9Wn5mtH3bmmHVTrDKJLg2liC\r\nyL9dx+Esx/ZPJGbIzNYQqtfHXHpS7irHk6UTcbigonRWAgtMnyeghZ2KTQ9M\r\nCKL4qk2qT1JjP4n58rQwrvQop+sOc6+13epkH2mXlOBeY8BYVLfRjZSxfvRu\r\nvTyjNgb+kM18Jn+d5kiol8z1ESuAWKCzbEF+SMw4HVhv2bTEYXwLro3cMPZH\r\nOWAl2VTny6nDXqrawGfn2Enc1/Xx59/JgFI1z6eOPcsHefSe10FMo+1cAIRq\r\nAVF5H4UGNcX7wqYa+C81C8IvzTOaYaYmUMoVgWhU9bO88/gxf6treB8HbtGn\r\n9i+ZEq2qY/mnnvg3zWUpTAtsI2cjTPRNL7TJ7QSqLQdTaJHXZNoEOemOpWcz\r\nYsqazvPjZX49PSHSTvB1FWhZKvqCPjy3BksFtkL7Ud6M4c6pU902PJ67gEqs\r\n62kLx94Fl/aGPDjVbNHfVouyRIONzeRSPb3biIL9WcggN/fHH6Y71dxtwLkE\r\nkhyquG/RV4+5j9PLOoHPbGO3If5+w3NYEHNm3zCeVtNPzbUlHbpgAFGBl8gZ\r\nrborLH0MoMIZVu6ZWb1y1h5w5V3FVALUsdk=\r\n=4eoy\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.9.0","apollo-server-express":"^3.9.0","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.9.0"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.9.0_1655312107127_0.14164265339802706","host":"s3://npm-registry-packages"}},"3.10.0":{"name":"apollo-server-lambda","version":"3.10.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"a63966086eaee21454d38c186d7e7becd418f29f","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.10.0.tgz","fileCount":13,"integrity":"sha512-kFKyMZBz0oc39QUJjFm7RORScSPib8kMaBRP9za597VzlT6w1DThFnpImtPPIsaKw3SwTS0UXSODahsGiMO8Lw==","signatures":[{"sig":"MEQCIArbSev6K12Kp9KcWU1gq51TOkOnMKypUGvkDwnwNww6AiAokPDeZ3Lik/3/b/CZN9i7z8W67lHkHmqXVIuvXgZHTw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22001,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJizHiaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrgWA/+MiChGIA5VGbRelt8m0gCgKYAPUA2r35dFDyRMk4wpAMZZHSk\r\nx9AUaUijlKbJjFgoKLG7tq6IFejavSJan9wqQvnWgmnX98w8zvcmeJaTF5G5\r\nY9+jX8+rXboNsWxm6oYDnPCJunw134gw+lOfx+kNv/jaL3q+XWL1K0QPMVuK\r\n+D6ihmLPMI1dKL/3MXEJBAFjd0y5XJLwSvcFgV28e/tg9qxLQzrYcu2f3xP7\r\n6ptCfn6SXKfz3o4xvJhC2GWFFEVjAFuD2cUAcbg9oxSEM7FICbFtF5cUl0g6\r\n5PGP4HlxbOxwfzVIuE2AW6EQ3aUEB12+Qalgt3TMdCc/XCT3yHly9phGLHAf\r\nTPru3kZT+03Xs6zzb6S+f1VXRp6ZDnuNsnw9w956dtOJZqEIFmUfNjNP2tKy\r\n8xI3oklcvXiPh/HKCTS9o3ilCI35LmTN3iGqeTPUA8yZ4L4QfQMIAi9xRhYJ\r\n+EfP/VCQb6j89uCuYtGtdbKJD5BXeVI0qW9r6P6EBK1W+SAxB+TtSqrt04Gw\r\nIT0CbHKLyBDMkr6WN2u0MVOK69gAups/mG7nZuc8qTXYUlA6sIuoC8bZJV09\r\ndxJUucfLWBZ8MuN5Cm+um7i9cPcxGRMKN9MpbSjumpe0tmgI48t+/nvVLph0\r\n/2T15SaZ7sE4QywvG4NU5NzKE8oxZsNISdA=\r\n=a8On\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.10.0","apollo-server-express":"^3.10.0","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.10.0"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.10.0_1657567386090_0.39966003797820404","host":"s3://npm-registry-packages"}},"3.10.1":{"name":"apollo-server-lambda","version":"3.10.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"7fb981b81b6f2c58dba1e394bbbf76a5ed6c0c17","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.10.1.tgz","fileCount":13,"integrity":"sha512-SqCFoVHHPMXfW/ypBWQgQOZWIjrtuTLUxxYqJYJ2oUAdsmuaPMzmwzxoi8+B4yMDHMQcbfhQ7rElM+ypc19DKQ==","signatures":[{"sig":"MEYCIQDdw4da/pnxWAnVjoZdaggZHyuE6PN4QRuHEOPNSOltvgIhAO2j9z7L0x1Do2HzdCDQE3pwgaEvKsGPcUpT/Z06IalC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22001,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi8+ZdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrF5w/+KTNeA22a31+Y8lTA6gjmd2AamnpgWaL5HNjejh2qLsB979sI\r\nIysdojCghHBbg+fVS8udUsNEjFJKJn/waj5+0a6JQS1+10O5Y6nkdWvy5BzS\r\nvwUKVe7DZREukGiyY9hHTeYISI0scTYNemLiI76WKXGT3ap9vukEISXoG8RF\r\nuUCsNRpsbDUQiH1eESrdD4psvRRVgl8MQgenFHwqQ/JryChVZU5k1b/mvCpd\r\nJ5VjlYyNNgQggg0pj2SSZ8LfcmMthHQs94L0P6HNXvRHGwRJJh6qWYlX9wWk\r\nYRhpJ1jX0XiVPXVj46Rlxzk1sPNgENhlyUMRcClOawhtlMssm/hNM4rp/6P2\r\n40xlv23pWrZxeYsOIi7P2a559+/n9dD/SWi1PNJySrJtbLJISiiveI/YmsLG\r\nf4LIPdTJfUj4apBUozkDJhUOefHmYRTiMQHQE7ECxngNKSzEZdwpbN1iIUUk\r\nxwizzLKg627ZBo/kBESPIlZwg+bIQm9BKwsx8sHJcfpr/m+FRhQ8oss/CY4Y\r\nkWn1t2ZNPbJ8tkg3DRsPiDEZnRNjDfeOZaKTVrYEDCvWGOlj5VC2F4wxtE/D\r\na3PAO858OyQVgyUs+Wv/ktGJOmYrFsQ4FWlciNSnPFpicFLp7vbZskiSXkzZ\r\nXjPv2SpyZmd0lH6m+tqkPacZePQBHqvUK6c=\r\n=HNIR\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.10.1","apollo-server-express":"^3.10.1","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.10.1"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.10.1_1660151389466_0.8589320006778525","host":"s3://npm-registry-packages"}},"2.26.0":{"name":"apollo-server-lambda","version":"2.26.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"a853e895c195bc16d404db8aa51ec1f13593fd46","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.26.0.tgz","fileCount":17,"integrity":"sha512-IQFwtv/chiuQNe79f+bfmkyQj+cKH4UN/DXkpFjOK6yiFEAo91Iz0psEEfWD/SFHXCKnBs1d+cqxpOR59/xDyg==","signatures":[{"sig":"MEUCIAy8E4/fHfV2UyxNosSu8PHHBKq0LkYo4xHqZHiGU6HMAiEAqs66jVs16XYvCdFP9UV+rh8QuqMozv8o0hgriBjLlEY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/oMBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrTsw//X9sPpx2FlpDBcgARGd/0pQ9cod/Kn0OMNUXffB8VjaJsmEyb\r\nQRN66RBok9eS5DETw/+T+ejAPepxojG2CydA2QdNzFHyEO2u7Jy4rYgY4fWY\r\nFr9UJB8gnEDc5D8bIpOr6vDu50IZxEffeT+8XAIz9jqmh4SNW85BTmJGx4X2\r\nQ1W+l632mMoG6jIpii1KU8nWwdsG8B4ZO5xZUzEoA+JB/+SGeo40+x54G62H\r\nmgn+oQsW9ISg1zlzY+D3PffWmW093eK/IdoHp4dktV2QjMnDbWNVB+ZpGc3d\r\nUxNEFEed+f3fAI/wWHScgBMukhY0WeEMMi0Dh0ckitOdlqVQp4Bm6Tqe/ijs\r\nMXIMRC1057ju5k94AtDosKRUQ7otJpoSmoFEiUxJqVNdxHL5m+/IAyAfozkt\r\nOwY9vED9IHM9AsgAt9TGOpdIBEJMiuTRE41mk1+hWbvkbdHcfLzBHtu6fU63\r\nhzBpEdgsrxQf6PwJHz5tDHFaWKZJd2SxcErZW554EZaUlCUQ7VFcxXeAqfS4\r\nusxjSaEOND0Xkwhp1SrS7wTz9sE3Hzl5C3ee/SONmx2/UvY41uX1SfPw+Rkx\r\n9/XCYE5b7hUREulR498ebRyZnGgaHoyKxpe2SMd2fb7wNwzktDuRJilmzaFQ\r\n/saRjJDR6SAEoIBdrN9hSC2O8DlVsiB5ghs=\r\n=Wyc1\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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":"91de501bb389c07ccfc5e684811153267b91e9ac","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.26.0_1660846849446_0.7773352946783032","host":"s3://npm-registry-packages"}},"3.10.2":{"name":"apollo-server-lambda","version":"3.10.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"d6f411b571e478cc6edfdfea5c2305d24cb347ce","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.10.2.tgz","fileCount":13,"integrity":"sha512-qoc27EA8lOyp605edCiywn9l2nDsBUwuf+JXNfwOqm+hF2BVmce92c+SZVP3O/2MPfr4fESb5X5AOVO+LtOTJQ==","signatures":[{"sig":"MEUCIDKqbnXTudXzeIq/GcHPFaT4QE5zyrfxX3REnrOvuj1vAiEA4fYtFWu8c5FIs15rtrnKoP5wc8lLBsBf7CVCNNChrlI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22001,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjCDLmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoXBQ//UvqpDKKWnMagGSaWXnA45e/INcc6paHMLiQSve1qNI1HzcZq\r\n0MrgmNnR777veALJ5kLAuWPuufC+fPOjDZoCQXVv0+70wfgmnWbeNen0Qi5a\r\nF/+LHsqNAFViUe+AYQpGS2b7iKJbxYkHjTnFNMkCKbiZiF/FdES1IrCqVZxd\r\nVfa0HauHKhPOaYpvK4tvSE+H1WlHNjugN8oxt6opwys3K5WHzfrMhW5mSqQF\r\nmrOf4STm+b18xDPSLwHmaLf0ejhQrPIbp44ULq+Y7KlfY08Jo9lbA9ja+vZS\r\n+St1FTVvLlgEYP5cIVCxcX91Nl3n05PNOkUzJ/Cn3fAymQE0vnnAclczkqQZ\r\n7LeNfDjxsDIyfyopyjCa2f71UqtzGRmB3tqkT1fBxSE/7GFuimdjboaP3ILE\r\nnHGnbuC5pInG8H3YV/l3OUr6h1S5lgQxRVDZ0FvPKsp20H3UOYx8KXev/ZCP\r\n3F/rWX/WH2SjW2hSrOGyVDknP+9BmK5yxMQoE8Rqm3gEswylWbot3O/4Lxzi\r\nmLtjOiPR4KcIjykRkaAxPIMzw6Vfg2l0DM3S1B/yeLB3mi3Vu0JMwbEY3Iwr\r\nf1aSbTSSoK40uOpCLtK9K3fGtSfe+3O2+w+OxTksW1gUV7mwyr0OY7xbRmXz\r\np4kuciq2yZvGqxqwjOoIvNVPyyvnckf+fc0=\r\n=8ULJ\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.10.2","apollo-server-express":"^3.10.2","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.10.2"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.10.2_1661481702032_0.21179030894608242","host":"s3://npm-registry-packages"}},"3.10.3":{"name":"apollo-server-lambda","version":"3.10.3","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"e5093cd0ba8b8c5e605c730ee4103aa2b5859053","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.10.3.tgz","fileCount":13,"integrity":"sha512-XOtGRFZvFOcicVocHvIqa4tU1Dr8lkVHArRcP7J2OTVFVmFOtvBxOVr60BLwcsWT5mOHrP78tejvDkk4SFYtlQ==","signatures":[{"sig":"MEUCIQCxl4ipVp80aM6hlkIvyVlhBFJtzk95yeDRjYC/mD8VMAIgddtKDCdZ2lOkjUc02u4RmHEPINatiRyVfKjNj+koMO0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22001,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQKWUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpGWQ//c1lMYlZeko5SdgfIx6SakMOq5AmjwC9hNeawK8yVmFOvk5JH\r\n+TAwftQCb6P4tJHqCyCO1UjY9HHGABc33Bz/BHUtJr470JGfFxl0GpkYSM5w\r\nSQJCHzxwkKmB2SOrsSkf7muTYj0x5Mku3f/odyobqAHfLTbzmzLQQt8fv6s2\r\nl5CjIJAiM88wTRgnyoYWoE5f/NCc01ujl1BzWCo/QSOm2c7lYnLBnLKpef1W\r\nd2z/JHfG3tsPPNqP5ZQPIc2mD6YwRgTGK8lrWHtzHHLDHznqBsM4NQi8jdzk\r\n48ef5gT3H8WGvmoFQqx5V+z1dYtJGEQlVEeBqHaGI1DzVqW24NR6O7sq9HWt\r\ngKJZS37Zpln4xIgHLWkWiKKct5prMU1jN4Op2y81poWGoaBgZ0Sbtwv2lT2S\r\nIEmEZza0Y2MGf16NuVT1MafhnVfwRN9BqjgG4YRKl2sHjYOC7rdQFIOHff7K\r\naKoNr7mCjRwPdKgJKuLpc2flNGsooQdH/eDLYKoew+ajdO+1NugwT/x/uw+N\r\n1UP4yV17ONUcZfwEV2aDlBE3b6+HdtcmVLwcdJv2quWzai8BDNO5Mwwq6/EA\r\n08O2q2C1eIooaEzDqk0xywWB12gVWL0XZMJSvv4pImRwKlAYWUcpehjjV3hd\r\nM0KxRcZ015bGu5njRVuf21Iq8lgUSNJ3Cdg=\r\n=bpoy\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.10.3","apollo-server-express":"^3.10.3","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.10.3"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.10.3_1665181076648_0.18538210638381103","host":"s3://npm-registry-packages"}},"2.26.1":{"name":"apollo-server-lambda","version":"2.26.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"7a558bbb5a48e60cb7982ef3054f7d4b3010893d","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.26.1.tgz","fileCount":17,"integrity":"sha512-DmoY9J25Fvy7Cc22go1zr0qAx6FuE+wswgZypFlr3Adhn3ogA6TotVj04stgBcwA5+b8ecIg0BpX/cbinQph4A==","signatures":[{"sig":"MEQCIF6VvIEFeD6CAe0Bp1RLyWt1pnqIb5vFMA+IU2IYMHlNAiBndoWL9oQvGNYo+HPx1MlNWVOMwqsXs2CZ/2LVy5UJ1A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUY0VACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrNdA//TF1xdvsd1d+JSBIDh4+OGKzHV4pL16c290mcIiLUgVtnFhTf\r\n0MsEz38izky0rZBcsCZadQDovpmqeoSU9EVFk6uZe3MI68VHZx7h2Ljnwhzv\r\nw3meVSUTiNZdVi173B4Ial+3PcpmMmlAkzetu4LPH5z/1ZZHvYKfMzFuYeXc\r\nTTKomQH9h+W0MEawvk6PwLDl2lqxQqwOaDio/ktg3p2vtzIS0/VQAg2wBXcW\r\n7Un2YnicYXkVQ/Fb10YKroESLLZbd9u5TYkjw8wnX41w0lXiTfBGpcAmJ7Di\r\nx3iEjH6umiEGKg9z613Tc1Rz5Xi/K9Z83LcxpPmDs4NCWfgv8xh83DasqLBT\r\nsJD7o4uxzeK2tTgfQP8/WGlFH54b9kA7u5fnXNa/Qp7q4U01AGxOSF2prIlc\r\nAkbjXiLZs1R5383dOPtm5tXZnHZiu8wKuiJsSdAaRnSsf6M/2Eu4J/ImM57j\r\nannR/EcPnJwQ4ORjFqCdPzfEz2V3FjR3OZnGPWIATaH7ifnrprPJxztkMO0P\r\n9Ub+kUNe9sqe5nJFxphslkLlHnjWMNDIwRjV6TnHGtdPuME6yJGCe0uiKw2I\r\nZqBcmQ0/37/iGZTczS4yoc20tJ6URLQ++6ST9lJDaKTWC5kUVG0Nqsb5/n1j\r\nL6ENoQNUxVCCKasy+45sbMyc6x1Cm1Tg+Lc=\r\n=/PEG\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-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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":"84852fcfb40bc5ea83c341dba546464d6114d7ed","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.26.1_1666288917422_0.37226591925896946","host":"s3://npm-registry-packages"}},"3.10.4":{"name":"apollo-server-lambda","version":"3.10.4","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"7bbc9c758276a1089a90fad62d1e2c90dad33fd6","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.10.4.tgz","fileCount":13,"integrity":"sha512-f/6buGwnnY/EMwWrprj/vW2YsvXhbOaCrfRUJkq7grq0IIO2gpLWJO1yBuRThhJm56Nx63crkR650ElbEl4nVA==","signatures":[{"sig":"MEYCIQDqhHLV1b/LPAs4Yx05kFM1LbXwf+kOdu04ZC9lvCIw3wIhAMFiJxfZtYQmlBDzk4f7iiYxpM9QL2Du0NdxHbhHt7f/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22001,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYEOVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp9pxAAgOS8h+w4l36KX5CsRgg7oe8KTrtNCkFdGo+0YjDBbcjh/MFZ\r\nxPwvwGceqD19htHu6RzjyqLQtxaZJiGnWdNG91/kDJHfA6t8wtgQEmO2c7oQ\r\nOVyTDRFbZOz9qW5/yFaonkTnXghqT1ge4R3nfnn0LTiHmirxUzm6l624Z9At\r\nkSZIdYMvkQNgYt4HrjD6eWkrG0/vofP/Y5eGZcvUHIKloxUViV/apqqBIR8J\r\nCfVu34IHiuegYSXNAgoLV7hMR5ox2XSzrzquGFYRyxxFB6skoFw9UV+f5XoO\r\nEIkRz5Q0EN4ssQ8BXB5dwPTvrLrG2et1x3c++ReiMok8wz4QmtqSV5nNeKcZ\r\nCzw/9jGkacJm9bN9DkJB1K89kLyLmRP+vKBU3lJSFrcyGzh54JphcgKsxXWc\r\n+kBBEJmiORNxP9CHFTBZztqMPqvZA8mb3uDpkKxihWoGRhIlRj1jLxiYahfC\r\no81DAGJ0N+8n7RhyTMb245j1gnKgDC7wN/M8UcBuR9Xf3TEXvWgb5fpd/T+G\r\nksjYFZs5KQm7JBlZl9FyhuT7Csfuy8Y9+VlhMCsY6Eeg0+EyRtQj6avxx+kX\r\nvPKFY60uDNz2g/5DkoEal17XmcW5b+ZkGzXRkN2YYDD1gw1aLtf/I881XHpB\r\n6+hhoM6WQxMknR2ET45e63MJp1r4ZLEjcuo=\r\n=/9cc\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.10.4","apollo-server-express":"^3.10.4","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.10.4"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.10.4_1667253141422_0.40796084587759784","host":"s3://npm-registry-packages"}},"3.11.0":{"name":"apollo-server-lambda","version":"3.11.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"e8d52fa98d45d8006f09190ab006034a6b2e2c82","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.11.0.tgz","fileCount":13,"integrity":"sha512-tiakuSb9pTD7SAufmsy48ZHgX+n03DxnuB4CxPNtVjAYhqXyeXtlurR1uMIb8PL7rK2+bVEZyjXR4mYnC4e2zQ==","signatures":[{"sig":"MEUCIQC04WAViCVj293cfEmmQQfcjRx3sRXZlg+GzigHzx/QaAIgRpZuHqXYgu0FRJEqbA7ey72YwKtwfhi4EPHAipPsKZU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22001,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYpM1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoh1BAAi2AkX7nR+rahVqdLKOW+NtW9rDOLXwIIZCHKhtUw7BNSdQV5\r\nVRfgISYrSPmB607Y3NDIsFKDBhfLF6pA1GNSqGxlymh42QCbG5Ud5gaprHLM\r\nJX/xxIsASMYPXTROmefGAJkgGjL1wGT15BnD2moC2ZvURakumOQDaithc3PS\r\nWzmna2zLqXFzeYJW4030tIbUDTSHwSEyamxPinCBtI1ULmjkUUqnZJapwTxk\r\nasbucV2ZOYveqYC7sn6sO/utfDhS6yBVB6kjwcUCUGyzB6GZyjqPQ5dsJeaZ\r\nqMHOEiT6ZGEbPFWOo8G4Y9stsWvpiAj44vcE5s/yVBp3G/hLGEuOBPyeuVB+\r\nx6sR8aHlgLq2rmvmPmFHfrTRCrsBWqUqQLX6MT0WGquA2NHcXAq500VhMeIj\r\nknEMp5pFhA1XP78Luah2wiZepS6TDN5IFAxebXSjdU8gy6JnQX2OE6YF7ljy\r\nh9GoVPIPhUDjCmthgvQnRA5Jj8TEMk/sw5j2SsdN0KEEAo9fWB8HIi/Fx8wL\r\nFGq01W5tsjBq3TZvrbjhbdSkXtbtxobfjEEpR5Tgcez+80Gj+VjMfQ+Qowxa\r\n+gpPKe2rBwV0sxBhHtVcd7mcpkIRRe1YpYYk7SRG4Bae3u82Y47GcRay6QqX\r\nM54rnNMdd6VTi15KG2+Qsp1psVh1hWgCdJw=\r\n=uB/4\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.11.0","apollo-server-express":"^3.11.0","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.11.0"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.11.0_1667404597370_0.6325628167794699","host":"s3://npm-registry-packages"}},"3.11.1":{"name":"apollo-server-lambda","version":"3.11.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"a2835f6a080d0cb202904a6440a0fc2c85825836","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.11.1.tgz","fileCount":13,"integrity":"sha512-aW/WvAy7E1SZUSYGqa2NI69AdxIvAI630G+URmiDjXMjST1dNpeQQ7RbzElvoKHofQh4yS/kJe2+BtG9bb+ENw==","signatures":[{"sig":"MEUCIDc6YVLtYOMOaMCLgmtJQ+73Pb/CHmfkik6qO3n7mztMAiEAzLXtcVBNkmbye9fgVoZYy+89ennv+3H4YVbyk38ZNPA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22001,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYxLwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrY3RAAl3c3/OxoNlneYLQX8utedi+/P4W6PAQ0hoUUv+R0Qj4eFRHe\r\n6YgRbOvrGjN7x8JGdlYWFdFtp9bn7iVRAS0mAmCpmfQaxjbYtTKqW8d8ElkD\r\n7gakheL/r3ikJFS5d3JS/Vu+lKU0SiHgWu4R8KwwML0p0e2UgTgHly95BsQs\r\n8Yu+ee8S2mRTY/Ub0y7hHK/fGs9k9X+I1KDDzOb+opnuEZVQvWQ0aLaa2Z6l\r\ncvQ9smpHrA9B5OYFdED1i8qefnVSGItHA0IwMLLW0JapzuH/fZkyNfbY2KMF\r\nvHu0QmToR226o4Uu287UjQjlkWyf8vJMV3WoPZ/VtBPF34agb68PhxzEbwQA\r\nDNiELvyyDtVxlxIc9Y26PXFew0/EbBLwE7hZrlIU+2RnkV7QhXKzwiibHJkt\r\n7u741Q6NIgpmdWBiU5p6UEOv1Y28lFLMm2hV/9x2OwUN317I95KVxjU/DyKp\r\nP0hevEI+kSwr9GgnQRFFLGDV0nb6+cjO5+2WnOamKK4hfMuOEfw5vdROiDUv\r\nhFgDK/t1li3OmnB6TM7tz2dNO7EzpsRODlDdG0EdxjOyqda44oP3lafCy1Ey\r\nhVTZo/XHWLAk5yPyTQ9pQL0gvtMcJLzbIXS6r8va3MCnv/s5BxfgQmSyKMbJ\r\nbHLAT0B4Uow4QmTGrfxZSAIvuYpJDcQjnRw=\r\n=BCbl\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.11.1","apollo-server-express":"^3.11.1","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.11.1"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.11.1_1667437296746_0.05965902227912756","host":"s3://npm-registry-packages"}},"3.12.0":{"name":"apollo-server-lambda","version":"3.12.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"cff33ec507e06d787525a4b21bca12636c9f94a6","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.12.0.tgz","fileCount":13,"integrity":"sha512-wojpLlNreecaQwX4HMFugXkjaTrdg4ujfDRAOQHRTKq6OtqZWgJGWGP2btuNX65v+qdknLqF9/YD7KePgUFggw==","signatures":[{"sig":"MEQCIEl5NvRtnqCb/MxSjNCG2UznqM/LLzIfYviNwnrBqYJiAiAMM2GxbeL4a4pql5t6RSwUduWw6y/ghP4gpLxyxCUxFw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22001,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkAPoUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoQkA/8C6wcNERjmgMTNLWFOHRe/EOfyFRdnIHm6UwwSl+v6sONlJxe\r\nFw3sbsQRCSwMJtYFnCFw/k/sdCeX9CHDOJ+Ni4wDUzmgcLfnNl8bFwFrI1UB\r\nvgxICtesMPyGRlQKueN+HiGh4MDDi6DltdH9qIFRSE/BAZxOVcezUK4TA8xb\r\n9F8EquxTjwOHCZRIcuRHgLMF92gyTGCQTHizbaiowE7JMuXn03DuKp1wUFBW\r\nDgVnQKPnJiOWqzL3BPC2zC8ASykNgh9iuIF+kF7+/LupNyrv7xToSmZW4AkF\r\nsRSSopsXeyWDqLuu01VMfqItMSntjQplvc38T0xUmZOQ8q2EyvKz+Ttq5dEC\r\nwdt3JZCKBUe4aFrnI+goo7AoWsFaEBCHc67BotLEMh6KzXtm7lS7jjhl/iOo\r\ngFbXhWCiizzMOO2OoXJCuKIBpJH00mSXh1N2HzquR+aMgKd2a0YG1g3vNjuE\r\n1AwZQZRGQ7XprzlzjnkhjAQmn4gLhW1Sfhmn6P15JmKcwsNsQc/1wWq7kZov\r\n0duP5npNGNJFCZph5g9zz9KVaJJdU+Lz4SDWI2Fl8nQRCKhtC/6FoASLPU6n\r\nemqAm1gjpYRuCofZBi+1Mj8E/qSpmP3iKjPPa33tW56SnjaL76Z/wb/TCWcU\r\nWGv1Ldj5d7nMNK7lwRxTJvQcanzkUt5x2nQ=\r\n=pD3Y\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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.12.0","apollo-server-express":"^3.12.0","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.12.0"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.12.0_1677785620679_0.17265489521518895","host":"s3://npm-registry-packages"}},"2.26.2":{"name":"apollo-server-lambda","version":"2.26.2","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"opensource@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"03bea9193271bd90a3ca7a4bc9b81ec5d84624ea","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-2.26.2.tgz","fileCount":17,"integrity":"sha512-rGYuPZeBjZ7nLVkNwcQPiuOu5rZWVgc25Um5qnodaA24rwsfRRUZaLN4HUSokWdbV/O7R4fuJIy+oXK7TwLGYA==","signatures":[{"sig":"MEQCIH4a+DGDS0BWg3jbJhvptw6PeBtF8s0AZrqNpW9R+ZdMAiAleHoCww62cLxPzJ0z+XYzWwyEQ5J2zUBvfzuv6pIVNw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55737},"main":"dist/index.js","types":"dist/index.d.ts","readme":"[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // the `playground` and `introspection` options must be set explicitly to `true`.\n  playground: true,\n  introspection: true,\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs12.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n## Getting request info\n\nTo read information about the current request from the API Gateway event (HTTP headers, HTTP method, body, path, ...) or the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...) use the options function. This way they can be passed to your schema resolvers using the context option.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n  }),\n});\n\nexports.handler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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":"8fbc66cded6549d5a61433c9fed26775e60e0648","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"The `apollo-server-lambda` 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-lambda"},"_npmVersion":"lerna/3.22.1/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"graphql-tools":"^4.0.8","@types/aws-lambda":"^8.10.31","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-lambda_2.26.2_1693429372844_0.036075241594118124","host":"s3://npm-registry-packages"}},"3.12.1":{"name":"apollo-server-lambda","version":"3.12.1","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"0e9a97591f9e4c600287cc5e6b9114546a1e1742","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.12.1.tgz","fileCount":13,"integrity":"sha512-PlwLI+uT4EaQm5bSRRvXWEv/JwwMfIXCiceU0jXcV2QL6G1cQDnQjaDTwisQymweyXhfQ8NGOB+87JMu9QFDsw==","signatures":[{"sig":"MEUCIQCXQbmv+Zg9h0DyL6BB3d7zwc3cSQslv1tfuU0eG4FmngIgBRpXT1SoN5VwQIxD1cfJQuraht/Dixa3s6JJUdYEKVg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22001},"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-lambda` 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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.12.1","apollo-server-express":"^3.12.1","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.12.1"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.12.1_1693430239439_0.3563679232198531","host":"s3://npm-registry-packages"}},"3.13.0":{"name":"apollo-server-lambda","version":"3.13.0","keywords":["GraphQL","Apollo","Server","Lambda","Javascript"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"apollo-server-lambda@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":"c9ce06e54c5b551254bc7716be93c0c906b715cc","tarball":"https://registry.npmjs.org/apollo-server-lambda/-/apollo-server-lambda-3.13.0.tgz","fileCount":13,"integrity":"sha512-DIwKwWo7tDHGP8aRDEHiGObxIqEeFUIJfx6qD0UIPlPix2Pgo87CJhviUi22MFpmLM8N8YF8ns42QJSB8hlWGw==","signatures":[{"sig":"MEYCIQCNHok3MGISS2QvV+aX3zmdAfuLnjzSLQ60zMJWHvM9KwIhAKk4mtW8C3yFhE3ohZwTLFXkwZCgDQjnA2DLKuzI//dd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22001},"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-lambda"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Production-ready Node.js GraphQL server for AWS Lambda","directories":{},"_nodeVersion":"12.22.7","dependencies":{"express":"^4.17.1","@types/aws-lambda":"^8.10.76","apollo-server-core":"^3.13.0","apollo-server-express":"^3.13.0","@vendia/serverless-express":"^4.3.9"},"_hasShrinkwrap":false,"devDependencies":{"apollo-server-integration-testsuite":"^3.13.0"},"peerDependencies":{"graphql":"^15.3.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apollo-server-lambda_3.13.0_1699921028493_0.011448193072591595","host":"s3://npm-registry-packages"},"deprecated":"The `apollo-server-lambda` 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":"2017-07-17T23:31:09.078Z","modified":"2024-10-25T18:42:31.141Z","1.0.2":"2017-07-17T23:31:09.078Z","1.0.3-tracing.0":"2017-07-20T20:43:36.835Z","1.0.3-tracing.1":"2017-07-20T20:56:32.425Z","1.0.3-tracing.2":"2017-07-20T21:02:03.736Z","1.0.3-tracing.3":"2017-07-21T01:34:27.392Z","1.0.4":"2017-07-24T08:22:41.348Z","1.0.5":"2017-08-01T18:37:15.313Z","1.1.0":"2017-08-09T19:13:10.799Z","1.1.2":"2017-08-24T04:27:43.193Z","1.1.3":"2017-10-05T04:46:55.966Z","1.1.5":"2017-10-09T18:34:27.134Z","1.1.6":"2017-10-09T19:12:25.387Z","1.1.7":"2017-10-16T14:59:42.566Z","1.2.0-pre.1":"2017-10-24T03:55:12.573Z","1.2.0":"2017-10-24T16:15:04.000Z","1.3.0":"2017-12-12T08:46:04.972Z","1.3.1":"2017-12-18T06:35:03.894Z","1.3.2":"2017-12-19T16:03:07.667Z","1.3.3":"2018-03-26T14:20:58.964Z","1.3.4":"2018-03-28T20:57:36.329Z","1.3.5":"2018-04-18T13:10:26.712Z","1.3.6":"2018-04-24T18:35:40.365Z","2.0.0-beta.5":"2018-06-07T22:05:17.281Z","2.0.0-beta.6":"2018-06-11T22:54:32.891Z","2.0.0-beta.7":"2018-06-12T01:45:48.816Z","2.0.0-beta.8":"2018-06-13T00:55:27.230Z","2.0.0-beta.9":"2018-06-13T18:48:08.184Z","2.0.0-rc.1":"2018-06-21T22:33:48.577Z","2.0.0-rc.2":"2018-06-22T02:54:15.767Z","2.0.0-rc.2.1":"2018-06-23T01:22:12.137Z","2.0.0-rc.3":"2018-06-24T10:31:26.262Z","2.0.0-rc.4":"2018-06-25T20:58:37.111Z","2.0.0-rc.5":"2018-06-26T00:06:14.183Z","2.0.0-rc.6":"2018-06-29T18:28:38.284Z","2.0.0-sashko.0":"2018-07-03T01:05:07.422Z","2.0.0-rc.7":"2018-07-10T02:34:07.676Z","1.4.0":"2018-07-13T18:55:03.898Z","2.0.0-xrc.8":"2018-07-14T00:50:44.717Z","2.0.0-xrc.9":"2018-07-17T17:47:57.575Z","2.0.0-xrc.10":"2018-07-17T17:57:27.474Z","2.0.0-xrc.11":"2018-07-17T23:30:58.045Z","2.0.0":"2018-07-19T19:51:28.652Z","2.0.1":"2018-08-14T18:06:15.032Z","2.0.2":"2018-08-14T18:50:47.740Z","2.0.3":"2018-08-16T19:12:48.779Z","2.0.4":"2018-08-20T21:18:34.598Z","2.0.5":"2018-09-03T13:07:44.386Z","2.0.6":"2018-09-05T15:34:20.758Z","2.0.7":"2018-09-14T17:37:11.542Z","2.1.0":"2018-09-18T23:16:12.632Z","2.2.0-register.2195":"2018-10-09T01:50:30.634Z","2.2.0-alpha.0":"2018-10-10T19:31:59.902Z","2.2.0-alpha.1":"2018-10-26T18:29:23.926Z","2.2.0-alpha.2":"2018-11-05T19:46:52.501Z","2.2.0-alpha.3":"2018-11-06T05:38:03.406Z","2.2.0-alpha.4":"2018-11-06T19:34:08.489Z","2.2.0":"2018-11-07T16:18:21.463Z","2.2.1":"2018-11-12T13:27:01.660Z","2.2.2":"2018-11-13T13:59:35.365Z","2.2.3":"2018-11-26T18:59:07.517Z","2.2.4":"2018-11-28T13:51:50.565Z","2.2.5":"2018-11-29T11:46:06.274Z","2.2.6":"2018-12-04T11:35:52.551Z","2.2.7-alpha.0":"2018-12-04T11:44:45.390Z","2.3.0-alpha.0":"2018-12-04T19:13:18.762Z","2.2.7":"2018-12-13T13:03:03.535Z","2.3.0":"2018-12-13T13:30:33.619Z","2.3.1":"2018-12-13T19:08:00.332Z","2.4.0-alpha.0":"2018-12-18T15:14:41.647Z","2.4.0-alpha.1":"2019-01-16T11:12:02.148Z","2.4.0-alpha.2":"2019-01-23T13:04:46.285Z","2.3.2":"2019-01-25T16:48:56.105Z","2.3.3":"2019-01-29T09:51:55.524Z","2.4.0-alpha.4":"2019-02-07T11:01:50.974Z","2.4.0":"2019-02-07T12:09:09.642Z","2.4.1":"2019-02-12T21:35:10.647Z","2.4.2-rc.0":"2019-02-14T13:17:16.699Z","2.4.2":"2019-02-14T13:26:23.629Z","2.4.3":"2019-02-20T17:00:35.412Z","2.4.4":"2019-02-21T18:22:55.119Z","2.4.6":"2019-02-22T07:22:21.100Z","2.4.7":"2019-02-26T11:21:50.094Z","2.4.8":"2019-02-26T14:26:07.187Z","2.5.0-alpha.0":"2019-03-22T18:32:39.568Z","2.5.0-alpha.1":"2019-03-26T18:24:40.300Z","2.5.0-alpha.2":"2019-04-05T14:56:18.425Z","2.5.0-alpha.3":"2019-04-05T16:52:48.281Z","2.5.0-alpha.4":"2019-04-05T17:14:38.237Z","2.5.0-alpha.5":"2019-04-12T09:34:52.602Z","2.5.0-alpha.6":"2019-04-14T03:54:09.178Z","2.5.0-alpha.7":"2019-04-25T17:51:38.213Z","2.5.0-rc.0":"2019-04-30T12:04:55.216Z","2.5.0":"2019-05-07T12:44:08.183Z","2.5.1-alpha.14":"2019-05-10T02:04:20.031Z","2.5.1-alpha.15":"2019-05-10T02:35:51.854Z","2.6.0-alpha.0":"2019-05-13T19:23:15.248Z","2.6.0-alpha.1":"2019-05-22T18:34:40.461Z","2.6.0-alpha.2":"2019-05-22T20:09:05.536Z","2.6.0-alpha.3":"2019-05-22T20:13:34.250Z","2.6.0-alpha.4":"2019-05-23T17:21:34.306Z","2.6.0-alpha.5":"2019-05-23T19:39:51.314Z","2.6.0-alpha.6":"2019-05-24T21:22:27.950Z","2.6.0-alpha.7":"2019-05-27T18:27:53.692Z","2.6.0-alpha.8":"2019-05-28T15:26:20.369Z","2.5.1-alpha.0":"2019-05-30T09:02:55.444Z","2.5.1-alpha.1":"2019-05-30T10:57:23.765Z","2.5.1":"2019-05-30T13:18:31.905Z","2.6.0-alpha.9":"2019-05-30T19:55:24.901Z","2.6.0-rc.0":"2019-05-30T20:30:08.191Z","2.6.0":"2019-05-31T17:59:09.587Z","2.6.1-alpha.0":"2019-05-31T21:42:03.622Z","2.6.1":"2019-05-31T22:03:01.977Z","2.6.2-alpha.0":"2019-06-06T15:27:30.885Z","2.6.2-alpha.1":"2019-06-06T17:48:11.921Z","2.6.2":"2019-06-06T19:48:58.959Z","2.6.3":"2019-06-12T06:10:11.606Z","2.6.4":"2019-06-20T20:50:39.325Z","2.6.5-alpha.0":"2019-06-21T16:51:27.214Z","2.6.5":"2019-06-25T16:20:50.954Z","2.6.6":"2019-06-25T18:11:05.617Z","2.6.7-alpha.0":"2019-06-25T22:08:49.812Z","2.6.7":"2019-06-26T11:51:30.099Z","2.7.0-alpha.0":"2019-06-27T20:02:04.197Z","2.7.0-alpha.1":"2019-06-27T21:01:07.393Z","2.7.0-alpha.2":"2019-06-30T22:09:08.700Z","2.7.0-alpha.3":"2019-07-01T20:00:26.399Z","2.7.0-alpha.4":"2019-07-03T22:39:34.735Z","2.7.0-alpha.5":"2019-07-04T18:15:29.244Z","2.7.0-alpha.6":"2019-07-04T19:05:39.511Z","2.7.0-alpha.7":"2019-07-05T13:35:34.435Z","2.7.0-alpha.8":"2019-07-05T13:48:34.342Z","2.6.8":"2019-07-09T22:25:08.266Z","2.6.9":"2019-07-11T18:29:34.236Z","2.7.0-alpha.9":"2019-07-13T20:49:52.724Z","2.7.0-alpha.12":"2019-07-15T07:42:32.731Z","2.7.0-alpha.13":"2019-07-15T12:42:36.233Z","2.7.0-alpha.14":"2019-07-16T08:26:37.236Z","2.7.0":"2019-07-16T13:46:10.675Z","2.7.1":"2019-07-25T10:47:37.570Z","2.7.2":"2019-07-26T23:29:09.617Z","2.8.0":"2019-07-29T17:14:36.194Z","2.8.1":"2019-07-31T11:17:07.814Z","2.8.2":"2019-08-20T18:03:07.564Z","2.9.0":"2019-08-23T15:22:28.467Z","2.9.1":"2019-08-28T20:33:12.474Z","2.9.2":"2019-08-30T10:06:11.118Z","2.9.3":"2019-09-01T21:47:20.121Z","2.9.4":"2019-09-24T17:03:19.350Z","2.9.5":"2019-10-04T21:12:48.152Z","2.9.6":"2019-10-10T12:15:50.359Z","2.9.7":"2019-10-21T17:26:37.664Z","2.9.8":"2019-11-12T18:43:04.145Z","2.9.9":"2019-11-13T22:43:24.551Z","2.9.10":"2019-11-20T22:27:17.070Z","2.9.11":"2019-11-20T23:29:49.459Z","2.9.12":"2019-11-21T18:01:27.701Z","2.9.13":"2019-12-05T20:01:35.728Z","2.9.14":"2019-12-17T12:24:17.582Z","2.9.15":"2019-12-27T12:10:52.610Z","2.9.16":"2020-01-09T22:17:00.856Z","2.10.0":"2020-02-06T12:34:45.407Z","2.10.1":"2020-02-14T14:00:03.823Z","2.11.0-alpha.1":"2020-02-24T15:28:49.632Z","2.11.0-alpha.2":"2020-02-25T16:02:38.083Z","2.11.0-alpha.3":"2020-02-25T16:29:05.688Z","2.11.0":"2020-03-03T17:42:52.629Z","2.12.0-alpha.0":"2020-03-16T19:48:15.754Z","2.12.0-alpha.1":"2020-03-18T18:08:52.002Z","2.12.0-alpha.2":"2020-03-23T14:40:49.283Z","2.12.0-alpha.3":"2020-03-26T13:13:59.886Z","2.12.0-alpha.4":"2020-03-26T13:54:23.210Z","2.12.0-alpha.5":"2020-04-02T23:10:11.802Z","2.12.0":"2020-04-07T18:36:36.362Z","2.13.0-alpha.0":"2020-04-10T12:14:56.098Z","2.13.0-alpha.1":"2020-04-23T16:39:41.548Z","2.13.0":"2020-05-04T14:49:26.723Z","2.13.1-alpha.0":"2020-05-08T19:49:35.275Z","2.13.1-alpha.1":"2020-05-11T18:35:09.585Z","2.13.1":"2020-05-11T19:15:00.610Z","2.14.0-alpha.0":"2020-05-13T10:06:23.596Z","2.14.0-alpha.1":"2020-05-19T09:55:00.406Z","2.14.0-alpha.2":"2020-05-20T14:38:14.092Z","2.14.0":"2020-05-27T14:32:24.222Z","2.14.1":"2020-05-28T17:20:46.921Z","2.14.2":"2020-06-04T17:24:25.417Z","2.14.3":"2020-06-08T21:44:24.615Z","2.14.4":"2020-06-12T14:41:41.276Z","2.15.0-alpha.0":"2020-06-16T18:38:01.185Z","2.14.5":"2020-06-16T21:44:18.039Z","2.15.0-alpha.1":"2020-06-17T17:18:13.461Z","2.15.0":"2020-06-17T17:25:26.458Z","2.15.1":"2020-06-30T11:25:10.211Z","2.16.0":"2020-07-17T12:13:53.361Z","2.16.1":"2020-07-27T20:49:59.908Z","3.0.0-alpha.2":"2020-08-06T20:01:22.741Z","3.0.0-alpha.3":"2020-08-12T16:58:41.276Z","2.17.0":"2020-08-27T18:42:09.132Z","2.17.1-alpha.0":"2020-09-03T18:23:18.882Z","2.18.0-rc.0":"2020-09-18T22:17:13.196Z","2.18.0-rc.1":"2020-09-21T17:46:45.324Z","2.18.0":"2020-09-22T04:24:22.265Z","2.18.1":"2020-09-24T18:09:51.578Z","2.19.0-alpha.0":"2020-10-05T14:23:20.055Z","2.18.2":"2020-10-05T19:14:01.190Z","2.19.0-alpha.1":"2020-10-19T18:33:49.388Z","2.19.0":"2020-10-30T20:02:41.292Z","2.19.1":"2020-12-22T23:07:20.349Z","2.19.2":"2021-01-14T16:51:17.387Z","2.20.0-alpha.0":"2021-02-09T01:11:27.131Z","2.20.0":"2021-02-09T23:06:39.883Z","2.21.0-alpha.0":"2021-02-11T19:16:22.331Z","2.21.0-alpha.1":"2021-02-11T19:53:28.889Z","2.21.0-alpha.2":"2021-02-11T21:48:21.535Z","2.21.0":"2021-02-12T01:57:22.451Z","2.21.1-alpha.0":"2021-03-06T00:33:01.873Z","2.21.1":"2021-03-08T18:27:07.345Z","2.21.2-alpha.0":"2021-03-16T21:35:29.606Z","2.21.2":"2021-03-18T19:52:20.440Z","2.22.0-alpha.0":"2021-03-22T21:59:12.353Z","2.22.0":"2021-03-26T00:28:26.301Z","2.22.1":"2021-03-26T05:00:57.793Z","2.22.2-alpha.0":"2021-03-29T19:26:02.453Z","2.22.2":"2021-03-29T19:37:06.465Z","2.23.0-alpha.0":"2021-04-09T00:09:18.609Z","2.23.0-alpha.1":"2021-04-09T20:07:11.259Z","2.23.0":"2021-04-14T23:23:35.379Z","2.23.1-unified.0":"2021-04-22T22:22:37.818Z","2.23.1-unified.2":"2021-04-22T23:05:47.730Z","2.23.1-unified2.0":"2021-04-22T23:14:42.130Z","2.23.1-unified2.1":"2021-04-23T05:46:08.935Z","2.23.1-unified2.2":"2021-04-27T22:17:08.167Z","2.23.1-unified2.3":"2021-04-27T22:54:13.572Z","2.24.0-alpha.0":"2021-04-28T21:01:52.779Z","2.24.0-alpha.1":"2021-04-29T22:33:20.625Z","2.24.0-alpha.2":"2021-04-30T14:06:28.385Z","2.24.0":"2021-04-30T18:10:08.716Z","3.0.0-alpha.4":"2021-05-06T20:23:03.706Z","3.0.0-lambda.0":"2021-05-13T19:44:54.895Z","2.24.1":"2021-05-18T22:49:28.515Z","3.0.0-html.0":"2021-05-25T04:35:28.712Z","3.0.0-html.2":"2021-05-25T05:19:59.439Z","2.25.0-alpha.0":"2021-05-26T22:31:30.684Z","2.25.0-alpha.1":"2021-05-27T14:10:53.185Z","2.25.0":"2021-05-27T14:40:30.375Z","3.0.0-preview.0":"2021-06-01T05:56:00.296Z","2.25.1":"2021-06-08T21:06:14.941Z","3.0.0-preview.1":"2021-06-16T05:59:25.212Z","3.0.0-preview.2":"2021-06-16T06:15:43.248Z","2.25.2":"2021-06-22T19:54:00.601Z","3.0.0-preview.3":"2021-06-26T05:43:23.444Z","3.0.0-preview.4":"2021-06-30T21:06:10.907Z","3.0.0-rc.0":"2021-07-01T23:42:19.080Z","3.0.0-rc.1":"2021-07-02T21:48:44.619Z","3.0.0":"2021-07-07T18:17:59.083Z","3.0.1":"2021-07-16T22:45:10.064Z","3.0.2":"2021-07-20T17:28:09.310Z","3.1.0-alpha.0":"2021-07-22T20:23:18.678Z","3.1.0-alpha.1":"2021-07-23T06:14:41.773Z","3.1.0":"2021-07-26T19:11:07.926Z","3.1.1":"2021-07-26T19:51:36.409Z","3.1.2":"2021-08-03T00:34:09.757Z","3.2.0-alpha.0":"2021-08-20T23:55:57.227Z","3.2.0":"2021-08-23T23:50:45.792Z","3.3.0":"2021-08-25T23:14:48.976Z","3.4.0-alpha.0":"2021-10-09T00:38:23.288Z","3.4.0":"2021-10-11T20:58:40.274Z","2.25.3":"2021-11-04T18:04:27.591Z","3.4.1":"2021-11-04T18:06:41.122Z","3.5.0":"2021-11-05T17:54:43.560Z","3.6.0-alpha.0":"2021-12-17T21:58:03.718Z","3.6.0-alpha.1":"2021-12-28T03:11:15.885Z","3.6.0":"2021-12-30T18:25:59.516Z","3.6.1":"2021-12-31T15:57:50.375Z","3.6.2":"2022-01-18T21:10:15.202Z","3.6.3":"2022-02-08T19:15:34.993Z","3.6.4":"2022-03-10T18:51:08.995Z","3.6.5":"2022-03-21T19:14:26.988Z","3.6.6":"2022-03-24T20:20:40.989Z","3.6.7":"2022-03-29T23:54:25.600Z","3.6.8":"2022-05-05T15:52:46.944Z","3.7.0":"2022-05-05T16:51:43.871Z","3.8.0":"2022-05-23T23:58:52.077Z","3.8.1":"2022-05-24T04:12:01.427Z","2.25.4":"2022-05-25T17:28:40.816Z","3.8.2":"2022-06-04T00:56:13.492Z","3.9.0":"2022-06-15T16:55:07.297Z","3.10.0":"2022-07-11T19:23:06.276Z","3.10.1":"2022-08-10T17:09:49.687Z","2.26.0":"2022-08-18T18:20:49.657Z","3.10.2":"2022-08-26T02:41:42.166Z","3.10.3":"2022-10-07T22:17:56.846Z","2.26.1":"2022-10-20T18:01:57.667Z","3.10.4":"2022-10-31T21:52:21.569Z","3.11.0":"2022-11-02T15:56:37.515Z","3.11.1":"2022-11-03T01:01:36.956Z","3.12.0":"2023-03-02T19:33:40.878Z","2.26.2":"2023-08-30T21:02:53.135Z","3.12.1":"2023-08-30T21:17:19.590Z","3.13.0":"2023-11-14T00:17:08.693Z"},"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","Lambda","Javascript"],"repository":{"url":"git+https://github.com/apollographql/apollo-server.git","type":"git","directory":"packages/apollo-server-lambda"},"description":"Production-ready Node.js GraphQL server for AWS Lambda","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"readme":"[![npm version](https://badge.fury.io/js/apollo-server-lambda.svg)](https://badge.fury.io/js/apollo-server-lambda)\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 AWS Lambda 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-lambda graphql\n```\n\n## Deploying with AWS Serverless Application Model (SAM)\n\nTo deploy the AWS Lambda function we must create a Cloudformation Template and a S3 bucket to store the artifact (zip of source code) and template. We will use the [AWS Command Line Interface](https://aws.amazon.com/cli/).\n\n#### 1. Write the API handlers\n\nIn a file named `graphql.js`, place the following code:\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\nconst { ApolloServerPluginLandingPageGraphQLPlayground } = require('apollo-server-core');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  // By default, the GraphQL Playground interface and GraphQL introspection\n  // is disabled in \"production\" (i.e. when `process.env.NODE_ENV` is `production`).\n  //\n  // If you'd like to have GraphQL Playground and introspection enabled in production,\n  // install the Playground plugin and set the `introspection` option explicitly to `true`.\n  introspection: true,\n  plugins: [ApolloServerPluginLandingPageGraphQLPlayground()],\n});\n\nexports.handler = server.createHandler();\n```\n\n#### 2. Create an S3 bucket\n\nThe bucket name must be universally unique.\n\n```bash\naws s3 mb s3://<bucket name>\n```\n\n#### 3. Create the Template\n\nThis will look for a file called graphql.js with the export `graphqlHandler`. It creates one API endpoints:\n\n* `/graphql` (GET and POST)\n\nIn a file called `template.yaml`:\n\n```yaml\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\nResources:\n  GraphQL:\n    Type: AWS::Serverless::Function\n    Properties:\n      Handler: graphql.handler\n      Runtime: nodejs14.x\n      Events:\n        AnyRequest:\n          Type: Api\n          Properties:\n            Path: /graphql\n            Method: ANY\n```\n\n#### 4. Package source code and dependencies\n\nThis will read and transform the template, created in previous step. Package and upload the artifact to the S3 bucket and generate another template for the deployment.\n\n```shell\naws cloudformation package \\\n  --template-file template.yaml \\\n  --output-template-file serverless-output.yaml \\\n  --s3-bucket <bucket-name>\n```\n\n#### 5. Deploy the API\n\nThis will create the Lambda Function and API Gateway for GraphQL. We use the stack-name `prod` to mean production but any stack name can be used.\n\n```\naws cloudformation deploy \\\n  --template-file serverless-output.yaml \\\n  --stack-name prod \\\n  --capabilities CAPABILITY_IAM\n```\n\n\n## Customizing HTTP serving\n\n`apollo-server-lambda` is built on top of `apollo-server-express`. It combines the HTTP server framework `express` with a package called `@vendia/serverless-express` that translates between Lambda events and Express requests. By default, this is entirely behind the scenes, but you can also provide your own express app with the `expressAppFromMiddleware` option to `createHandler`:\n\n```js\nconst { ApolloServer } = require('apollo-server-lambda');\nconst express = require('express');\n\nexports.handler = server.createHandler({\n  expressAppFromMiddleware(middleware) {\n    const app = express();\n    app.use(someOtherMiddleware);\n    app.use(middleware);\n    return app;\n  }\n});\n```\n\n## Getting request info\n\nYour ApolloServer's `context` function can read information about the current operation from both the original Lambda data structures and the Express request and response created by `@vendia/serverless-express`. These are provided to your `context` function as `event`, `context`, and `express` options.\n\nThe `event` object contains the API Gateway event (HTTP headers, HTTP method, body, path, ...). The `context` object (not to be confused with the `context` function itself!) contains the current Lambda Context (Function Name, Function Version, awsRequestId, time remaining, ...). `express` contains `req` and `res` fields with the Express request and response. The object returned from your `context` function is provided to all of your schema resolvers in the third `context` argument.\n\n```js\nconst { ApolloServer, gql } = require('apollo-server-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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: ({ event, context, express }) => ({\n    headers: event.headers,\n    functionName: context.functionName,\n    event,\n    context,\n    expressRequest: express.req,\n  }),\n});\n\nexports.graphqlHandler = server.createHandler();\n```\n\n## Modifying the Lambda 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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: '*',\n      credentials: true,\n    }\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-lambda');\n\n// Construct a schema, using GraphQL schema language\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\n// Provide resolver functions 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  expressGetMiddlewareOptions: {\n    cors: {\n      origin: true,\n      credentials: true,\n    }\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","readmeFilename":"README.md","users":{"nak2k":true,"suryasaripalli":true}}