added codegen
This commit is contained in:
parent
399fde8616
commit
415fd74c4f
19
web/codegen.ts
Normal file
19
web/codegen.ts
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
import type { CodegenConfig } from '@graphql-codegen/cli';
|
||||
|
||||
const config: CodegenConfig = {
|
||||
overwrite: true,
|
||||
schema: "http://localhost:8080/graphql",
|
||||
documents: "./src/**/*.graphql",
|
||||
generates: {
|
||||
"src/gql/": {
|
||||
preset: "client",
|
||||
plugins: [],
|
||||
config:{
|
||||
useTypeImports: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default config;
|
5013
web/package-lock.json
generated
5013
web/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -7,7 +7,8 @@
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"check": "svelte-check --tsconfig ./tsconfig.app.json && tsc -p tsconfig.node.json"
|
||||
"check": "svelte-check --tsconfig ./tsconfig.app.json && tsc -p tsconfig.node.json",
|
||||
"codegen": "graphql-codegen --config codegen.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
||||
@ -20,6 +21,8 @@
|
||||
"svelte-check": "^4.1.1",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"typescript": "~5.6.2",
|
||||
"vite": "^6.0.5"
|
||||
"vite": "^6.0.5",
|
||||
"@graphql-codegen/cli": "5.0.3",
|
||||
"@graphql-codegen/client-preset": "4.5.1"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user