{"name":"@apollo/subgraph","version":"2.2.3","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@2.2.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":"cef1fee9a705f52aac22a37a1d4f6c902c63c00e","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-2.2.3.tgz","fileCount":70,"integrity":"sha512-y7SdZaDbRJXq6xQcwT5Xj/KR1RAV9cokKK0XcMIBGvXcUXdMVorFxX2pYGzxyiIM7y4qFsAF/L8+0G5dtrnkZw==","signatures":[{"sig":"MEUCIBDDqLVLDmPEDDb8TYsPDMOG4Hsr5VXJWilUuRQ86bMrAiEAj4kMssd3ltL1kdRB8YL32l7BdaFqpyUyxDLE3mb/mVs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232987,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvdG1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo3Qw//e/6WWglg8RtHHo+1Xkpgi4erWXPkm9hv4cGTQCZQnJBjzmna\r\nZf7OOV6qgh7LWsXtZurkp1lFfgix6L+FmViZ5RWC3IJchhrYdE8fE5BIVFPw\r\n4PPiRR+zhHpbO2IZQq7m68TpyYGKgQaMRT925K7LUS9ocCTLjPEG0VnwSgYe\r\nkuoHhwlVv0bXs+rSBIiUyF3ITxQ5VntDbg2QCeYEn5UFQXgvzMXqfb9ZX8Uq\r\n/0Cv1L7ED0N+jG6a9gpTK966t4RkkQQiFhhFNQDDCRTe2/DL/+ohfj7NMxuK\r\n442VAwoKUAS0x0vRvdRZKBKH66SqBj9VcHlIer0QFu0ruWBWdTqOlOb63QR6\r\n4on6ZN+RPvdvPiHqT/pPK3oI3jZToleN7u5chdv0P2iWViA14CBAMKJn/fbd\r\n3ys0uYlKJzkFsj3cJ3V0I0JkaJaaxrUwFbz0QVgr/nv4QjEIa2MiLfjLsMiZ\r\nOFQkWX8c9fvDIRCLIX2eZ50M4tMbZTg6ZTRqwMPGyRAp6BBzcieEG8az+XOY\r\nFl4nCWyeVPXWWvJr9H+W7a1269g5NO4/pHuGRa/AAy0HZeHjnLcYGzfb/6HH\r\nPH7Bq+i2z9fIXvSxxxWPXXzlhDxiavOMKAVA0jIy+LEJtUlA3DgOFs1I+ajk\r\n/L3dKUs3Oz7Z3OtrcQxEleViNewKjH5h62E=\r\n=d7s1\r\n-----END PGP SIGNATURE-----\r\n","size":63486,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-2.2.3.tgz"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=14.15.0"},"gitHead":"fdc15069d2aa9aa44bb0534111fc6af390e9a764","_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.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"graphql":"^16.5.0"},"_npmOperationalInternal":{"tmp":"tmp/subgraph_2.2.3_1673384373553_0.39143613475810835","host":"s3://npm-registry-packages"},"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\nimport { ApolloServer } from '@apollo/server';\nimport { startStandaloneServer } from '@apollo/server/standalone';\nimport { gql } from 'graphql-tag';\nimport { buildSubgraphSchema } from '@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// Note the top-level await!\nconst { url } = await startStandaloneServer(server);\nconsole.log(`🚀  Server ready at ${url}`);\n```\n","publish_time":1673384373709,"_cnpm_publish_time":1673384373709,"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"}}