{"name":"@apollo/subgraph","version":"0.5.1","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@0.5.1","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":"9d9aabe69bc61e13a510c19f50c6aa6e741a6ec4","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-0.5.1.tgz","fileCount":68,"integrity":"sha512-pj+igKgdpmTfgUmscTNuVdLip8WZ8jFKS5FGb/tD2hj4xPwaQ+MfszLsuNfoytp7d63PdLorIndxcHCW+rb7Dg==","signatures":[{"sig":"MEUCIGDmjoslzcFvhgSMaxgeVv/cfErqxqriwf5l8xFdcJofAiEAwqRahdM59md/dqGBLnaguZ1urk2LeTIYl16stqqEnns=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":222841,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/oogACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpOvw/+KbbVpnYcZu+DdDFqBRaLUThEckHbfA4lyums1luJ4iAdE1dB\r\nwIxltGAhszm1SiKgjC0DEzyq6nCH575MKXJCf0HCYHnAXPZ3t4vEJHpvMRuc\r\nhuYOUQvmh+dvjDs1g4JQSXB2igtR/f6SoJyTpXYt/oQ+reGgGkEgE2OjAWJn\r\nc8OtBmXieXYOTNuTlVez4fooa+Rs9BhI6FpUSlIQGc8GDiVHL4enK0ChyCGv\r\n6nT72WXqyUl4ctvNWV4QX+JFB3PgXvcjtyhFPGDuLgzbN5kqbiduD63Hw0ac\r\n5oGtXnwyYRxTR5v70KEqWLfAHJZBAH0HJKEkf4zxygEQHMkCsG47UY8heJuN\r\nKMsZzzFTr/llFJXrMqbWb3XS4hjdnPaOgOPy05k5h7rfS6zUPH300+yIctIN\r\n4b6sDgfNrd3x4LVIKca076cL33xJRFfCD4HTh87RoGIqlnMsYAi7aXC3CNPY\r\n8tryycrE61vp9U0x21FWXybly0yr5nbAj1OYvRrEwnypYXizEiMXR4iRBLv/\r\nKwA0gVbwvYINwf+4/r7MKdvZge1gJYkRCCXvP52Ul/sE5dmldE35Yj5pqo4m\r\nl+Hr3YMYYNhbHRVTiyiP0rG9GyK1cXHFJ7jV+yVQkiUMbljh/4vxG/1YR66l\r\ngfTqraaOa783klZvptlqC1ipNeNQWqZZmIU=\r\n=zx7l\r\n-----END PGP SIGNATURE-----\r\n","size":61792,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-0.5.1.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":"93459ba00f7ad3b4df8e6150cc6d4af5901b8bdb","_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","dependencies":{"@apollo/cache-control-types":"^1.0.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"graphql":"^15.8.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/subgraph_0.5.1_1660848671677_0.7469790626005435","host":"s3://npm-registry-packages"},"publish_time":1660848672059,"_cnpm_publish_time":1660848672059,"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"}}