feat: refactor schema builder and resolver builder (#2215)

* feat: wip refactor schema builder

* feat: wip store types and first queries generation

* feat: refactor schema-builder and resolver-builder

* fix: clean & small type fix

* fix: avoid breaking change

* fix: remove util from pg-graphql classes

* fix: required default fields

* Refactor frontend accordingly

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Jérémy M
2023-11-03 17:16:37 +01:00
committed by GitHub
parent aba3fd454b
commit 1ed4965a95
216 changed files with 3215 additions and 2028 deletions

View File

@ -25,7 +25,7 @@ export const companyShowFieldDefinitions: FieldDefinition<FieldMetadata>[] = [
fieldId: 'domainName',
label: 'Domain name',
Icon: IconLink,
type: 'url',
type: 'URL',
metadata: {
fieldName: 'domainName',
placeHolder: 'URL',
@ -35,7 +35,7 @@ export const companyShowFieldDefinitions: FieldDefinition<FieldMetadata>[] = [
fieldId: 'accountOwner',
label: 'Account owner',
Icon: IconUserCircle,
type: 'relation',
type: 'RELATION',
metadata: {
fieldName: 'accountOwner',
relationType: Entity.User,
@ -52,7 +52,7 @@ export const companyShowFieldDefinitions: FieldDefinition<FieldMetadata>[] = [
fieldId: 'employees',
label: 'Employees',
Icon: IconUsers,
type: 'number',
type: 'NUMBER',
metadata: {
fieldName: 'employees',
placeHolder: 'Employees',
@ -62,7 +62,7 @@ export const companyShowFieldDefinitions: FieldDefinition<FieldMetadata>[] = [
fieldId: 'address',
label: 'Address',
Icon: IconMap,
type: 'text',
type: 'TEXT',
metadata: {
fieldName: 'address',
placeHolder: 'Address',
@ -72,7 +72,7 @@ export const companyShowFieldDefinitions: FieldDefinition<FieldMetadata>[] = [
fieldId: 'idealCustomerProfile',
label: 'ICP',
Icon: IconTarget,
type: 'boolean',
type: 'BOOLEAN',
metadata: {
fieldName: 'idealCustomerProfile',
},
@ -81,7 +81,7 @@ export const companyShowFieldDefinitions: FieldDefinition<FieldMetadata>[] = [
fieldId: 'xUrl',
label: 'Twitter',
Icon: IconBrandX,
type: 'url',
type: 'URL',
metadata: {
fieldName: 'xUrl',
placeHolder: 'X',
@ -91,7 +91,7 @@ export const companyShowFieldDefinitions: FieldDefinition<FieldMetadata>[] = [
fieldId: 'createdAt',
label: 'Created at',
Icon: IconCalendar,
type: 'date',
type: 'DATE',
metadata: {
fieldName: 'createdAt',
},

View File

@ -16,37 +16,37 @@ export const companyTableFilterDefinitions: FilterDefinitionByEntity<Company>[]
fieldId: 'name',
label: 'Name',
Icon: IconBuildingSkyscraper,
type: 'text',
type: 'TEXT',
},
{
fieldId: 'employees',
label: 'Employees',
Icon: IconUsers,
type: 'number',
type: 'NUMBER',
},
{
fieldId: 'domainName',
label: 'URL',
Icon: IconLink,
type: 'text',
type: 'TEXT',
},
{
fieldId: 'address',
label: 'Address',
Icon: IconMap,
type: 'text',
type: 'TEXT',
},
{
fieldId: 'createdAt',
label: 'Created at',
Icon: IconCalendarEvent,
type: 'date',
type: 'DATE',
},
{
fieldId: 'accountOwnerId',
label: 'Account owner',
Icon: IconUser,
type: 'entity',
type: 'ENTITY',
entitySelectComponent: <FilterDropdownUserSearchSelect />,
},
];