[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-70664":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":34,"readmeContent":35,"aiSummary":36,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":37,"discoverSource":38},70664,"apollo-server","apollographql\u002Fapollo-server","apollographql","🌍  Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more.","https:\u002F\u002Fwww.apollographql.com\u002Fdocs\u002Fapollo-server\u002F",null,"TypeScript",13938,2006,193,57,0,2,3,71.21,"MIT License",false,"main",[7,24,25,26,27,28,29,30,31,32,33],"express","express-graphql","graphql","graphql-schema","graphql-server","hapi","koa","node","resolvers","restify","2026-06-12 04:00:56","# `@apollo\u002Fserver`\n\n> This `@apollo\u002Fserver` package is new since Apollo Server 4. Previous major versions of Apollo Server used a set of package names starting with `apollo-server`, such as `apollo-server`, `apollo-server-express`, `apollo-server-core`, etc.\n\n[![npm version](https:\u002F\u002Fbadge.fury.io\u002Fjs\u002F%40apollo%2Fserver.svg)](https:\u002F\u002Fbadge.fury.io\u002Fjs\u002F%40apollo%2Fserver)\n[![Build Status](https:\u002F\u002Fcircleci.com\u002Fgh\u002Fapollographql\u002Fapollo-server.svg?style=svg)](https:\u002F\u002Fcircleci.com\u002Fgh\u002Fapollographql\u002Fapollo-server)\n[![Join the community](https:\u002F\u002Fimg.shields.io\u002Fdiscourse\u002Fstatus?label=Join%20the%20community&server=https%3A%2F%2Fcommunity.apollographql.com)](https:\u002F\u002Fcommunity.apollographql.com)\n\n---\n\n**Announcement:**\nJoin 1000+ engineers at GraphQL Summit 2025 by Apollo for talks, workshops, and office hours. Oct 6-8, 2025 in San Francisco. [Get your pass here ->](https:\u002F\u002Fwww.apollographql.com\u002Fgraphql-summit-2025?utm_campaign=2025-03-04_graphql-summit-github-announcement&utm_medium=github&utm_source=apollo-server)\n\n---\n\n## A TypeScript\u002FJavaScript GraphQL server\n\n**Apollo Server is an [open-source](https:\u002F\u002Fgithub.com\u002Fapollographql\u002Fapollo-server), spec-compliant GraphQL server** that's compatible with any GraphQL client, including [Apollo Client](https:\u002F\u002Fwww.apollographql.com\u002Fdocs\u002Freact). It's the best way to build a production-ready, self-documenting GraphQL API that can use data from any source.\n\n\nYou can use Apollo Server as:\n\n* A stand-alone GraphQL server\n* The GraphQL server for a [subgraph](https:\u002F\u002Fwww.apollographql.com\u002Fdocs\u002Ffederation\u002Fsubgraphs\u002F) in a federated supergraph\n* The gateway for a [federated supergraph](https:\u002F\u002Fwww.apollographql.com\u002Fdocs\u002Ffederation\u002F)\n\nApollo Server provides a simple API for integrating with any Node.js web framework or serverless environment. The `@apollo\u002Fserver` package itself ships with a minimally-configurable, standalone web server which handles CORS and body parsing out of the box. Integrations with other environments are community-maintained.\n\nApollo Server provides:\n\n*  **Straightforward setup**, so your client developers can start fetching data quickly\n*  **Incremental adoption**, enabling you to add features as they're needed\n*  **Universal compatibility** with any data source, any build tool, and any GraphQL client\n*  **Production readiness**, enabling you to confidently run your graph in production\n\n## Documentation\n\nFull documentation for Apollo Server is available on [our documentation site](https:\u002F\u002Fwww.apollographql.com\u002Fdocs\u002Fapollo-server\u002F). This README shows the basics of getting a server running (both standalone and with Express), but most features are only documented on our docs site.\n\n\n## Getting started: standalone server\n\n> You can also check out the [getting started](https:\u002F\u002Fwww.apollographql.com\u002Fdocs\u002Fapollo-server\u002Fgetting-started) guide in the Apollo Server docs for more details, including examples in both TypeScript and JavaScript.\n\nApollo Server's standalone server lets you get a GraphQL server up and running quickly without needing to set up an HTTP server yourself. It allows all the same configuration of GraphQL logic as the Express integration, but does not provide the ability to make fine-grained tweaks to the HTTP-specific behavior of your server.\n\nFirst, install Apollo Server and the JavaScript implementation of the core GraphQL algorithms:\n\n```\nnpm install @apollo\u002Fserver graphql\n```\n\nThen, write the following to `server.mjs`. (By using the `.mjs` extension, Node lets you use the `await` keyword at the top level.)\n\n```js\nimport { ApolloServer } from '@apollo\u002Fserver';\nimport { startStandaloneServer } from '@apollo\u002Fserver\u002Fstandalone';\n\n\u002F\u002F The GraphQL schema\nconst typeDefs = `#graphql\n  type Query {\n    hello: String\n  }\n`;\n\n\u002F\u002F A map of functions which return data for the schema.\nconst resolvers = {\n  Query: {\n    hello: () => 'world',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nconst { url } = await startStandaloneServer(server);\nconsole.log(`🚀 Server ready at ${url}`);\n```\n\nNow run your server with:\n\n```\nnode server.mjs\n```\n\nOpen the URL it prints in a web browser. It will show [Apollo Sandbox](https:\u002F\u002Fwww.apollographql.com\u002Fdocs\u002Fstudio\u002Fexplorer\u002Fsandbox\u002F), a web-based tool for running GraphQL operations. Try running the operation `query { hello }`!\n\n\n## Getting started: Express middleware\n\nApollo Server's Express middleware lets you run your GraphQL server as part of an app built with [Express](https:\u002F\u002Fexpressjs.com\u002F), the most popular web framework for Node.\n\nFirst, install Apollo Server, its Express middleware, the JavaScript implementation of the core GraphQL algorithms, Express, and the standard Express middleware package for CORS headers:\n\n```\nnpm install @apollo\u002Fserver @as-integrations\u002Fexpress5 graphql express cors\n```\n\nIf using Typescript you may also need to install additional type declaration packages as development dependencies to avoid common errors when importing the above packages (i.e. Could not find a declaration file for module '`cors`'):\n\n```\nnpm install --save-dev @types\u002Fcors @types\u002Fexpress\n```\n\nThen, write the following to `server.mjs`. (By using the `.mjs` extension, Node lets you use the `await` keyword at the top level.)\n\n```js\nimport { ApolloServer } from '@apollo\u002Fserver';\nimport { expressMiddleware } from '@as-integrations\u002Fexpress5';\nimport { ApolloServerPluginDrainHttpServer } from '@apollo\u002Fserver\u002Fplugin\u002FdrainHttpServer'\nimport express from 'express';\nimport http from 'http';\nimport cors from 'cors';\n\n\u002F\u002F The GraphQL schema\nconst typeDefs = `#graphql\n  type Query {\n    hello: String\n  }\n`;\n\n\u002F\u002F A map of functions which return data for the schema.\nconst resolvers = {\n  Query: {\n    hello: () => 'world',\n  },\n};\n\nconst app = express();\nconst httpServer = http.createServer(app);\n\n\u002F\u002F Set up Apollo Server\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n  plugins: [ApolloServerPluginDrainHttpServer({ httpServer })],\n});\nawait server.start();\n\napp.use(\n  cors(),\n  express.json(),\n  expressMiddleware(server),\n);\n\nawait new Promise((resolve) => httpServer.listen({ port: 4000 }, resolve));\nconsole.log(`🚀 Server ready at http:\u002F\u002Flocalhost:4000`);\n```\n\nNow run your server with:\n\n```\nnode server.mjs\n```\n\nOpen the URL it prints in a web browser. It will show [Apollo Sandbox](https:\u002F\u002Fwww.apollographql.com\u002Fdocs\u002Fstudio\u002Fexplorer\u002Fsandbox\u002F), a web-based tool for running GraphQL operations. Try running the operation `query { hello }`!\n","Apollo Server 是一个符合GraphQL规范的开源服务器，支持使用TypeScript\u002FJavaScript构建生产级的GraphQL API。它提供了简单易用的API接口，能够与任何Node.js Web框架（如Express、Hapi、Koa等）或无服务器环境无缝集成。核心功能包括直观的设置过程、渐进式采用能力、对任意数据源和构建工具的普遍兼容性以及为生产环境准备的稳定性。适用于需要快速开发并部署自文档化GraphQL服务的各种场景，无论是作为独立的GraphQL服务器还是在联邦架构中作为子图或网关。","2026-06-11 03:33:29","high_star"]