[payload-generator] Generate TS schema types for tests
This commit is contained in:
Родитель
b38cba9c9d
Коммит
50a6216ecd
|
@ -14,16 +14,21 @@
|
|||
"lint": "monorepo-scripts lint",
|
||||
"test": "monorepo-scripts test",
|
||||
"types": "monorepo-scripts types",
|
||||
"just": "monorepo-scripts"
|
||||
"just": "monorepo-scripts",
|
||||
"test:schema-types": "ts-node ./scripts/graphql-codegen.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"deepmerge": "^4.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@graphitation/graphql-js-tag": "^0.9.0",
|
||||
"@graphitation/graphql-codegen-typescript-typemap-plugin": "^0.0.1",
|
||||
"@graphql-codegen/cli": "^2.6.2",
|
||||
"@graphql-codegen/typescript": "^2.5.1",
|
||||
"@types/jest": "^26.0.22",
|
||||
"monorepo-scripts": "*",
|
||||
"relay-test-utils-internal": "^11.0.2"
|
||||
"relay-test-utils-internal": "^11.0.2",
|
||||
"ts-node": "^10.8.1"
|
||||
},
|
||||
"publishConfig": {
|
||||
"main": "./lib/index",
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
import { generate } from "@graphql-codegen/cli";
|
||||
|
||||
generate(
|
||||
{
|
||||
schema: require.resolve("relay-test-utils-internal/lib/testschema.graphql"),
|
||||
generates: {
|
||||
"./src/__tests__/__generated__/schema-types.ts": {
|
||||
plugins: [
|
||||
"typescript",
|
||||
"@graphitation/graphql-codegen-typescript-typemap-plugin",
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
true,
|
||||
);
|
2080
packages/graphql-js-operation-payload-generator/src/__tests__/__generated__/schema-types.ts
сгенерированный
Normal file
2080
packages/graphql-js-operation-payload-generator/src/__tests__/__generated__/schema-types.ts
сгенерированный
Normal file
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -7,5 +7,10 @@
|
|||
"outDir": "lib"
|
||||
},
|
||||
"include": ["src"],
|
||||
"references": [{ "path": "../graphql-js-tag" }]
|
||||
"references": [{ "path": "../graphql-js-tag" }],
|
||||
"ts-node": {
|
||||
"compilerOptions": {
|
||||
"module": "commonjs"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
1848
yarn.lock
1848
yarn.lock
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче