{"name":"@apollo/subgraph","version":"2.1.0-alpha.0","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@2.1.0-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":"92528c601725bd6023a8c64b016f32306db07de0","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-2.1.0-alpha.0.tgz","fileCount":70,"integrity":"sha512-H7X9RDCeVxAxLbql3daLhbYc28/vIFAzOmOJW/y413hvApCEa3r3Mi860s9s5Y8boJvohhDNYmxjmCbx2X22TA==","signatures":[{"sig":"MEUCIQDcAH3qgXPevnieOu7DDTGVTGvT5i/KN99nncPbLoPRYQIgI5DZSOvWubFaBcsBOeI3UpDCnKekyuki4rw/zuvOWmk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":220301,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitOmhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr/OA/9GswOtGjOmolGa8drmIc7/k8CQuPNUwsiOtRiSLmc8Hhwhkht\r\nWq7InJd/CrI9ieyBoOHZIIgVVDF76e/AU4FFnSUATDm2hOWMMWMEqNVSA0vN\r\nHg8PmN0cCznjRryHh/8ko9/yf1HlG2KFNxQW1fMrTYBzTge13tWrWUMpX/Ai\r\nO0TRo6xMF3novrJNipAr5EkPa9db6NKj2ySyp0OTNjXhqHNfCjfq/7LISfam\r\nDQz9do+voZjvZd11O19HxmhAjVnkDsfNIRTMvi+cCJg0hnLTOrf5lttjQnnu\r\nUtz3qAJgdJgyv8slyk6x8FRv/W/siHydel+LgHub7p5ar+7CF6qlyvHW+2XM\r\n3xtbEKOURBVNhC73xaUnYdLMhkSa5TlD2A93FtuWjm4wJGsp7ZXq33gz3qlX\r\nbJD0SosgXCCFW8ggbLz3wCke9BdsqMIwG6Q4oRzfqdI12d4xpsPKTT0mTwht\r\n+L+2u3hzgVhlacOUgOx5qNxaktcgC3m5uYaF5ycZ/1ZdlSclMv/c6QvDGlJm\r\nB/9Ii5u5WGVyNNy8Q7FMkE2VqXLdSqJAKouEhDD+eZm15WnRn54Jc50eoZX6\r\nQ/wo2t0cqZ5vkfFvQRiPXhkEvFJKjCkaS8lmWBxtxrrfuK2w+KXSSGVIcwyf\r\nl5Nfz+u7QNCotL8zfvvolSQYNImIV7OBMLg=\r\n=tZin\r\n-----END PGP SIGNATURE-----\r\n","size":62053,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-2.1.0-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"},"gitHead":"721a0143e418d64e538082b301862ca9417e830c","_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.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"graphql":"^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/subgraph_2.1.0-alpha.0_1656023457151_0.479844237956379","host":"s3://npm-registry-packages"},"publish_time":1656023457332,"_cnpm_publish_time":1656023457332,"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"}}