{"name":"@apollo/subgraph","version":"2.0.0-alpha.6","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@2.0.0-alpha.6","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":"efc0ce6f634b22848ff08f311cd16a49823b2d57","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-2.0.0-alpha.6.tgz","fileCount":68,"integrity":"sha512-Kx8Gfhw8OphcEzdiXfXAbSIOidz41Wxom+D1WEeoryqGV66L9CFQX3nAkCFD4jRBo9WhupQw4/nKQ6qZMJIBRQ==","signatures":[{"sig":"MEQCIBnF3nfrf8V4Z3IpIlO07mgw7JEXGBdTfs5+yd5PrvafAiAr1peNSeuxsknU/1gyFH0rLMLXLwLi/DwQSjSTFNiNzg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216743,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiCjmACRA9TVsSAnZWagAAEhwQAJ1yss8gtBHadxOsSogH\nm65RFM4jhhmBcJnrzq0vmJtq08X59s2a6jppUbRocM4CmPLpC8LSs1PiL7iB\nfpjNG/9lV6VnfLlaB//HBzjSD1S7ygVOf939a/dV1scj/Dhc+HVY70Rm9O65\noN9FUbwnn1HI/FA3Ji/GV/ReXaFZdAubeONyOhjSZ0BfPpN+3eWLuBwTuPDI\nJKuLq7OHLRvvdxeir/IER3qrCkfgEm3O7k3fkYCubUYRdzm8PdsS+UqMAfw5\nCgWm/egQGIv1pqMVKnkvyToXKcOv8mseITsYzazOZ9qLxF22/hCBgr5jnQV2\n0TEEXIodCsOzcmxbOVs+b7L0w4SFH+KFuXYgbvFq5b3GT/TOPUiJ2/ogQlNL\n+WWu+3xpdz/bglamiLBss5/GFOfq5Zh9tFCgw4CwOzhjM+0cklKwG8BGf67O\nkf6CGKaRuRIKAoo6yPNvB6QI7hlMnoR/ow9tD3FTuD4ZQOfAxPTtHqHtrSLb\nNtPMTrlyF45wPd3UZy4iaM1csLcV3x02K2yt6WEWj6cwLjgipMNnefAzJmwj\niSY3/9pU6HK12UZgz32eKfrA7jy73rNroj6Ic2G17+LPJGy1BI3D+nFhv1J+\n09N1ga5zYqgY/jn5D+BCG+ci76s3Aab/cwjUwCCaKSphwoVrYv2g8AAubT8l\njChL\r\n=1axl\r\n-----END PGP SIGNATURE-----\r\n","size":60850,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-2.0.0-alpha.6.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":"ee84b3fd9df161c3a94ae3d70e82a14dba5794ba","_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.6_1644837248403_0.6059293152836502","host":"s3://npm-registry-packages"},"publish_time":1644837248579,"_cnpm_publish_time":1644837248579,"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"}}