🌍 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.
100 matches across 5 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | packages/integration-testsuite/src/httpSpecTests.ts | 8 | export function defineIntegrationTestSuiteHttpSpecTests( |
| LOW | packages/integration-testsuite/src/apolloServerTests.ts | 164 | export function defineIntegrationTestSuiteApolloServerTests( |
| LOW | packages/integration-testsuite/src/apolloServerTests.ts | 2379 | async function makeFakeUsageReportingServer({ |
| LOW | packages/integration-testsuite/src/apolloServerTests.ts | 2584 | function createApolloFetchAsIfFromGateway(uri: string): ApolloFetch { |
| LOW | packages/integration-testsuite/src/httpServerTests.ts | 268 | export function defineIntegrationTestSuiteHttpServerTests( |
| LOW | packages/integration-testsuite/src/index.ts | 27 | export function defineIntegrationTestSuite( |
| LOW | packages/server/src/runHttpQuery.ts | 37 | function searchParamIfSpecifiedOnce( |
| LOW | packages/server/src/runHttpQuery.ts | 54 | function jsonParsedSearchParamIfSpecifiedOnce( |
| LOW | packages/server/src/runHttpQuery.ts | 99 | function ensureQueryIsStringOrMissing(query: unknown) { |
| LOW | packages/server/src/runHttpQuery.ts | 369 | function orderExecutionResultFields( |
| LOW | packages/server/src/requestPipeline.ts | 88 | function isBadUserInputGraphQLError(error: GraphQLError): boolean { |
| LOW | packages/server/src/ApolloServer.ts | 1429 | export function chooseContentTypeForSingleResultResponse( |
| LOW | …ckages/server/src/plugin/subscriptionCallback/index.ts | 20 | export function ApolloServerPluginSubscriptionCallback( |
| LOW | packages/server/src/plugin/cacheControl/index.ts | 55 | export function ApolloServerPluginCacheControl( |
| LOW | packages/server/src/plugin/cacheControl/index.ts | 102 | function memoizedCacheAnnotationFromType( |
| LOW | packages/server/src/plugin/cacheControl/index.ts | 114 | function memoizedCacheAnnotationFromField( |
| LOW | packages/server/src/plugin/cacheControl/index.ts | 350 | function parseExistingCacheControlHeader( |
| LOW | packages/server/src/plugin/cacheControl/index.ts | 372 | function cacheAnnotationFromDirectives( |
| LOW | packages/server/src/plugin/inlineTrace/index.ts | 47 | export function ApolloServerPluginInlineTrace( |
| LOW | …src/plugin/usageReporting/operationDerivedDataCache.ts | 10 | export function createOperationDerivedDataCache({ |
| LOW | …src/plugin/usageReporting/operationDerivedDataCache.ts | 56 | export function operationDerivedDataCacheKey( |
| LOW | packages/server/src/plugin/usageReporting/plugin.ts | 221 | function executableSchemaIdForSchema(schema: GraphQLSchema) { |
| LOW | packages/server/src/plugin/usageReporting/plugin.ts | 237 | async function sendAllReportsAndReportErrors(): Promise<void> { |
| LOW | packages/server/src/plugin/usageReporting/plugin.ts | 245 | async function sendReportAndReportErrors( |
| LOW | packages/server/src/plugin/usageReporting/plugin.ts | 423 | async function maybeCallIncludeRequestHook( |
| LOW | …kages/server/src/plugin/usageReporting/traceDetails.ts | 75 | function handleVariableValueTransformError( |
| LOW | …/plugin/usageReporting/defaultSendOperationsAsTrace.ts | 6 | export function defaultSendOperationsAsTrace() { |
| LOW | packages/server/src/plugin/disabled/index.ts | 23 | export function ApolloServerPluginCacheControlDisabled(): ApolloServerPlugin<BaseContext> { |
| LOW | packages/server/src/plugin/disabled/index.ts | 27 | export function ApolloServerPluginInlineTraceDisabled(): ApolloServerPlugin<BaseContext> { |
| LOW | packages/server/src/plugin/disabled/index.ts | 31 | export function ApolloServerPluginLandingPageDisabled(): ApolloServerPlugin<BaseContext> { |
| LOW | packages/server/src/plugin/disabled/index.ts | 35 | export function ApolloServerPluginSchemaReportingDisabled(): ApolloServerPlugin<BaseContext> { |
| LOW | packages/server/src/plugin/disabled/index.ts | 39 | export function ApolloServerPluginUsageReportingDisabled(): ApolloServerPlugin<BaseContext> { |
| LOW | packages/server/src/plugin/schemaReporting/index.ts | 60 | export function ApolloServerPluginSchemaReporting( |
| LOW | packages/server/src/plugin/drainHttpServer/index.ts | 27 | export function ApolloServerPluginDrainHttpServer( |
| LOW | packages/server/src/plugin/landingPage/default/index.ts | 23 | export function ApolloServerPluginLandingPageLocalDefault( |
| LOW | packages/server/src/plugin/landingPage/default/index.ts | 38 | export function ApolloServerPluginLandingPageProductionDefault( |
| LOW | packages/server/src/plugin/disableSuggestions/index.ts | 4 | export function ApolloServerPluginDisableSuggestions(): ApolloServerPlugin { |
| LOW | packages/server/src/utils/schemaInstrumentation.ts | 46 | export function pluginsEnabledForSchemaResolvers( |
| LOW | packages/server/src/__tests__/runQuery.test.ts | 1037 | function createLifecyclePluginMocks() { |
| LOW | packages/server/src/__tests__/runQuery.test.ts | 1141 | function cacheRepresentationOfQuery(query: string): string { |
| LOW | …rc/__tests__/plugin/subscriptionCallback/index.test.ts | 2151 | function mockRouterCheckResponseWithError(opts?: { |
| LOW | …rc/__tests__/plugin/subscriptionCallback/index.test.ts | 2213 | function mockRouterCompleteResponse(requestOpts?: { |
| LOW | …ests__/plugin/cacheControl/collectCacheControlHints.ts | 10 | export async function collectCacheControlHintsAndPolicyIfCacheable( |
| LOW | …c/__tests__/plugin/cacheControl/cacheControlSupport.ts | 8 | export function augmentTypeDefsWithCacheControlSupport(typeDefs: string) { |
| LOW | …c/__tests__/plugin/cacheControl/cacheControlSupport.ts | 25 | export function buildSchemaWithCacheControlSupport(source: string) { |
| LOW | …c/__tests__/plugin/cacheControl/cacheControlSupport.ts | 29 | export function makeExecutableSchemaWithCacheControlSupport( |
| LOW | …ver/src/__tests__/plugin/usageReporting/plugin.test.ts | 311 | function containsFieldExecutionData( |
| LOW | …server/src/validationRules/RecursiveSelectionsLimit.ts | 157 | export function createMaxRecursiveSelectionsRule( |
| LOW | packages/cache-control-types/src/index.ts | 79 | export function maybeCacheControlFromInfo( |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | .gitleaks.toml | 1 | # This file exists primarily to influence scheduled scans that Apollo runs of all repos in Apollo-managed orgs. |
| LOW | smoke-test/smoke-test.sh | 41 | node generated/tsc/smoke-test.mjs |
| LOW | packages/integration-testsuite/src/httpSpecTests.ts | 41 | } |
| LOW | packages/integration-testsuite/src/resolvable.ts | 1 | // Copyright 2019 Joseph Gentle |
| LOW | packages/server/src/internalPlugin.ts | 1 | import type { BaseContext, ApolloServerPlugin } from './externalTypes/index.js'; |
| LOW | packages/server/src/preventCsrf.ts | 1 | import MIMEType from 'whatwg-mimetype'; |
| LOW | packages/server/src/preventCsrf.ts | 21 | const NON_PREFLIGHTED_CONTENT_TYPES = [ |
| LOW | packages/server/src/preventCsrf.ts | 41 | // content types. For those operations, we require (if this feature is enabled) |
| LOW | packages/server/src/preventCsrf.ts | 61 | // actually *ok* because that would lead to a preflight. (For example, the |
| LOW | packages/server/src/requestPipeline.ts | 281 | return await sendErrorResponse( |
| LOW | packages/server/src/requestPipeline.ts | 481 | // The first thing that execution does is coerce the request's variables |
| LOW | packages/server/src/ApolloServer.ts | 181 | legacyExperimentalExecuteIncrementally?: LegacyExperimentalExecuteIncrementally; |
| LOW | packages/server/src/ApolloServer.ts | 381 | 'The `status400ForVariableCoercionErrors: false` configuration option is deprecated and will be removed in Apo |
| LOW | packages/server/src/ApolloServer.ts | 401 | // Apollo Server 3+ the functions like `expressMiddleware` use `assertStarted` |
| LOW | packages/server/src/ApolloServer.ts | 621 | process.on(signal, signalHandler); |
| LOW | packages/server/src/ApolloServer.ts | 681 | }.'`, |
| LOW | packages/server/src/ApolloServer.ts | 761 | // missing/undefined means use the default (creating a new one each |
| LOW | packages/server/src/ApolloServer.ts | 1001 | // this if an API key was configured and log a warning.) |
| LOW | packages/server/src/ApolloServer.ts | 1341 | logger: server.logger, |
| LOW | packages/server/src/externalTypes/plugins.ts | 81 | // Called on startup fail. This can occur if the schema fails to load or if a |
| LOW | packages/server/src/plugin/traceTreeBuilder.ts | 81 | } |
| LOW | packages/server/src/plugin/traceTreeBuilder.ts | 101 | // |
| LOW | packages/server/src/plugin/traceTreeBuilder.ts | 281 | return err; |
| LOW | packages/server/src/plugin/schemaIsSubgraph.ts | 1 | import { |
| LOW | packages/server/src/plugin/cacheControl/index.ts | 221 | // (uncached) or the default if specified in the constructor. |
| LOW | packages/server/src/plugin/cacheControl/index.ts | 301 | policyIfCacheable && |
| LOW | …src/plugin/usageReporting/operationDerivedDataCache.ts | 21 | }, |
| LOW | packages/server/src/plugin/usageReporting/plugin.ts | 141 | |
| LOW | packages/server/src/plugin/usageReporting/plugin.ts | 501 | requestContext.operation === undefined; |
| LOW | packages/server/src/plugin/usageReporting/stats.ts | 21 | // interface is what is accepted as input. We build up our messages using custom |
| LOW | packages/server/src/plugin/usageReporting/stats.ts | 301 | |
| LOW | …/plugin/usageReporting/defaultSendOperationsAsTrace.ts | 1 | import { LRUCache } from 'lru-cache'; |
| LOW | packages/server/src/plugin/drainHttpServer/stoppable.ts | 1 | // This file is adapted from the stoppable npm package: |
| LOW | …s/server/src/utils/makeGatewayGraphQLRequestContext.ts | 21 | // exist any more. |
| LOW | …s/server/src/utils/makeGatewayGraphQLRequestContext.ts | 41 | // |
| LOW | …s/server/src/utils/makeGatewayGraphQLRequestContext.ts | 61 | // Similarly, it's not clear what the intended use case of mutating `debug` in |
| LOW | packages/server/src/utils/resolvable.ts | 1 | // Copyright 2019 Joseph Gentle |
| LOW | …src/__tests__/plugin/drainHttpServer/stoppable.test.ts | 1 | // This file is adapted from the stoppable npm package: |
| LOW | packages/cache-control-types/src/index.ts | 61 | extends Omit<GraphQLResolveInfo, 'cacheControl'> { |
| LOW | …-response-cache/src/ApolloServerPluginResponseCache.ts | 21 | // JSON object with keys representing the query document, operation name, |
| LOW | …-response-cache/src/ApolloServerPluginResponseCache.ts | 41 | // - Else it will be cached under a cache key tagged with the mode |
| LOW | …-response-cache/src/ApolloServerPluginResponseCache.ts | 61 | // Note: this hook has been updated in Apollo Server v4 to only return a |
| LOW | …-response-cache/src/ApolloServerPluginResponseCache.ts | 81 | |
| LOW | …-response-cache/src/ApolloServerPluginResponseCache.ts | 301 | if (errors || !data || !policyIfCacheable) { |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | CHANGELOG_historical.md | 1202 | - Add support for GraphiQL editor themes in [#484](https://github.com/apollographql/apollo-server/pull/484) as requested |
| HIGH | CHANGELOG_historical.md | 1202 | - Add support for GraphiQL editor themes in [#484](https://github.com/apollographql/apollo-server/pull/484) as requested |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | .gitleaks.toml | 12 | # or wasn't as robust as we needed. For example, one of the allowlisting options offered by Gitleaks depends on the line |
| MEDIUM | .gitleaks.toml | 14 | # This creates a fairly fragile allowlisting mechanism. This file allows us to leverage the full capabilities of the Git |
| MEDIUM | packages/server/src/requestPipeline.ts | 216 | // utilize the operation's hash to lookup the AST from the previously |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | docs/source/schema/schema.md | 557 | "name": "Jane Doe", |
| LOW | docs/source/schema/schema.md | 606 | "name": "Jane Doe", |