refactor: remove mappers (#326)

* refactor: remove mappers

* chore: generate graphql types

* lint: remove useless import

* Remove preset-react-create-app from storybook addons

* test: remove old tests

* Upgrade storybook version

* Remove sb preset-cra and add sb svgr loader

* chore: remove figma image url from storybook

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Sammy Teillet
2023-06-19 16:07:16 +02:00
committed by GitHub
parent c8c4a953c2
commit 96a53ad765
27 changed files with 849 additions and 1005 deletions

View File

@ -2,6 +2,7 @@ import { FetchResult, gql } from '@apollo/client';
import { apiClient } from '~/apollo';
import { UpdateCompanyMutationVariables } from '../../../generated/graphql';
import { Company, mapToGqlCompany } from '../interfaces/company.interface';
export const UPDATE_COMPANY = gql`
@ -78,11 +79,11 @@ export const DELETE_COMPANIES = gql`
`;
export async function updateCompany(
company: Company,
company: UpdateCompanyMutationVariables,
): Promise<FetchResult<Company>> {
const result = await apiClient.mutate({
mutation: UPDATE_COMPANY,
variables: mapToGqlCompany(company),
variables: company,
});
return result;
}