{"name":"@apollo/subgraph","version":"2.0.0-alpha.3","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@2.0.0-alpha.3","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":"52bb97a51c3bb99415cac889377c33efd9f0d7e4","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-2.0.0-alpha.3.tgz","fileCount":68,"integrity":"sha512-EMCbWrNK8OqVpMilu5biSbrwrsYjAt+ez3qaSreMH8wNBTH/6mLHdW8GYzV6HCSKwVsZR2SfydzH3Y0Tmdyjtw==","signatures":[{"sig":"MEYCIQDQaKTWd2Ex+Ip6nfs04BgY1WfnFxJLWcbwJpnd2KhYDgIhANlwY9vuK8Z78JJkL0UMIVq67UJwffkBYG1PYsGR8Kva","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214273,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4e1WCRA9TVsSAnZWagAAulgP/31tBgW2QMMGE3zEe+1I\nF0h0aMUrTSQBWTRQWdckf8kN2GaWhHKQjibMGRGkHZq4s1qQJ+stSrGzAVUY\nnR1wQS7EDIpVVrhXbHeMnv8iAzuu+AJmF5t9rakmk9xiyQeebw1FtJ/vuL77\noF/YRr+yxWFIE/MP1bgU2q8UE6pb0NLqYv2gMB9qKsDGarSJ/L9HZQMk6qcr\nbbYYwkh0PFnpS4E3eg0UBHvcUh09ZoExrkI38QmYsghkmJczv3SOV2/0EiYJ\nvMTMxVtYiFlRHerKI9+DwJJMmLO463g5qKbsen2NRIGaZkbS7r7k+WqXBpIu\ntBbNVo6NqABbhN5F+EH3aSMJ8+J+biU2I12ZRFsSErK0PH1I4jEq/uieVJnb\nkCB3X/mYMs3FDouR3Ymn2TDw7lx2VGHu9d7ZSIxda0d1foVV5OXEFaY4Vi2+\nSOrm4a5JSJ0cfsZjG6vhiHt/e/n2pN/WDG3SXRvmmNaeIpnumLjEHzQjVwMr\nMog5pC5EMyMpHIRfIMVMfCkEf9q1d6pmcQXrUOtx1r8aeKAo/Qvql+5jbL4+\n7DB3vLnxILnBvhwyNlAVuojBIGjYNAyR9k5csZQOPLVYz3ihCulViKrR/cst\nyZhJeEpKLVSemPbn7T7OoFtxTTc7BNw0Xk4bKBR/Izhb5E1LbdeLJBhsNqFC\nW7xv\r\n=/dVn\r\n-----END PGP SIGNATURE-----\r\n","size":60216,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-2.0.0-alpha.3.tgz"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"# `Apollo Subgraph Utilities`\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/apollo-server/tree/main/packages/apollo-gateway).\n\nFor complete documentation, see the [Apollo Subgraph API reference](https://www.apollographql.com/docs/apollo-server/api/apollo-subgraph/).\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```\n","engines":{"node":">=12.13.0 <17.0"},"gitHead":"c32794a48598bac2e2372c23a2ea74ae187cce85","_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":"^15.7.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/subgraph_2.0.0-alpha.3_1642196310512_0.1528394723373825","host":"s3://npm-registry-packages"},"publish_time":1642196310781,"_cnpm_publish_time":1642196310781,"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"}}