{"name":"@apollo/subgraph","version":"2.0.0-alpha.2","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@2.0.0-alpha.2","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":"34bca92341b41571ade8504ee2d6c82e800106e8","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-2.0.0-alpha.2.tgz","fileCount":43,"integrity":"sha512-uJd6SJobqn68tiPIPiQi2dRB+5Kc5pInWuH6BseCOrOJpz4P4ElOKTitGBUdWKR8zCJ7A0XNI7LYkzJSXhEXAg==","signatures":[{"sig":"MEQCIGA/xE2L1PwXJqAyCQ+d6Uys72778GulxjxqSl2YnfKJAiBXKN3NDYydL0x/eibQVh3NUhDgvhRqh/S/TDpCLl53Ig==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":171010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsjZ/CRA9TVsSAnZWagAAbyEQAJiKFLnlR+9cNTxajn82\nFxxkTmgbAIajKxA5LQDlB4QusP6HGjUoTu3fyYii0IlXbMzM2oBxjtsXejPb\nZuKNBSPnSZaBLCTvMkq8NJYsirXGPVNVjftFfq8yuggKegw6XEEPSudcte8i\nRE0Ao1qyMRVcGa6UM6ZMFh5U/R/wnTVh6MQMKKvMY9mqSQ/K7ccMrgkROowl\nrfxgSSRqKs5CfB9pgNYpuUPZeNMa41A3W+xBI3+ms3OeHu/tE8Dk4ZcNfIee\nLoADhqw8w/GECFPJ8SUBoOCjTRwYk+cuVLR+ZFC8a3R68Biz5PfITgiBI6QZ\n5QAbi9NqqITM0UHqZ2zSTiHsk90+2dKkcGAM41vbb/Lh4VWY4EQaMgmm0phj\n+JFUt3rQ2GYVw+1l4cm9lrM7Svf6ieE9B9pySlxBq3y01rldzXWAhDq4hY+Y\nR73Qfn+R12GrIh8qUuYEEC6eJTHvg6F3vtxjI4z8LSrPmIOyE0V/LxL0dc4h\nQqEOZ4IGegmn7zvExV3TzWpIr/+u7K7dWzZB6VfG3bKvII/t6Wdp+ZkNufqS\nyoSVsixS90yEFCJrloTbSPzyrRJjtmILRzcZ0FHSYeBWLwOsDFJG5t1BvBh+\nQ3SSlIyfxHO1d1bVDYKTArxp0b4BxE8E19LpgBunmN3qxwjNREFqZfWikNGt\n6UcM\r\n=8Vus\r\n-----END PGP SIGNATURE-----\r\n","size":50403,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-2.0.0-alpha.2.tgz"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"# `Apollo Subgraph Utilities`\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/apollo-server/tree/main/packages/apollo-gateway).\n\nFor complete documentation, see the [Apollo Subgraph API reference](https://www.apollographql.com/docs/apollo-server/api/apollo-subgraph/).\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```\n","engines":{"node":">=12.13.0 <17.0"},"gitHead":"9265ba09ec5620b931861a44603d7d5f7d4688f2","_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-graphql":"^0.9.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"graphql":"^15.7.0"},"_npmOperationalInternal":{"tmp":"tmp/subgraph_2.0.0-alpha.2_1639069311575_0.42100242693577794","host":"s3://npm-registry-packages"},"publish_time":1639069311716,"_cnpm_publish_time":1639069311716,"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"}}