Skip to content

Commit d9b55f1

Browse files
authored
Revert "fix(preset/near-operation-file): accept skipDocumentsValidation config parameter. Closes #214 (#383)"
This reverts commit 9a692da.
1 parent 2187780 commit d9b55f1

File tree

3 files changed

+2
-55
lines changed

3 files changed

+2
-55
lines changed

.changeset/thirty-books-explode.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/presets/near-operation-file/src/index.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,10 +350,7 @@ export const preset: Types.OutputPreset<NearOperationFileConfig> = {
350350
config,
351351
schema: options.schema,
352352
schemaAst: schemaObject,
353-
skipDocumentsValidation:
354-
typeof options.skipDocumentsValidation === 'undefined'
355-
? { skipDuplicateValidation: true }
356-
: options.skipDocumentsValidation,
353+
skipDocumentsValidation: true,
357354
});
358355
}
359356

packages/presets/near-operation-file/tests/near-operation-file.spec.ts

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -699,45 +699,7 @@ describe('near-operation-file preset', () => {
699699
pluginMap: {},
700700
});
701701

702-
expect(result[0].skipDocumentsValidation).toEqual({ skipDuplicateValidation: true });
703-
});
704-
705-
it('Should allow to customize the skip documents validation', async () => {
706-
const result = await executePreset({
707-
baseOutputDir: './src/',
708-
config: {},
709-
presetConfig: {
710-
baseTypesPath: 'types.ts',
711-
},
712-
schema: schemaDocumentNode,
713-
schemaAst: schemaNode,
714-
documents: testDocuments,
715-
plugins: [],
716-
pluginMap: {},
717-
skipDocumentsValidation: {
718-
skipValidationAgainstSchema: true,
719-
},
720-
});
721-
722-
expect(result[0].skipDocumentsValidation).toEqual({ skipValidationAgainstSchema: true });
723-
});
724-
725-
it('Should allow to opt-out skipping documents validation', async () => {
726-
const result = await executePreset({
727-
baseOutputDir: './src/',
728-
config: {},
729-
presetConfig: {
730-
baseTypesPath: 'types.ts',
731-
},
732-
schema: schemaDocumentNode,
733-
schemaAst: schemaNode,
734-
documents: testDocuments,
735-
plugins: [],
736-
pluginMap: {},
737-
skipDocumentsValidation: false,
738-
});
739-
740-
expect(result[0].skipDocumentsValidation).toBe(false);
702+
expect(result[0].skipDocumentsValidation).toBeTruthy();
741703
});
742704

743705
it('Should allow to customize output extension', async () => {

0 commit comments

Comments
 (0)