{"name":"@apollo/subgraph","version":"0.4.0","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@0.4.0","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":"4c6fc2bcc03b1715e7bcb7071f79512f3c5cee1e","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-0.4.0.tgz","fileCount":68,"integrity":"sha512-Fg9XGaXpFP+X2J5HswIin/0ksmZShdukBtmtbMgvxJs7wfStlr+7m8gice4YSXYm/nu4td+UxUAfaqUjLYiFbQ==","signatures":[{"sig":"MEUCIQCbMqlp3E1B8aHH6EKs+/m4XBgJcn9YmOOO8XTgMVWqhgIga9ZDhZ+DgSbqi/pKn3YOawXrJkLxdPGtbUhTqe7u+pg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":219411,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPh7YACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmryig//dnnJdhixT/NuEuYVDqNiPpa8xW04ucyElTAITIKizbs9UNkq\r\nhH4XMOQQN4b4FrvMpnJr4zpOXjBsoQHYfOUXJLiHgKM/cLzjVBqILa3IBwK5\r\nA/mMqCXJ3/MqoraN4iZFVZEUtINHHUvUMNscozW1v23/nnH+y0H1uLK/ytOy\r\n5BIovNkJhGfKaqHqSBsrl2be/ReImXY8H/pdGGc3ARHc7WVjRjkDkyNKbjVN\r\nXDtZq2n7mS1Qbf0dTsM7wIecHdB1scQoKGYxdntNORtvHKiG5nrkWFYPmazc\r\naSR7nrmaOCapKcQpeuvaH+Hoa1HE8ZuchLcWF073CEZJV7mvYw2HMVde9FJy\r\nPPN8w8fCilDnxycrr9tLeyeOH7rdlOL3iCyAha1cMYRhalHxtJohaAvB02Z2\r\nmumZ89QrTz+vpcgWkcj9wtzpsXCqVT+UXfkChqduzZZlyjgbcyuDjZzZo/y7\r\ntph+W+/iFje9IYBm9q4CH8Hn9+xGSooWdYJIlfnWvD6IYS48XXsuFqIGgvRv\r\nG9SrEHRHyiVeVF70+XGJy8koutrhMDdSeit8LuoGhD6WZxZ2q6kA2LOgSamO\r\n0LVUDn2B51vkv6OSKVTvWFEK0KINC54m0/S30tqvXgdGBFdO6EQRKipkT51s\r\nCXb9jMwOMRvsZnlw4nny5A5BQyhJowRRfKc=\r\n=iY5e\r\n-----END PGP SIGNATURE-----\r\n","size":61330,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-0.4.0.tgz"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.13.0 <18.0"},"gitHead":"60defe7f8eb227325462d1a90d0ab1a9f21f13ea","_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,"peerDependencies":{"graphql":"^15.8.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/subgraph_0.4.0_1648238296528_0.3049912369893564","host":"s3://npm-registry-packages"},"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\nimport { ApolloServer } from '@apollo/server';\nimport { startStandaloneServer } from '@apollo/server/standalone';\nimport { gql } from 'graphql-tag';\nimport { buildSubgraphSchema } from '@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// Note the top-level await!\nconst { url } = await startStandaloneServer(server);\nconsole.log(`🚀  Server ready at ${url}`);\n```\n","publish_time":1648238296698,"_cnpm_publish_time":1648238296698,"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"}}