{"name":"@apollo/subgraph","version":"2.1.2-alpha.0","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@2.1.2-alpha.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":"06e8d86ef693e2237e391defaa31cd8d66f23084","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-2.1.2-alpha.0.tgz","fileCount":70,"integrity":"sha512-gJ6aJ9gSS0dAM69ss4D9Q0HRbnc2Ko/FP4kCdZMKOUgD5xitFIZT+DRZXLhXKQVmZxPXLcvM9tOy+TWKjosDvA==","signatures":[{"sig":"MEUCID4dRAbs+WkPFGBW+0FdwSP8zCALJI2eJoNCnLKccTdnAiEAgizFDBjQ732914lT3HmzPzv5YFTJkwPa0zHArCK6PKw=","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\nwsFzBAEBCAAGBQJjF30sACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmorcBAAn1ATDAyJ1cpgE/5WY5mnthnU+viA/L5UbfMCI+1lFnOqgZaM\r\nWMVTyqUzJZRl+eW3uTzmVEp3OnSzS4fCSWY9dz5HCK0TZqoQb8vmIXOz8b02\r\nbgoa+njj1Zu6X+yjj4nnPAYiexKRNFH+RWLUzUN0SvQk1kNRmeRPpKr3nXy6\r\npNRGWblOiHuFGrgwZj38u5faiogfx0ckfnkqeDy64fw3qRpE+fiO3iMKYSEZ\r\nWyMBeygf/y9M2V04cVu+P5D0Dby9MdqNqWLEctAsduTFXiK8u2k4nOCS8qy+\r\nSSzAJBXm7g2zIjJzqmm/73jwzV3bWCxYAeogxvf9mMSqX4meBbRj84zZuqmX\r\nW04reHXJW9VbkB5tqXqsBbrYqBaE/nm+XDBLJXxJ9sMmhENd6VPLhL8dPD7j\r\nYNxhUML+lv59UIyXwdun2aTfJD8YPmH2CSlVz0kh0fiVLRD7UhSfCqpXsdqG\r\nO558UV+TxOgr9H7EN+8UhQVXI2BIznv8S7dUdE4FuZaHAe9hlKs+2/BzA5bc\r\n+w2vHKqkyumgPkarqmk3JNybNo4FcNChM8jIic6LFbVWdkuXqkJ3Fia7PVAI\r\nB6aBwPnd+/LX2QfYP9pU4fENwQHZlm0b3Df/Tcb5ITJOa1K49DASLbWVJApN\r\nEkh0oj3m+G++QCvWD09fxY38WMxFkBL8Yz0=\r\n=P8tK\r\n-----END PGP SIGNATURE-----\r\n","size":62038,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-2.1.2-alpha.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"},"gitHead":"4ee2da1aaa93f08f1b9ff173b6ab9b895e3a53fc","_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.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"graphql":"^16.5.0"},"_npmOperationalInternal":{"tmp":"tmp/subgraph_2.1.2-alpha.0_1662483756331_0.7131299756067009","host":"s3://npm-registry-packages"},"publish_time":1662483756509,"_cnpm_publish_time":1662483756509,"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"}}