{"name":"@apollo/subgraph","version":"0.2.0","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@0.2.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":"3542201b6dd50bcc0f472ba30d0b59cebaabdd06","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-0.2.0.tgz","fileCount":68,"integrity":"sha512-nt6A+hFnvxTUm1Y4TpTD7qPHTHfBEY0XOV6D9yTo4qmxkbjMcqj71zYGtY9m7GjPTeOCv1/5JPMhtneUrg6IzQ==","signatures":[{"sig":"MEUCIF2TtT3K5c6+q1cyVP5bjJFS2Gc7h7Li+4UvH2trav0zAiEArNfcXFReyIaTuR8hGcqcWJ+4fBbZVaoX/JI2SHu0FG4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217993,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/Be+CRA9TVsSAnZWagAAfpMP/27ESk24EH/hvnRFPNqt\nL+5JhzjopVzCnOZ6phu05Qbb/InschiPjYvd1hYOjM25IQWWBXBODtxOGiFk\nJkxhbvdgghVAaF16dDdBfhfYEFpfFh7s4YLbHZLtGnFp2DWiMPge22uhaLtO\nqL4AT1htQ13WFbaeoIOSxO5xKbhTLBiGsbOxELFITlLn6Sn+/ekyzKSNRNh3\njfqprkUoplZa0dUYdlYkatRsWrS/Aot+cV39gjI/HIwuyQsZy52rBsrc+BrJ\nhPl35LXfnqiUhKRsTpZsnjXuC2VjVjgYwYtFoBZBztgMCG0KmkXLzDcAZeT0\nBTYCe6dZaixgWQHyrqg9vr4gbShX+H7LLi0hDE/HvnpiDC1VfU1xMD5Fgxo4\nIkrqtJomDUUM3VB3O9EQZE9Idx4DLMLHXw2hdqlYZnu8UG+hqUAstek9sKyU\nvqeanrpyhA63t74XyZg/qZy9IhiruLja4ig1Hv6tjO5VPM/ahAXNDVJjnt4y\nJHWoLnXbAmD42pVwbtuaOxcmLEOV+p9SadeDxMY4HqwH39xxXOFAvzJUWDOp\nWO8mwUuRgpDNJKrpVYHt+OUUNp7ycCtC02H5M/tc6ACRfrP74mdg2f8WrI2q\n9BDJQ0WgpbKj+RLJeZCMt8DAnhx/7S7+vrMY66Orwmuneo4GOS/3oo02eVsS\nc0xf\r\n=IeOL\r\n-----END PGP SIGNATURE-----\r\n","size":60800,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-0.2.0.tgz"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.13.0 <17.0"},"gitHead":"55189c410aeaaaad63f97c8bad4c3f6232fc9b5b","_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.5.3 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/subgraph_0.2.0_1643911102815_0.7932316573746325","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":1643911102968,"_cnpm_publish_time":1643911102968,"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"}}