{"name":"@apollo/subgraph","version":"2.1.2-alpha.1","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@2.1.2-alpha.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":"d6e3b52452859e210f6071f06b024f3fe6be727d","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-2.1.2-alpha.1.tgz","fileCount":70,"integrity":"sha512-mEYRmYFrUlrnyRLj8S5KieSWG2TdhCVFY6MKVWhoviriB3rTBMcvLXn4vTdYg08Dei9SWJco74OU1u2hEAi6aw==","signatures":[{"sig":"MEUCIQCcBjfe0IfQyBrg7RXvx+C3iqoeVRoTlakyG0oulaCnrwIgRPhzlXYboVSLNRPgAiDxdr5jXIk1ZI/kXTecbTc4taY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":220094,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjH2GvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrx1g//dFWB9ZRjjNs8dPJyys1vhNHRFE855NuBDisE1JjUOClvhqzi\r\nQIcSmcl8J3gpMTpGXNmJzT2Czft1VpwKzUtgmFA97eC6HXKEuEPua9Z3GlRm\r\nbib4XiIvdDz0O6xg3zfE3UKeSooRFnqqrR1yCA/Cfy6u5ntRil8K6gd/bGA4\r\nUHJCdmD59M3Vo+8QsrZMP2ecRwkO+yj4DiWLCbCcAxScu6dYr9r0Q0oaEXnq\r\nRJLV75QIVadIdHRrHCeKzzI9n+9f2jfhQAMfBeaCd6+UNttNisrmJZhlUBo8\r\nYnHEQoqhgVcfdMFF6ioDuvGVR1fiu2vOPY3snFkroWMlRVtN1wRhueKKo8Mg\r\nUAQvULszoMjfVhKhLbeU83DZ7tBDexnBxQY3JXhWR92Mf1qaeBb0ASIyx6uW\r\naMGuBMXCMx4r/tpje0JZtk+/Z5WIXTMaLjejvOJ4VPNLYov+WvoF3hu/lDet\r\n3JO47QyYsfV1UpPhNyTWbKJZNZRJyHzt3TkUfy3rwVOEKDqkhOaG5OnAix05\r\nW7DrfljQKfVp+XHkITMztqZQAD6zlLhpPARMJnrpmqBJbUYrDx2SPUllOiQC\r\n2Ro0k21p59ZzTeyDlzdPCH743cUiXt2svoPDJ2VKy60N9F10WyG3vXDf0/4w\r\nGB4CkxE0QySWvVgaocAr6TEI97QXWVqCX9w=\r\n=TEYE\r\n-----END PGP SIGNATURE-----\r\n","size":62040,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-2.1.2-alpha.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"},"gitHead":"d4da310a8aa3ef93350a3de0c5a32692bb2d8e0b","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"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","@apollo/federation-internals":"^2.1.2-alpha.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"graphql":"^16.5.0"},"_npmOperationalInternal":{"tmp":"tmp/subgraph_2.1.2-alpha.1_1663001006854_0.8767349543256167","host":"s3://npm-registry-packages"},"publish_time":1663001007052,"_cnpm_publish_time":1663001007052,"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"}}