{"name":"@apollo/subgraph","version":"0.4.1","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@0.4.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":"7bc4f0a133a8558607b99f83138cbb313fe39b42","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-0.4.1.tgz","fileCount":68,"integrity":"sha512-4tm9sY/aYGwB20xccVRJiLupEpEhXBbhbJNlpqigtXnE6A5uQvvKn7qgDdZn5fZr6rw4kX5N9lLSliU03QwTfA==","signatures":[{"sig":"MEYCIQCzVgnqQUwDpSvCrAk2kVR2FszntcQbjzonemnPtSKV/wIhAOhs5VLFbIwqZ484AGHvwIu34Fru7MlL/co4r2Ny3F8x","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":219562,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiVzbrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoy0A//TQOkkgRelbqN7c2JyU85fM5YCtqIyrFKEAHWuEUEjxIau4n3\r\npwWiJ8QtPZ+cL5zjeXWhfltmEagLN220eiehS0aL1ZeFHvfTrSAvcsLzgoA9\r\np/3AmOsJ/zZt/zftl4HitExhO5HGIo/b7hOnGXlm2G1JvEaIqMawBU23ylzg\r\nSTxBF8+KHC5ThV1s3QSxYqCcS3vsiUFuAlaUIAQIqn7zQM2nVnj3i79+q20R\r\nZX3Z6cZo7GjoAu+peqFhkNg8cyE/bRlNy8F94eebA7J+CTyUPqIizp7iCo4K\r\nn6SBMgu2Df13xwlChMSHTZ2Pi9wXZcDT1Ybh2W4wiE4/+kvRxi/rPGDuLOiP\r\naTNyzNTZyQLTzr2KKShHO8jL3bQ0jYrfjiD97rsc/IrRVVQgUXkwOg0yoIYU\r\nrYBY7mS3onpNcr8JanijECAY9YBkhE8fGyTUdrcqy6S+ozYuS8srfYLKLV8Y\r\nb0ICrBc9qlnWeDjD/K6/sLbOlqLpJwyDluZboCdtL/PQ6q5M6pnPFfPClPNU\r\no8lLph7EjSFcquaKOrIjiMVru+5PqrN5ZaSmSEmIsR8wX9rLRjN357MYn2oF\r\ndNXDtxZD3y4eJs4vtnrjImnJS6ZzYxqCMaP4H6F1eARGl7cEl8s7tqzbJ6Uf\r\n4siRpkBOK/bxu4kGT4eWsyewA2fCbYl6xPw=\r\n=et5d\r\n-----END PGP SIGNATURE-----\r\n","size":61380,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-0.4.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":"34ce971a02eecee62fcdc91deaa63d2ce6564d95","_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.1_1649882859564_0.6647489939607045","host":"s3://npm-registry-packages"},"publish_time":1649882859754,"_cnpm_publish_time":1649882859754,"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"}}