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