apollo-server
Audited by Runlayer on Feb 21, 2026
Tool passed security scan
Malicious tool definition detected
await verifyToken(token) : null; return { user }; }; ``` ### Don't Expose Internal Errors ```typescript const server = new ApolloServer({ typeDefs, resolvers, formatError: (formattedError, error) => { // Log full error internally console.error(error); // Don't expose internal errors to clients if (formattedError.extensions?.code === "INTERNAL_SERVER_ERROR") { return { message: "Internal server error", extensions: { code: "INTERNAL_SERVER_ERROR" }, }; } return formattedError; }, }); ``` ### Rate
Tool passed security scan
Malicious tool definition detected
Description: => { const user = await db.user.findById(id); const posts = await db.posts.findByAuthor(id); const followers = await db.followers.findByUser(id); return { ...user, posts, followers }; }, }, }; // Good - fetch only when requested const resolvers = { Query: { user: (_, { id }) => db.user.findById(id), }, User: { posts: (parent) => db.posts.findByAuthor(parent.id), followers: (parent) => db.followers.findByUser(parent.id), }, }; ```
Malicious tool definition detected
Tool: references/troubleshooting.md [1/2] Description: # Troubleshooting Reference ## Table of Contents - [Setup Issues](#setup-issues) - [Schema Issues](#schema-issues) - [Runtime Errors](#runtime-errors) - [Performance Issues](#performance-issues) - [Integration Issues](#integration-issues) - [Debugging Tips](#debugging-tips) ## Setup Issues ### Module Not Found Errors **Error:** `Cannot find module '@apollo/server'` ```bash # Ensure correct packages are installed npm install @apollo/server gr
*/ }), // Standalone has basic CORS enabled by default }); ``` ### Body Parser Issues **Error:** `req.body` is undefined or empty ```typescript // Express - ensure json middleware is before Apollo app.use(express.json()); // Must come before expressMiddleware app.use( "/graphql", cors(), express.json(), // JSON parser is required expressMiddleware(server), ); ``` ### WebSocket / Subscriptions **Error:** Subscriptions not working ```typescript // Apollo Server 4 doesn't include subscription suppo
Tool passed security scan
Tool passed security scan
Tool passed security scan
Passed Files (1)Click to expand
Tool passed security scan