{"name":"@apollo/subgraph","version":"2.1.0-alpha.4","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@2.1.0-alpha.4","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":"9ab2a0a0f52b8f3700f0d31662f83c58fe9462c1","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-2.1.0-alpha.4.tgz","fileCount":70,"integrity":"sha512-/n2NZZVNh2ubmZAl4Su9BFM5uSNi2DxEUEDSpVWKOq56CUIQhMVhMzA808SwJCJGCNeEjzW+97OyaqMTlUIxAg==","signatures":[{"sig":"MEUCIQC7zvdcFp0wmI2DBvspxcBEpS3SZ65c1h0RuUxRoBeUlAIgBS0GnIXXQrZlbn6XxFH2EN/xJQUjBU/SuKWMncq1++E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":220087,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi9qGlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqRGw//aK9wSQK3kHoh4la7xAxJkivdm+km/ApKiFax5TnRfjm4149y\r\naltowjnLj+HqODJWpQKr3qVAASAC5+p2Rmv4SDuKIdlcKqIXli/eFgZtz2bI\r\nRBjHlZ49z8M8jPXfHul7Lvj96jOm6zIMWu1cq66MCdxfRePf94UkMESmBPe4\r\npdJ+tERHHj2DnFDi2cQ69IA5cW5SzCiU3dyHZx1eV3OsUWs6/3LqA/LuJYJe\r\nJgTBZhMLJ0klBclYav2IVL0iFw/BOLxubpGe+8xJfPYCYcnzsVJC69qpdkeF\r\n0rrgCa1viA/5bIEGB9Y3svuCGFbZdeFjSLKgY+YcuA3gpG8tsI0/QsVm/wJq\r\nL72KYRfNdXpbpnKqcDfVz5dYhqkaX+o7i7VTdslfazgFlRbtfKUrhy4sR7h6\r\nafUJQ1Ofj99K3drpPWZFT9Q5MNv3u3T01ttWmnhAfGTkNGhhoGFhGxqH39vD\r\nXRY+SfSdRFqbQ6yZE8eq95GXmFncp2XsEBhWJF6/58yo0y8CMgZXmQUSbm4S\r\nZr6NCofWD+eZjPby0u2xHGcFVvIkvpEKQJ8D/a3Ny9GB5UsbklEXaUC8RMdq\r\nFZ/ZlLJJGZ942Som4OCindtpz6R1uzt+3omrREFvekvQrADKbi7UCJFqbThC\r\n+k4WusBQzwjWow2MuDzPIp9Uv76t1/0dfqU=\r\n=aJ30\r\n-----END PGP SIGNATURE-----\r\n","size":61993,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-2.1.0-alpha.4.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":"db61f574cc2ee95a53dac8b95a5a320f8caf6fbc","_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.0-alpha.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"graphql":"^16.5.0"},"_npmOperationalInternal":{"tmp":"tmp/subgraph_2.1.0-alpha.4_1660330405571_0.9924059396623675","host":"s3://npm-registry-packages"},"publish_time":1660330405788,"_cnpm_publish_time":1660330405788,"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"}}