Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

Seanaye/fix/property sum type (#4748)

Sean Aye774efea4ded5
diff --git a/.github/workspace-dep-closures.json b/.github/workspace-dep-closures.json
index 5be151647e..7dd3eb7a70 100644
--- a/.github/workspace-dep-closures.json
+++ b/.github/workspace-dep-closures.json
@@ -2644,41 +2644,22 @@
"crates/ai_toolset",
"crates/ai_usage",
"crates/attachment",
- "crates/authentication_service_client",
"crates/bot_id",
- "crates/call",
"crates/channel_sender",
- "crates/channels",
- "crates/connection",
- "crates/connection_gateway_client",
- "crates/connection_gateway_models",
- "crates/contacts",
"crates/cowlike",
- "crates/crm",
"crates/decode_jwt",
"crates/document_sub_type",
- "crates/email",
- "crates/email_db_client",
- "crates/email_utils",
"crates/entity_access",
"crates/entity_access_db_utils",
- "crates/entity_access_management",
"crates/filter_ast",
- "crates/frecency",
"crates/graphql_common",
"crates/graphql_properties",
"crates/invite_email",
- "crates/ip_extractor",
"crates/item_filters",
"crates/last_online_tracker",
"crates/macro_auth",
- "crates/macro_aws_config",
- "crates/macro_db_client",
"crates/macro_env",
"crates/macro_env_var",
- "crates/macro_event_broker",
- "crates/macro_event_topics",
- "crates/macro_middleware",
"crates/macro_service_urls",
"crates/macro_user_id",
"crates/macro_uuid",
@@ -2689,30 +2670,18 @@
"crates/model_file_type",
"crates/model_notifications",
"crates/model_user",
- "crates/models_ai_projection",
"crates/models_bulk_upload",
- "crates/models_dcs",
- "crates/models_email",
"crates/models_entity_access_management",
- "crates/models_opensearch",
"crates/models_pagination",
"crates/models_permissions",
"crates/models_properties",
- "crates/models_soup",
- "crates/models_team",
"crates/non_empty",
"crates/notification",
"crates/prompt",
"crates/properties",
"crates/rate_limit",
"crates/remote_env_var",
- "crates/s3_key",
- "crates/share_permission_db_utils",
- "crates/sqs_client",
- "crates/sqs_worker",
"crates/system_properties",
- "crates/unfurl",
- "crates/user_quota",
"crates/workspace-hack"
],
"graphql_soup": [
diff --git a/Cargo.lock b/Cargo.lock
index e43792d860..2e80dee015 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5973,7 +5973,6 @@ dependencies = [
"macro_user_id",
"model-entity",
"models_properties",
- "models_soup",
"properties",
"rootcause",
"tokio",
@@ -6001,7 +6000,6 @@ dependencies = [
"model_file_type",
"model_user",
"models_pagination",
- "models_properties",
"models_soup",
"serde",
"serde_json",
diff --git a/apps/web/docs/graphql-normalized-cache-plan.md b/apps/web/docs/graphql-normalized-cache-plan.md
index 4a965117d2..7500b231af 100644
--- a/apps/web/docs/graphql-normalized-cache-plan.md
+++ b/apps/web/docs/graphql-normalized-cache-plan.md
@@ -42,8 +42,8 @@ entire cache in browser memory. With 10s of thousands of cached objects
async reads fine; imperative consumers get a Promise-based API.
8. **Schema awareness** — `GraphqlSoupEntity` is a 9-variant union; the cache
needs possible-types metadata and per-type key config (e.g.
- `GraphqlSoupChannelMessage.messageId`, embedded non-keyable types like
- `GraphqlSoupPropertyValue`). Schema lives in-repo
+ `GraphqlSoupChannelMessage.messageId`, embedded non-keyable types like the variants of
+ `GraphqlPropertyValue`). Schema lives in-repo
(`static_assets/schema.graphql`) → embed metadata at build time, no
runtime introspection.
9. **External write API** — no GraphQL subscriptions exist; updates arrive
@@ -74,7 +74,7 @@ entire cache in browser memory. With 10s of thousands of cached objects
An output object type with `id: ID!` is keyed by `__typename:id`; no
`id` field → embedded. The SDL is the policy (schema authors must only
name a field `id` when it is a global identity — hence
- `GraphqlSoupProperty.propertyDefinitionId` and
+ `GraphqlProperty.propertyDefinitionId` and
`GraphqlSoupChannelMessage.id`); the build fails on malformed shapes.
12. **Native-testable core** — the Rust engine is a pure crate (`cargo test`,
no wasm) with storage/clock behind traits.
diff --git a/apps/web/src/lib/queries/properties/graphql-optimistic.test.ts b/apps/web/src/lib/queries/properties/graphql-optimistic.test.ts
index 3a60951a9b..47a1768718 100644
--- a/apps/web/src/lib/queries/properties/graphql-optimistic.test.ts
+++ b/apps/web/src/lib/queries/properties/graphql-optimistic.test.ts
@@ -9,29 +9,28 @@ import {
buildOptimisticSetEntityProperty,
} from './graphql-optimistic';
-const emptyLists = {
- boolValue: null,
- numberValue: null,
- stringValue: null,
- dateValue: null,
- selectOptionIds: [],
- entityReferences: [],
- links: [],
-};
-
describe('apiValuesToGraphqlPropertyValue', () => {
it('converts each populated variant', () => {
expect(
apiValuesToGraphqlPropertyValue({ valueType: 'STRING', value: 'hi' })
- ).toEqual({ ...emptyLists, kind: 'String', stringValue: 'hi' });
+ ).toEqual({
+ __typename: 'GraphqlStringPropertyValue',
+ stringValue: 'hi',
+ });
expect(
apiValuesToGraphqlPropertyValue({ valueType: 'NUMBER', value: 3 })
- ).toEqual({ ...emptyLists, kind: 'Number', numberValue: 3 });
+ ).toEqual({
+ __typename: 'GraphqlNumberPropertyValue',
+ numberValue: 3,
+ });
expect(
apiValuesToGraphqlPropertyValue({ valueType: 'BOOLEAN', value: false })
- ).toEqual({ ...emptyLists, kind: 'Boolean', boolValue: false });
+ ).toEqual({
+ __typename: 'GraphqlBooleanPropertyValue',
+ boolValue: false,
+ });
expect(
apiValuesToGraphqlPropertyValue({
@@ -39,8 +38,7 @@ describe('apiValuesToGraphqlPropertyValue', () => {
value: new Date('2026-07-10T00:00:00.000Z'),
})
).toEqual({
- ...emptyLists,
- kind: 'Date',
+ __typename: 'GraphqlDatePropertyValue',
dateValue: '2026-07-10T00:00:00.000Z',
});
@@ -51,9 +49,8 @@ describe('apiValuesToGraphqlPropertyValue', () => {
values: ['opt-1'],
})
).toEqual({
- ...emptyLists,
- kind: 'SelectOption',
- selectOptionIds: ['opt-1'],
+ __typename: 'GraphqlSelectOptionPropertyValue',
+ optionIds: ['opt-1'],
});
expect(
apiValuesToGraphqlPropertyValue({
@@ -61,9 +58,8 @@ describe('apiValuesToGraphqlPropertyValue', () => {
values: ['opt-1', 'opt-2'],
})
).toEqual({
- ...emptyLists,
- kind: 'SelectOption',
- selectOptionIds: ['opt-1', 'opt-2'],
+ __typename: 'GraphqlSelectOptionPropertyValue',
+ optionIds: ['opt-1', 'opt-2'],
});
expect(
@@ -79,9 +75,8 @@ describe('apiValuesToGraphqlPropertyValue', () => {
],
})
).toEqual({
- ...emptyLists,
- kind: 'EntityReference',
- entityReferences: [
+ __typename: 'GraphqlEntityReferencePropertyValue',
+ references: [
{
entityId: 'doc-1',
entityType: 'DOCUMENT',
@@ -96,7 +91,10 @@ describe('apiValuesToGraphqlPropertyValue', () => {
valueType: 'LINK',
values: ['https://a'],
})
- ).toEqual({ ...emptyLists, kind: 'Link', links: ['https://a'] });
+ ).toEqual({
+ __typename: 'GraphqlLinkPropertyValue',
+ urls: ['https://a'],
+ });
});
it('maps empty variants to null (clearing the value)', () => {
@@ -164,9 +162,8 @@ describe('buildOptimisticSetEntityProperty', () => {
isSystem: true,
isMetadata: false,
value: {
- ...emptyLists,
- kind: 'SelectOption',
- selectOptionIds: ['opt-done'],
+ __typename: 'GraphqlSelectOptionPropertyValue',
+ optionIds: ['opt-done'],
},
});
});
diff --git a/apps/web/src/lib/queries/properties/graphql-optimistic.ts b/apps/web/src/lib/queries/properties/graphql-optimistic.ts
index bbb666050f..dc71eeabc2 100644
--- a/apps/web/src/lib/queries/properties/graphql-optimistic.ts
+++ b/apps/web/src/lib/queries/properties/graphql-optimistic.ts
@@ -17,20 +17,6 @@ import type { SoupPropertyFieldsFragment } from '../../service-clients/service-s
type GraphqlPropertyValue = NonNullable<SoupPropertyFieldsFragment['value']>;
-/**
- * The GraphQL value object has non-null list fields and nullable scalars;
- * every variant starts from this empty shape and fills in its own field.
- */
-const EMPTY_VALUE_FIELDS: Omit<GraphqlPropertyValue, 'kind'> = {
- boolValue: null,
- numberValue: null,
- stringValue: null,
- dateValue: null,
- selectOptionIds: [],
- entityReferences: [],
- links: [],
-};
-
/**
* `PropertyApiValues` → the GraphQL property value as the server would
* return it. `null` mirrors the REST behavior of clearing the value when
@@ -43,28 +29,28 @@ export function apiValuesToGraphqlPropertyValue(
case 'STRING':
return apiValues.value != null
? {
- ...EMPTY_VALUE_FIELDS,
- kind: 'String',
+ __typename: 'GraphqlStringPropertyValue',
stringValue: apiValues.value,
}
: null;
case 'NUMBER':
return apiValues.value != null
? {
- ...EMPTY_VALUE_FIELDS,
- kind: 'Number',
+ __typename: 'GraphqlNumberPropertyValue',
numberValue: apiValues.value,
}
: null;
case 'BOOLEAN':
return apiValues.value != null
- ? { ...EMPTY_VALUE_FIELDS, kind: 'Boolean', boolValue: apiValues.value }
+ ? {
+ __typename: 'GraphqlBooleanPropertyValue',
+ boolValue: apiValues.value,
+ }
: null;
case 'DATE':
return apiValues.value != null
? {
- ...EMPTY_VALUE_FIELDS,
- kind: 'Date',
+ __typename: 'GraphqlDatePropertyValue',
dateValue: apiValues.value.toISOString(),
}
: null;
@@ -72,17 +58,15 @@ export function apiValuesToGraphqlPropertyValue(
case 'SELECT_NUMBER':
return apiValues.values != null && apiValues.values.length > 0
? {
- ...EMPTY_VALUE_FIELDS,
- kind: 'SelectOption',
- selectOptionIds: apiValues.values,
+ __typename: 'GraphqlSelectOptionPropertyValue',
+ optionIds: apiValues.values,
}
: null;
case 'ENTITY':
return apiValues.refs != null && apiValues.refs.length > 0
? {
- ...EMPTY_VALUE_FIELDS,
- kind: 'EntityReference',
- entityReferences: apiValues.refs.map((ref) => ({
+ __typename: 'GraphqlEntityReferencePropertyValue',
+ references: apiValues.refs.map((ref) => ({
entityId: ref.entity_id,
entityType: ref.entity_type,
specificMessageId: ref.specific_message_id ?? null,
@@ -91,7 +75,10 @@ export function apiValuesToGraphqlPropertyValue(
: null;
case 'LINK':
return apiValues.values != null && apiValues.values.length > 0
- ? { ...EMPTY_VALUE_FIELDS, kind: 'Link', links: apiValues.values }
+ ? {
+ __typename: 'GraphqlLinkPropertyValue',
+ urls: apiValues.values,
+ }
: null;
default: {
const exhaustiveCheck: never = apiValues;
diff --git a/apps/web/src/lib/service-clients/service-storage/graphql-soup.ts b/apps/web/src/lib/service-clients/service-storage/graphql-soup.ts
index 61bc5dc6ef..895d30006c 100644
--- a/apps/web/src/lib/service-clients/service-storage/graphql-soup.ts
+++ b/apps/web/src/lib/service-clients/service-storage/graphql-soup.ts
@@ -113,11 +113,11 @@ export type GraphqlSoupInput = SoupInput;
type GraphqlSoupItem = SoupQuery['user']['soup']['items'][number];
type GraphqlSoupEntity = GraphqlSoupItem['entity'];
-type GraphqlSoupProperty = Extract<
+type GraphqlProperty = Extract<
GraphqlSoupEntity,
{ __typename: 'GraphqlSoupDocument' }
>['properties'][number];
-type GraphqlSoupPropertyValue = NonNullable<GraphqlSoupProperty['value']>;
+type GraphqlPropertyValue = NonNullable<GraphqlProperty['value']>;
type GraphqlSoupDocument = Extract<
GraphqlSoupEntity,
{ __typename: 'GraphqlSoupDocument' }
@@ -129,66 +129,54 @@ type GraphqlSoupChannelMessage = NonNullable<
>['latestMessage']
>;
-const GRAPHQL_PROPERTY_VALUE_KINDS = [
- 'Boolean',
- 'Number',
- 'String',
- 'Date',
- 'SelectOption',
- 'EntityReference',
- 'Link',
-] as const;
-
-type GraphqlPropertyValueKind = (typeof GRAPHQL_PROPERTY_VALUE_KINDS)[number];
-
-function isGraphqlPropertyValueKind(
- kind: string
-): kind is GraphqlPropertyValueKind {
- return GRAPHQL_PROPERTY_VALUE_KINDS.includes(
- kind as GraphqlPropertyValueKind
- );
-}
-
function mapGraphqlPropertyValue(
- value: GraphqlSoupPropertyValue | null | undefined
+ value: GraphqlPropertyValue | null | undefined
) {
if (!value) return value;
- if (!isGraphqlPropertyValueKind(value.kind)) return undefined;
- return match(value.kind)
- .with('Boolean', () => ({
+ return match(value)
+ .with({ __typename: 'GraphqlBooleanPropertyValue' }, ({ boolValue }) => ({
type: 'Boolean' as const,
- value: value.boolValue ?? false,
+ value: boolValue,
}))
- .with('Number', () => ({
+ .with({ __typename: 'GraphqlNumberPropertyValue' }, ({ numberValue }) => ({
type: 'Number' as const,
- value: value.numberValue ?? 0,
+ value: numberValue,
}))
- .with('String', () => ({
+ .with({ __typename: 'GraphqlStringPropertyValue' }, ({ stringValue }) => ({
type: 'String' as const,
- value: value.stringValue ?? '',
+ value: stringValue,
}))
- .with('Date', () => ({
+ .with({ __typename: 'GraphqlDatePropertyValue' }, ({ dateValue }) => ({
type: 'Date' as const,
- value: value.dateValue ?? '',
- }))
- .with('SelectOption', () => ({
- type: 'SelectOption' as const,
- value: value.selectOptionIds,
+ value: dateValue,
}))
- .with('EntityReference', () => ({
- type: 'EntityReference' as const,
- value: value.entityReferences.map((ref) => ({
- entity_id: ref.entityId,
- entity_type: ref.entityType,
- specific_message_id: ref.specificMessageId ?? undefined,
- })),
+ .with(
+ { __typename: 'GraphqlSelectOptionPropertyValue' },
+ ({ optionIds }) => ({
+ type: 'SelectOption' as const,
+ value: optionIds,
+ })
+ )
+ .with(
+ { __typename: 'GraphqlEntityReferencePropertyValue' },
+ ({ references }) => ({
+ type: 'EntityReference' as const,
+ value: references.map((reference) => ({
+ entity_id: reference.entityId,
+ entity_type: reference.entityType,
+ specific_message_id: reference.specificMessageId ?? undefined,
+ })),
+ })
+ )
+ .with({ __typename: 'GraphqlLinkPropertyValue' }, ({ urls }) => ({
+ type: 'Link' as const,
+ value: urls,
}))
- .with('Link', () => ({ type: 'Link' as const, value: value.links }))
.exhaustive();
}
-function mapGraphqlProperties(properties: GraphqlSoupProperty[]) {
+function mapGraphqlProperties(properties: GraphqlProperty[]) {
return properties.map((property) => ({
id: property.id,
definition: {
diff --git a/apps/web/src/lib/service-clients/service-storage/graphql/generated/graphql.ts b/apps/web/src/lib/service-clients/service-storage/graphql/generated/graphql.ts
index 1de8d93ce6..81a887e35a 100644
--- a/apps/web/src/lib/service-clients/service-storage/graphql/generated/graphql.ts
+++ b/apps/web/src/lib/service-clients/service-storage/graphql/generated/graphql.ts
@@ -283,7 +283,28 @@ export type GraphqlPropertiesLiteral = {
value: GraphqlPropertyMatchValue;
};
-/** GraphQL entity type supported by property filters. */
+/** A property definition's supported value type. */
+export type GraphqlPropertyDataType =
+ /** Boolean true/false values. */
+ | 'BOOLEAN'
+ /** Date and time values. */
+ | 'DATE'
+ /** References to other entities. */
+ | 'ENTITY'
+ /** URL values. */
+ | 'LINK'
+ /** Numeric values. */
+ | 'NUMBER'
+ /** A select property with numeric options. */
+ | 'SELECT_NUMBER'
+ /** A select property with string options. */
+ | 'SELECT_STRING'
+ /** String or text values. */
+ | 'STRING'
+ /** User- or team-scoped colored labels. */
+ | 'TAG';
+
+/** An entity type supported by the properties domain. */
export type GraphqlPropertyEntityType =
/** Channel entity. */
| 'CHANNEL'
@@ -337,27 +358,6 @@ export type GraphqlSimpleSortMethod =
/** Sort by viewed timestamp, falling back to updated timestamp. */
| 'VIEWED_UPDATED';
-/** GraphQL representation of supported Soup property data types. */
-export type GraphqlSoupDataType =
- /** Boolean true/false values. */
- | 'BOOLEAN'
- /** Date and time values. */
- | 'DATE'
- /** Entity reference property. */
- | 'ENTITY'
- /** Link value Property. */
- | 'LINK'
- /** Numeric values. */
- | 'NUMBER'
- /** Select property with numeric options. */
- | 'SELECT_NUMBER'
- /** Select property with string options. */
- | 'SELECT_STRING'
- /** String/text values. */
- | 'STRING'
- /** Tag property - user- or team-scoped colored labels (always multi-select). */
- | 'TAG';
-
/** GraphQL representation of Soup entity types. */
export type GraphqlSoupEntityType =
/** Call entity. */
@@ -387,25 +387,6 @@ export type GraphqlSoupEntityType =
/** User entity. */
| 'USER';
-/** GraphQL entity type supported by Soup properties. */
-export type GraphqlSoupPropertyEntityType =
- /** Channel entity. */
- | 'CHANNEL'
- /** Chat entity. */
- | 'CHAT'
- /** Company entity. */
- | 'COMPANY'
- /** Document entity. */
- | 'DOCUMENT'
- /** Project entity. */
- | 'PROJECT'
- /** Task entity. */
- | 'TASK'
- /** Thread entity. */
- | 'THREAD'
- /** User entity. */
- | 'USER';
-
export type SetEntityPropertyInput = {
entityId: string;
entityType: GraphqlPropertyEntityType;
@@ -438,7 +419,15 @@ export type SetEntityPropertyMutationVariables = Exact<{
}>;
-export type SetEntityPropertyMutation = { setEntityProperty: { id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlSoupDataType, isMultiSelect: boolean, specificEntityType: GraphqlSoupPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value: { kind: string, boolValue: boolean | null, numberValue: number | null, stringValue: string | null, dateValue: string | null, selectOptionIds: Array<string>, links: Array<string>, entityReferences: Array<{ entityId: string, entityType: GraphqlSoupPropertyEntityType, specificMessageId: string | null }> } | null } };
+export type SetEntityPropertyMutation = { setEntityProperty: { id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null } };
export type SoupQueryVariables = Exact<{
input: SoupInput;
@@ -449,19 +438,67 @@ export type SoupQuery = { user: { id: string, soup: { nextCursor: string | null,
| { __typename: 'GraphqlSoupCall', id: string, channelId: string, channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }> }
| { __typename: 'GraphqlSoupChannel', id: string, channelType: string, ownerId: string, organizationId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, interactedAt: string | null, channelName: string | null, channelTeamId: string | null, participants: Array<{ channelId: string, userId: string, role: string, joinedAt: string, leftAt: string | null }>, latestMessage: { id: string, threadId: string | null, senderId: string, content: string, createdAt: string, updatedAt: string, deletedAt: string | null, mentions: Array<string> } | null, latestNonThreadMessage: { id: string, threadId: string | null, senderId: string, content: string, createdAt: string, updatedAt: string, deletedAt: string | null, mentions: Array<string> } | null }
| { __typename: 'GraphqlSoupChannelThread', id: string, channelId: string, senderId: string, content: string, createdAt: string, updatedAt: string, effectiveUpdatedAt: string, replyCount: number }
- | { __typename: 'GraphqlSoupChat', id: string, ownerId: string, projectId: string | null, isPersistent: boolean, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, chatName: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlSoupDataType, isMultiSelect: boolean, specificEntityType: GraphqlSoupPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value: { kind: string, boolValue: boolean | null, numberValue: number | null, stringValue: string | null, dateValue: string | null, selectOptionIds: Array<string>, links: Array<string>, entityReferences: Array<{ entityId: string, entityType: GraphqlSoupPropertyEntityType, specificMessageId: string | null }> } | null }> }
- | { __typename: 'GraphqlSoupCrmCompany', id: string, description: string | null, emailSync: boolean, hidden: boolean, createdAt: string, updatedAt: string, viewedAt: string | null, domains: Array<string>, crmTeamId: string, crmCompanyName: string | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlSoupDataType, isMultiSelect: boolean, specificEntityType: GraphqlSoupPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value: { kind: string, boolValue: boolean | null, numberValue: number | null, stringValue: string | null, dateValue: string | null, selectOptionIds: Array<string>, links: Array<string>, entityReferences: Array<{ entityId: string, entityType: GraphqlSoupPropertyEntityType, specificMessageId: string | null }> } | null }> }
- | { __typename: 'GraphqlSoupDocument', id: string, ownerId: string, fileType: string | null, projectId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, documentName: string, subType: { kind: string, isCompleted: boolean | null } | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlSoupDataType, isMultiSelect: boolean, specificEntityType: GraphqlSoupPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value: { kind: string, boolValue: boolean | null, numberValue: number | null, stringValue: string | null, dateValue: string | null, selectOptionIds: Array<string>, links: Array<string>, entityReferences: Array<{ entityId: string, entityType: GraphqlSoupPropertyEntityType, specificMessageId: string | null }> } | null }> }
- | { __typename: 'GraphqlSoupEmailThread', id: string, providerId: string | null, ownerId: string, inboxVisible: boolean, linkId: string | null, snippet: string | null, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null, isRead: boolean, isDraft: boolean, isImportant: boolean, projectId: string | null, sortTs: string, createdAt: string, updatedAt: string, viewedAt: string | null, emailName: string | null, participants: Array<{ id: string, linkId: string, name: string | null, email: string | null, sfsPhotoUrl: string | null }>, attachments: Array<{ id: string, messageId: string, providerAttachmentId: string | null, filename: string | null, mimeType: string | null, sizeBytes: number | null, contentId: string | null, createdAt: string }>, labels: Array<{ id: string, linkId: string, providerLabelId: string, name: string, createdAt: string, messageListVisibility: string, labelListVisibility: string, type: string }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlSoupDataType, isMultiSelect: boolean, specificEntityType: GraphqlSoupPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value: { kind: string, boolValue: boolean | null, numberValue: number | null, stringValue: string | null, dateValue: string | null, selectOptionIds: Array<string>, links: Array<string>, entityReferences: Array<{ entityId: string, entityType: GraphqlSoupPropertyEntityType, specificMessageId: string | null }> } | null }> }
+ | { __typename: 'GraphqlSoupChat', id: string, ownerId: string, projectId: string | null, isPersistent: boolean, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, chatName: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupCrmCompany', id: string, description: string | null, emailSync: boolean, hidden: boolean, createdAt: string, updatedAt: string, viewedAt: string | null, domains: Array<string>, crmTeamId: string, crmCompanyName: string | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupDocument', id: string, ownerId: string, fileType: string | null, projectId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, documentName: string, subType: { kind: string, isCompleted: boolean | null } | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupEmailThread', id: string, providerId: string | null, ownerId: string, inboxVisible: boolean, linkId: string | null, snippet: string | null, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null, isRead: boolean, isDraft: boolean, isImportant: boolean, projectId: string | null, sortTs: string, createdAt: string, updatedAt: string, viewedAt: string | null, emailName: string | null, participants: Array<{ id: string, linkId: string, name: string | null, email: string | null, sfsPhotoUrl: string | null }>, attachments: Array<{ id: string, messageId: string, providerAttachmentId: string | null, filename: string | null, mimeType: string | null, sizeBytes: number | null, contentId: string | null, createdAt: string }>, labels: Array<{ id: string, linkId: string, providerLabelId: string, name: string, createdAt: string, messageListVisibility: string, labelListVisibility: string, type: string }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
| { __typename: 'GraphqlSoupForeignEntity', id: string, foreignEntityId: string, foreignEntitySource: string, storedForId: string, storedForAuthEntity: string, metadata: unknown, createdAt: string, updatedAt: string }
- | { __typename: 'GraphqlSoupProject', id: string, ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, projectName: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlSoupDataType, isMultiSelect: boolean, specificEntityType: GraphqlSoupPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value: { kind: string, boolValue: boolean | null, numberValue: number | null, stringValue: string | null, dateValue: string | null, selectOptionIds: Array<string>, links: Array<string>, entityReferences: Array<{ entityId: string, entityType: GraphqlSoupPropertyEntityType, specificMessageId: string | null }> } | null }> }
+ | { __typename: 'GraphqlSoupProject', id: string, ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, projectName: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
}> } } };
-export type SoupPropertyFieldsFragment = { id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlSoupDataType, isMultiSelect: boolean, specificEntityType: GraphqlSoupPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value: { kind: string, boolValue: boolean | null, numberValue: number | null, stringValue: string | null, dateValue: string | null, selectOptionIds: Array<string>, links: Array<string>, entityReferences: Array<{ entityId: string, entityType: GraphqlSoupPropertyEntityType, specificMessageId: string | null }> } | null };
+export type SoupPropertyFieldsFragment = { id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null };
export type SoupChannelMessageFieldsFragment = { id: string, threadId: string | null, senderId: string, content: string, createdAt: string, updatedAt: string, deletedAt: string | null, mentions: Array<string> };
-export const SoupPropertyFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupProperty"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"propertyDefinitionId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}},{"kind":"Field","name":{"kind":"Name","value":"isMultiSelect"}},{"kind":"Field","name":{"kind":"Name","value":"specificEntityType"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"value"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"kind"}},{"kind":"Field","name":{"kind":"Name","value":"boolValue"}},{"kind":"Field","name":{"kind":"Name","value":"numberValue"}},{"kind":"Field","name":{"kind":"Name","value":"stringValue"}},{"kind":"Field","name":{"kind":"Name","value":"dateValue"}},{"kind":"Field","name":{"kind":"Name","value":"selectOptionIds"}},{"kind":"Field","name":{"kind":"Name","value":"entityReferences"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"specificMessageId"}}]}},{"kind":"Field","name":{"kind":"Name","value":"links"}}]}}]}}]} as unknown as DocumentNode<SoupPropertyFieldsFragment, unknown>;
+export const SoupPropertyFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlProperty"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"propertyDefinitionId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}},{"kind":"Field","name":{"kind":"Name","value":"isMultiSelect"}},{"kind":"Field","name":{"kind":"Name","value":"specificEntityType"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"value"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlBooleanPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"boolValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNumberPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"numberValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlStringPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stringValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDatePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dateValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSelectOptionPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"optionIds"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEntityReferencePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"references"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"specificMessageId"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlLinkPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"urls"}}]}}]}}]}}]} as unknown as DocumentNode<SoupPropertyFieldsFragment, unknown>;
export const SoupChannelMessageFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupChannelMessageFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannelMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"mentions"}}]}}]} as unknown as DocumentNode<SoupChannelMessageFieldsFragment, unknown>;
-export const SetEntityPropertyDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SetEntityProperty"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SetEntityPropertyInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"setEntityProperty"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupProperty"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"propertyDefinitionId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}},{"kind":"Field","name":{"kind":"Name","value":"isMultiSelect"}},{"kind":"Field","name":{"kind":"Name","value":"specificEntityType"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"value"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"kind"}},{"kind":"Field","name":{"kind":"Name","value":"boolValue"}},{"kind":"Field","name":{"kind":"Name","value":"numberValue"}},{"kind":"Field","name":{"kind":"Name","value":"stringValue"}},{"kind":"Field","name":{"kind":"Name","value":"dateValue"}},{"kind":"Field","name":{"kind":"Name","value":"selectOptionIds"}},{"kind":"Field","name":{"kind":"Name","value":"entityReferences"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"specificMessageId"}}]}},{"kind":"Field","name":{"kind":"Name","value":"links"}}]}}]}}]} as unknown as DocumentNode<SetEntityPropertyMutation, SetEntityPropertyMutationVariables>;
-export const SoupDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Soup"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SoupInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"soup"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"frecencyScore"}},{"kind":"Field","name":{"kind":"Name","value":"entity"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupDocument"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"documentName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"subType"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"kind"}},{"kind":"Field","name":{"kind":"Name","value":"isCompleted"}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChat"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"chatName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"isPersistent"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupProject"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"projectName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"parentId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEmailThread"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"providerId"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"inboxVisible"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","alias":{"kind":"Name","value":"emailName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"snippet"}},{"kind":"Field","name":{"kind":"Name","value":"senderEmail"}},{"kind":"Field","name":{"kind":"Name","value":"senderName"}},{"kind":"Field","name":{"kind":"Name","value":"senderPhotoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isRead"}},{"kind":"Field","name":{"kind":"Name","value":"isDraft"}},{"kind":"Field","name":{"kind":"Name","value":"isImportant"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"sortTs"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"sfsPhotoUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"attachments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"messageId"}},{"kind":"Field","name":{"kind":"Name","value":"providerAttachmentId"}},{"kind":"Field","name":{"kind":"Name","value":"filename"}},{"kind":"Field","name":{"kind":"Name","value":"mimeType"}},{"kind":"Field","name":{"kind":"Name","value":"sizeBytes"}},{"kind":"Field","name":{"kind":"Name","value":"contentId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"labels"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"providerLabelId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"messageListVisibility"}},{"kind":"Field","name":{"kind":"Name","value":"labelListVisibility"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannel"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"channelName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"channelType"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"organizationId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"interactedAt"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"leftAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"latestMessage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupChannelMessageFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"latestNonThreadMessage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupChannelMessageFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannelThread"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"effectiveUpdatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"replyCount"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCall"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"channelName"}},{"kind":"Field","name":{"kind":"Name","value":"createdBy"}},{"kind":"Field","name":{"kind":"Name","value":"customName"}},{"kind":"Field","name":{"kind":"Name","value":"summary"}},{"kind":"Field","name":{"kind":"Name","value":"startedAt"}},{"kind":"Field","name":{"kind":"Name","value":"endedAt"}},{"kind":"Field","name":{"kind":"Name","value":"durationMs"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"attended"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"leftAt"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCrmCompany"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"crmTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmCompanyName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"emailSync"}},{"kind":"Field","name":{"kind":"Name","value":"hidden"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"domains"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupForeignEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","name":{"kind":"Name","value":"foreignEntitySource"}},{"kind":"Field","name":{"kind":"Name","value":"storedForId"}},{"kind":"Field","name":{"kind":"Name","value":"storedForAuthEntity"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"nextCursor"}},{"kind":"Field","name":{"kind":"Name","value":"hasMore"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupProperty"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"propertyDefinitionId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}},{"kind":"Field","name":{"kind":"Name","value":"isMultiSelect"}},{"kind":"Field","name":{"kind":"Name","value":"specificEntityType"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"value"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"kind"}},{"kind":"Field","name":{"kind":"Name","value":"boolValue"}},{"kind":"Field","name":{"kind":"Name","value":"numberValue"}},{"kind":"Field","name":{"kind":"Name","value":"stringValue"}},{"kind":"Field","name":{"kind":"Name","value":"dateValue"}},{"kind":"Field","name":{"kind":"Name","value":"selectOptionIds"}},{"kind":"Field","name":{"kind":"Name","value":"entityReferences"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"specificMessageId"}}]}},{"kind":"Field","name":{"kind":"Name","value":"links"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupChannelMessageFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannelMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"mentions"}}]}}]} as unknown as DocumentNode<SoupQuery, SoupQueryVariables>;
+export const SetEntityPropertyDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SetEntityProperty"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SetEntityPropertyInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"setEntityProperty"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlProperty"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"propertyDefinitionId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}},{"kind":"Field","name":{"kind":"Name","value":"isMultiSelect"}},{"kind":"Field","name":{"kind":"Name","value":"specificEntityType"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"value"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlBooleanPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"boolValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNumberPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"numberValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlStringPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stringValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDatePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dateValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSelectOptionPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"optionIds"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEntityReferencePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"references"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"specificMessageId"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlLinkPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"urls"}}]}}]}}]}}]} as unknown as DocumentNode<SetEntityPropertyMutation, SetEntityPropertyMutationVariables>;
+export const SoupDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Soup"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SoupInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"soup"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"frecencyScore"}},{"kind":"Field","name":{"kind":"Name","value":"entity"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupDocument"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"documentName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"subType"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"kind"}},{"kind":"Field","name":{"kind":"Name","value":"isCompleted"}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChat"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"chatName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"isPersistent"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupProject"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"projectName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"parentId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEmailThread"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"providerId"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"inboxVisible"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","alias":{"kind":"Name","value":"emailName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"snippet"}},{"kind":"Field","name":{"kind":"Name","value":"senderEmail"}},{"kind":"Field","name":{"kind":"Name","value":"senderName"}},{"kind":"Field","name":{"kind":"Name","value":"senderPhotoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isRead"}},{"kind":"Field","name":{"kind":"Name","value":"isDraft"}},{"kind":"Field","name":{"kind":"Name","value":"isImportant"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"sortTs"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"sfsPhotoUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"attachments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"messageId"}},{"kind":"Field","name":{"kind":"Name","value":"providerAttachmentId"}},{"kind":"Field","name":{"kind":"Name","value":"filename"}},{"kind":"Field","name":{"kind":"Name","value":"mimeType"}},{"kind":"Field","name":{"kind":"Name","value":"sizeBytes"}},{"kind":"Field","name":{"kind":"Name","value":"contentId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"labels"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"providerLabelId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"messageListVisibility"}},{"kind":"Field","name":{"kind":"Name","value":"labelListVisibility"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannel"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"channelName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"channelType"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"organizationId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"interactedAt"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"leftAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"latestMessage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupChannelMessageFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"latestNonThreadMessage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupChannelMessageFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannelThread"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"effectiveUpdatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"replyCount"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCall"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"channelName"}},{"kind":"Field","name":{"kind":"Name","value":"createdBy"}},{"kind":"Field","name":{"kind":"Name","value":"customName"}},{"kind":"Field","name":{"kind":"Name","value":"summary"}},{"kind":"Field","name":{"kind":"Name","value":"startedAt"}},{"kind":"Field","name":{"kind":"Name","value":"endedAt"}},{"kind":"Field","name":{"kind":"Name","value":"durationMs"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"attended"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"leftAt"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCrmCompany"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"crmTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmCompanyName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"emailSync"}},{"kind":"Field","name":{"kind":"Name","value":"hidden"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"domains"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupForeignEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","name":{"kind":"Name","value":"foreignEntitySource"}},{"kind":"Field","name":{"kind":"Name","value":"storedForId"}},{"kind":"Field","name":{"kind":"Name","value":"storedForAuthEntity"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"nextCursor"}},{"kind":"Field","name":{"kind":"Name","value":"hasMore"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlProperty"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"propertyDefinitionId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}},{"kind":"Field","name":{"kind":"Name","value":"isMultiSelect"}},{"kind":"Field","name":{"kind":"Name","value":"specificEntityType"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"value"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlBooleanPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"boolValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNumberPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"numberValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlStringPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stringValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDatePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dateValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSelectOptionPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"optionIds"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEntityReferencePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"references"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"specificMessageId"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlLinkPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"urls"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupChannelMessageFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannelMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"mentions"}}]}}]} as unknown as DocumentNode<SoupQuery, SoupQueryVariables>;
diff --git a/apps/web/src/lib/service-clients/service-storage/graphql/soup.graphql b/apps/web/src/lib/service-clients/service-storage/graphql/soup.graphql
index 07f5eaa840..8c5fd61de0 100644
--- a/apps/web/src/lib/service-clients/service-storage/graphql/soup.graphql
+++ b/apps/web/src/lib/service-clients/service-storage/graphql/soup.graphql
@@ -190,7 +190,7 @@ query Soup($input: SoupInput!) {
}
}
-fragment SoupPropertyFields on GraphqlSoupProperty {
+fragment SoupPropertyFields on GraphqlProperty {
id
propertyDefinitionId
displayName
@@ -200,18 +200,32 @@ fragment SoupPropertyFields on GraphqlSoupProperty {
isSystem
isMetadata
value {
- kind
- boolValue
- numberValue
- stringValue
- dateValue
- selectOptionIds
- entityReferences {
- entityId
- entityType
- specificMessageId
+ __typename
+ ... on GraphqlBooleanPropertyValue {
+ boolValue: value
+ }
+ ... on GraphqlNumberPropertyValue {
+ numberValue: value
+ }
+ ... on GraphqlStringPropertyValue {
+ stringValue: value
+ }
+ ... on GraphqlDatePropertyValue {
+ dateValue: value
+ }
+ ... on GraphqlSelectOptionPropertyValue {
+ optionIds
+ }
+ ... on GraphqlEntityReferencePropertyValue {
+ references {
+ entityId
+ entityType
+ specificMessageId
+ }
+ }
+ ... on GraphqlLinkPropertyValue {
+ urls
}
- links
}
}
diff --git a/crates/client/README.md b/crates/client/README.md
index 8bd7735656..37dd43d8fa 100644
--- a/crates/client/README.md
+++ b/crates/client/README.md
@@ -43,7 +43,7 @@ is embedded inline in its parent record. The schema itself is the policy —
there is no client-side key config. The build fails on malformed shapes
(nullable/non-ID `id`, `id` on the query root). Consequence for schema
authors: **only expose a field named `id` when it is the object's global
-identity** (e.g. `GraphqlSoupProperty` exposes `propertyDefinitionId`
+identity** (e.g. `GraphqlProperty` exposes `propertyDefinitionId`
because a property instance's value is per-entity).
Identity is not the cache's concern: the engine accepts an opaque session
diff --git a/crates/client/cache-core/src/meta.rs b/crates/client/cache-core/src/meta.rs
index 20c16291b0..7d3885ef7f 100644
--- a/crates/client/cache-core/src/meta.rs
+++ b/crates/client/cache-core/src/meta.rs
@@ -135,10 +135,10 @@ mod tests {
// Property assignments have globally unique database ids and are
// normalized independently from their shared definitions.
assert_eq!(
- type_meta("GraphqlSoupProperty").unwrap().key_fields,
+ type_meta("GraphqlProperty").unwrap().key_fields,
Some(&["id"][..])
);
- assert!(field_meta("GraphqlSoupProperty", "propertyDefinitionId").is_some());
+ assert!(field_meta("GraphqlProperty", "propertyDefinitionId").is_some());
// No id field → embedded.
assert_eq!(type_meta("SoupPage").unwrap().key_fields, None);
assert_eq!(
@@ -151,9 +151,9 @@ mod tests {
#[test]
fn field_shapes() {
- // properties: [GraphqlSoupProperty!]!
+ // properties: [GraphqlProperty!]!
let f = field_meta("GraphqlSoupDocument", "properties").unwrap();
- assert_eq!(f.ty.name, "GraphqlSoupProperty");
+ assert_eq!(f.ty.name, "GraphqlProperty");
assert_eq!(f.ty.kind, FieldKind::Composite);
assert!(!f.ty.nullable && f.ty.list && !f.ty.item_nullable);
diff --git a/crates/client/cache-core/tests/optimistic.rs b/crates/client/cache-core/tests/optimistic.rs
index 9e672101cf..6d67a7614f 100644
--- a/crates/client/cache-core/tests/optimistic.rs
+++ b/crates/client/cache-core/tests/optimistic.rs
@@ -18,7 +18,14 @@ query Soup($input: SoupInput!) {
__typename
... on GraphqlSoupDocument {
id
- properties { id displayName value { kind stringValue } }
+ properties {
+ id
+ displayName
+ value {
+ __typename
+ ... on GraphqlStringPropertyValue { stringValue: value }
+ }
+ }
}
}
}
@@ -33,12 +40,15 @@ mutation SetEntityProperty($input: SetEntityPropertyInput!) {
setEntityProperty(input: $input) {
id
displayName
- value { kind stringValue }
+ value {
+ __typename
+ ... on GraphqlStringPropertyValue { stringValue: value }
+ }
}
}
"#;
-const PROPERTY_KEY: &str = "GraphqlSoupProperty:prop-1";
+const PROPERTY_KEY: &str = "GraphqlProperty:prop-1";
fn query_vars() -> serde_json::Map<String, Json> {
let Json::Object(map) = json!({ "input": { "limit": 10 } }) else {
@@ -74,7 +84,10 @@ fn soup_page(display_name: &str, value: &str) -> Json {
"properties": [{
"id": "prop-1",
"displayName": display_name,
- "value": { "kind": "String", "stringValue": value }
+ "value": {
+ "__typename": "GraphqlStringPropertyValue",
+ "stringValue": value
+ }
}]
}
}],
@@ -89,7 +102,10 @@ fn mutation_response(display_name: &str, value: &str) -> Json {
"setEntityProperty": {
"id": "prop-1",
"displayName": display_name,
- "value": { "kind": "String", "stringValue": value }
+ "value": {
+ "__typename": "GraphqlStringPropertyValue",
+ "stringValue": value
+ }
}
})
}
@@ -232,10 +248,7 @@ fn begin_composes_over_base_without_persisting() {
let Some(CacheValue::Object(value)) = stored.fields.get("value") else {
panic!("stored value shape");
};
- assert_eq!(
- value.get("stringValue"),
- Some(&CacheValue::String("todo".into()))
- );
+ assert_eq!(value.get("value"), Some(&CacheValue::String("todo".into())));
});
}
@@ -523,11 +536,7 @@ fn different_fields_on_same_record_compose() {
MUTATION,
Some("SetEntityProperty"),
&mutation_vars("todo"),
- &json!({ "setEntityProperty": {
- "id": "prop-1",
- "displayName": "Stage",
- "value": { "kind": "String", "stringValue": "todo" }
- }}),
+ &mutation_response("Stage", "todo"),
)
.await
.unwrap();
@@ -537,11 +546,7 @@ fn different_fields_on_same_record_compose() {
MUTATION,
Some("SetEntityProperty"),
&mutation_vars("doing"),
- &json!({ "setEntityProperty": {
- "id": "prop-1",
- "displayName": "Stage",
- "value": { "kind": "String", "stringValue": "doing" }
- }}),
+ &mutation_response("Stage", "doing"),
)
.await
.unwrap();
@@ -558,11 +563,7 @@ fn different_fields_on_same_record_compose() {
MUTATION,
Some("SetEntityProperty"),
&mutation_vars("todo"),
- &json!({ "setEntityProperty": {
- "id": "prop-1",
- "displayName": "Stage",
- "value": { "kind": "String", "stringValue": "todo" }
- }}),
+ &mutation_response("Stage", "todo"),
)
.await
.unwrap();
diff --git a/crates/client/cache-core/tests/roundtrip.rs b/crates/client/cache-core/tests/roundtrip.rs
index 922dcb9004..eed63bc1b4 100644
--- a/crates/client/cache-core/tests/roundtrip.rs
+++ b/crates/client/cache-core/tests/roundtrip.rs
@@ -50,7 +50,7 @@ query Soup($input: SoupInput!) {
}
}
-fragment SoupPropertyFields on GraphqlSoupProperty {
+fragment SoupPropertyFields on GraphqlProperty {
id
propertyDefinitionId
displayName
@@ -59,14 +59,10 @@ fragment SoupPropertyFields on GraphqlSoupProperty {
isSystem
isMetadata
value {
- kind
- boolValue
- selectOptionIds
- entityReferences {
- entityId
- entityType
+ __typename
+ ... on GraphqlSelectOptionPropertyValue {
+ optionIds
}
- links
}
}
@@ -114,13 +110,8 @@ fn response_data() -> Json {
"isSystem": true,
"isMetadata": false,
"value": {
- "kind": "SelectOption",
- "boolValue": null,
- "selectOptionIds": ["opt-1"],
- "entityReferences": [
- { "entityId": "proj-9", "entityType": "PROJECT" }
- ],
- "links": []
+ "__typename": "GraphqlSelectOptionPropertyValue",
+ "optionIds": ["opt-1"]
}
}
]
@@ -173,12 +164,12 @@ fn normalizes_expected_records() {
assert_eq!(
keys,
vec![
+ "GraphqlProperty:entity-prop-1",
"GraphqlSoupChannel:ch-1",
"GraphqlSoupChannelMessage:msg-1",
"GraphqlSoupDocument:doc-1",
"GraphqlSoupItem:ch-1",
"GraphqlSoupItem:doc-1",
- "GraphqlSoupProperty:entity-prop-1",
"GraphqlUser:user-1",
"ROOT_QUERY",
]
@@ -196,7 +187,7 @@ fn normalizes_expected_records() {
assert!(matches!(
doc_record.fields.get("properties"),
Some(CacheValue::List(items))
- if matches!(&items[0], CacheValue::Ref(k) if k.0 == "GraphqlSoupProperty:entity-prop-1")
+ if matches!(&items[0], CacheValue::Ref(k) if k.0 == "GraphqlProperty:entity-prop-1")
));
let channel = &records[&EntityKey("GraphqlSoupChannel:ch-1".into())];
assert!(matches!(
@@ -237,12 +228,12 @@ fn round_trip_reproduces_response() {
assert_eq!(
dep_keys,
vec![
+ "GraphqlProperty:entity-prop-1",
"GraphqlSoupChannel:ch-1",
"GraphqlSoupChannelMessage:msg-1",
"GraphqlSoupDocument:doc-1",
"GraphqlSoupItem:ch-1",
"GraphqlSoupItem:doc-1",
- "GraphqlSoupProperty:entity-prop-1",
"GraphqlUser:user-1",
"ROOT_QUERY",
]
diff --git a/crates/client/cache-wasm/tests/web.rs b/crates/client/cache-wasm/tests/web.rs
index 6fc135ccdf..c7d14b5dba 100644
--- a/crates/client/cache-wasm/tests/web.rs
+++ b/crates/client/cache-wasm/tests/web.rs
@@ -159,7 +159,7 @@ async fn optimistic_write_round_trip() {
assert_eq!(begin["affectedOps"], serde_json::json!(["tab1:1"]));
assert_eq!(
begin["changed"],
- serde_json::json!(["GraphqlSoupProperty:prop-1"])
+ serde_json::json!(["GraphqlProperty:prop-1"])
);
// The optimistic layer is visible through reads.
@@ -190,7 +190,7 @@ async fn optimistic_write_round_trip() {
let commit: serde_json::Value = serde_wasm_bindgen::from_value(commit).unwrap();
assert_eq!(
commit["changed"],
- serde_json::json!(["GraphqlSoupProperty:prop-1"])
+ serde_json::json!(["GraphqlProperty:prop-1"])
);
assert_eq!(commit["affectedOps"], serde_json::json!(["tab1:1"]));
diff --git a/crates/complete_graph/AGENTS.md b/crates/complete_graph/AGENTS.md
index afd3963d55..0eded59814 100644
--- a/crates/complete_graph/AGENTS.md
+++ b/crates/complete_graph/AGENTS.md
@@ -19,7 +19,7 @@ Clients key cache records by `__typename:id`. Consequences:
can appear, across all queries, arguments, and parent objects.
- **Only name a field `id` when it is the object's global identity.** If a
type carries a reference to something else's id, name it accordingly:
- - `GraphqlSoupProperty.id` is the globally unique entity-property assignment
+ - `GraphqlProperty.id` is the globally unique entity-property assignment
id. `propertyDefinitionId` remains separate because definitions are shared
while assignment values are per-entity.
- `GraphqlSoupChannelMessage.id` (renamed from `messageId`) — it *is* the
diff --git a/crates/complete_graph/src/edges.rs b/crates/complete_graph/src/edges.rs
index 5b673c098e..66be072323 100644
--- a/crates/complete_graph/src/edges.rs
+++ b/crates/complete_graph/src/edges.rs
@@ -4,7 +4,7 @@ use async_graphql::{Context, Object};
use graphql_notification::{
GraphqlSoupNotification, SoupNotificationEdgeReader, load_entity_notifications,
};
-use graphql_properties::{GraphqlSoupProperty, SoupPropertyEdgeReader, load_entity_properties};
+use graphql_properties::{EntityPropertyReader, GraphqlProperty, load_entity_properties};
use graphql_soup::SoupEntityEdges;
/// Notification and property fields attached to property-bearing Soup entities.
@@ -28,7 +28,7 @@ impl<NR, PR> Clone for SoupEdges<NR, PR> {
impl<NR, PR> SoupEntityEdges for SoupEdges<NR, PR>
where
NR: SoupNotificationEdgeReader,
- PR: SoupPropertyEdgeReader,
+ PR: EntityPropertyReader,
{
fn from_entity(entity: model_entity::Entity<'static>) -> Self {
Self {
@@ -42,12 +42,9 @@ where
impl<NR, PR> SoupEdges<NR, PR>
where
NR: SoupNotificationEdgeReader,
- PR: SoupPropertyEdgeReader,
+ PR: EntityPropertyReader,
{
- async fn properties(
- &self,
- ctx: &Context<'_>,
- ) -> async_graphql::Result<Vec<GraphqlSoupProperty>> {
+ async fn properties(&self, ctx: &Context<'_>) -> async_graphql::Result<Vec<GraphqlProperty>> {
load_entity_properties::<PR>(ctx, self.entity.clone()).await
}
diff --git a/crates/complete_graph/src/lib.rs b/crates/complete_graph/src/lib.rs
index 1d3b5d8e0b..c5ab2a2f80 100644
--- a/crates/complete_graph/src/lib.rs
+++ b/crates/complete_graph/src/lib.rs
@@ -14,11 +14,10 @@ pub use graphql_notification::{
EntityNotificationsLoader, SoupNotificationEdgeReader, entity_notifications_loader,
};
pub use graphql_properties::{
- EntityPropertiesLoader, EntityPropertyWriter, NoOpSoupPropertyEdgeReader,
- PropertiesEntityPropertyWriter, PropertiesMutationRoot, PropertiesSoupPropertyEdgeReader,
- SoupPropertyEdgeReader, entity_properties_loader,
+ EntityPropertiesLoader, EntityPropertyReader, EntityPropertyWriter, NoOpEntityPropertyReader,
+ PropertiesEntityPropertyReader, PropertiesEntityPropertyWriter, PropertiesMutationRoot,
+ entity_properties_loader,
};
-pub use graphql_soup::SharedSoupService;
pub use schema::{
SchemaOnlySoupSchema, SchemaOnlyState, SharedSoupSchema, SoupQueryRoot, SoupSchema,
build_schema, build_schema_from_arc, build_schema_with_service,
diff --git a/crates/complete_graph/src/schema.rs b/crates/complete_graph/src/schema.rs
index b313bef10f..a307b68cc2 100644
--- a/crates/complete_graph/src/schema.rs
+++ b/crates/complete_graph/src/schema.rs
@@ -14,10 +14,10 @@ use entity_access::domain::ports::{EntityAccessService, NoOpEntityAccessService}
use graphql_common::extract_part;
use graphql_notification::{NoOpSoupNotificationEdgeReader, SoupNotificationEdgeReader};
use graphql_properties::{
- EntityPropertyWriter, NoOpEntityPropertyWriter, NoOpSoupPropertyEdgeReader,
- PropertiesMutationRoot, SoupPropertyEdgeReader,
+ EntityPropertyReader, EntityPropertyWriter, NoOpEntityPropertyReader, NoOpEntityPropertyWriter,
+ PropertiesMutationRoot,
};
-use graphql_soup::{SharedSoupService, SoupInput, SoupPage, resolve_soup};
+use graphql_soup::{SoupInput, SoupPage, resolve_soup};
use model_user::axum_extractor::MacroUserExtractor;
use soup::domain::ports::{NoOpSoupService, SoupService};
@@ -33,8 +33,7 @@ pub type SoupSchema<S, E, EAS, St, W, NR, PR> =
Schema<SoupQueryRoot<S, E, EAS, St, NR, PR>, PropertiesMutationRoot<W>, EmptySubscription>;
/// GraphQL Soup schema type backed by a shared soup service.
-pub type SharedSoupSchema<S, E, EAS, St, W, NR, PR> =
- SoupSchema<SharedSoupService<S>, E, EAS, St, W, NR, PR>;
+pub type SharedSoupSchema<S, E, EAS, St, W, NR, PR> = SoupSchema<Arc<S>, E, EAS, St, W, NR, PR>;
/// GraphQL Soup schema type backed by the no-op services, used only for
/// SDL export or introspection.
@@ -45,7 +44,7 @@ pub type SchemaOnlySoupSchema = SoupSchema<
SchemaOnlyState,
NoOpEntityPropertyWriter,
NoOpSoupNotificationEdgeReader,
- NoOpSoupPropertyEdgeReader,
+ NoOpEntityPropertyReader,
>;
/// Axum-style state used only to construct the GraphQL schema for SDL export.
@@ -110,7 +109,7 @@ where
Arc<EAS>: FromRef<St>,
W: EntityPropertyWriter,
NR: SoupNotificationEdgeReader,
- PR: SoupPropertyEdgeReader,
+ PR: EntityPropertyReader,
{
Schema::build(
SoupQueryRoot::new(service),
@@ -133,9 +132,9 @@ where
Arc<EAS>: FromRef<St>,
W: EntityPropertyWriter,
NR: SoupNotificationEdgeReader,
- PR: SoupPropertyEdgeReader,
+ PR: EntityPropertyReader,
{
- build_schema_with_service(SharedSoupService::new(service))
+ build_schema_with_service(service)
}
#[Object]
@@ -148,7 +147,7 @@ where
EmailRouterState<E>: FromRef<St>,
Arc<EAS>: FromRef<St>,
NR: SoupNotificationEdgeReader,
- PR: SoupPropertyEdgeReader,
+ PR: EntityPropertyReader,
{
/// The authenticated user.
async fn user(&self) -> GraphqlUser<S, E, EAS, St, NR, PR> {
@@ -169,7 +168,7 @@ where
EmailRouterState<E>: FromRef<St>,
Arc<EAS>: FromRef<St>,
NR: SoupNotificationEdgeReader,
- PR: SoupPropertyEdgeReader,
+ PR: EntityPropertyReader,
{
/// Stable id of the authenticated user.
async fn id(&self, ctx: &Context<'_>) -> async_graphql::Result<async_graphql::ID> {
diff --git a/crates/complete_graph/src/schema/test.rs b/crates/complete_graph/src/schema/test.rs
index 0f4327a479..9537515cca 100644
--- a/crates/complete_graph/src/schema/test.rs
+++ b/crates/complete_graph/src/schema/test.rs
@@ -269,7 +269,7 @@ struct TestHarness {
TestState,
NoOpEntityPropertyWriter,
NoOpSoupNotificationEdgeReader,
- NoOpSoupPropertyEdgeReader,
+ NoOpEntityPropertyReader,
>,
state: TestState,
inbox_calls: Arc<AtomicUsize>,
diff --git a/crates/complete_graph/src/sdl_test.rs b/crates/complete_graph/src/sdl_test.rs
index b5803099b4..f7e1953006 100644
--- a/crates/complete_graph/src/sdl_test.rs
+++ b/crates/complete_graph/src/sdl_test.rs
@@ -18,7 +18,7 @@ fn soup_response_schema_exposes_frontend_fields() {
"participants: [GraphqlSoupEmailParticipant!]!",
"attachments: [GraphqlSoupEmailAttachment!]!",
"labels: [GraphqlSoupEmailLabel!]!",
- "properties: [GraphqlSoupProperty!]!",
+ "properties: [GraphqlProperty!]!",
"type GraphqlSoupCall {",
"channelName: String",
"customName: String",
@@ -33,6 +33,18 @@ fn soup_response_schema_exposes_frontend_fields() {
}
}
+#[test]
+fn property_values_are_a_typed_union_without_soup_names() {
+ let sdl = crate::build_schema().sdl();
+
+ assert_sdl_line(
+ &sdl,
+ "union GraphqlPropertyValue = GraphqlBooleanPropertyValue | GraphqlNumberPropertyValue | GraphqlStringPropertyValue | GraphqlDatePropertyValue | GraphqlSelectOptionPropertyValue | GraphqlEntityReferencePropertyValue | GraphqlLinkPropertyValue",
+ );
+ assert!(!sdl.contains("GraphqlSoupProperty"));
+ assert!(!sdl.contains("GraphqlSoupDataType"));
+}
+
/// The exported SDL is a frontend contract: `schema.graphql` feeds the client
/// codegen and the normalized-cache metadata. Splitting the schema across
/// crates must never change it silently — regenerate with
diff --git a/crates/graphql_common/src/property_filter.rs b/crates/graphql_common/src/property_filter.rs
index 44ac49ad52..76eb02ebc5 100644
--- a/crates/graphql_common/src/property_filter.rs
+++ b/crates/graphql_common/src/property_filter.rs
@@ -65,7 +65,7 @@ impl GraphqlPropertyMatchValue {
}
}
-/// GraphQL entity type supported by property filters.
+/// An entity type supported by the properties domain.
#[derive(Enum, Copy, Clone, Eq, PartialEq)]
pub enum GraphqlPropertyEntityType {
/// Channel entity.
@@ -101,6 +101,21 @@ impl From<GraphqlPropertyEntityType> for models_properties::EntityType {
}
}
+impl From<models_properties::EntityType> for GraphqlPropertyEntityType {
+ fn from(value: models_properties::EntityType) -> Self {
+ match value {
+ models_properties::EntityType::Channel => Self::Channel,
+ models_properties::EntityType::Chat => Self::Chat,
+ models_properties::EntityType::Company => Self::Company,
+ models_properties::EntityType::Document => Self::Document,
+ models_properties::EntityType::Project => Self::Project,
+ models_properties::EntityType::Task => Self::Task,
+ models_properties::EntityType::Thread => Self::Thread,
+ models_properties::EntityType::User => Self::User,
+ }
+ }
+}
+
impl From<GraphqlPropertyEntityType> for PropertyEntityType {
fn from(value: GraphqlPropertyEntityType) -> Self {
match value {
diff --git a/crates/graphql_properties/Cargo.toml b/crates/graphql_properties/Cargo.toml
index 2b1f63319b..bf24424bee 100644
--- a/crates/graphql_properties/Cargo.toml
+++ b/crates/graphql_properties/Cargo.toml
@@ -12,7 +12,6 @@ graphql_common = { path = "../graphql_common" }
macro_user_id = { path = "../macro_user_id" }
model-entity = { path = "../model-entity" }
models_properties = { path = "../models_properties" }
-models_soup = { path = "../models_soup" }
properties = { path = "../properties", default-features = false, features = [
"ports",
] }
diff --git a/crates/graphql_properties/src/lib.rs b/crates/graphql_properties/src/lib.rs
index c8af010d51..5219e69779 100644
--- a/crates/graphql_properties/src/lib.rs
+++ b/crates/graphql_properties/src/lib.rs
@@ -10,14 +10,16 @@ pub use graphql_common::{
GraphqlPropertiesBinaryExpr, GraphqlPropertiesExpr, GraphqlPropertyEntityType,
};
pub use loaders::{
- EntityPropertiesLoader, NoOpSoupPropertyEdgeReader, PropertiesSoupPropertyEdgeReader,
- SoupPropertyEdgeReader, entity_properties_loader,
+ EntityPropertiesLoader, EntityPropertyReader, NoOpEntityPropertyReader,
+ PropertiesEntityPropertyReader, entity_properties_loader,
};
pub use mutations::{
EntityPropertyWriter, NoOpEntityPropertyWriter, PropertiesEntityPropertyWriter,
PropertiesMutationRoot,
};
pub use objects::{
- GraphqlSoupProperty, GraphqlSoupPropertyEntityReference, GraphqlSoupPropertyValue,
- load_entity_properties,
+ GraphqlBooleanPropertyValue, GraphqlDatePropertyValue, GraphqlEntityReferencePropertyValue,
+ GraphqlLinkPropertyValue, GraphqlNumberPropertyValue, GraphqlProperty, GraphqlPropertyDataType,
+ GraphqlPropertyEntityReference, GraphqlPropertyValue, GraphqlSelectOptionPropertyValue,
+ GraphqlStringPropertyValue, load_entity_properties,
};
diff --git a/crates/graphql_properties/src/loaders.rs b/crates/graphql_properties/src/loaders.rs
index db466a8128..5057da799d 100644
--- a/crates/graphql_properties/src/loaders.rs
+++ b/crates/graphql_properties/src/loaders.rs
@@ -4,7 +4,7 @@ use async_graphql::dataloader::{DataLoader, Loader};
use entity_access::domain::models::ViewAccessLevel;
use entity_access::domain::ports::EntityAccessService;
use macro_user_id::user_id::MacroUserIdStr;
-use models_soup::SoupProperty;
+use models_properties::service::entity_property_with_definition::EntityPropertyWithDefinition;
use rootcause::markers::{Cloneable, Dynamic};
fn property_entity_type(
@@ -20,7 +20,7 @@ fn property_entity_type(
}
/// Reader used by GraphQL property edges.
-pub trait SoupPropertyEdgeReader: Send + Sync + 'static {
+pub trait EntityPropertyReader: Send + Sync + 'static {
/// Load properties for the requested entity keys on behalf of the given
/// user. Entities the user cannot view yield an empty property list.
fn get_properties(
@@ -29,7 +29,7 @@ pub trait SoupPropertyEdgeReader: Send + Sync + 'static {
keys: &[model_entity::Entity<'static>],
) -> impl Future<
Output = Result<
- HashMap<model_entity::Entity<'static>, Vec<SoupProperty>>,
+ HashMap<model_entity::Entity<'static>, Vec<EntityPropertyWithDefinition>>,
rootcause::Report,
>,
> + Send;
@@ -37,26 +37,29 @@ pub trait SoupPropertyEdgeReader: Send + Sync + 'static {
/// Property reader used by schema-only GraphQL construction.
#[derive(Clone, Copy, Debug, Default)]
-pub struct NoOpSoupPropertyEdgeReader;
+pub struct NoOpEntityPropertyReader;
-impl SoupPropertyEdgeReader for NoOpSoupPropertyEdgeReader {
+impl EntityPropertyReader for NoOpEntityPropertyReader {
async fn get_properties(
&self,
_user_id: &MacroUserIdStr<'static>,
keys: &[model_entity::Entity<'static>],
- ) -> Result<HashMap<model_entity::Entity<'static>, Vec<SoupProperty>>, rootcause::Report> {
+ ) -> Result<
+ HashMap<model_entity::Entity<'static>, Vec<EntityPropertyWithDefinition>>,
+ rootcause::Report,
+ > {
Ok(keys.iter().cloned().map(|key| (key, Vec::new())).collect())
}
}
/// GraphQL property reader backed by the properties domain service and the
/// canonical entity access service.
-pub struct PropertiesSoupPropertyEdgeReader<P, A> {
+pub struct PropertiesEntityPropertyReader<P, A> {
properties_service: Arc<P>,
entity_access_service: Arc<A>,
}
-impl<P, A> PropertiesSoupPropertyEdgeReader<P, A> {
+impl<P, A> PropertiesEntityPropertyReader<P, A> {
/// Create a property edge reader from the services supplied by the
/// application composition root.
pub fn new(properties_service: Arc<P>, entity_access_service: Arc<A>) -> Self {
@@ -67,7 +70,7 @@ impl<P, A> PropertiesSoupPropertyEdgeReader<P, A> {
}
}
-impl<P, A> SoupPropertyEdgeReader for PropertiesSoupPropertyEdgeReader<P, A>
+impl<P, A> EntityPropertyReader for PropertiesEntityPropertyReader<P, A>
where
P: properties::PropertiesService,
A: EntityAccessService,
@@ -76,7 +79,10 @@ where
&self,
user_id: &MacroUserIdStr<'static>,
keys: &[model_entity::Entity<'static>],
- ) -> Result<HashMap<model_entity::Entity<'static>, Vec<SoupProperty>>, rootcause::Report> {
+ ) -> Result<
+ HashMap<model_entity::Entity<'static>, Vec<EntityPropertyWithDefinition>>,
+ rootcause::Report,
+ > {
let mut result = keys
.iter()
.cloned()
@@ -139,10 +145,7 @@ where
entity_type,
};
if let Some(properties) = properties_by_entity.get(&batch_key) {
- result.insert(
- key.clone(),
- properties.iter().cloned().map(SoupProperty::from).collect(),
- );
+ result.insert(key.clone(), properties.clone());
}
}
@@ -165,9 +168,9 @@ impl<R> EntityPropertiesLoader<R> {
impl<R> Loader<model_entity::OwnedEntity> for EntityPropertiesLoader<R>
where
- R: SoupPropertyEdgeReader,
+ R: EntityPropertyReader,
{
- type Value = Vec<SoupProperty>;
+ type Value = Vec<EntityPropertyWithDefinition>;
type Error = rootcause::Report<Dynamic, Cloneable>;
async fn load(
@@ -201,7 +204,7 @@ pub fn entity_properties_loader<R>(
reader: R,
) -> DataLoader<EntityPropertiesLoader<R>>
where
- R: SoupPropertyEdgeReader,
+ R: EntityPropertyReader,
{
DataLoader::new(EntityPropertiesLoader::new(user_id, reader), tokio::spawn)
}
diff --git a/crates/graphql_properties/src/mutations.rs b/crates/graphql_properties/src/mutations.rs
index 90d08fd063..f2f2791f73 100644
--- a/crates/graphql_properties/src/mutations.rs
+++ b/crates/graphql_properties/src/mutations.rs
@@ -4,13 +4,13 @@ use entity_access::domain::ports::EntityAccessService;
use graphql_common::{GraphqlPropertyEntityType, parse_id};
use macro_user_id::user_id::MacroUserIdStr;
use models_properties::api::requests::SetPropertyValue;
+use models_properties::service::entity_property_with_definition::EntityPropertyWithDefinition;
use models_properties::shared::EntityReference;
-use models_soup::SoupProperty;
use properties::{PropertiesAccessReceipt, PropertiesService, access_entity_type};
use std::{marker::PhantomData, sync::Arc};
use uuid::Uuid;
-use crate::objects::GraphqlSoupProperty;
+use crate::objects::GraphqlProperty;
/// Mutation root for entity property writes.
#[derive(Default)]
@@ -32,7 +32,7 @@ pub trait EntityPropertyWriter: Send + Sync + 'static {
entity_id: String,
property_definition_id: Uuid,
value: Option<SetPropertyValue>,
- ) -> impl Future<Output = Result<SoupProperty, rootcause::Report>> + Send;
+ ) -> impl Future<Output = Result<EntityPropertyWithDefinition, rootcause::Report>> + Send;
}
/// Property writer used by schema-only GraphQL construction.
@@ -46,7 +46,7 @@ impl EntityPropertyWriter for NoOpEntityPropertyWriter {
_entity_id: String,
_property_definition_id: Uuid,
_value: Option<SetPropertyValue>,
- ) -> Result<SoupProperty, rootcause::Report> {
+ ) -> Result<EntityPropertyWithDefinition, rootcause::Report> {
Err(rootcause::report!("property writer is not configured"))
}
}
@@ -84,7 +84,7 @@ where
entity_id: String,
property_definition_id: Uuid,
value: Option<SetPropertyValue>,
- ) -> Result<SoupProperty, rootcause::Report> {
+ ) -> Result<EntityPropertyWithDefinition, rootcause::Report> {
let entity_access_receipt = self
.entity_access_service
.generate_entity_access_receipt::<EditAccessLevel>(
@@ -101,13 +101,11 @@ where
)
.map_err(|err| rootcause::report!(err))?;
- let property = self
+ Ok(self
.properties_service
.set_entity_property(&access, property_definition_id, value)
.await
- .map_err(|err| rootcause::report!(err))?;
-
- Ok(property.into())
+ .map_err(|err| rootcause::report!(err))?)
}
}
@@ -203,7 +201,7 @@ where
&self,
ctx: &Context<'_>,
input: SetEntityPropertyInput,
- ) -> async_graphql::Result<GraphqlSoupProperty> {
+ ) -> async_graphql::Result<GraphqlProperty> {
let writer = ctx.data::<T>()?;
let property_definition_id =
parse_id(input.property_definition_id, "propertyDefinitionId")?;
@@ -254,7 +252,7 @@ mod tests {
#[derive(Clone)]
struct CapturingWriter {
write: Arc<Mutex<Option<CapturedWrite>>>,
- property: SoupProperty,
+ property: EntityPropertyWithDefinition,
}
impl EntityPropertyWriter for CapturingWriter {
@@ -264,7 +262,7 @@ mod tests {
entity_id: String,
property_definition_id: Uuid,
value: Option<SetPropertyValue>,
- ) -> Result<SoupProperty, rootcause::Report> {
+ ) -> Result<EntityPropertyWithDefinition, rootcause::Report> {
*self.write.lock().expect("capture mutex poisoned") =
Some((entity_type, entity_id, property_definition_id, value));
Ok(self.property.clone())
@@ -276,10 +274,18 @@ mod tests {
let property_assignment_id = Uuid::from_u128(3);
let property_definition_id = Uuid::from_u128(1);
let option_id = Uuid::from_u128(2);
+ let now = chrono::Utc::now();
let writer = CapturingWriter {
write: Arc::default(),
- property: SoupProperty {
- id: property_assignment_id,
+ property: EntityPropertyWithDefinition {
+ property: models_properties::service::entity_property::EntityProperty {
+ id: property_assignment_id,
+ entity_id: "task-1".to_owned(),
+ entity_type: models_properties::EntityType::Task,
+ property_definition_id,
+ created_at: now,
+ updated_at: now,
+ },
definition: models_properties::service::property_definition::PropertyDefinition {
id: property_definition_id,
owner: models_properties::PropertyOwner::System,
@@ -287,8 +293,8 @@ mod tests {
data_type: models_properties::DataType::SelectString,
is_multi_select: false,
specific_entity_type: Some(models_properties::EntityType::Task),
- created_at: chrono::Utc::now(),
- updated_at: chrono::Utc::now(),
+ created_at: now,
+ updated_at: now,
is_system: true,
is_metadata: false,
},
@@ -297,6 +303,7 @@ mod tests {
option_id,
]),
),
+ options: None,
},
};
let writer_data = writer.clone();
@@ -326,8 +333,10 @@ mod tests {
isSystem
isMetadata
value {{
- kind
- selectOptionIds
+ __typename
+ ... on GraphqlSelectOptionPropertyValue {{
+ optionIds
+ }}
}}
}}
}}
@@ -349,8 +358,8 @@ mod tests {
"isSystem": true,
"isMetadata": false,
"value": {
- "kind": "SelectOption",
- "selectOptionIds": [option_id.to_string()],
+ "__typename": "GraphqlSelectOptionPropertyValue",
+ "optionIds": [option_id.to_string()],
},
}
})
diff --git a/crates/graphql_properties/src/objects.rs b/crates/graphql_properties/src/objects.rs
index 22e9d94da7..4a7963966a 100644
--- a/crates/graphql_properties/src/objects.rs
+++ b/crates/graphql_properties/src/objects.rs
@@ -1,35 +1,37 @@
-use async_graphql::{Context, Enum, ID, Object, SimpleObject, dataloader::DataLoader};
-use models_properties::service::property_value::PropertyValue;
-use models_soup::SoupProperty;
+use async_graphql::{Context, Enum, ID, Object, SimpleObject, Union, dataloader::DataLoader};
+use graphql_common::GraphqlPropertyEntityType;
+use models_properties::service::{
+ entity_property_with_definition::EntityPropertyWithDefinition, property_value::PropertyValue,
+};
-use crate::loaders::{EntityPropertiesLoader, SoupPropertyEdgeReader};
+use crate::loaders::{EntityPropertiesLoader, EntityPropertyReader};
-/// GraphQL representation of supported Soup property data types.
+/// A property definition's supported value type.
#[derive(Enum, Clone, Copy, PartialEq, Eq)]
-pub enum GraphqlSoupDataType {
+pub enum GraphqlPropertyDataType {
/// Boolean true/false values.
Boolean,
/// Date and time values.
Date,
/// Numeric values.
Number,
- /// String/text values.
+ /// String or text values.
String,
- /// Select property with numeric options.
+ /// A select property with numeric options.
SelectNumber,
- /// Select property with string options.
+ /// A select property with string options.
SelectString,
- /// Tag property - user- or team-scoped colored labels (always multi-select).
+ /// User- or team-scoped colored labels.
Tag,
- /// Entity reference property.
+ /// References to other entities.
Entity,
- /// Link value Property.
+ /// URL values.
Link,
}
-impl From<models_properties::DataType> for GraphqlSoupDataType {
- fn from(dt: models_properties::DataType) -> Self {
- match dt {
+impl From<models_properties::DataType> for GraphqlPropertyDataType {
+ fn from(data_type: models_properties::DataType) -> Self {
+ match data_type {
models_properties::DataType::Boolean => Self::Boolean,
models_properties::DataType::Date => Self::Date,
models_properties::DataType::Number => Self::Number,
@@ -43,13 +45,13 @@ impl From<models_properties::DataType> for GraphqlSoupDataType {
}
}
-/// Load properties attached to an entity through the request-scoped loader.
+/// Load the properties attached to an entity through the request-scoped loader.
pub async fn load_entity_properties<R>(
ctx: &Context<'_>,
entity: model_entity::Entity<'static>,
-) -> async_graphql::Result<Vec<GraphqlSoupProperty>>
+) -> async_graphql::Result<Vec<GraphqlProperty>>
where
- R: SoupPropertyEdgeReader,
+ R: EntityPropertyReader,
{
let loader = ctx.data::<DataLoader<EntityPropertiesLoader<R>>>()?;
let properties = loader
@@ -57,203 +59,182 @@ where
.await
.map_err(|err| async_graphql::Error::new(err.to_string()))?
.unwrap_or_default();
- Ok(properties
- .into_iter()
- .map(GraphqlSoupProperty::from)
- .collect())
+ Ok(properties.into_iter().map(GraphqlProperty::from).collect())
}
-/// GraphQL property assignment attached to a Soup entity.
-pub struct GraphqlSoupProperty(SoupProperty);
+/// A property definition assigned to an entity, together with its current value.
+pub struct GraphqlProperty(EntityPropertyWithDefinition);
-impl From<SoupProperty> for GraphqlSoupProperty {
- fn from(value: SoupProperty) -> Self {
+impl From<EntityPropertyWithDefinition> for GraphqlProperty {
+ fn from(value: EntityPropertyWithDefinition) -> Self {
Self(value)
}
}
#[Object]
-impl GraphqlSoupProperty {
- /// Globally unique id of this property assignment.
+impl GraphqlProperty {
+ /// The globally unique identifier of this entity-property assignment.
async fn id(&self) -> ID {
- ID(self.0.id.to_string())
+ ID(self.0.property.id.to_string())
}
- /// Id of the shared property definition.
+ /// The identifier of the shared property definition.
async fn property_definition_id(&self) -> ID {
ID(self.0.definition.id.to_string())
}
+ /// The user-facing name of the property.
async fn display_name(&self) -> &str {
&self.0.definition.display_name
}
- async fn data_type(&self) -> GraphqlSoupDataType {
+ /// The type of value accepted by the property.
+ async fn data_type(&self) -> GraphqlPropertyDataType {
self.0.definition.data_type.into()
}
+ /// Whether the property can contain more than one value.
async fn is_multi_select(&self) -> bool {
self.0.definition.is_multi_select
}
- async fn specific_entity_type(&self) -> Option<GraphqlSoupPropertyEntityType> {
+ /// The required entity type for entity-reference properties, when constrained.
+ async fn specific_entity_type(&self) -> Option<GraphqlPropertyEntityType> {
self.0
.definition
.specific_entity_type
- .map(GraphqlSoupPropertyEntityType::from)
+ .map(GraphqlPropertyEntityType::from)
}
+ /// Whether this property is managed by the system.
async fn is_system(&self) -> bool {
self.0.definition.is_system
}
+ /// Whether this property describes entity metadata.
async fn is_metadata(&self) -> bool {
self.0.definition.is_metadata
}
- async fn value(&self) -> Option<GraphqlSoupPropertyValue> {
- self.0.value.as_ref().map(GraphqlSoupPropertyValue::from)
+ /// The current value, represented by exactly one typed union variant.
+ async fn value(&self) -> Option<GraphqlPropertyValue> {
+ self.0.value.as_ref().map(GraphqlPropertyValue::from)
}
}
-/// GraphQL representation of a property value.
+/// A property value represented by a type-safe GraphQL union.
+#[derive(Union)]
+pub enum GraphqlPropertyValue {
+ /// A Boolean value.
+ Boolean(GraphqlBooleanPropertyValue),
+ /// A numeric value.
+ Number(GraphqlNumberPropertyValue),
+ /// A string value.
+ String(GraphqlStringPropertyValue),
+ /// An RFC 3339 date-time value.
+ Date(GraphqlDatePropertyValue),
+ /// One or more selected option identifiers.
+ SelectOption(GraphqlSelectOptionPropertyValue),
+ /// One or more entity references.
+ EntityReference(GraphqlEntityReferencePropertyValue),
+ /// One or more URL values.
+ Link(GraphqlLinkPropertyValue),
+}
+
+/// A Boolean property value.
#[derive(SimpleObject)]
-pub struct GraphqlSoupPropertyValue {
- kind: String,
- bool_value: Option<bool>,
- number_value: Option<f64>,
- string_value: Option<String>,
- date_value: Option<String>,
- select_option_ids: Vec<ID>,
- entity_references: Vec<GraphqlSoupPropertyEntityReference>,
- links: Vec<String>,
+pub struct GraphqlBooleanPropertyValue {
+ /// The stored Boolean.
+ value: bool,
}
-impl From<&PropertyValue> for GraphqlSoupPropertyValue {
- fn from(value: &PropertyValue) -> Self {
- match value {
- PropertyValue::Bool(value) => Self {
- kind: "Boolean".to_owned(),
- bool_value: Some(*value),
- number_value: None,
- string_value: None,
- date_value: None,
- select_option_ids: Vec::new(),
- entity_references: Vec::new(),
- links: Vec::new(),
- },
- PropertyValue::Num(value) => Self {
- kind: "Number".to_owned(),
- bool_value: None,
- number_value: Some(*value),
- string_value: None,
- date_value: None,
- select_option_ids: Vec::new(),
- entity_references: Vec::new(),
- links: Vec::new(),
- },
- PropertyValue::Str(value) => Self {
- kind: "String".to_owned(),
- bool_value: None,
- number_value: None,
- string_value: Some(value.clone()),
- date_value: None,
- select_option_ids: Vec::new(),
- entity_references: Vec::new(),
- links: Vec::new(),
- },
- PropertyValue::Date(value) => Self {
- kind: "Date".to_owned(),
- bool_value: None,
- number_value: None,
- string_value: None,
- date_value: Some(value.to_rfc3339()),
- select_option_ids: Vec::new(),
- entity_references: Vec::new(),
- links: Vec::new(),
- },
- PropertyValue::SelectOption(values) => Self {
- kind: "SelectOption".to_owned(),
- bool_value: None,
- number_value: None,
- string_value: None,
- date_value: None,
- select_option_ids: values.iter().map(|id| ID(id.to_string())).collect(),
- entity_references: Vec::new(),
- links: Vec::new(),
- },
- PropertyValue::EntityRef(values) => Self {
- kind: "EntityReference".to_owned(),
- bool_value: None,
- number_value: None,
- string_value: None,
- date_value: None,
- select_option_ids: Vec::new(),
- entity_references: values
- .iter()
- .map(GraphqlSoupPropertyEntityReference::from)
- .collect(),
- links: Vec::new(),
- },
- PropertyValue::Link(values) => Self {
- kind: "Link".to_owned(),
- bool_value: None,
- number_value: None,
- string_value: None,
- date_value: None,
- select_option_ids: Vec::new(),
- entity_references: Vec::new(),
- links: values.clone(),
- },
- }
- }
+/// A numeric property value.
+#[derive(SimpleObject)]
+pub struct GraphqlNumberPropertyValue {
+ /// The stored number.
+ value: f64,
}
-/// GraphQL entity reference stored in a property value.
+/// A string property value.
#[derive(SimpleObject)]
-pub struct GraphqlSoupPropertyEntityReference {
- entity_id: String,
- entity_type: GraphqlSoupPropertyEntityType,
- specific_message_id: Option<ID>,
+pub struct GraphqlStringPropertyValue {
+ /// The stored string.
+ value: String,
}
-/// GraphQL entity type supported by Soup properties.
-#[derive(Enum, Clone, Copy, PartialEq, Eq)]
-pub enum GraphqlSoupPropertyEntityType {
- /// Channel entity.
- Channel,
- /// Chat entity.
- Chat,
- /// Company entity.
- Company,
- /// Document entity.
- Document,
- /// Project entity.
- Project,
- /// Task entity.
- Task,
- /// Thread entity.
- Thread,
- /// User entity.
- User,
+/// A date-time property value.
+#[derive(SimpleObject)]
+pub struct GraphqlDatePropertyValue {
+ /// The stored date-time formatted as RFC 3339.
+ value: String,
+}
+
+/// A select-option property value.
+#[derive(SimpleObject)]
+pub struct GraphqlSelectOptionPropertyValue {
+ /// The selected option identifiers.
+ option_ids: Vec<ID>,
}
-impl From<models_properties::EntityType> for GraphqlSoupPropertyEntityType {
- fn from(entity: models_properties::EntityType) -> Self {
- match entity {
- models_properties::EntityType::Channel => Self::Channel,
- models_properties::EntityType::Chat => Self::Chat,
- models_properties::EntityType::Company => Self::Company,
- models_properties::EntityType::Document => Self::Document,
- models_properties::EntityType::Project => Self::Project,
- models_properties::EntityType::Task => Self::Task,
- models_properties::EntityType::Thread => Self::Thread,
- models_properties::EntityType::User => Self::User,
+/// An entity-reference property value.
+#[derive(SimpleObject)]
+pub struct GraphqlEntityReferencePropertyValue {
+ /// The referenced entities.
+ references: Vec<GraphqlPropertyEntityReference>,
+}
+
+/// A link property value.
+#[derive(SimpleObject)]
+pub struct GraphqlLinkPropertyValue {
+ /// The stored URLs.
+ urls: Vec<String>,
+}
+
+impl From<&PropertyValue> for GraphqlPropertyValue {
+ fn from(value: &PropertyValue) -> Self {
+ match value {
+ PropertyValue::Bool(value) => {
+ Self::Boolean(GraphqlBooleanPropertyValue { value: *value })
+ }
+ PropertyValue::Num(value) => Self::Number(GraphqlNumberPropertyValue { value: *value }),
+ PropertyValue::Str(value) => Self::String(GraphqlStringPropertyValue {
+ value: value.clone(),
+ }),
+ PropertyValue::Date(value) => Self::Date(GraphqlDatePropertyValue {
+ value: value.to_rfc3339(),
+ }),
+ PropertyValue::SelectOption(values) => {
+ Self::SelectOption(GraphqlSelectOptionPropertyValue {
+ option_ids: values.iter().map(|id| ID(id.to_string())).collect(),
+ })
+ }
+ PropertyValue::EntityRef(values) => {
+ Self::EntityReference(GraphqlEntityReferencePropertyValue {
+ references: values
+ .iter()
+ .map(GraphqlPropertyEntityReference::from)
+ .collect(),
+ })
+ }
+ PropertyValue::Link(values) => Self::Link(GraphqlLinkPropertyValue {
+ urls: values.clone(),
+ }),
}
}
}
-impl From<&models_properties::EntityReference> for GraphqlSoupPropertyEntityReference {
+/// An entity reference stored in a property value.
+#[derive(SimpleObject)]
+pub struct GraphqlPropertyEntityReference {
+ /// The referenced entity's identifier.
+ entity_id: String,
+ /// The referenced entity's property-domain type.
+ entity_type: GraphqlPropertyEntityType,
+ /// The specific message identifier when the reference targets a thread message.
+ specific_message_id: Option<ID>,
+}
+
+impl From<&models_properties::EntityReference> for GraphqlPropertyEntityReference {
fn from(value: &models_properties::EntityReference) -> Self {
Self {
entity_id: value.entity_id.clone(),
diff --git a/crates/graphql_soup/Cargo.toml b/crates/graphql_soup/Cargo.toml
index 4bff4f87f6..7ad56bc18b 100644
--- a/crates/graphql_soup/Cargo.toml
+++ b/crates/graphql_soup/Cargo.toml
@@ -1,8 +1,8 @@
[package]
-name = "graphql_soup"
-version = "0.1.0"
edition = "2024"
+name = "graphql_soup"
publish = false
+version = "0.1.0"
[dependencies]
async-graphql = { workspace = true, features = ["dataloader"] }
@@ -22,11 +22,10 @@ filter_ast = { path = "../filter_ast" }
graphql_common = { path = "../graphql_common" }
item_filters = { path = "../item_filters" }
macro_user_id = { path = "../macro_user_id" }
+model-entity = { path = "../model-entity" }
model_file_type = { path = "../model_file_type" }
model_user = { path = "../model_user", features = ["axum"] }
-model-entity = { path = "../model-entity" }
models_pagination = { path = "../models_pagination" }
-models_properties = { path = "../models_properties" }
models_soup = { path = "../models_soup" }
serde = { workspace = true }
serde_json = { workspace = true }
diff --git a/crates/graphql_soup/src/lib.rs b/crates/graphql_soup/src/lib.rs
index ac9b990053..0199cb821f 100644
--- a/crates/graphql_soup/src/lib.rs
+++ b/crates/graphql_soup/src/lib.rs
@@ -17,4 +17,4 @@ pub use objects::{
GraphqlSoupEntity, GraphqlSoupForeignEntity, GraphqlSoupItem, GraphqlSoupProject,
SoupEntityEdges, SoupPage,
};
-pub use resolvers::{SharedSoupService, resolve_soup};
+pub use resolvers::resolve_soup;
diff --git a/crates/graphql_soup/src/resolvers.rs b/crates/graphql_soup/src/resolvers.rs
index 848d2f7049..7284476927 100644
--- a/crates/graphql_soup/src/resolvers.rs
+++ b/crates/graphql_soup/src/resolvers.rs
@@ -8,72 +8,19 @@ use email::{
inbound::axum::{axum_impls::MultiEmailLinkExtractor, previews_router::EmailRouterState},
};
use entity_access::{
- domain::{
- models::{EntityAccessReceipt, MemberTeamRole},
- ports::EntityAccessService,
- },
+ domain::{models::MemberTeamRole, ports::EntityAccessService},
inbound::axum_extractors::OptionalMacroUserTeamExtractor,
};
use graphql_common::extract_part;
use model_user::axum_extractor::MacroUserExtractor;
use models_pagination::TypeEraseCursor;
-use soup::domain::{models::SoupRequest, ports::SoupService};
+use soup::domain::ports::SoupService;
use crate::{
inputs::SoupInput,
objects::{SoupEntityEdges, SoupPage},
};
-/// Shared wrapper for a concrete Soup service.
-pub struct SharedSoupService<S>(Arc<S>);
-
-impl<S> Clone for SharedSoupService<S> {
- fn clone(&self) -> Self {
- Self(Arc::clone(&self.0))
- }
-}
-
-impl<S> SharedSoupService<S> {
- /// Create a shared Soup service wrapper.
- pub fn new(service: Arc<S>) -> Self {
- Self(service)
- }
-}
-
-impl<S> SoupService for SharedSoupService<S>
-where
- S: SoupService,
-{
- async fn get_user_soup<T>(
- &self,
- req: SoupRequest<T>,
- team_receipt: Option<EntityAccessReceipt<MemberTeamRole>>,
- ) -> Result<soup::domain::ports::SoupOutput<T>, soup::domain::models::SoupErr>
- where
- SoupRequest<T>: soup::domain::models::IntoSoupReqAst,
- T: Clone + serde::Serialize + Send,
- {
- self.0.get_user_soup(req, team_receipt).await
- }
-
- async fn get_user_soup_grouped(
- &self,
- req: soup::domain::models::GroupedSortRequest<'_>,
- ) -> Result<Vec<soup::domain::models::GroupedSoupItem>, soup::domain::models::SoupErr> {
- self.0.get_user_soup_grouped(req).await
- }
-
- async fn caller_tag_sets<'a>(
- &self,
- user_id: macro_user_id::user_id::MacroUserIdStr<'a>,
- ) -> Result<
- Vec<models_properties::service::property_definition_with_options::PropertyDefinitionWithOptions>,
- soup::domain::models::SoupErr,
- >{
- self.0.caller_tag_sets(user_id).await
- }
-}
-
/// Resolve a page of Soup items for the authenticated user: runs the lazy
/// axum extractors against the request context, converts the GraphQL input
/// into a Soup request, and executes it against the Soup service.
diff --git a/crates/soup/src/domain/ports.rs b/crates/soup/src/domain/ports.rs
index 5d550fa7c8..00f212f192 100644
--- a/crates/soup/src/domain/ports.rs
+++ b/crates/soup/src/domain/ports.rs
@@ -1,3 +1,5 @@
+use std::sync::Arc;
+
use crate::domain::models::{
AdvancedSortParams, FrecencySoupItem, GroupedSortRequest, GroupedSoupItem, IntoSoupReqAst,
SimpleSortRequest, SoupErr, SoupRequest,
@@ -72,6 +74,9 @@ pub type SoupOutput<T> = Either<
PaginatedCursor<FrecencySoupItem, String, Frecency, T>,
>;
+#[cfg(test)]
+mod test;
+
/// Service abstraction for executing user-facing soup queries.
pub trait SoupService: Send + Sync + 'static {
/// Run a soup query for the authenticated user.
@@ -103,6 +108,37 @@ pub trait SoupService: Send + Sync + 'static {
) -> impl Future<Output = Result<Vec<PropertyDefinitionWithOptions>, SoupErr>> + Send;
}
+impl<S> SoupService for Arc<S>
+where
+ S: SoupService,
+{
+ async fn get_user_soup<T>(
+ &self,
+ req: SoupRequest<T>,
+ team_receipt: Option<EntityAccessReceipt<MemberTeamRole>>,
+ ) -> Result<SoupOutput<T>, SoupErr>
+ where
+ SoupRequest<T>: IntoSoupReqAst,
+ T: Clone + Serialize + Send,
+ {
+ (**self).get_user_soup(req, team_receipt).await
+ }
+
+ async fn get_user_soup_grouped(
+ &self,
+ req: GroupedSortRequest<'_>,
+ ) -> Result<Vec<GroupedSoupItem>, SoupErr> {
+ (**self).get_user_soup_grouped(req).await
+ }
+
+ async fn caller_tag_sets<'a>(
+ &self,
+ user_id: MacroUserIdStr<'a>,
+ ) -> Result<Vec<PropertyDefinitionWithOptions>, SoupErr> {
+ (**self).caller_tag_sets(user_id).await
+ }
+}
+
/// No-op [`SoupService`] for binaries that need to satisfy the bound but
/// never serve soup queries — e.g. schema-only GraphQL SDL export. Every
/// method errors; swap for a real implementation if you actually need soup.
diff --git a/crates/soup/src/domain/ports/test.rs b/crates/soup/src/domain/ports/test.rs
new file mode 100644
index 0000000000..ad064be8e0
--- /dev/null
+++ b/crates/soup/src/domain/ports/test.rs
@@ -0,0 +1,10 @@
+use std::sync::Arc;
+
+use super::{NoOpSoupService, SoupService};
+
+#[test]
+fn arc_of_soup_service_is_a_soup_service() {
+ fn assert_soup_service<T: SoupService>() {}
+
+ assert_soup_service::<Arc<NoOpSoupService>>();
+}
diff --git a/services/document_storage_service/src/api/context.rs b/services/document_storage_service/src/api/context.rs
index 13df61cbbc..4ddfc700df 100644
--- a/services/document_storage_service/src/api/context.rs
+++ b/services/document_storage_service/src/api/context.rs
@@ -146,7 +146,7 @@ pub(crate) type DssGraphqlSoupSchema = complete_graph::SharedSoupSchema<
ApiContext,
complete_graph::PropertiesEntityPropertyWriter<PropertiesService, EntityAccessService>,
Arc<ai_tools::ToolNotificationService>,
- complete_graph::PropertiesSoupPropertyEdgeReader<PropertiesService, EntityAccessService>,
+ complete_graph::PropertiesEntityPropertyReader<PropertiesService, EntityAccessService>,
>;
type SystemPropertiesService = SystemPropertiesServiceImpl<PgSystemPropertiesRepository>;
diff --git a/services/document_storage_service/src/api/graphql_soup.rs b/services/document_storage_service/src/api/graphql_soup.rs
index 7282ad5fbb..5a6f573cd5 100644
--- a/services/document_storage_service/src/api/graphql_soup.rs
+++ b/services/document_storage_service/src/api/graphql_soup.rs
@@ -54,7 +54,7 @@ async fn handler(State(state): State<ApiContext>, req: Request) -> Response {
.into_response();
};
- let property_reader = complete_graph::PropertiesSoupPropertyEdgeReader::new(
+ let property_reader = complete_graph::PropertiesEntityPropertyReader::new(
state.properties_service.clone(),
state.entity_access_service.clone(),
);
diff --git a/static_assets/schema.graphql b/static_assets/schema.graphql
index 9f9d17f3d8..91a451a436 100644
--- a/static_assets/schema.graphql
+++ b/static_assets/schema.graphql
@@ -1,3 +1,13 @@
+"""
+A Boolean property value.
+"""
+type GraphqlBooleanPropertyValue {
+ """
+ The stored Boolean.
+ """
+ value: Boolean!
+}
+
input GraphqlCallBinaryExpr {
left: GraphqlCallExpr!
right: GraphqlCallExpr!
@@ -136,6 +146,16 @@ input GraphqlDateLiteral @oneOf {
lte: String
}
+"""
+A date-time property value.
+"""
+type GraphqlDatePropertyValue {
+ """
+ The stored date-time formatted as RFC 3339.
+ """
+ value: String!
+}
+
input GraphqlDocumentBinaryExpr {
left: GraphqlDocumentExpr!
right: GraphqlDocumentExpr!
@@ -241,6 +261,16 @@ input GraphqlEntityReferenceInput {
specificMessageId: ID
}
+"""
+An entity-reference property value.
+"""
+type GraphqlEntityReferencePropertyValue {
+ """
+ The referenced entities.
+ """
+ references: [GraphqlPropertyEntityReference!]!
+}
+
input GraphqlForeignEntityBinaryExpr {
left: GraphqlForeignEntityExpr!
right: GraphqlForeignEntityExpr!
@@ -262,6 +292,26 @@ input GraphqlForeignEntityLiteral @oneOf {
notificationSeen: Boolean
}
+"""
+A link property value.
+"""
+type GraphqlLinkPropertyValue {
+ """
+ The stored URLs.
+ """
+ urls: [String!]!
+}
+
+"""
+A numeric property value.
+"""
+type GraphqlNumberPropertyValue {
+ """
+ The stored number.
+ """
+ value: Float!
+}
+
input GraphqlProjectBinaryExpr {
left: GraphqlProjectExpr!
right: GraphqlProjectExpr!
@@ -315,8 +365,107 @@ input GraphqlPropertiesLiteral {
value: GraphqlPropertyMatchValue!
}
+type GraphqlProperty {
+ """
+ The globally unique identifier of this entity-property assignment.
+ """
+ id: ID!
+ """
+ The identifier of the shared property definition.
+ """
+ propertyDefinitionId: ID!
+ """
+ The user-facing name of the property.
+ """
+ displayName: String!
+ """
+ The type of value accepted by the property.
+ """
+ dataType: GraphqlPropertyDataType!
+ """
+ Whether the property can contain more than one value.
+ """
+ isMultiSelect: Boolean!
+ """
+ The required entity type for entity-reference properties, when constrained.
+ """
+ specificEntityType: GraphqlPropertyEntityType
+ """
+ Whether this property is managed by the system.
+ """
+ isSystem: Boolean!
+ """
+ Whether this property describes entity metadata.
+ """
+ isMetadata: Boolean!
+ """
+ The current value, represented by exactly one typed union variant.
+ """
+ value: GraphqlPropertyValue
+}
+
+"""
+A property definition's supported value type.
+"""
+enum GraphqlPropertyDataType {
+ """
+ Boolean true/false values.
+ """
+ BOOLEAN
+ """
+ Date and time values.
+ """
+ DATE
+ """
+ Numeric values.
+ """
+ NUMBER
+ """
+ String or text values.
+ """
+ STRING
+ """
+ A select property with numeric options.
+ """
+ SELECT_NUMBER
+ """
+ A select property with string options.
+ """
+ SELECT_STRING
+ """
+ User- or team-scoped colored labels.
+ """
+ TAG
+ """
+ References to other entities.
+ """
+ ENTITY
+ """
+ URL values.
+ """
+ LINK
+}
+
"""
-GraphQL entity type supported by property filters.
+An entity reference stored in a property value.
+"""
+type GraphqlPropertyEntityReference {
+ """
+ The referenced entity's identifier.
+ """
+ entityId: String!
+ """
+ The referenced entity's property-domain type.
+ """
+ entityType: GraphqlPropertyEntityType!
+ """
+ The specific message identifier when the reference targets a thread message.
+ """
+ specificMessageId: ID
+}
+
+"""
+An entity type supported by the properties domain.
"""
enum GraphqlPropertyEntityType {
"""
@@ -367,6 +516,21 @@ input GraphqlPropertyMatchValue @oneOf {
entityRef: String
}
+"""
+A property value represented by a type-safe GraphQL union.
+"""
+union GraphqlPropertyValue = GraphqlBooleanPropertyValue | GraphqlNumberPropertyValue | GraphqlStringPropertyValue | GraphqlDatePropertyValue | GraphqlSelectOptionPropertyValue | GraphqlEntityReferencePropertyValue | GraphqlLinkPropertyValue
+
+"""
+A select-option property value.
+"""
+type GraphqlSelectOptionPropertyValue {
+ """
+ The selected option identifiers.
+ """
+ optionIds: [ID!]!
+}
+
input GraphqlSetPropertyValue @oneOf {
boolean: Boolean
date: String
@@ -425,7 +589,7 @@ type GraphqlSoupCall {
participantCount: Int!
participantIds: [String!]!
participants: [GraphqlSoupCallParticipant!]!
- properties: [GraphqlSoupProperty!]!
+ properties: [GraphqlProperty!]!
notifications: [GraphqlSoupNotification!]!
}
@@ -451,7 +615,7 @@ type GraphqlSoupChannel {
participants: [GraphqlSoupChannelParticipant!]!
latestMessage: GraphqlSoupChannelMessage
latestNonThreadMessage: GraphqlSoupChannelMessage
- properties: [GraphqlSoupProperty!]!
+ properties: [GraphqlProperty!]!
notifications: [GraphqlSoupNotification!]!
}
@@ -483,7 +647,7 @@ type GraphqlSoupChannelThread {
updatedAt: String!
effectiveUpdatedAt: String!
replyCount: Int!
- properties: [GraphqlSoupProperty!]!
+ properties: [GraphqlProperty!]!
notifications: [GraphqlSoupNotification!]!
}
@@ -497,7 +661,7 @@ type GraphqlSoupChat {
updatedAt: String!
viewedAt: String
deletedAt: String
- properties: [GraphqlSoupProperty!]!
+ properties: [GraphqlProperty!]!
notifications: [GraphqlSoupNotification!]!
}
@@ -512,52 +676,10 @@ type GraphqlSoupCrmCompany {
updatedAt: String!
viewedAt: String
domains: [String!]!
- properties: [GraphqlSoupProperty!]!
+ properties: [GraphqlProperty!]!
notifications: [GraphqlSoupNotification!]!
}
-"""
-GraphQL representation of supported Soup property data types.
-"""
-enum GraphqlSoupDataType {
- """
- Boolean true/false values.
- """
- BOOLEAN
- """
- Date and time values.
- """
- DATE
- """
- Numeric values.
- """
- NUMBER
- """
- String/text values.
- """
- STRING
- """
- Select property with numeric options.
- """
- SELECT_NUMBER
- """
- Select property with string options.
- """
- SELECT_STRING
- """
- Tag property - user- or team-scoped colored labels (always multi-select).
- """
- TAG
- """
- Entity reference property.
- """
- ENTITY
- """
- Link value Property.
- """
- LINK
-}
-
type GraphqlSoupDocument {
id: ID!
name: String!
@@ -569,7 +691,7 @@ type GraphqlSoupDocument {
viewedAt: String
deletedAt: String
subType: GraphqlSoupDocumentSubType
- properties: [GraphqlSoupProperty!]!
+ properties: [GraphqlProperty!]!
notifications: [GraphqlSoupNotification!]!
}
@@ -632,7 +754,7 @@ type GraphqlSoupEmailThread {
participants: [GraphqlSoupEmailParticipant!]!
attachments: [GraphqlSoupEmailAttachment!]!
labels: [GraphqlSoupEmailLabel!]!
- properties: [GraphqlSoupProperty!]!
+ properties: [GraphqlProperty!]!
notifications: [GraphqlSoupNotification!]!
}
@@ -708,7 +830,7 @@ type GraphqlSoupForeignEntity {
metadata: JSON!
createdAt: String!
updatedAt: String!
- properties: [GraphqlSoupProperty!]!
+ properties: [GraphqlProperty!]!
notifications: [GraphqlSoupNotification!]!
}
@@ -743,87 +865,18 @@ type GraphqlSoupProject {
updatedAt: String!
viewedAt: String
deletedAt: String
- properties: [GraphqlSoupProperty!]!
+ properties: [GraphqlProperty!]!
notifications: [GraphqlSoupNotification!]!
}
-type GraphqlSoupProperty {
- """
- Globally unique id of this property assignment.
- """
- id: ID!
- """
- Id of the shared property definition.
- """
- propertyDefinitionId: ID!
- displayName: String!
- dataType: GraphqlSoupDataType!
- isMultiSelect: Boolean!
- specificEntityType: GraphqlSoupPropertyEntityType
- isSystem: Boolean!
- isMetadata: Boolean!
- value: GraphqlSoupPropertyValue
-}
-
-"""
-GraphQL entity reference stored in a property value.
"""
-type GraphqlSoupPropertyEntityReference {
- entityId: String!
- entityType: GraphqlSoupPropertyEntityType!
- specificMessageId: ID
-}
-
+A string property value.
"""
-GraphQL entity type supported by Soup properties.
-"""
-enum GraphqlSoupPropertyEntityType {
- """
- Channel entity.
- """
- CHANNEL
- """
- Chat entity.
- """
- CHAT
+type GraphqlStringPropertyValue {
"""
- Company entity.
- """
- COMPANY
+ The stored string.
"""
- Document entity.
- """
- DOCUMENT
- """
- Project entity.
- """
- PROJECT
- """
- Task entity.
- """
- TASK
- """
- Thread entity.
- """
- THREAD
- """
- User entity.
- """
- USER
-}
-
-"""
-GraphQL representation of a property value.
-"""
-type GraphqlSoupPropertyValue {
- kind: String!
- boolValue: Boolean
- numberValue: Float
- stringValue: String
- dateValue: String
- selectOptionIds: [ID!]!
- entityReferences: [GraphqlSoupPropertyEntityReference!]!
- links: [String!]!
+ value: String!
}
type GraphqlUser {
@@ -846,7 +899,7 @@ type PropertiesMutationRoot {
"""
Set or attach one property on an entity.
"""
- setEntityProperty(input: SetEntityPropertyInput!): GraphqlSoupProperty!
+ setEntityProperty(input: SetEntityPropertyInput!): GraphqlProperty!
}
input SetEntityPropertyInput {