{"name":"@apollo/subgraph","version":"2.1.0-alpha.1","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@2.1.0-alpha.1","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":"4cae908f68106ef43197ea6e75564aac8bd1aa22","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-2.1.0-alpha.1.tgz","fileCount":70,"integrity":"sha512-XJT6/3YfhS4YPkzQ37T08PeGG+GExoGkXkw4RUtSyWGYpNJbPrWJircS2QEoSJskdVXrAusTG+oSREcV4fFvnQ==","signatures":[{"sig":"MEUCICRJMaoynEdRfaFYeTNi0O2c5B7blxfXhGeGJ5LHDWIHAiEAyhiWjNSCzco5TXYNYeGv0vVR2yG46PAbpohsDDK3TgU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":221621,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1wThACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq69g/+Pqd0izt1hBgbm9u2KpbXX9n/dXNH6u/isJ/HmmWyBbIZDer3\r\n9PhZo91nY0lNzjLvZ3heR2NDduGbU8DUTmBaXOIQIvG85KsFEm9sGZ8BOM87\r\n/AluqnETIrvBVRE4wOOd7Z0VM5vUx3cE32o5dqnHpqCmSfR7HKdIrj97MLdk\r\nt3F0Iv5FEQwvLNLj/aP9qClEy8dkvRe73jfcDSpCR9TBCoInSnvekN1l2aPZ\r\nCYAvACN2ZOxe7uEqV347dtDJuPcBBWCBQJGv92P2LLFbVXkLH4K7cugmrp6P\r\ns4SNbF60kgEnXkOYnumPnJaPJs2gGZlNwPZRYYlpzf8oG/dqtZrHdaMsg6LE\r\nwtgbt5PKILw+3n/0H304Aoifphv72mmyW9nP7YMQGPIuCJhuf1WgxXfWvBJn\r\nunMotes70bpmAyNM7znfbmn1wTu4MoQVnW+cZK17I3v2s3sSdnUUa41yfB79\r\nWIF+qns61qe8skvesp7eZMmbOLh6hFHbgMrDpuEcmx89qhhEFTVHaYYyfVQ2\r\nwuIEldQxeZxlTO1+cV4MsMPBRJK87mN7V5LNy8mCghKZspLZ8rX8St25/okk\r\nEbJR0O8xMzlkBaIF7qk2F8Uy/bYRAdryxkC9qfkqVl43CJKpiG2VliBBrIbl\r\n/erAMUU5yhtJKYde7ud14MLQD5Ut5OnBqfU=\r\n=SPnP\r\n-----END PGP SIGNATURE-----\r\n","size":62665,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-2.1.0-alpha.1.tgz"},"main":"dist/index.js","types":"dist/index.d.ts","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\nconst { ApolloServer, gql } = require(\"apollo-server\");\nconst { buildSubgraphSchema } = require(\"@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\nserver.listen(4001).then(({ url }) => {\n    console.log(`🚀 Server ready at ${url}`);\n});\n```\n","engines":{"node":">=12.13.0"},"gitHead":"d8df6aecd716a9e2dc1f1596b0f114d0ef57fe74","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"repository":{"url":"git+https://github.com/apollographql/federation.git","type":"git","directory":"subgraph-js/"},"_npmVersion":"lerna/4.0.0/node@v12.22.7+x64 (linux)","description":"Apollo Subgraph Utilities","directories":{},"_nodeVersion":"12.22.7","dependencies":{"@apollo/federation-internals":"^2.1.0-alpha.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"graphql":"^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/subgraph_2.1.0-alpha.1_1658258657683_0.3264408646706858","host":"s3://npm-registry-packages"},"publish_time":1658258657882,"_cnpm_publish_time":1658258657882,"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"}}