{"name":"@apollo/subgraph","version":"2.0.0-alpha.4","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@2.0.0-alpha.4","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":"4b44d38d9b412e9be3a90782ae040a8816162a57","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-2.0.0-alpha.4.tgz","fileCount":68,"integrity":"sha512-i6b6J4hcznafjvYujcKxV2Y+jSRhgusL8+LfvAzsfyTBajZaUu75j3HLqz6d9M44GKeDKDiUsY4B5yTYp48vvA==","signatures":[{"sig":"MEUCIBzK9v4zjatGZGBMloUmWJyU8R/dcT+iAn1pXqZ509S/AiEA2y7q5dVM5p0yENUfmrKJHwbNJk6hvS2g8XAffbMAFsk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216505,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/E4xCRA9TVsSAnZWagAANQIQAKIfT3CiBH59rvgTW9sd\nyQYtu48b1eV1X5TVE0U/IRkF3o977mvRD8J+59Srx0BDRgOFycpYIl6IN/zQ\nMDazdSVLR9kweBHC1FmyUrJ/ZY1y1BoQXx8cUj26AauJ5oidB+fAJWT7u+J0\nm52a5Hy8TjJ7Q0Y500QW+VusPAplYiDNGOabg5A3Y20MT0vPJOaRSjdJZJHG\nn9ZqpOFdUfMOadze/UhNPIjNCsuMREL102eUCfWYP11DQzlKYuR4WHiVVV0S\nq8YWrT0SxNlJBniSyXGHR77gvCJGU4OAICrVXnQyDh+JsGFv2UcsExgmOSPo\njMg8kiIaKe4+2IxAnpMmZ2LYIFc/ORz3WhVSpzOHS6/+qIHuC1eqmMXHjJdV\nGrfrxjsi/UnOYHDZueoCNKxSPTUMva+cGOO6gsjb9+31hqHI61W1M3EGrHI8\noALXChtSMVkb0HsA4gLT7WFhcm8KIufw5IDRJUxb1OJyl0FovaDJYTTn76Xf\nvu4ZgTR7bgMLChGFpV2XxMDY6nh2GEi/s+hKj20sKzyeugbgbEi/2nyUoW7m\nFGKNJ0r+T2lduGK7opItMD6KfMTq90Oy1rI307hrh5i4U+jGTPsLiGe3RXl9\nuET8Vr3e/hOdmbQj3QUuybvx+gq7Y3tWRegvPHfGmT0j1jcWVW+AjKqnfOPD\nell+\r\n=3h3B\r\n-----END PGP SIGNATURE-----\r\n","size":60794,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-2.0.0-alpha.4.tgz"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"# `Apollo Subgraph Utilities`\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/apollo-server/tree/main/packages/apollo-gateway).\n\nFor complete documentation, see the [Apollo Subgraph API reference](https://www.apollographql.com/docs/apollo-server/api/apollo-subgraph/).\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```\n","engines":{"node":">=12.13.0 <17.0"},"gitHead":"efb50aa3d3742d2fed8c841569651b2b7b729f2f","_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-alpha.4_1643925041190_0.9069805672334985","host":"s3://npm-registry-packages"},"publish_time":1643925041557,"_cnpm_publish_time":1643925041557,"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"}}