Skip to content

Commit

Permalink
[frontend] Change typing from query to mutation (#7589)
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-julien authored and aHenryJard committed Oct 8, 2024
1 parent dd543b3 commit e52d001
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Tooltip from '@mui/material/Tooltip';
import { graphql } from 'react-relay';
import CustomFileUploader from '@components/common/files/CustomFileUploader';
import CodeBlock from '@components/common/CodeBlock';
import { CsvMapperTestDialogQuery$data } from '@components/data/csvMapper/__generated__/CsvMapperTestDialogQuery.graphql';
import { CsvMapperTestDialogMutation$data } from '@components/data/csvMapper/__generated__/CsvMapperTestDialogMutation.graphql';
import { InformationOutline } from 'mdi-material-ui';
import Box from '@mui/material/Box';
import { useFormatter } from '../../../../components/i18n';
Expand Down Expand Up @@ -38,7 +38,7 @@ const CsvMapperTestDialog: FunctionComponent<CsvMapperTestDialogProps> = ({
const { t_i18n } = useFormatter();

const [value, setValue] = useState<File | undefined>(undefined);
const [result, setResult] = useState<CsvMapperTestDialogQuery$data | undefined>(undefined);
const [result, setResult] = useState<CsvMapperTestDialogMutation$data | undefined>(undefined);
const [loading, setLoading] = useState<boolean>(false);

const onChange = async (field: string, v: string | File | undefined | null) => {
Expand All @@ -58,7 +58,7 @@ const CsvMapperTestDialog: FunctionComponent<CsvMapperTestDialogProps> = ({
commitMutation({
mutation: csvMapperTestQuery,
variables: { file: value, configuration },
onCompleted: (data: CsvMapperTestDialogQuery$data) => {
onCompleted: (data: CsvMapperTestDialogMutation$data) => {
const resultTest = data.csvMapperTest;
if (resultTest) {
setResult({ csvMapperTest: { ...resultTest } });
Expand Down

0 comments on commit e52d001

Please sign in to comment.