* 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>
13 lines
432 B
TypeScript
13 lines
432 B
TypeScript
import { Person as GQLPerson } from '../../../generated/graphql';
|
|
import { DeepPartial } from '../../utils/utils';
|
|
|
|
export type Person = DeepPartial<GQLPerson> & { id: GQLPerson['id'] };
|
|
|
|
export type GraphqlQueryPerson = Person;
|
|
|
|
export type GraphqlMutationPerson = Person;
|
|
|
|
export const mapToPerson = (person: GraphqlQueryPerson): Person => person;
|
|
|
|
export const mapToGqlPerson = (person: Person): GraphqlMutationPerson => person;
|