{"name":"@apollo/subgraph","version":"2.1.2-alpha.2","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@2.1.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":"35fabc7c5ce3d56ee0563f0821b65ef8df26cd8c","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-2.1.2-alpha.2.tgz","fileCount":70,"integrity":"sha512-DjqblhhlU6v2Gawf9RWdf893gtSPUkC0Cuu2S7y66wNCnZV/P2QJoBjk6i+6bhLz7PS0mq8IoNhkN2sOSdVTcw==","signatures":[{"sig":"MEYCIQCdzrpPx9Md6gb2y0LsHv3FRCkxJdRLywXXGKKrTP66RAIhAL35gFRZkkdKUlKLA6JxCPv1UxLCCIB1HhtcMNArMUoc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":222276,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjIijFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp2IBAAorBOEexD+Ti5uXUJXZ2qi/jJf1Guy0KSSdXXFTD1Ma3OxqRQ\r\np5jNxWZZ/EFVLRiyWE6qEFE+gMd6wIDm524FP5ekEIq5ZVP7R5aY2l6/7YPO\r\n6q5hP5Qq8t3h17MbcI7y0wFEk+5LQ8YaRUZMQWSD/3UybOxrndSc1yQmLwUz\r\ni+I20oao1x/YCVUFTHA2j2X/IgA9wY+SYwZ5NgZ/d5s0KcgMg0PnRKDM6uzJ\r\n9SCUl5Rf9FzwRICx/FK7mqbQCrwTRindMMae0oEf2yQ6wnjFT79z/Om4siYy\r\nJ1sDC/T0dicoABEexYtPJ+ca3MuK9x7c1b7V5MwOkFcPgag3hAHi7/HX3kZc\r\npD4F5tkOrLtBasI2u+SR2KthsqAGHtPlY3JrKtl/jnIIpTDkIapIPJOgwlMR\r\nqzqnlDNrY51ZzLzuGlZWu9bmL9llxvPY0QXp4TjAPID//dO5tN0TnHyGY9zQ\r\n7ZVoQx39DRTI96cW2B7g5yQvs4qBuD0UYmX7HqiJhCn4/cAwg3E3t3SNSQYf\r\n6t7aJl9CdojqYd1nl6WX2WhXtZ/ElkWO7eLS8sP8/nb6QWpjDYlG8/DGMd5e\r\nJLRb6IkO+OrPvurWeqXcpR+xs5XcoxPa+Lf+yOuAcIexakSal+7XekfDMIcT\r\nKZafqUZ+8pRq6WxJoApNjpafavBTc3yRPoc=\r\n=IKT1\r\n-----END PGP SIGNATURE-----\r\n","size":62733,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-2.1.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"},"gitHead":"c7bb87702c5913f5a0ecc5c2a28d2f7228e2988c","_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/cache-control-types":"^1.0.2","@apollo/federation-internals":"^2.1.2-alpha.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"graphql":"^16.5.0"},"_npmOperationalInternal":{"tmp":"tmp/subgraph_2.1.2-alpha.2_1663183045493_0.6966456062775024","host":"s3://npm-registry-packages"},"publish_time":1663183045671,"_cnpm_publish_time":1663183045671,"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"}}