{"name":"@apollo/subgraph","version":"2.0.0-preview.11","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@2.0.0-preview.11","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":"e2b65638b4abda5fdaf654973e58e63a8e9099c4","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-2.0.0-preview.11.tgz","fileCount":68,"integrity":"sha512-HnziiILTuyjfzvcJAyZ5Fopd0h7pG4v7Q+XAF+QkOr2InxFpcaFhzdvCD0Dp2nZViQGmqGmxUUU+S5LXUHgg4g==","signatures":[{"sig":"MEYCIQCdU+UzqMJxdgCGbtgFWnYogI1qcz1LkqwRiJ4egeCaiQIhALirUmbcwRvp2DORU0+2FZmNiZDR80tLol0A7icuj559","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227517,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUFRfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpurg//ZInholFX+qRfz3v91hK+wnjEttU1olxEsIWzbxBZhMdjYPsT\r\nuyxbaOI3ZQddp/rKF113zXAsyOfLJ/KjqXpZrIPyxVBAV3VxD4mQfk5G4a0Q\r\nB1RkMR22ny3W4su4IEDLBre4k+wk90nbjaKGR118KoFafOgMrVS9OVdknQEM\r\nGvZmZE6WkwDU7OW7HuCqMpDG9UsQuSKBRTTOu2V0weXj1I4wD1pvVY3h9bFZ\r\n3gWe5Cio69L8g4rdYnt3RO9Xcq9gGnIHSV//xFFeDLliMn7Rkclm8T1NjixS\r\nxoYgwrTLEXURmXcw4AGHIqqVZ3iOw52qAYO/NNXRYw1H+sFGp1AE4XWWDLga\r\nXatPbgGKEVrr0x4L5CiyBSXP2vy8mX825jIMy09b49ZWrLobKlu0nbWJec0g\r\nAtF6cIiUpFDLpjqnAHKWn9ftlwapnFQuRsGgQPExSUKa533oN4PN/zRt5vcK\r\n4LzVmC0f9wbnbyFiEe2U6t60CcW28M07bwqko7hY3nZRLdDxow73cvvh1Byw\r\nxYtv77gCY1DzbfGDzTETPlNVImXas+ykR05g1S5t+a8hQCI0VPO+sOQ6UAnk\r\nt/fTm+P+vqUfuuoNfhgEMZTk5XD1SRl8dR3y9eRKr6js332H5nVGdMbPvmxp\r\n11eElN62tlc6QFiCGgkayp9NkAt20nmeL3k=\r\n=W6fv\r\n-----END PGP SIGNATURE-----\r\n","size":63087,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-2.0.0-preview.11.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":"7042642341b00ab31e2e58ac4ea35d7a44682792","_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","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"graphql":"^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/subgraph_2.0.0-preview.11_1649431647504_0.44929882913669617","host":"s3://npm-registry-packages"},"publish_time":1649431647942,"_cnpm_publish_time":1649431647942,"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"}}