{"name":"@apollo/subgraph","version":"0.4.2","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@0.4.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":"f8516f1d5e5fbd57189727497ed9f805fa5017c8","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-0.4.2.tgz","fileCount":68,"integrity":"sha512-sIGzqfUryW6tS5RPWp1awtO+5CehjPV6xbDrWS4I2Hsj8rug8Y9oiMpcnNk8GaQ1TF3UEf99ZL16mNa4J++IIQ==","signatures":[{"sig":"MEQCIAw2M8iuRCZExt/HRSeerNjBTU7yIitJYWmu+8Mor4LYAiAiQyWwdf5ZmnWX2MAmxZikOK93t1I8iYIHPvufZjkxZQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":224157,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiZwaHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmolGQ/+KXi2BP/E/zgzclEM9J1cxa+BSy3Ux1sP+kIj0juHRtq0rJwb\r\nziojf9RlQSU66K9UreI+egPvtYmpYSQxYhOSOvBOBhJkc6GNXTEmYNLoPkhy\r\nfs96J+3zJZqe5jZt59FIn/LyMVYQvsy9OvPZMeuv9eDbRRAjqZbWGW/6iaBA\r\nwgkF2ydSBR9SI2P9Lef8SHAqU/NgUGazJtHDEFZHIMd58URhBk7DZ8Dv5vSV\r\nsNYptYwipB1jgG4XRZkvHv8daYx3viDBYzME6tURRMWQxl22zo04HrIZcmRh\r\n9Rwo8gUcnLOIiDH7F/9pRH1sMJ3zLVoZhVWsC4aJ1w9xLmofMSLGTVwJULok\r\nPPStoOeh8S+WtwySML37a0qJin+auBWvkS+8aK/4wW7HGSjWERoOg2JIBdGW\r\nmi4ZtxDd7h9xLzI0W3q/HTLS6w55nTm/toiXGC7AsiOadH3VLr25s0UJPrPV\r\nesJPiHI7BpFqk0g/F41ujpvphuysxA4JaG20UYvnjPIDG4llEwZF0DdYANc3\r\nJ7STE4s2KuPPUKotD3N3QBDg7y0WTHwlj1Uc+ZOxJsx3Dx8IQ36tFymnh4Ad\r\nT5FXuSk+QlKTFiC2oWHG8Fyh81FFSWpuoszfVEMQiVkhchaNpsJBiSRvdB40\r\nMXSJEkhLMDmpkPCWkb4O5+BW81QAZjZ/vSU=\r\n=1Nwb\r\n-----END PGP SIGNATURE-----\r\n","size":62202,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-0.4.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 <18.0"},"gitHead":"b812602d24dcc245e07f712c8e942a4078609d55","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"All v0.x versions of @apollo/subgraph are now deprecated with an end-of-life date of September 22, 2023. Apollo recommends upgrading to v2.x as soon as possible. For more details, see our announcement blog post (https://www.apollographql.com/blog/announcement/backend/announcing-the-end-of-life-schedule-for-apollo-gateway-v0-x/) and documentation (https://www.apollographql.com/docs/federation/federation-2/backward-compatibility/#is-official-support-ending-for-apollogateway-v0x).","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":"^15.8.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/subgraph_0.4.2_1650919047388_0.4752997190841233","host":"s3://npm-registry-packages"},"publish_time":1650919047584,"_cnpm_publish_time":1650919047584,"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"}}