mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 09:22:43 +03:00
Fix MySQL mutations
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8482 GitOrigin-RevId: 0cdbc081abee6d139c8132a00cae4e268239fd22
This commit is contained in:
parent
de128e726a
commit
9143d9443a
@ -116,6 +116,7 @@ export interface DataSourcesAPI {
|
|||||||
NUMERIC?: string;
|
NUMERIC?: string;
|
||||||
DATE?: string;
|
DATE?: string;
|
||||||
BOOLEAN?: string;
|
BOOLEAN?: string;
|
||||||
|
BOOL?: string;
|
||||||
TEXT?: string;
|
TEXT?: string;
|
||||||
ARRAY?: string;
|
ARRAY?: string;
|
||||||
BIGSERIAL?: string;
|
BIGSERIAL?: string;
|
||||||
@ -445,6 +446,7 @@ export interface DataSourcesAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export let currentDriver: Driver = 'postgres';
|
export let currentDriver: Driver = 'postgres';
|
||||||
|
|
||||||
export let dataSource: DataSourcesAPI = services[currentDriver || 'postgres'];
|
export let dataSource: DataSourcesAPI = services[currentDriver || 'postgres'];
|
||||||
|
|
||||||
export const isFeatureSupported = (
|
export const isFeatureSupported = (
|
||||||
|
@ -384,6 +384,7 @@ const columnDataTypes = {
|
|||||||
BIGINT: 'bigint',
|
BIGINT: 'bigint',
|
||||||
BIGSERIAL: 'bigserial',
|
BIGSERIAL: 'bigserial',
|
||||||
BOOLEAN: 'boolean',
|
BOOLEAN: 'boolean',
|
||||||
|
BOOL: 'bool',
|
||||||
DATE: 'date',
|
DATE: 'date',
|
||||||
DATETIME: 'datetime',
|
DATETIME: 'datetime',
|
||||||
INTEGER: 'integer',
|
INTEGER: 'integer',
|
||||||
|
@ -133,7 +133,7 @@ export const InsertRowForm: React.VFC<InsertRowFormProps> = ({
|
|||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
placeholder={column.placeholder}
|
placeholder={column.placeholder}
|
||||||
isDisabled={!column.insertable}
|
isDisabled={!column.insertable}
|
||||||
// disable if the column has no default value
|
// TODO-NEXT: disable if the column has no default value
|
||||||
isDefaultDisabled={false}
|
isDefaultDisabled={false}
|
||||||
isNullDisabled={!column.nullable}
|
isNullDisabled={!column.nullable}
|
||||||
resetToken={resetToken}
|
resetToken={resetToken}
|
||||||
|
@ -134,7 +134,6 @@ export const ColumnRow = ({
|
|||||||
onInput={checkValueRadio}
|
onInput={checkValueRadio}
|
||||||
inputRef={valueInputRef}
|
inputRef={valueInputRef}
|
||||||
disabled={isDisabled}
|
disabled={isDisabled}
|
||||||
tabIndex={2}
|
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
onValueChange={onValueChange}
|
onValueChange={onValueChange}
|
||||||
onCheckValueRadio={onCheckValueRadio}
|
onCheckValueRadio={onCheckValueRadio}
|
||||||
|
@ -45,7 +45,10 @@ export const ColumnRowInput: React.VFC<ColumnRowInputProps> = ({
|
|||||||
return <JsonInput {...props} />;
|
return <JsonInput {...props} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dataType === dataSource.columnDataTypes.BOOLEAN) {
|
if (
|
||||||
|
dataType === dataSource.columnDataTypes.BOOLEAN ||
|
||||||
|
dataType === dataSource.columnDataTypes.BOOL
|
||||||
|
) {
|
||||||
return (
|
return (
|
||||||
<BooleanInput
|
<BooleanInput
|
||||||
checked={false}
|
checked={false}
|
||||||
|
@ -48,7 +48,6 @@ export const TextInput: React.VFC<TextInputProps> = ({
|
|||||||
type="text"
|
type="text"
|
||||||
className={clsx(inputTw, className || '')}
|
className={clsx(inputTw, className || '')}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
tabIndex={2}
|
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
@ -12,6 +12,7 @@ export const getPlaceholder = (type: TableColumn['data_type']) => {
|
|||||||
case dataSource.columnDataTypes.DATE:
|
case dataSource.columnDataTypes.DATE:
|
||||||
return getISODatePart();
|
return getISODatePart();
|
||||||
case dataSource.columnDataTypes.TIME:
|
case dataSource.columnDataTypes.TIME:
|
||||||
|
case 'time':
|
||||||
// eslint-disable-next-line no-case-declarations
|
// eslint-disable-next-line no-case-declarations
|
||||||
const time = getISOTimePart();
|
const time = getISOTimePart();
|
||||||
return `${time}Z or ${time}+05:30`;
|
return `${time}Z or ${time}+05:30`;
|
||||||
|
Loading…
Reference in New Issue
Block a user