{"name":"@apollo/subgraph","version":"2.3.3","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@2.3.3","maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"homepage":"https://github.com/apollographql/federation#readme","bugs":{"url":"https://github.com/apollographql/federation/issues"},"dist":{"shasum":"f2a24cfcb2d0ef8b2086aadcbbd15d22f416708b","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-2.3.3.tgz","fileCount":69,"integrity":"sha512-stYoQ/pvm1TlSEU7DeW1YEk2cQ4yYIaS9tAEiPWTLzWivMwfbgVrsSGwBgME3UZ605EqHPXx4D1wVC/YfHT53Q==","signatures":[{"sig":"MEUCIDP/YpQWg+yn331mZRrqlm0FbqDsFwCFCLbyyyXxp9VDAiEA3tLHZwZNnu+AwiLuas5CxHn5K42aMz82tmskvg/oPp8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":207409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkB3Q5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqYEw//b57ZcVuu3iWeVw0CDZL0elzqYj2yRKFMSRl0hk05FB1S+SG+\r\naPJ+SQJT2dfulMcGwv0wH/QD6k/ekQJOHibagMNZ3Uqs/eTazssrOVHv2MOK\r\nhDnHrnogzqUdQ8vVzrbGtgldL2vHi7sIW6m0V7SfAZgmdIFjmjHuqaloI+sn\r\nmq8zoflj+drZE4YAYVQWl7Ie46cBujpxU2akp4V9k5UfhzlsWRxh/ZJGAA8l\r\nA7OSgnJLQqppS/yIiVgKRLOLly9RlKW7susAMpGCC4xA8+pw1Gxxn9Eo3Rkg\r\nrDoXxK9qiM5Jhzchxj5AVP/l6iT3YPH4aFz5Z4a4sT9kdPHJmZON8lKwYAwC\r\nL1JrcXnwV0SzQorSIEaTcp5cUQxBK8Rq4az5+W6RstFSLvBN41970AguX/9l\r\n+o/oCpPnEi3RVdyGlNGU5G4Ik2lj1or7suhZXka/zLGEmgdIkgeiDZ0M9n5c\r\n4Un4g5RXfKA0lYYPnLd9MVzYGcYm8ss9fGYvq01qDBqETgY733SgoL4FMR0o\r\nR622ZThifYEHAgawaKSWrKwgmvZHWti7LCemLRYEyP0PTaGwGoRFfFWpVE5j\r\nxRS8VZ5HO58YI0bXAKOefk7kVAp+DjflFsLqfVni8nPJFPOohr7kAjeigawB\r\nBw7N0dyvLJfiZVfMfGx+NdI3+C46GC1RCCM=\r\n=TsjQ\r\n-----END PGP SIGNATURE-----\r\n","size":50791,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-2.3.3.tgz"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=14.15.0"},"gitHead":"88747063e74b6a032dcb073143d664e58dd74e49","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"repository":{"url":"git+https://github.com/apollographql/federation.git","type":"git","directory":"subgraph-js/"},"_npmVersion":"8.19.3","description":"Apollo Subgraph Utilities","directories":{},"_nodeVersion":"16.19.1","dependencies":{"@apollo/cache-control-types":"^1.0.2","@apollo/federation-internals":"2.3.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"graphql":"^16.5.0"},"_npmOperationalInternal":{"tmp":"tmp/subgraph_2.3.3_1678210105020_0.17931453553764265","host":"s3://npm-registry-packages"},"readme":"# `Apollo Subgraph`\n\nThis package provides utilities for creating GraphQL microservices, which can be combined into a single endpoint through tools like [Apollo Gateway](https://github.com/apollographql/federation/tree/main/gateway-js).\n\nFor complete documentation, see the [Apollo Subgraph API reference](https://www.apollographql.com/docs/federation/subgraphs/).\n\n## Usage\n\n```js\nimport { ApolloServer } from '@apollo/server';\nimport { startStandaloneServer } from '@apollo/server/standalone';\nimport { gql } from 'graphql-tag';\nimport { buildSubgraphSchema } from '@apollo/subgraph';\n\nconst typeDefs = gql`\n  type Query {\n    me: User\n  }\n\n  type User @key(fields: \"id\") {\n    id: ID!\n    username: String\n  }\n`;\n\nconst resolvers = {\n  Query: {\n    me() {\n      return { id: \"1\", username: \"@ava\" }\n    }\n  },\n  User: {\n    __resolveReference(user, { fetchUserById }){\n      return fetchUserById(user.id)\n    }\n  }\n};\n\nconst server = new ApolloServer({\n  schema: buildSubgraphSchema([{ typeDefs, resolvers }])\n});\n\n// Note the top-level await!\nconst { url } = await startStandaloneServer(server);\nconsole.log(`🚀  Server ready at ${url}`);\n```\n","publish_time":1678210105170,"_cnpm_publish_time":1678210105170,"dist-tags":{"alpha":"2.10.0-alpha.4","beta":"2.9.0-beta.0","connectors":"2.9.0-connectors.9","latest":"2.10.0","latest-1":"0.6.1","next":"2.11.0-preview.0","preview":"2.11.0-preview.0","testing":"2.7.4-testing.1"}}