Skip to content

Commit 04bbccb

Browse files
authored
Merge pull request #90 from mizdra/refactoring-e2e-tests
Refactoring E2E tests
2 parents 7178466 + 307444e commit 04bbccb

31 files changed

+71
-122
lines changed
File renamed without changes.

e2e/esm/codegen.ts renamed to e2e/01-esm/codegen.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
import { CodegenConfig } from '@graphql-codegen/cli';
2-
3-
const defaultTypeScriptPluginConfig = {
4-
nonOptionalTypename: true,
5-
enumsAsTypes: true,
6-
avoidOptionals: true,
7-
skipTypename: true,
8-
};
9-
const defaultFabbricaPluginConfig = {
10-
typesFile: './types.js',
11-
skipTypename: true,
12-
};
2+
import { defaultFabbricaPluginConfig, defaultTypeScriptPluginConfig } from '../util/config.cjs';
133

144
const config: CodegenConfig = {
155
generates: {
@@ -18,6 +8,7 @@ const config: CodegenConfig = {
188
plugins: ['typescript'],
199
config: {
2010
...defaultTypeScriptPluginConfig,
11+
skipTypename: true,
2112
scalars: {
2213
CustomScalarTest_CustomScalar1: 'Date',
2314
CustomScalarTest_CustomScalar2: '{ field: string }',
@@ -32,6 +23,7 @@ const config: CodegenConfig = {
3223
plugins: ['@mizdra/graphql-codegen-typescript-fabbrica'],
3324
config: {
3425
...defaultFabbricaPluginConfig,
26+
skipTypename: true,
3527
namingConvention: {
3628
typeNames: './my-naming-fn.cjs',
3729
},
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)