sveltekit-graphql
Advanced tools
Comparing version
@@ -58,13 +58,11 @@ #!/usr/bin/env node | ||
exists: 'houdini config already exists', | ||
contents: `/// <references types="houdini-svelte"> | ||
contents: `import { createHoudiniConfig } from 'sveltekit-graphql/config'; | ||
/** @type {import('houdini').ConfigFile} */ | ||
const config = { | ||
scalars: { | ||
// You can define custom scalars here | ||
}, | ||
}; | ||
export default config; | ||
const config = createHoudiniConfig({ | ||
scalars: { | ||
// You can define custom scalars here | ||
}, | ||
}); | ||
export default config; | ||
`, | ||
@@ -71,0 +69,0 @@ }); |
@@ -1,9 +0,1 @@ | ||
export declare const houdiniConfig: { | ||
schemaPath: string; | ||
plugins: { | ||
'houdini-svelte': { | ||
client: string; | ||
}; | ||
}; | ||
}; | ||
export declare function codegen(): Promise<void>; |
import generate from 'houdini/codegen'; | ||
// @ts-expect-error Despite having typings, typescript doesn't seem to be able find them correctly. | ||
import { getConfig } from 'houdini'; | ||
export const houdiniConfig = { | ||
schemaPath: 'src/graphql/**/*.graphql', | ||
plugins: { | ||
'houdini-svelte': { | ||
client: './src/graphql/client.ts', | ||
}, | ||
}, | ||
}; | ||
export async function codegen() { | ||
const config = await getConfig(houdiniConfig); | ||
const config = await getConfig(); | ||
await generate(config); | ||
} | ||
//# sourceMappingURL=houdini.js.map |
@@ -5,3 +5,2 @@ import watchAndRun from 'vite-plugin-watch-and-run'; | ||
import houdini from 'houdini/vite'; | ||
import { houdiniConfig } from './houdini.js'; | ||
let hadErrors = false; | ||
@@ -56,5 +55,5 @@ export default function () { | ||
]), | ||
...houdini(houdiniConfig), | ||
...houdini(), | ||
]; | ||
} | ||
//# sourceMappingURL=vite.js.map |
{ | ||
"name": "sveltekit-graphql", | ||
"version": "0.0.0-snapshot-20231103133536", | ||
"version": "0.0.0-snapshot-20231106122131", | ||
"type": "module", | ||
@@ -24,2 +24,6 @@ "license": "MIT", | ||
"import": "./dist/vite.js" | ||
}, | ||
"./config": { | ||
"types": "./dist/config.d.ts", | ||
"import": "./dist/config.js" | ||
} | ||
@@ -35,2 +39,5 @@ }, | ||
"dist/vite.d.ts" | ||
], | ||
"config": [ | ||
"dist/config.d.ts" | ||
] | ||
@@ -37,0 +44,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
35353
0.59%21
16.67%469
-1.05%