Files
twenty/packages/twenty-server/test/integration/graphql/suites/inputs-validation/constants/test-object-gql-fields.constant.ts
T
Guillim 5daef28328 Morph INPUT integration test (#16464)
- Adding a new target to the test setup suite
- We add the MORPH_RELATION to the list of types we wanna test in the
current test suites

Important:
I noticed the REST API was not working well with Morph relations. I
created [an
issue](https://github.com/twentyhq/core-team-issues/issues/2002) to work
on that. Within that timeframe, I `xdescribed` the related tests

Fixes https://github.com/twentyhq/core-team-issues/issues/1327
2025-12-11 10:10:30 +01:00

61 lines
1.3 KiB
TypeScript

import { joinColumnNameForManyToOneMorphRelationField1 } from 'test/integration/graphql/suites/inputs-validation/utils/setup-test-objects-with-all-field-types.util';
export const TEST_OBJECT_GQL_FIELDS = `
id
manyToOneRelationFieldId
manyToOneRelationField {
id
}
${joinColumnNameForManyToOneMorphRelationField1}
${joinColumnNameForManyToOneMorphRelationField1.replace('Id', '')}{
id
}
uuidField
textField
phonesField {
primaryPhoneNumber
primaryPhoneCallingCode
primaryPhoneCountryCode
additionalPhones
}
emailsField {
primaryEmail
additionalEmails
}
dateTimeField
dateField
booleanField
numberField
linksField {
primaryLinkUrl
primaryLinkLabel
secondaryLinks
}
currencyField {
amountMicros
currencyCode
}
fullNameField {
firstName
lastName
}
ratingField
selectField
multiSelectField
addressField {
addressStreet1
addressStreet2
addressCity
addressState
addressCountry
addressPostcode
}
rawJsonField
arrayField
richTextField
richTextV2Field {
blocknote
markdown
}
`;