{"name":"@apollo/subgraph","version":"2.0.0-preview.7","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@2.0.0-preview.7","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":"aa6572cba8edaaf9f412c3efd346220dee9038eb","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-2.0.0-preview.7.tgz","fileCount":68,"integrity":"sha512-HHu0oJ8SoaJ+EQuGQ5cvpzMAB1NR5l7D9e4sO6EPsaQwKjs0A8NVJwuwpQzolVpos6CUVYpgAocsc/gd1292Wg==","signatures":[{"sig":"MEYCIQDsM6woJ2m+rFLU15tTEQCMHnb6bnXg9S8yyCZcUvky1gIhAJXEIKHY2VxczXLQO2nY1b8HnDsvLQ66DyyisRIviTzl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":222359,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiMMidACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoRnBAAgPv2+n+by8TxN0LbRNAz9tYnIj6hBsNy35OjqpRbQI0Tc6mq\r\n24uDODFmx0aTjOPC0qERlFh0Yc54eY4TBHgusxZoRA7geNBzORU0SPIPGg6X\r\nkZjmcy1WYE0L/c3uBkQ0qtf/zmQPla4V+CkyvQ8EimuYw2ewu+tfNQk9iAN9\r\nDUrLLemAarCG8jWBFsV0gSUr6TQKhWtSZNOIvgTym5Zofeg2Gh2IOOcff7An\r\nTt8pBgzduTpGLn89T6paExbQX9hKluZjXXDWsmjGVEHZaBViEhR9QQgaI3oa\r\nfTPhrQHfqgGsUqIebrZgblY3+AYp/eP8hNujo/WxKzQwa2Ds588p2/wVMs0f\r\nOcgncdY6Pkbnqjoh77nr1c/LQx8fp/b3z3anMINJU2RlOEWTahCAReseJUlN\r\n5+5JufUx0LXx6LIW+zNQi9B+VMT3Y3LQtzgspOgowq7KFNsTamAg01wcBXKu\r\nX8l2rdws6fS277QG8rBjIbGpZzH3gVh3Wj/PmSenb1XFMlS+7p0/TeVE6WsI\r\n/CtyANxWKOAm5Uj1bNeSMqiCuVo9OJvCo8Kx8lMo8rDqdlmovkJE0dsUyBhl\r\nP8/bi56lKOuLxlhejpw044HOIuUt8C+pvjWsQSRYDMhrw/MphihDQuk1Ta5C\r\nRvGF7ZSgLqzAOYWT7cQFFU7SH9mjgDeUUEE=\r\n=aKky\r\n-----END PGP SIGNATURE-----\r\n","size":62517,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-2.0.0-preview.7.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 <17.0"},"gitHead":"8572831c6abf87749ba60dba161ae3ce7fb30ea8","_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","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"graphql":"^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/subgraph_2.0.0-preview.7_1647364253731_0.4665166712421951","host":"s3://npm-registry-packages"},"publish_time":1647364253889,"_cnpm_publish_time":1647364253889,"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"}}