{"name":"@apollo/subgraph","version":"2.0.2-alpha.0","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@2.0.2-alpha.0","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":"dc7967d02141ea29466dc0920da7f45df88d7756","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-2.0.2-alpha.0.tgz","fileCount":68,"integrity":"sha512-mSGpVLt4WnV48Z/JKDYAzxqR4rmK5MY/yNpYO5SMErbMCZlLWP2QTMoB8uuzgrGHE4lTjJI71TPWYduU1fil7w==","signatures":[{"sig":"MEUCIQCeuGbD3QnbPiSWZq/OHAQU9g1hTT6KuLWKi5j77ve/uwIgU4y3NLHStY+caHTZ6WZgyQmB6VMhBeIYot/oJSxRHZE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242093,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiZVn7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqljg/+NQUMGqbvexIZ+WxFgZlO2k9+HFehzdKMbUoS6CJC9qmGLZTe\r\nucQWwKP1RlyF3Ab8VDXl6ZMRDuvR8NsZWnf+i2axS84QUARkjLmdBIly7iLu\r\nch+5WhhGzo5Vin4ahH6rEI/MzYccz4stc7TpSl+BWv97hXQsK0qdlG9diRx0\r\nuILSuUsSqT+a9AOweoLKoLBwiNO3t+S2BDtpTP4+7yYlmOz8cuMM4iO57xrC\r\nTKlOf1Gd00WZqAw+1qdounxvDYfg6ZNsU+MJbciEIxNMabUdV57W5q/+1XBE\r\n644abVFPkje71zVzI6ZGduxR6QGAopndwVzCeNe9mzrSGt3YB4/7fL71cmly\r\n5zjbklah+WIxW1+TI277cfiEfzcahwJ/6HFGjZz/vYKMBmYsteHK5afRtmgP\r\n+AWSEb5jvaaHr2BSTW6h4r7ZBbQ92bvNrRsWEpa5wxiJ2Fp9p11B+JPASCGK\r\nLv3U80aJkwOuuVEoDRY1lYAvFa90BqfvblWWuq77tzdHhDDuFcO8spqWtIg3\r\now9+Y7PKM8LK4b3vTC4gcNWj1TnalI6bda9EwfkD8zoGkUNNcWplFRq0AJMd\r\nayom3Hqq47yyObVeI3XqPEEYNfJejg6e02Zz0kTMbIaDfG3y2k384wk5rYks\r\nj9KZJDBFBTlOz43mL2PZpI5arQ8fYilCqQE=\r\n=u2Jg\r\n-----END PGP SIGNATURE-----\r\n","size":66048,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-2.0.2-alpha.0.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":"077f496095196016643728e4829495408b391115","_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.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"graphql":"^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/subgraph_2.0.2-alpha.0_1650809339059_0.9711282480985581","host":"s3://npm-registry-packages"},"publish_time":1650809339257,"_cnpm_publish_time":1650809339257,"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"}}