{"name":"@apollo/subgraph","version":"2.0.2-alpha.1","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@2.0.2-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":"b018a6902b77dfae9fe71288c100b5083b361aac","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-2.0.2-alpha.1.tgz","fileCount":68,"integrity":"sha512-mtkpVZjxZnt2pZ6KnuP3NpoFmrhgAUemNP/9mhZCIUoIlhgAq2F+DU1ExkIOxW08qB2Hy2iw3b/uym8cSklwyA==","signatures":[{"sig":"MEUCICvydpDJqOlaeFz/ivnVcxtp2A4cVSKaR6kaK4vel/iGAiEAwn+JzBVtqDrnQ/qlcBwky0XIKn9lPU/OQdlH1oTexSw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJibDaJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrGfQ/8DBp2kN7t4Bk4ONSatpMu7a4vjS8A2W5QKDbla8CZu4/kh1x1\r\nqXuSO4C+vGYp5Rp4a/GSlLdaIxstPQKWVqzJCS04GtbGs9RNR8OqnC06HgF+\r\ne/JmWuZjhwihQ/iwgvowPrgHWBLl7AAw6xgnxTBSCBtE66W4EmFuvx9oZk3l\r\n6w6XaIqZ3tQnjwKO6Al9wAJqHZDFXDOb0N/+JOkBbvwFwmRa7NO1ATo0F9CN\r\nUAaxrBJsj3P6Vu44rpp31OyCRy/lkzk1mrBx3XVbsN5DNr04Yz8dScwaH/Ie\r\n9N+H2SB0xkdvIbNrm1SeYxA+58QGeS4JVwVmyfySfd1+Qn9VBk2pKIMvySZs\r\nbqVHKuqRPL78nbgMUPEW8V1YuZ3amczfTxNurQnjeFFh/03griMlx2il7gTg\r\n6WM4dedK1kg2wU1NG2+ICgGk2NVC4BAUlt1CzKhK1gba481FbLluQNbFeRGT\r\nrLEhYp2/R3GeANFO7ALCqBFNrhSxpPgpLczH/Suje3HyKJ4f/2GSLfnsQ2rx\r\nyUBLwvLsqu1fZW21z1lg3uxdmnosPjhhVgm++hgMa5FsLm2pHK6AM1TDeEZy\r\nOjFzoJdu6/wZvfTXvpLaJhx3HVXkJ/h4hdMYp9EG38c6r8Fovn1fv06HRP6r\r\nmzk1nWryEnG5D8oGbFHeAoOoEirmbyzR5/M=\r\n=O+Jx\r\n-----END PGP SIGNATURE-----\r\n","size":66231,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-2.0.2-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 <18.0"},"gitHead":"7fcf0f23509f0d62fdb017c8e74a861cb304915d","_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.0.2-alpha.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"graphql":"^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/subgraph_2.0.2-alpha.1_1651259017646_0.295119802518121","host":"s3://npm-registry-packages"},"publish_time":1651259017840,"_cnpm_publish_time":1651259017840,"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"}}