{"name":"@apollo/subgraph","version":"0.5.0","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@0.5.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":"35dd3649d0450ac4807071db0a4b752bab90cd5a","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-0.5.0.tgz","fileCount":68,"integrity":"sha512-CKauhGL+ghlIZ6zV+P4+s16jP/i+mKCROmEd7lKbu3RdWW6GmSu45EeDy96uMHlK5PsIUfBqYnsoS+WaYL0P5Q==","signatures":[{"sig":"MEUCIQCf2698n4AkNCA3nr8xN7P3aUvgLaGe/9e++S7sqMbpnwIgEUpnZHABsKuA1b028eBU0g8leJHhAejQSEcu6fNyIS0=","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\nwsFzBAEBCAAGBQJi88fcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpCpg//YMbjJO+2AsoqKZhBDlctcE/u80yl9hBkXVn8C5iHeAgMksfA\r\nvohOXHPEngk/ZUQW/Y3iTTdKwi1P7iFA82FlxDCRp5MqZ08LW8GGtrMLF37/\r\nPWuZaNpJFW/87oWr657VvoeWy/XyADlxf+TbldDtApgPRbB1hIGS3ouMWOag\r\nMN/oYYyXZMR6DLFu6aIxLPn2x3CfebCBe/uRMLehbx6xbP0eSrTUBRnuob72\r\nwNdhfEkbz774SMXBr3g+0T+KpFBC07BOv9LaGEXztnxULkfRUAXyEG5nSaqy\r\nZBEiojHzxxP1jm9/HHPmTI4xnmpL/J4DzlLtuEBvIt9lhN99vks1oLpf96Iy\r\nQn6dl+NG9VKJt9lMeSub+wALjf7/As3F8rlO73gljfVkSgk1dPGarih3ff3Y\r\npUEOtTzSEmd1RYIVEwXcCvOreSDwBz9eCZH72p38DDdFGMxzbSSSgK4lfXQA\r\nNTlCkmHd8VDVhjngLXKfe6havmzfiSfgAxGXwR6AQpoAFxZaJaCALSvNJGGc\r\nejkYlaGS2HpoNR0RKIwcZAZPy8kyjKjrHo21I1a4b6W1RI5pUCXC+ZeqMNh2\r\nseXfR3HNYKWYCn9ZvI4L76hBO5uP+SEKmnJ9MBM4GBWwT48S4NWPK8VTwSxs\r\n/y/qdtyGwdkFmELYVh5GBASwZxXTlKZXQug=\r\n=LGLk\r\n-----END PGP SIGNATURE-----\r\n","size":61791,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-0.5.0.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":"302ecaeea4e20a4d594b92b94499d9e156f4cea6","_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.0_1660143580683_0.80214560128653","host":"s3://npm-registry-packages"},"publish_time":1660143580857,"_cnpm_publish_time":1660143580857,"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"}}