mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-06 16:02:19 +00:00
fix: disable schema awareness when object resource (#2343)
This commit is contained in:
@@ -235,8 +235,14 @@
|
||||
let command: Disposable | undefined = undefined
|
||||
|
||||
let sqlSchemaCompletor: Disposable | undefined = undefined
|
||||
$: args &&
|
||||
(dbSchema = $dbSchemas[(lang === 'graphql' ? args.api : args.database)?.replace('$res:', '')])
|
||||
|
||||
function updateSchema(lang, args) {
|
||||
const schemaRes = lang === 'graphql' ? args.api : args.database
|
||||
if (schemaRes instanceof String) {
|
||||
dbSchema = $dbSchemas[schemaRes.replace('$res:', '')]
|
||||
}
|
||||
}
|
||||
$: args && updateSchema(lang, args)
|
||||
$: dbSchema && ['sql', 'graphql'].includes(lang) && addDBSchemaCompletions()
|
||||
$: (!dbSchema || lang !== 'sql') && sqlSchemaCompletor && sqlSchemaCompletor.dispose()
|
||||
$: (!dbSchema || lang !== 'graphql') && graphqlService && graphqlService.setSchemaConfig([])
|
||||
|
||||
@@ -104,7 +104,13 @@
|
||||
|
||||
$: !$generatedCode && hideDiff()
|
||||
|
||||
$: dbSchema = $dbSchemas[(lang === 'graphql' ? args.api : args.database)?.replace('$res:', '')]
|
||||
function updateSchema(lang, args) {
|
||||
const schemaRes = lang === 'graphql' ? args.api : args.database
|
||||
if (schemaRes instanceof String) {
|
||||
dbSchema = $dbSchemas[schemaRes.replace('$res:', '')]
|
||||
}
|
||||
}
|
||||
$: updateSchema(lang, args)
|
||||
</script>
|
||||
|
||||
{#if SUPPORTED_LANGUAGES.has(lang)}
|
||||
|
||||
@@ -146,7 +146,13 @@
|
||||
$: editor && setSelectionHandler()
|
||||
$: selection && (isEdit = !selection.isEmpty())
|
||||
|
||||
$: dbSchema = $dbSchemas[(lang === 'graphql' ? args.api : args.database)?.replace('$res:', '')]
|
||||
function updateSchema(lang, args) {
|
||||
const schemaRes = lang === 'graphql' ? args.api : args.database
|
||||
if (schemaRes instanceof String) {
|
||||
dbSchema = $dbSchemas[schemaRes.replace('$res:', '')]
|
||||
}
|
||||
}
|
||||
$: updateSchema(lang, args)
|
||||
</script>
|
||||
|
||||
{#if $generatedCode.length > 0 && !genLoading}
|
||||
|
||||
Reference in New Issue
Block a user