{"name":"@apollo/subgraph","version":"2.4.4","keywords":["graphql","federation","apollo","subgraph"],"author":{"name":"Apollo","email":"packages@apollographql.com"},"license":"MIT","_id":"@apollo/subgraph@2.4.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":"104bc67c03088f8a14604e5c758ef92645f3b5a4","tarball":"http://registry-npm.ywwl.com/@apollo/subgraph/download/@apollo/subgraph-2.4.4.tgz","fileCount":24,"integrity":"sha512-5ltZrDNifGjUt4PLv0s/Apw+7BeZGFDvRc0TufXNQ2a5Mmz0WlMqiUtjp9jQetKRIN6nkfYlx85Ym90/SUErmA==","signatures":[{"sig":"MEUCIFGcrmaNxbXMsJdgjrlIgNOnKMEQ3RwMDFAJjjmioAEnAiEAnzNrAec57gFv6pe2wDLBvG4zG4BQXB/1KWLzdll0X9s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":105157,"size":22762,"noattachment":false,"key":"/@apollo/subgraph/-/@apollo/subgraph-2.4.4.tgz"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=14.15.0"},"gitHead":"fed24b4bcc978a12ce7154f0ac8c3401ae08353e","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"deprecated":"This patch involved a publishing failure. Please use version 2.4.5 instead.","repository":{"url":"git+https://github.com/apollographql/federation.git","type":"git","directory":"subgraph-js/"},"_npmVersion":"8.19.4","description":"Apollo Subgraph Utilities","directories":{},"_nodeVersion":"16.20.0","dependencies":{"@apollo/cache-control-types":"^1.0.2","@apollo/federation-internals":"2.4.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"graphql":"^16.5.0"},"_npmOperationalInternal":{"tmp":"tmp/subgraph_2.4.4_1684282243691_0.18401822990805483","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":1684282243860,"_cnpm_publish_time":1684282243860,"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"}}