{"name":"@apollo/subgraph","version":"2.0.2-alpha.2","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@2.0.2-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":"cdfacd66229783ce02dc06a5a36d085805ececc3","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-2.0.2-alpha.2.tgz","fileCount":68,"integrity":"sha512-qKvsYJpoXh3zFT4Sdx5ZPpembDohirspSkN4P/GGXB5yd8hwN9P6b/LvRz042Tuu1N3XG4F+89+OS0vkmSIB4g==","signatures":[{"sig":"MEYCIQC2jtCzQFNvig9dhsBLgw4hdhi1Js6hk7N1aEh+nfMoeAIhANK5menvWZNITqXR3b75WDbplblImeHVy8Ue5O+JBsNS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242173,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJicAk+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoSGhAAhgvvp/jmDyreHhZIgzZW0BrWnouFiA/6Munn9tiGmNzHkjgI\r\nItWP8KIqx9KmNUHgRvDnn3u7DUP+AgpSNcKKPe+SEKTT4X8R1gsZL0fCp0nm\r\nHVUbe4v9Nkzy+Aq92rBjSKlS56d3Y+nll8yIDZOVXinSn10uuCfF4G0Et9Jj\r\nn+7+tG58lJl4gbxXqAnkVTsmbnV9T3EuhqxEkj9q3EaU9Ltp5y+v1Mwhh7w/\r\nHlaoiKVDHYAKdLw13C21pNaMbwI8QAHmr6PSsWEztLqFzWGJxXU5wziGBzVb\r\nThoCKbXx+LI/zE9Pc2fZUg5LiCyoajUtrMc/4u1rLcxMaiGiHpBDVcPnbzIr\r\nzo0lfrJdckn8o/4IrLA/fRSEksuJWsYe0wgmHN6zALi3VxIF8f0595nDeA4m\r\nFTJEbuYZRmRLx3RIoKFFP7hA2f2oZNiZwckPXhIkOD/FW1p9zNQ7PbOoEGdH\r\n+7Ek2Pe3hbRY1OEMLCY81Sx3gbNoIr+jcZtBNm76NlgpCzlFN9ow6gyCFz3r\r\nwcXVocOCxtJTokAodc/Z3e4YeWMqf2xInerovgomlqA6aFWQrexDYXnV2eye\r\nnPThYXKqS+YHv+SS+IfrKaxsKHQdZZe+eqicJwuzTJbjvjfAkOOeKkjbFRBB\r\nNbjkR28zaYe7JU4O2cc0FWL/lk2HmDPK0jg=\r\n=Dts5\r\n-----END PGP SIGNATURE-----\r\n","size":65970,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-2.0.2-alpha.2.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":"906611360a43172c938b7a0571cc354111b5913f","_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.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"graphql":"^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/subgraph_2.0.2-alpha.2_1651509566103_0.05268365014841159","host":"s3://npm-registry-packages"},"publish_time":1651509566274,"_cnpm_publish_time":1651509566274,"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"}}