Skip to content

Commit 4745ebe

Browse files
committed
Rename option from disableValidation to dangerouslyDisableValidation
1 parent 11f5981 commit 4745ebe

7 files changed

Lines changed: 8 additions & 8 deletions

File tree

docs/source/api/apollo-server.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ An array containing custom functions to use as additional [validation rules](htt
201201
<tr>
202202
<td>
203203

204-
##### `disableValidation`
204+
##### `dangerouslyDisableValidation`
205205

206206
`Boolean`
207207
</td>

packages/apollo-server-core/src/ApolloServer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ export class ApolloServerBase<
959959
logger: this.logger,
960960
plugins: this.plugins,
961961
documentStore,
962-
disableValidation: this.config.disableValidation,
962+
dangerouslyDisableValidation: this.config.dangerouslyDisableValidation,
963963
context,
964964
parseOptions: this.parseOptions,
965965
...this.requestOptions,

packages/apollo-server-core/src/graphqlOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export interface GraphQLServerOptions<
6262
persistedQueries?: PersistedQueryOptions;
6363
plugins?: ApolloServerPlugin[];
6464
documentStore?: DocumentStore | null;
65-
disableValidation?: boolean;
65+
dangerouslyDisableValidation?: boolean;
6666
parseOptions?: ParseOptions;
6767
nodeEnv?: string;
6868
allowBatchedHttpRequests?: boolean;

packages/apollo-server-core/src/requestPipeline.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export interface GraphQLRequestPipelineConfig<TContext> {
9191
) => GraphQLResponse | null;
9292

9393
plugins?: ApolloServerPlugin[];
94-
disableValidation?: boolean;
94+
dangerouslyDisableValidation?: boolean;
9595
documentStore?: DocumentStore | null;
9696

9797
parseOptions?: ParseOptions;
@@ -258,7 +258,7 @@ export async function processGraphQLRequest<TContext extends BaseContext>(
258258
return await sendErrorResponse(syntaxError as GraphQLError, SyntaxError);
259259
}
260260

261-
if (config.disableValidation !== true) {
261+
if (config.dangerouslyDisableValidation !== true) {
262262
const validationDidEnd = await dispatcher.invokeDidStartHook(
263263
'validationDidStart',
264264
requestContext as GraphQLRequestContextValidationDidStart<TContext>,

packages/apollo-server-core/src/runHttpQuery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ export async function runHttpQuery(
274274
// passed in.
275275
cache: options.cache!,
276276
dataSources: options.dataSources,
277-
disableValidation: options.disableValidation,
277+
dangerouslyDisableValidation: options.dangerouslyDisableValidation,
278278
documentStore: options.documentStore,
279279

280280
persistedQueries: options.persistedQueries,

packages/apollo-server-core/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export interface Config<ContextFunctionParams = any> extends BaseConfig {
107107
stopOnTerminationSignals?: boolean;
108108
apollo?: ApolloConfigInput;
109109
nodeEnv?: string;
110-
disableValidation?: boolean;
110+
dangerouslyDisableValidation?: boolean;
111111
documentStore?: DocumentStore | null;
112112
csrfPrevention?: CSRFPreventionOptions | boolean;
113113
cache?: KeyValueCache | 'bounded';

packages/apollo-server-integration-testsuite/src/ApolloServer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ export function testApolloServer<AS extends ApolloServerBase>(
288288
stopOnTerminationSignals: false,
289289
nodeEnv: 'production',
290290
cache: 'bounded',
291-
disableValidation: true,
291+
dangerouslyDisableValidation: true,
292292
});
293293

294294
const apolloFetch = createApolloFetch({ uri });

0 commit comments

Comments
 (0)