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

@ -19,7 +19,7 @@ export const mockedObjectMetadataItems = {
{
node: {
id: '5db475e7-8208-402d-97a1-62c9ce344dd4',
type: 'text',
type: 'TEXT',
name: 'objectId',
label: 'Object Id',
description: 'View target object',
@ -35,7 +35,7 @@ export const mockedObjectMetadataItems = {
{
node: {
id: 'ddc89a56-9add-4110-aa53-4ecdbba36767',
type: 'text',
type: 'TEXT',
name: 'type',
label: 'Type',
description: 'View type',
@ -51,7 +51,7 @@ export const mockedObjectMetadataItems = {
{
node: {
id: '35fa806b-5d9d-446d-bd0e-1a6874b871ee',
type: 'text',
type: 'TEXT',
name: 'name',
label: 'Name',
description: 'View name',
@ -94,7 +94,7 @@ export const mockedObjectMetadataItems = {
{
node: {
id: '1d718fcf-5a17-4694-91a4-4d3968a51aa4',
type: 'text',
type: 'TEXT',
name: 'viewId',
label: 'View Id',
description: 'View Field related view',
@ -110,7 +110,7 @@ export const mockedObjectMetadataItems = {
{
node: {
id: '8ead2e86-7b60-4a47-9b4f-ad008e744d52',
type: 'number',
type: 'NUMBER',
name: 'position',
label: 'Position',
description: 'View Field position',
@ -126,7 +126,7 @@ export const mockedObjectMetadataItems = {
{
node: {
id: '4d77c2dd-2b04-4989-b11e-cb0e386d1b4d',
type: 'text',
type: 'TEXT',
name: 'fieldId',
label: 'Field Id',
description: 'View Field target field',
@ -142,7 +142,7 @@ export const mockedObjectMetadataItems = {
{
node: {
id: '0f5ab566-9fc4-44b7-85c5-1e05db9f6b49',
type: 'boolean',
type: 'BOOLEAN',
name: 'isVisible',
label: 'Visible',
description: 'View Field visibility',
@ -158,7 +158,7 @@ export const mockedObjectMetadataItems = {
{
node: {
id: '21268ece-7002-4b04-a442-f25278f8ca13',
type: 'number',
type: 'NUMBER',
name: 'size',
label: 'Size',
description: 'View Field size',
@ -201,7 +201,7 @@ export const mockedObjectMetadataItems = {
{
node: {
id: '397eabc0-c5a1-4550-8e68-839c878a8d0e',
type: 'text',
type: 'TEXT',
name: 'name',
label: 'Name',
description: 'The company name.',
@ -217,8 +217,8 @@ export const mockedObjectMetadataItems = {
{
node: {
id: '7ad234c7-f3b9-4efc-813c-43dc97070b07',
type: 'url',
name: 'url',
type: 'URL',
name: 'URL',
label: 'URL',
description:
'The company website URL. We use this url to fetch the company icon.',
@ -234,7 +234,7 @@ export const mockedObjectMetadataItems = {
{
node: {
id: 'a578ffb2-13db-483c-ace7-5c30a13dff2d',
type: 'relation',
type: 'RELATION',
name: 'accountOwner',
label: 'Account Owner',
description:
@ -251,7 +251,7 @@ export const mockedObjectMetadataItems = {
{
node: {
id: 'b7fd622d-7d8b-4f5a-b148-a7e9fd2c4660',
type: 'number',
type: 'NUMBER',
name: 'employees',
label: 'Employees',
description: 'Number of employees in the company.',
@ -267,7 +267,7 @@ export const mockedObjectMetadataItems = {
{
node: {
id: '60ab27ed-a959-471e-b583-887387f7accd',
type: 'url',
type: 'URL',
name: 'linkedin',
label: 'Linkedin',
description: null,
@ -283,7 +283,7 @@ export const mockedObjectMetadataItems = {
{
node: {
id: '6daadb98-83ca-4c85-bca5-7792a7d958ad',
type: 'boolean',
type: 'BOOLEAN',
name: 'prioritySupport',
label: 'Priority Support',
description: 'Whether the company has priority support.',
@ -326,7 +326,7 @@ export const mockedObjectMetadataItems = {
{
node: {
id: 'f955402c-9e8f-4b91-a82c-95f6de392b99',
type: 'text',
type: 'TEXT',
name: 'slug',
label: 'Slug',
description: null,