{"name":"@apollo/subgraph","version":"2.0.6-rc.0","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@2.0.6-rc.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":"d23e25e29219720bc7a36884b5d5392de2caeb8e","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-2.0.6-rc.0.tgz","fileCount":70,"integrity":"sha512-PpXBu4EW+QPKCJNVxUj5MVZkb5ZKLteaS0x4gHWz3KrMNiRL1AD8fe7+xQNxhej49zQ+nROYoT8W0oIfyMS1bQ==","signatures":[{"sig":"MEYCIQDykKWswvjw/uK1sLKhavncPByRPnO7Z+TXAGYO5mDqEgIhAMtp7mx1d+anO2ASgMVYIcQLmbSH8tVhOl/pFJdBoTgm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":220183,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiojLQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoAhxAAg1gEGtEcNSx4rQU9IeLaY4lyk4b3e0T1EZMw1raxcqbxfbs0\r\nge+L0YE06A94SgP6ToiGKtAoZrq29a+qOL5bXvFzS0O4aEs518cvy+ZiqF1w\r\nQLcxXZntx6b7/6wx42cSkyT/2cP4m3BEogCYIoe/eJHNLNKFoAuqYxyhtx0D\r\n1myo9z9JjORyneL4SvZ7rA23DAR5mm8k0Cqe3TscPDyYC7SgkRkWGcpAJ8mt\r\nRP2EWReg2DkhlJQ7F3T7AVlsf3Lrf6436YLPDEFC5pKK+HVSHvU15cVGJzxZ\r\nMnQbVVAYfQNu+pYI1Mwu11LF9mMrf/YrXbgpHyTD95nenkkZHR7N3RInZUhO\r\nxPSLIYYxS7i9JAINBw3M/6XpmLzPJmHr6Cmyu62vNsWGTgTE7HHZ84ZxhLj6\r\nlM41kV/THWvghcCRu4B4peqZ9C1Mr+8OVk5jwKc3tfVQ2z8o7C5ixdw7p6kH\r\ntzEus+cj4GZuIqY+rT72yF1EDbBIGFGfqL2vrb2NulLtcwAXinffyA0uVnuQ\r\nxJIJ2HsvLBzPbFRqJ2X1dj3Ljrg7FpX9LFnW5IocaYrvG7tRRDFobqfpsPuI\r\nfwX+yG/d8GKF9LufLDg9jxEvYzimXs2q/fv/SHjev56Z0WM07if8/P8Nk9Ek\r\n1xsbOo0fVs8kDhlD0rsxTKmpqjCwlxT8iEc=\r\n=Z1eK\r\n-----END PGP SIGNATURE-----\r\n","size":62022,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-2.0.6-rc.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":"6d61efe1543394866dc91f545793e9a086c6b478","_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.6-rc.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"graphql":"^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/subgraph_2.0.6-rc.0_1654797007785_0.22026131325950216","host":"s3://npm-registry-packages"},"publish_time":1654797007982,"_cnpm_publish_time":1654797007982,"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"}}