{"_id":"@as-integrations/google-cloud-functions","_rev":"3-460932643f142f764716757a4dacb088","name":"@as-integrations/google-cloud-functions","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.4":{"name":"@as-integrations/google-cloud-functions","version":"0.1.4","author":{"name":"Ernesto Resende","email":"dev@ernestoresende.com"},"license":"MIT","_id":"@as-integrations/google-cloud-functions@0.1.4","maintainers":[{"name":"thisisernesto","email":"dev@ernestoresende.com"}],"homepage":"https://github.com/apollo-server-integrations/apollo-server-integration-google-cloud-functions#readme","bugs":{"url":"https://github.com/apollo-server-integrations/apollo-server-integration-google-cloud-functions/issues"},"dist":{"shasum":"6478fc3e04cc4951dfc34241118060af2b7a6523","tarball":"https://registry.npmjs.org/@as-integrations/google-cloud-functions/-/google-cloud-functions-0.1.4.tgz","fileCount":7,"integrity":"sha512-zwoasVWKGHw0cLzyDmjakJ+Xd8PD8njWIqw0OIglVrEfA75mdhkNxLwxsWxZlGH7vu2oQ/4YpQUS1q3k2eScsA==","signatures":[{"sig":"MEQCIFTWbJF1w2HvWd6mT8U7QL3nNpTkYDzXvRsYP0LlnsOoAiALfRYB6+t/yDNMiQMkZL2iDsCfDDxfoQnYARUH3RY3zQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj4YQMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpmlA//Y8y8Htud8QXBrAPjtfNGkLYT9JoQpVISMD2ty5lWflzzbFjx\r\naEZt+w0JjCQO/wUkX2BdtC2SES8ODwsEgU7UXeaVLjI8aueTyKKxxs+QGU7e\r\nVrx3JO9UmeRpF1D2W7NDJq+mXSNztL4DjaQHcKD32mUvN+SeFaSZ7TpM/AzS\r\ns3SRC2ZWg4UHW2xsskDlszYYCCUOeqJ5Eq/C/UOEgfzWNozOgSnDvUD+b0S/\r\n4pRyBJTONmyN+XNInNDM9Sp+1trsm7Dc7ycZRfdCivxU53HDDpBySZg7L2HR\r\nGPJW3z6ws+TsmBq8s4d4a0aqJHPRf1L1JhubCm4hImes5lZtDO1q20+y0jMc\r\nPcGYKatvMFBHzd9Pu6864FiVelGv5eg0ddbfo/t9bkhqb5JgR3vjBbHH2ST8\r\nOlFbj1nlttYvTDxVp2742mpcnb1ofU4OYnWMC5VyGAjUMPuI52KIFYUqgvN8\r\n7LDAUGd5lJJnjXtR96DaJfyLn5s8Js+2kOs7VP309duvpWF3hI3xfAFsZE7T\r\nsjKwllEZVb24VHQGQq4y7EuV9YHZ4nwg9iOVOF4/ztliL19CAkyST9OwGqog\r\nE0FU/z/K65OfjYoSwYD0TNIBXyIShRk3sSmy4dqXI/Pe4ZD38BscZGwtabD+\r\nXY3Ef6n4QvkoEbiRdxZkvuW+x29+fQ+ujoU=\r\n=dxlQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:as-integrations-google-cloud-functions-0.1.4.tgz","types":"dist/index.d.ts","engines":{"node":">=14.0"},"scripts":{"test":"jest","build":"tsc --build tsconfig.json","clean":"git clean -dfqX","test:ci":"jest --coverage --ci --maxWorkers=2 --reporters=default --reporters=jest-junit"},"_npmUser":{"name":"thisisernesto","email":"dev@ernestoresende.com"},"_resolved":"/tmp/e9b03de178223a5fd7108dbb85f32624/as-integrations-google-cloud-functions-0.1.4.tgz","_integrity":"sha512-zwoasVWKGHw0cLzyDmjakJ+Xd8PD8njWIqw0OIglVrEfA75mdhkNxLwxsWxZlGH7vu2oQ/4YpQUS1q3k2eScsA==","repository":{"url":"git+https://github.com/apollo-server-integrations/apollo-server-integration-google-cloud-functions.git","type":"git"},"_npmVersion":"8.19.3","description":"An integration to use Google Cloud Functions as a hosting service with Apollo Server","directories":{},"_nodeVersion":"16.19.0","_hasShrinkwrap":false,"devDependencies":{"jest":"29.4.1","ts-jest":"29.0.5","ts-node":"10.9.1","prettier":"2.8.3","jest-junit":"15.0.0","typescript":"4.9.4","@types/jest":"29.4.0","@types/node":"14.18.36","@apollo/server":"4.3.2","@apollo/utils.withrequired":"2.0.0","@google-cloud/functions-framework":"3.1.3","@apollo/server-integration-testsuite":"4.3.2"},"peerDependencies":{"@apollo/server":"^4.3.0","@google-cloud/functions-framework":"^3.1.3"},"_npmOperationalInternal":{"tmp":"tmp/google-cloud-functions_0.1.4_1675723788673_0.42955930403893827","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-02-06T22:49:48.621Z","modified":"2026-01-22T17:35:23.930Z","0.1.4":"2023-02-06T22:49:48.813Z"},"bugs":{"url":"https://github.com/apollo-server-integrations/apollo-server-integration-google-cloud-functions/issues"},"author":{"name":"Ernesto Resende","email":"dev@ernestoresende.com"},"license":"MIT","homepage":"https://github.com/apollo-server-integrations/apollo-server-integration-google-cloud-functions#readme","repository":{"url":"git+https://github.com/apollo-server-integrations/apollo-server-integration-google-cloud-functions.git","type":"git"},"description":"An integration to use Google Cloud Functions as a hosting service with Apollo Server","maintainers":[{"email":"dev@ernestoresende.com","name":"thisisernesto"},{"email":"mail@lenzw.de","name":"phryneas"},{"email":"npmjs@jro.cc","name":"abernix"}],"readme":"# Apollo Server Integration for Google Cloud Functions\n\n## Introduction\nA simple Apollo Server integration for use with Google Cloud Functions\n\n## Requirements\n- **[Node.js v14](https://nodejs.org/)** or later.\n- **[GraphQL.js v16](https://graphql.org/graphql-js/)** or later.\n- **[Apollo Server v4](https://www.apollographql.com/docs/apollo-server/)** or later.\n- **[Google Cloud Functions Framework v3]()** or later.\n- **[Google Cloud CLI Tool](https://cloud.google.com/sdk/gcloud)** (for deployments from a local machine).\n\n## Installation\n```bash\nnpm install @as-integrations/google-cloud-functions @google-cloud/functions/framework @apollo/server graphql\n```\n\n## Usage\nIn the root of your project, create an Apollo Server instance and pass it to `startServerAndCreateGoogleCloudFunctionsHandler`, imported from `@as-integrations/google-cloud-functions`:\n\nGoogle Cloud Functions requires you to name the function entry point. In this example, we name it `apollo-graphql`. Take note the the name you give to the function is the name you will use when deploying to Google Cloud Functions:\n\n```ts\nimport { ApolloServer } from \"@apollo/server\";\nimport { startServerAndCreateGoogleCloudFunctionsHandler } from \"@as-integrations/google-cloud-functions\";\n\nconst resolvers = {\n  Query: {\n    hello: () => 'world',\n  },\n};\n\n\nconst typeDefs = gql`\n  type Query {\n    hello: String\n  }\n`;\n\nconst server = new ApolloServer({\n  resolvers,\n  typeDefs,\n});\n\nstartServerAndCreateGoogleCloudFunctionsHandler(server, { functionTarget: \"apollo-graphql\" });\n```\n\n## Example project \nTo develop, test and deploy your function, you will need to setup proper tooling to bundle your function and its dependencies.\n\nWe highly recommend taking a look at the [the project example](/example), which gives you an good starting point and sane defaults on how you can correctly bundle your function using `esbuild` and setup scripts for common development tasks.\n\n>**Note**\n> ### Why do I need to bundle my function?\n> You're probably writing your function in TypeScript, and you're probably using modern syntax from ES Modules like `import` and `export`. Google Cloud Functions Framework for Node.js does not support TypeScript, and it does not understand ES Modules.\n>\n> Futhermore, Google Cloud Functions works by having an entry point signature supplied to the function handler. This means that the final bundle of code that gets uploaded to Google Cloud Functions needs to visibly have the function entry point, otherwise it will fail with the error: `Function <function-name> is not defined in the provided module...`.\n\n\n","readmeFilename":"README.md"}