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/unset property optimism (#7123)

Sean Ayee5c2ca169fdd
diff --git a/apps/web/src/features/next-soup/soup-view/views/tasks/task-grid-layout.tsx b/apps/web/src/features/next-soup/soup-view/views/tasks/task-grid-layout.tsx
index c1cb6a9322..08c45b3c18 100644
--- a/apps/web/src/features/next-soup/soup-view/views/tasks/task-grid-layout.tsx
+++ b/apps/web/src/features/next-soup/soup-view/views/tasks/task-grid-layout.tsx
@@ -48,7 +48,7 @@ const EPOCH = new Date(0).toISOString();
*/
function buildStubProperty(col: TaskGridColumn): Property {
const stubSoup: SoupProperty = {
- id: col.defId,
+ id: `pending:${col.defId}`,
definition: {
id: col.defId,
display_name: col.label,
diff --git a/apps/web/src/features/tasks-view/browser-test/playwright.config.ts b/apps/web/src/features/tasks-view/browser-test/playwright.config.ts
new file mode 100644
index 0000000000..21e1a6f5ef
--- /dev/null
+++ b/apps/web/src/features/tasks-view/browser-test/playwright.config.ts
@@ -0,0 +1,28 @@
+import { fileURLToPath } from 'node:url';
+import { defineConfig } from '@playwright/test';
+
+const webDirectory = fileURLToPath(new URL('../../../../', import.meta.url));
+const port = process.env.TASK_PROPERTY_TEST_PORT ?? '3004';
+
+// Build the current WASM first: just build-cache-wasm (from apps/web).
+export default defineConfig({
+ testDir: fileURLToPath(new URL('.', import.meta.url)),
+ testMatch: '*.browser.e2e.ts',
+ workers: 1,
+ timeout: 60_000,
+ use: {
+ baseURL: `http://localhost:${port}`,
+ headless: true,
+ viewport: { width: 1280, height: 800 },
+ launchOptions: {
+ executablePath: process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH,
+ },
+ },
+ webServer: {
+ command: `bunx vite --port ${port}`,
+ cwd: webDirectory,
+ url: `http://localhost:${port}`,
+ reuseExistingServer: true,
+ timeout: 60_000,
+ },
+});
diff --git a/apps/web/src/features/tasks-view/browser-test/property-optimism.browser.e2e.ts b/apps/web/src/features/tasks-view/browser-test/property-optimism.browser.e2e.ts
new file mode 100644
index 0000000000..0a6dd3aa1d
--- /dev/null
+++ b/apps/web/src/features/tasks-view/browser-test/property-optimism.browser.e2e.ts
@@ -0,0 +1,111 @@
+import { expect, test } from '@playwright/test';
+
+test.beforeEach(async ({ page }) => {
+ // The fixture replaces GraphQL HTTP, and does not need live subscriptions.
+ await page.routeWebSocket('**', (socket) => socket.close());
+ await page.goto(
+ '/src/features/tasks-view/browser-test/property-optimism.html'
+ );
+ await expect(
+ page
+ .getByRole('region', { name: 'Task 1' })
+ .getByRole('button', { name: 'Priority', exact: true })
+ ).toBeVisible();
+});
+
+test('unset priority updates before HTTP and adopts the server assignment ID', async ({
+ page,
+}) => {
+ const first = page.getByRole('region', { name: 'Task 1' });
+ const second = page.getByRole('region', { name: 'Task 2' });
+ await first.getByRole('button', { name: 'Priority', exact: true }).click();
+ await page
+ .locator('[role="menu"]')
+ .getByText('Urgent', { exact: true })
+ .click();
+ await expect(
+ first.getByRole('button', { name: 'Urgent', exact: true })
+ ).toBeVisible();
+ await expect(page.locator('[role="menu"]')).toHaveCount(0);
+ await expect(page.getByText('HTTP requests: 1 · Settled: 0')).toBeVisible();
+ await expect(first.locator('output')).toContainText('optimistic-property:');
+ await expect(
+ second.getByRole('button', { name: 'Priority', exact: true })
+ ).toBeVisible();
+ await page.getByRole('button', { name: 'Commit next request' }).click();
+ await expect(first.locator('output')).toHaveText(
+ '00000000-0000-0000-0000-000000000201'
+ );
+ await expect(
+ first.getByRole('button', { name: 'Urgent', exact: true })
+ ).toBeVisible();
+});
+
+for (const succeeds of [true, false]) {
+ test(`bulk save waits for the queued request's ${succeeds ? 'commit' : 'failure'}`, async ({
+ page,
+ }) => {
+ await page.getByRole('button', { name: 'Set both Urgent' }).click();
+ await expect(page.getByText('HTTP requests: 1 · Settled: 0')).toBeVisible();
+ await page.getByRole('button', { name: 'Commit next request' }).click();
+ await expect(page.getByText('HTTP requests: 2 · Settled: 1')).toBeVisible();
+ await expect(page.getByLabel('Save status')).toHaveText(
+ 'Pending: yes · Succeeded: 0 · Failed: 0'
+ );
+ await page
+ .getByRole('button', {
+ name: succeeds ? 'Commit next request' : 'Fail next request',
+ })
+ .click();
+ await expect(page.getByLabel('Save status')).toHaveText(
+ succeeds
+ ? 'Pending: no · Succeeded: 1 · Failed: 0'
+ : 'Pending: no · Succeeded: 0 · Failed: 1'
+ );
+ await expect(
+ page.getByRole('region', { name: 'Task 2' }).getByRole('button', {
+ name: succeeds ? 'Urgent' : 'Priority',
+ exact: true,
+ })
+ ).toBeVisible();
+ });
+}
+
+test('bulk layers appear before the first response and rollback stays task-scoped', async ({
+ page,
+}) => {
+ const first = page.getByRole('region', { name: 'Task 1' });
+ const second = page.getByRole('region', { name: 'Task 2' });
+ await page.getByRole('button', { name: 'Set both Urgent' }).click();
+ await expect(
+ first.getByRole('button', { name: 'Urgent', exact: true })
+ ).toBeVisible();
+ await expect(
+ second.getByRole('button', { name: 'Urgent', exact: true })
+ ).toBeVisible();
+ await expect(page.getByText('HTTP requests: 1 · Settled: 0')).toBeVisible();
+ expect(await first.locator('output').textContent()).not.toBe(
+ await second.locator('output').textContent()
+ );
+ await page.getByRole('button', { name: 'Fail next request' }).click();
+ await expect(
+ first.getByRole('button', { name: 'Priority', exact: true })
+ ).toBeVisible();
+ await expect(
+ second.getByRole('button', { name: 'Urgent', exact: true })
+ ).toBeVisible();
+ await expect(page.getByText('HTTP requests: 2 · Settled: 1')).toBeVisible();
+ await expect(page.getByLabel('Save status')).toHaveText(
+ 'Pending: yes · Succeeded: 0 · Failed: 0'
+ );
+ await page.getByRole('button', { name: 'Commit next request' }).click();
+ await expect(second.locator('output')).toHaveText(
+ '00000000-0000-0000-0000-000000000202'
+ );
+ await expect(page.getByLabel('Save status')).toHaveText(
+ 'Pending: no · Succeeded: 0 · Failed: 1'
+ );
+ await expect(
+ second.getByRole('button', { name: 'Urgent', exact: true })
+ ).toBeVisible();
+});
diff --git a/apps/web/src/features/tasks-view/browser-test/property-optimism.html b/apps/web/src/features/tasks-view/browser-test/property-optimism.html
new file mode 100644
index 0000000000..1a4d27b193
--- /dev/null
+++ b/apps/web/src/features/tasks-view/browser-test/property-optimism.html
@@ -0,0 +1,5 @@
+<!doctype html>
+<html lang="en">
+ <head><meta charset="utf-8" /><title>Task property optimism regression</title></head>
+ <body><div id="root"></div><script type="module" src="./property-optimism.tsx"></script></body>
+</html>
diff --git a/apps/web/src/features/tasks-view/browser-test/property-optimism.tsx b/apps/web/src/features/tasks-view/browser-test/property-optimism.tsx
new file mode 100644
index 0000000000..c67bd599e0
--- /dev/null
+++ b/apps/web/src/features/tasks-view/browser-test/property-optimism.tsx
@@ -0,0 +1,224 @@
+// Real task-list property cells, production queries/exchange and worker/WASM
+// cache. Only HTTP is replaced; no hosted workspace data is read or changed.
+import '@app/index.css';
+import { createUrqlQuery } from '@app/lib/urql-solid/create-urql-query';
+import { enableGraphqlSoup } from '@core/constant/featureFlags';
+import { soupPropertyToProperty } from '@entity/extractors-property/property-helpers';
+import { ListPropertyValue } from '@property/component/ListPropertyValue';
+import { PROPERTY_OPTION_IDS, SYSTEM_PROPERTY_IDS } from '@property/constants';
+import { PropertiesProvider } from '@property/context/PropertiesContext';
+import type { Property, PropertyApiValues } from '@property/types';
+import { queryClient } from '@queries/client';
+import { useBulkSaveEntityPropertiesMutation } from '@queries/properties/entity';
+import { propertiesKeys } from '@queries/properties/keys';
+import {
+ EntityPropertiesDocument,
+ type SoupPropertyFieldsFragment,
+} from '@service-storage/graphql/generated/graphql';
+import {
+ getGraphqlSoupClient,
+ mapGraphqlProperties,
+} from '@service-storage/graphql-soup';
+import { QueryClientProvider } from '@tanstack/solid-query';
+import { createSignal, For, Show } from 'solid-js';
+import { render } from 'solid-js/web';
+
+enableGraphqlSoup.override = true;
+const taskIds = [
+ '00000000-0000-0000-0000-000000000101',
+ '00000000-0000-0000-0000-000000000102',
+];
+const definitionId = SYSTEM_PROPERTY_IDS.PRIORITY;
+const urgent = PROPERTY_OPTION_IDS.PRIORITY.URGENT;
+const placeholder = soupPropertyToProperty({
+ id: `pending:${definitionId}`,
+ definition: {
+ id: definitionId,
+ display_name: 'Priority',
+ data_type: 'SELECT_STRING',
+ is_multi_select: false,
+ is_metadata: false,
+ is_system: true,
+ owner: { scope: 'system' },
+ created_at: new Date(0).toISOString(),
+ updated_at: new Date(0).toISOString(),
+ },
+});
+queryClient.setQueryData(
+ propertiesKeys.options({ propertyDefinitionId: definitionId }).queryKey,
+ placeholder.options
+);
+const saved = new Map<string, SoupPropertyFieldsFragment>();
+const pending: Array<(success: boolean) => void> = [];
+const [requestCount, setRequestCount] = createSignal(0);
+const [settledCount, setSettledCount] = createSignal(0);
+const nativeFetch = window.fetch.bind(window);
+window.fetch = async (input, init) => {
+ if (!String(input).includes('/items/soup/graphql'))
+ return nativeFetch(input, init);
+ const body = JSON.parse(String(init?.body)) as {
+ query: string;
+ variables: {
+ input: { entityId?: string; value?: { selectOption?: string } };
+ };
+ };
+ if (body.query.includes('mutation SetEntityProperty')) {
+ setRequestCount((value) => value + 1);
+ return await new Promise<Response>((resolve) => {
+ pending.push((success) => {
+ const id = body.variables.input.entityId!;
+ const property: SoupPropertyFieldsFragment = {
+ id: id.replace(/1(\d\d)$/, '2$1'),
+ propertyDefinitionId: definitionId,
+ displayName: 'Priority',
+ dataType: 'SELECT_STRING',
+ isMultiSelect: false,
+ isMetadata: false,
+ isSystem: true,
+ specificEntityType: null,
+ value: {
+ __typename: 'GraphqlSelectOptionPropertyValue',
+ optionIds: [body.variables.input.value?.selectOption ?? urgent],
+ },
+ };
+ if (success) saved.set(id, property);
+ setSettledCount((value) => value + 1);
+ resolve(
+ Response.json(
+ success
+ ? { data: { setEntityProperty: property } }
+ : { errors: [{ message: 'Rejected by fixture' }] }
+ )
+ );
+ });
+ });
+ }
+ return Response.json({
+ data: {
+ user: {
+ id: 'macro|[email protected]',
+ soup: {
+ items: taskIds.map((id) => ({
+ __typename: 'GraphqlSoupDocument',
+ id,
+ properties: saved.has(id) ? [saved.get(id)] : [],
+ })),
+ },
+ },
+ },
+ });
+};
+
+function Fixture() {
+ const query = createUrqlQuery(() => ({
+ client: getGraphqlSoupClient(),
+ query: EntityPropertiesDocument,
+ variables: { input: { initial: { limit: 2 } } },
+ requestPolicy: 'cache-and-network',
+ }));
+ const [successes, setSuccesses] = createSignal(0);
+ const [failures, setFailures] = createSignal(0);
+ const save = useBulkSaveEntityPropertiesMutation({
+ onSuccess: () => {
+ setSuccesses((value) => value + 1);
+ },
+ onError: () => {
+ setFailures((value) => value + 1);
+ },
+ });
+ const property = (entityId: string): Property => {
+ const raw =
+ query.data?.user.soup.items.find((item) => item.id === entityId)
+ ?.properties ?? [];
+ return (
+ mapGraphqlProperties(raw)
+ .map(soupPropertyToProperty)
+ .find((p) => p.propertyDefinitionId === definitionId) ?? placeholder
+ );
+ };
+ const saveOne = async (
+ entityId: string,
+ value: Property,
+ apiValues: PropertyApiValues
+ ) => {
+ await save.mutateAsync({
+ properties: [
+ { entityId, entityType: 'TASK', property: value, apiValues },
+ ],
+ });
+ };
+ return (
+ <main class="p-8 text-ink bg-page min-h-screen">
+ <h1>Task priority optimistic cache regression</h1>
+ <p>
+ HTTP requests: {requestCount()} · Settled: {settledCount()}
+ </p>
+ <p aria-label="Save status">
+ Pending: {save.isPending ? 'yes' : 'no'} · Succeeded: {successes()} ·
+ Failed: {failures()}
+ </p>
+ <Show when={query.data} fallback={<p>Loading</p>}>
+ <For each={taskIds}>
+ {(entityId, index) => (
+ <section
+ aria-label={`Task ${index() + 1}`}
+ class="flex items-center gap-4 py-3"
+ >
+ <span>Task {index() + 1}</span>
+ <PropertiesProvider
+ entityId={entityId}
+ entityType="TASK"
+ canEdit
+ properties={() => [property(entityId)]}
+ onRefresh={() => {}}
+ onPropertyAdded={() => {}}
+ onPropertyDeleted={() => {}}
+ saveHandler={{
+ saveProperty: (p, v) => saveOne(entityId, p, v),
+ saveDate: (p, value) =>
+ saveOne(entityId, p, { valueType: 'DATE', value }),
+ }}
+ >
+ <ListPropertyValue
+ property={property(entityId)}
+ entityId={entityId}
+ />
+ </PropertiesProvider>
+ <output data-assignment={entityId}>
+ {property(entityId).propertyId}
+ </output>
+ </section>
+ )}
+ </For>
+ <button
+ onClick={() =>
+ save.mutate({
+ properties: taskIds.map((entityId) => ({
+ entityId,
+ entityType: 'TASK',
+ property: property(entityId),
+ apiValues: { valueType: 'SELECT_STRING', values: [urgent] },
+ })),
+ })
+ }
+ >
+ Set both Urgent
+ </button>
+ <button onClick={() => pending.shift()?.(true)}>
+ Commit next request
+ </button>
+ <button onClick={() => pending.shift()?.(false)}>
+ Fail next request
+ </button>
+ </Show>
+ </main>
+ );
+}
+render(
+ () => (
+ <QueryClientProvider client={queryClient}>
+ <Fixture />
+ </QueryClientProvider>
+ ),
+ document.querySelector('#root')!
+);
diff --git a/apps/web/src/features/tasks-view/components/task-list/TaskGridLayout.tsx b/apps/web/src/features/tasks-view/components/task-list/TaskGridLayout.tsx
index 8512be5a67..d35f95aae9 100644
--- a/apps/web/src/features/tasks-view/components/task-list/TaskGridLayout.tsx
+++ b/apps/web/src/features/tasks-view/components/task-list/TaskGridLayout.tsx
@@ -42,7 +42,7 @@ const EPOCH = new Date(0).toISOString();
*/
function buildStubProperty(col: TaskGridColumn): Property {
const stubSoup: SoupProperty = {
- id: col.defId,
+ id: `pending:${col.defId}`,
definition: {
id: col.defId,
display_name: col.label,
diff --git a/apps/web/src/lib/graphql-cache/exchange/normalized-cache-exchange.test.ts b/apps/web/src/lib/graphql-cache/exchange/normalized-cache-exchange.test.ts
index 874a4b271b..76b3e7f99b 100644
--- a/apps/web/src/lib/graphql-cache/exchange/normalized-cache-exchange.test.ts
+++ b/apps/web/src/lib/graphql-cache/exchange/normalized-cache-exchange.test.ts
@@ -2729,6 +2729,47 @@ describe('normalizedCacheExchange', () => {
expect(forwarded.map((op) => op.kind)).toEqual(['mutation']);
});
+ it('acknowledges cache installation independently of the network result', async () => {
+ const acknowledge = vi.fn();
+ const enqueue = host.enqueueOptimisticMutation.bind(host);
+ let release!: () => void;
+ const installation = new Promise<void>((resolve) => {
+ release = resolve;
+ });
+ host.enqueueOptimisticMutation = vi.fn(async (args, claim) => {
+ await installation;
+ return enqueue(args, claim);
+ });
+ const { ops, forwarded, results, network } = controlledQueryHarness(host);
+ const operation = makeMutationOp(1, optimistic);
+ ops.next(
+ makeOperation('mutation', operation, {
+ ...operation.context,
+ normalizedCacheOptimisticEnqueued: acknowledge,
+ })
+ );
+ await tick();
+ expect(acknowledge).not.toHaveBeenCalled();
+ expect(forwarded).toEqual([]);
+ release();
+ await tick();
+ expect(acknowledge).toHaveBeenCalledOnce();
+ expect(results).toEqual([]);
+ expect(forwarded).toHaveLength(1);
+ expect(
+ vi.mocked(host.enqueueOptimisticMutation).mock.calls[0][0]
+ ).not.toHaveProperty('onEnqueued');
+ network.next({
+ operation: forwarded[0],
+ data: optimistic,
+ stale: false,
+ hasNext: false,
+ });
+ await tick();
+ expect(results).toHaveLength(1);
+ expect(acknowledge).toHaveBeenCalledOnce();
+ });
+
it('installs the optimistic layer before forwarding to the network', async () => {
const { ops, results, forwarded } = harness(host);
const enqueue = host.enqueueOptimisticMutation.bind(host);
diff --git a/apps/web/src/lib/graphql-cache/exchange/normalized-cache-exchange.ts b/apps/web/src/lib/graphql-cache/exchange/normalized-cache-exchange.ts
index 96707a1722..a9e3d51c36 100644
--- a/apps/web/src/lib/graphql-cache/exchange/normalized-cache-exchange.ts
+++ b/apps/web/src/lib/graphql-cache/exchange/normalized-cache-exchange.ts
@@ -80,6 +80,7 @@ import {
} from './entity-resolvers';
import {
normalizedEntityKey,
+ notifyOptimisticMutationEnqueued,
optimisticContextOf,
withOptimisticMutationDisposition,
} from './optimistic';
@@ -1041,6 +1042,7 @@ export function normalizedCacheExchange(
op: Operation
): Promise<OperationResult | undefined> {
if (host.disabled) {
+ notifyOptimisticMutationEnqueued(op);
enqueueForward(op);
return undefined;
}
@@ -1144,6 +1146,7 @@ export function normalizedCacheExchange(
resolveRoute: resolve,
});
});
+ notifyOptimisticMutationEnqueued(op);
try {
await match(enqueue.initialClaim)
.with({ kind: 'claimed' }, ({ mutation }) =>
diff --git a/apps/web/src/lib/graphql-cache/exchange/optimistic.ts b/apps/web/src/lib/graphql-cache/exchange/optimistic.ts
index 29185fb98e..8550ed8b3f 100644
--- a/apps/web/src/lib/graphql-cache/exchange/optimistic.ts
+++ b/apps/web/src/lib/graphql-cache/exchange/optimistic.ts
@@ -31,6 +31,8 @@ import {
/** Private operation-context field carrying serializable optimistic data. */
const OPTIMISTIC_MUTATION_CONTEXT_KEY = 'normalizedCacheOptimistic';
+// Page-local acknowledgement; deliberately excluded from durable queue data.
+const OPTIMISTIC_ENQUEUED_CONTEXT_KEY = 'normalizedCacheOptimisticEnqueued';
/** Private result-extension field carrying the queue disposition. */
const OPTIMISTIC_MUTATION_DISPOSITION_KEY =
'normalizedCacheMutationDisposition';
@@ -111,6 +113,8 @@ export type QueryRevalidation = {
export type OptimisticMutationOptions = {
/** Required RFC UUID; reuse only when the newer intent safely replaces the older one. */
uuid: string;
+ /** Runs after durable layer installation, independently of HTTP settlement. */
+ onEnqueued?: () => void;
updates?: readonly OptimisticUpdate[];
/** Relevant queries that cannot safely be updated still revalidate on success. */
revalidations?: readonly QueryRevalidation[];
@@ -300,6 +304,33 @@ export function update<TItem extends object>(
} as OptimisticUpdate;
}
+/**
+ * Upserts a logical list member using its matching mutation-response record.
+ * Settlement resolves the server's ID rather than persisting a temporary ID.
+ */
+export function upsertByField<TItem extends object, K extends ScalarKey<TItem>>(
+ selection: ListSelection<TItem>,
+ args: {
+ entity: NormalizedEntityIdentity;
+ whereField: K;
+ equals: Extract<Present<TItem[K]>, JsonScalar>;
+ }
+): OptimisticUpdate {
+ const patch: OptimisticLinkPatchWire = {
+ query: stringifyDocument(selection.document),
+ operationName: documentOperationName(selection.document),
+ variablesJson: JSON.stringify(selection.variables ?? {}),
+ path: [...selection.path],
+ operation: {
+ kind: 'upsertByField',
+ entityKey: normalizedEntityKey(args.entity),
+ whereField: args.whereField,
+ equals: args.equals,
+ },
+ };
+ return patch as OptimisticUpdate;
+}
+
/**
* Removes an entity link from a selected embedded list item and decrements
* its count only when the link was present.
@@ -406,9 +437,23 @@ export function executeOptimisticMutation<
};
return client.mutation(document, variables, {
[OPTIMISTIC_MUTATION_CONTEXT_KEY]: context,
+ ...(options.onEnqueued
+ ? { [OPTIMISTIC_ENQUEUED_CONTEXT_KEY]: options.onEnqueued }
+ : {}),
});
}
+/** Acknowledge installation without allowing caller code to interrupt queue routing. */
+export function notifyOptimisticMutationEnqueued(op: Operation): void {
+ const notify: unknown = op.context[OPTIMISTIC_ENQUEUED_CONTEXT_KEY];
+ if (typeof notify !== 'function') return;
+ try {
+ notify();
+ } catch (error) {
+ console.warn('Optimistic enqueue acknowledgement failed', error);
+ }
+}
+
/** Reads and defensively validates the private context at the exchange edge. */
export function optimisticContextOf(
op: Operation
diff --git a/apps/web/src/lib/graphql-cache/index.ts b/apps/web/src/lib/graphql-cache/index.ts
index ad7ae6a30b..8df67616c5 100644
--- a/apps/web/src/lib/graphql-cache/index.ts
+++ b/apps/web/src/lib/graphql-cache/index.ts
@@ -37,6 +37,7 @@ export {
type Selection,
select,
update,
+ upsertByField,
upsertEmbeddedLink,
} from './exchange/optimistic';
export {
diff --git a/apps/web/src/lib/graphql-cache/protocol.ts b/apps/web/src/lib/graphql-cache/protocol.ts
index 6261e6f3c8..52708fb446 100644
--- a/apps/web/src/lib/graphql-cache/protocol.ts
+++ b/apps/web/src/lib/graphql-cache/protocol.ts
@@ -303,6 +303,12 @@ export type OptimisticLinkPatchWire = {
operation:
| { kind: 'remove'; entityKey: string }
| { kind: 'prependUnique'; entityKey: string }
+ | {
+ kind: 'upsertByField';
+ entityKey: string;
+ whereField: string;
+ equals: string | number | boolean | null;
+ }
| {
kind: 'removeEmbeddedLink';
listItem: {
diff --git a/apps/web/src/lib/queries/properties/entity.test.tsx b/apps/web/src/lib/queries/properties/entity.test.tsx
index aa1904f65d..1a2885f4fb 100644
--- a/apps/web/src/lib/queries/properties/entity.test.tsx
+++ b/apps/web/src/lib/queries/properties/entity.test.tsx
@@ -678,14 +678,24 @@ describe('useBulkSaveEntityPropertiesMutation dispositions', () => {
vi.restoreAllMocks();
});
- it('submits GraphQL optimism while offline for the durable cache queue', async () => {
+ it('submits GraphQL optimism while offline and waits for durable settlement', async () => {
onlineManager.setOnline(false);
- graphqlEntityPropertyMutationMock.mockResolvedValue({
- kind: 'queued',
- transactionId: 'txn-offline',
- });
+ let commit!: (disposition: { kind: 'committed' }) => void;
+ graphqlEntityPropertyMutationMock.mockImplementation(
+ () =>
+ new Promise((resolve) => {
+ commit = resolve;
+ })
+ );
- await expect(mutation.mutateAsync(variables)).resolves.toBeUndefined();
+ const pending = mutation.mutateAsync(variables);
+ await vi.waitFor(() =>
+ expect(graphqlEntityPropertyMutationMock).toHaveBeenCalledOnce()
+ );
+ expect(mutation.isPending).toBe(true);
+ onlineManager.setOnline(true);
+ commit({ kind: 'committed' });
+ await expect(pending).resolves.toBeUndefined();
expect(graphqlEntityPropertyMutationMock).toHaveBeenCalledOnce();
expect(graphqlEntityPropertyMutationMock).toHaveBeenCalledWith({
@@ -695,13 +705,24 @@ describe('useBulkSaveEntityPropertiesMutation dispositions', () => {
expect(optimisticUpdateSoupEntityMock).not.toHaveBeenCalled();
});
- it('treats queued GraphQL saves as accepted submissions', async () => {
- graphqlEntityPropertyMutationMock.mockResolvedValue({
- kind: 'queued',
- transactionId: 'txn-queued',
- });
+ it('keeps GraphQL saves pending until settlement without snapshot rollback', async () => {
+ let commit!: (disposition: { kind: 'committed' }) => void;
+ graphqlEntityPropertyMutationMock.mockImplementation(
+ () =>
+ new Promise((resolve) => {
+ commit = resolve;
+ })
+ );
- await expect(mutation.mutateAsync(variables)).resolves.toBeUndefined();
+ const pending = mutation.mutateAsync(variables);
+ await vi.waitFor(() =>
+ expect(graphqlEntityPropertyMutationMock).toHaveBeenCalledOnce()
+ );
+ expect(mutation.isPending).toBe(true);
+ expect(invalidateSoupEntityMock).not.toHaveBeenCalled();
+ expect(toastFailureMock).not.toHaveBeenCalled();
+ commit({ kind: 'committed' });
+ await expect(pending).resolves.toBeUndefined();
expect(optimisticUpdateSoupEntityMock).not.toHaveBeenCalled();
expect(rollbackMock).not.toHaveBeenCalled();
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 47a1768718..b9e2dbd00f 100644
--- a/apps/web/src/lib/queries/properties/graphql-optimistic.test.ts
+++ b/apps/web/src/lib/queries/properties/graphql-optimistic.test.ts
@@ -168,7 +168,42 @@ describe('buildOptimisticSetEntityProperty', () => {
});
});
- it('skips optimism for uninstantiated definitions (no stable id)', () => {
+ it('scopes new assignments to their entity and preserves persisted assignment IDs', () => {
+ const value: PropertyApiValues = {
+ valueType: 'SELECT_STRING',
+ values: ['urgent'],
+ };
+ const target = { entityType: 'DOCUMENT', entityId: 'task-1' };
+ const first = buildOptimisticSetEntityProperty(
+ definitionOnly,
+ value,
+ target
+ )!;
+ const second = buildOptimisticSetEntityProperty(definitionOnly, value, {
+ ...target,
+ entityId: 'task-2',
+ })!;
+ expect(first.id).not.toBe(second.id);
+ expect(first.id).not.toBe(definitionOnly.id);
+ expect(first.value).toEqual({
+ __typename: 'GraphqlSelectOptionPropertyValue',
+ optionIds: ['urgent'],
+ });
+ expect(
+ buildOptimisticSetEntityProperty(instantiated, value, target)?.id
+ ).toBe('prop-1');
+ for (const propertyId of ['def-1', 'pending:def-1', first.id]) {
+ expect(
+ buildOptimisticSetEntityProperty(
+ { ...instantiated, propertyId },
+ value,
+ target
+ )?.id
+ ).toBe(first.id);
+ }
+ });
+
+ it('skips optimism for uninstantiated definitions without an owning target', () => {
expect(
buildOptimisticSetEntityProperty(definitionOnly, {
valueType: 'SELECT_STRING',
diff --git a/apps/web/src/lib/queries/properties/graphql-optimistic.ts b/apps/web/src/lib/queries/properties/graphql-optimistic.ts
index 9f4b62390f..a84602aa74 100644
--- a/apps/web/src/lib/queries/properties/graphql-optimistic.ts
+++ b/apps/web/src/lib/queries/properties/graphql-optimistic.ts
@@ -94,36 +94,68 @@ export function apiValuesToGraphqlPropertyValue(
* assignment carrying `value`.
*/
function optimisticPropertyRecord(
- property: Property,
- value: GraphqlPropertyValue | null
+ property: Property | PropertyDefinitionDomain,
+ value: GraphqlPropertyValue | null,
+ id: string
): SoupPropertyFieldsFragment {
return {
- id: property.propertyId,
- propertyDefinitionId: property.propertyDefinitionId,
+ id,
+ propertyDefinitionId: isInstantiatedProperty(property)
+ ? property.propertyDefinitionId
+ : property.id,
displayName: property.displayName,
dataType: property.valueType,
isMultiSelect: property.isMultiSelect,
specificEntityType: property.specificEntityType ?? null,
- isSystem: property.isSystemProperty ?? false,
+ isSystem: isInstantiatedProperty(property)
+ ? (property.isSystemProperty ?? false)
+ : property.isSystem,
isMetadata: property.isMetadata ?? false,
value,
};
}
+const TEMPORARY_PROPERTY_PREFIX = 'optimistic-property:';
+
+/** Temporary assignments must retain a response-derived parent-list recipe. */
+export function isTemporaryGraphqlProperty(id: string): boolean {
+ return id.startsWith(TEMPORARY_PROPERTY_PREFIX);
+}
+
+function hasPersistedAssignment(
+ property: Property | PropertyDefinitionDomain
+): property is Property {
+ return (
+ isInstantiatedProperty(property) &&
+ property.propertyId !== property.propertyDefinitionId &&
+ !property.propertyId.startsWith('pending:') &&
+ !isTemporaryGraphqlProperty(property.propertyId)
+ );
+}
+
/**
- * Complete optimistic mutation payload for an existing property
- * assignment, or `undefined` when none can be built safely:
- * uninstantiated definitions have no assignment id until the server
- * responds, and inventing one would corrupt the normalized cache.
+ * New assignments use a target-scoped temporary ID, never a shared definition
+ * ID. Callers supplying a target must also install a response-derived list
+ * recipe, so commit replaces the temporary link with the server's assignment.
*/
export function buildOptimisticSetEntityProperty(
property: Property | PropertyDefinitionDomain,
- apiValues: PropertyApiValues
+ apiValues: PropertyApiValues,
+ target?: { entityType: string; entityId: string }
): SoupPropertyFieldsFragment | undefined {
- if (!isInstantiatedProperty(property)) return undefined;
+ const definitionId = isInstantiatedProperty(property)
+ ? property.propertyDefinitionId
+ : property.id;
+ const id = hasPersistedAssignment(property)
+ ? property.propertyId
+ : target
+ ? `${TEMPORARY_PROPERTY_PREFIX}${target.entityType}:${target.entityId}:${definitionId}`
+ : undefined;
+ if (!id) return undefined;
return optimisticPropertyRecord(
property,
- apiValuesToGraphqlPropertyValue(apiValues)
+ apiValuesToGraphqlPropertyValue(apiValues),
+ id
);
}
@@ -137,7 +169,7 @@ export function buildOptimisticEntityPropertyOptions(
property: Property | PropertyDefinitionDomain,
optionIds: readonly string[]
): SoupPropertyFieldsFragment | undefined {
- if (!isInstantiatedProperty(property)) return undefined;
+ if (!hasPersistedAssignment(property)) return undefined;
return optimisticPropertyRecord(
property,
optionIds.length > 0
@@ -145,6 +177,7 @@ export function buildOptimisticEntityPropertyOptions(
__typename: 'GraphqlSelectOptionPropertyValue',
optionIds: [...optionIds],
}
- : null
+ : null,
+ property.propertyId
);
}
diff --git a/apps/web/src/lib/queries/properties/graphql/assignment-links.test.ts b/apps/web/src/lib/queries/properties/graphql/assignment-links.test.ts
new file mode 100644
index 0000000000..d8c08ded3f
--- /dev/null
+++ b/apps/web/src/lib/queries/properties/graphql/assignment-links.test.ts
@@ -0,0 +1,94 @@
+import type { CacheHost } from '@graphql-cache/host/types';
+import { describe, expect, it, vi } from 'vitest';
+import { buildPropertyAssignmentLinks } from './assignment-links';
+
+function host(flat: unknown[], grouped: unknown[] = []) {
+ return {
+ inspectQuery: vi.fn(async (args: { operationName?: string }) =>
+ args.operationName === 'SoupMembership' ? flat : grouped
+ ),
+ } as unknown as CacheHost;
+}
+
+describe('new property assignment links', () => {
+ it('links one flat-list parent by ID and reconciles by definition, not temporary ID', async () => {
+ const cache = host([
+ {
+ variables: { input: { initial: { limit: 10 } } },
+ value: { items: [{ id: 'other' }] },
+ },
+ {
+ variables: { input: { initial: { limit: 20 } } },
+ value: { items: [{ id: 'task-1' }] },
+ },
+ ]);
+ const patches = await buildPropertyAssignmentLinks(
+ cache,
+ 'task-1',
+ 'temporary-1',
+ 'priority'
+ );
+ expect(patches).toHaveLength(1);
+ expect(patches[0]).toMatchObject({
+ operationName: 'EntityProperties',
+ path: [
+ { field: 'user' },
+ { field: 'soup' },
+ { field: 'items' },
+ { listItem: { whereField: 'id', equals: 'task-1' } },
+ { field: 'properties' },
+ ],
+ operation: {
+ kind: 'upsertByField',
+ entityKey: 'GraphqlProperty:temporary-1',
+ whereField: 'propertyDefinitionId',
+ equals: 'priority',
+ },
+ });
+ expect(JSON.parse(patches[0].variablesJson)).toEqual({
+ input: { initial: { limit: 20 } },
+ });
+ expect(cache.inspectQuery).toHaveBeenCalledOnce();
+ });
+
+ it('finds grouped-only parents without requiring unrelated property data', async () => {
+ const cache = host(
+ [],
+ [
+ {
+ variables: { input: { initial: { limit: 20 } } },
+ value: { bins: [{ key: 'not-set', items: [{ id: 'task-1' }] }] },
+ },
+ ]
+ );
+ const patches = await buildPropertyAssignmentLinks(
+ cache,
+ 'task-1',
+ 'temporary-1',
+ 'priority'
+ );
+ expect(patches[0]).toMatchObject({
+ operationName: 'GroupEntityProperties',
+ path: [
+ { field: 'user' },
+ { field: 'groupSoup' },
+ { field: 'bins' },
+ { listItem: { whereField: 'key', equals: 'not-set' } },
+ { field: 'items' },
+ { listItem: { whereField: 'id', equals: 'task-1' } },
+ { field: 'properties' },
+ ],
+ });
+ });
+
+ it('does not manufacture a relation for a parent absent from cached lists', async () => {
+ expect(
+ await buildPropertyAssignmentLinks(
+ host([]),
+ 'task-1',
+ 'temporary-1',
+ 'priority'
+ )
+ ).toEqual([]);
+ });
+});
diff --git a/apps/web/src/lib/queries/properties/graphql/assignment-links.ts b/apps/web/src/lib/queries/properties/graphql/assignment-links.ts
new file mode 100644
index 0000000000..6a683557ad
--- /dev/null
+++ b/apps/web/src/lib/queries/properties/graphql/assignment-links.ts
@@ -0,0 +1,76 @@
+import type { CacheHost } from '@graphql-cache/host/types';
+import {
+ inspect,
+ type OptimisticUpdate,
+ select,
+ selectAll,
+ upsertByField,
+} from '@graphql-cache/index';
+import {
+ EntityPropertiesDocument,
+ GroupEntityPropertiesDocument,
+ GroupSoupMembershipDocument,
+ SoupMembershipDocument,
+} from '@service-storage/graphql/generated/graphql';
+
+/**
+ * One path to the normalized parent suffices for every mounted list/detail
+ * query. Discover through ID-only documents so unrelated partial rows cannot
+ * hide an otherwise usable path. No new query is fetched before the edit.
+ */
+export async function buildPropertyAssignmentLinks(
+ host: CacheHost,
+ entityId: string,
+ propertyId: string,
+ propertyDefinitionId: string
+): Promise<OptimisticUpdate[]> {
+ const identity = {
+ entity: { __typename: 'GraphqlProperty', id: propertyId },
+ whereField: 'propertyDefinitionId' as const,
+ equals: propertyDefinitionId,
+ };
+ const pages = await inspect(
+ host,
+ selectAll(SoupMembershipDocument).field('user').field('soup')
+ );
+ const page = pages.find(({ value }) =>
+ value?.items.some((item) => item.id === entityId)
+ );
+ if (page) {
+ return [
+ upsertByField(
+ select(EntityPropertiesDocument, page.variables)
+ .field('user')
+ .field('soup')
+ .field('items')
+ .item('id', entityId)
+ .field('properties'),
+ identity
+ ),
+ ];
+ }
+ const groupedPages = await inspect(
+ host,
+ selectAll(GroupSoupMembershipDocument).field('user').field('groupSoup')
+ );
+ for (const { variables, value } of groupedPages) {
+ const bin = value?.bins.find((bin) =>
+ bin.items.some((item) => item.id === entityId)
+ );
+ if (!bin) continue;
+ return [
+ upsertByField(
+ select(GroupEntityPropertiesDocument, variables)
+ .field('user')
+ .field('groupSoup')
+ .field('bins')
+ .item('key', bin.key)
+ .field('items')
+ .item('id', entityId)
+ .field('properties'),
+ identity
+ ),
+ ];
+ }
+ return [];
+}
diff --git a/apps/web/src/lib/queries/properties/graphql/entity.test.ts b/apps/web/src/lib/queries/properties/graphql/entity.test.ts
index 74e543de53..68818eb09c 100644
--- a/apps/web/src/lib/queries/properties/graphql/entity.test.ts
+++ b/apps/web/src/lib/queries/properties/graphql/entity.test.ts
@@ -1,3 +1,5 @@
+import type { CacheHost } from '@graphql-cache/host/types';
+import type { MutationSettlement } from '@graphql-cache/protocol';
import type { Property } from '@property/types';
import type { EntityType } from '@service-properties/generated/schemas/entityType';
import type { SoupProperty } from '@service-storage/generated/schemas/soupProperty';
@@ -15,6 +17,7 @@ import { filter, makeSubject, mergeMap, pipe } from 'wonka';
const graphqlClientState = vi.hoisted(() => ({
current: undefined as Client | undefined,
+ host: undefined as CacheHost | undefined,
}));
const mapGraphqlPropertiesMock = vi.hoisted(() => vi.fn());
@@ -23,7 +26,7 @@ vi.mock('@service-storage/graphql-soup', () => ({
if (!graphqlClientState.current) throw new Error('GraphQL client not set');
return graphqlClientState.current;
},
- getGraphqlCacheHost: () => undefined,
+ getGraphqlCacheHost: () => graphqlClientState.host,
mapGraphqlProperties: mapGraphqlPropertiesMock,
}));
@@ -74,6 +77,35 @@ function makeControlledClient() {
return { client, requests };
}
+function makeSettlementHost() {
+ const listeners = new Set<(settlement: MutationSettlement) => void>();
+ const unsubscribe = vi.fn();
+ const unsubscribeGeneration = vi.fn();
+ graphqlClientState.host = {
+ inspectQuery: vi.fn(async () => []),
+ inspectQueryVariants: vi.fn(async () => []),
+ onMutationSettled(callback: (settlement: MutationSettlement) => void) {
+ listeners.add(callback);
+ return () => {
+ listeners.delete(callback);
+ unsubscribe();
+ };
+ },
+ onCacheGenerationChanged: () => unsubscribeGeneration,
+ } as unknown as CacheHost;
+ return {
+ emit: (settlement: MutationSettlement) => {
+ for (const callback of listeners) callback(settlement);
+ },
+ unsubscribe,
+ unsubscribeGeneration,
+ };
+}
+
+afterEach(() => {
+ graphqlClientState.host = undefined;
+});
+
const EMPTY_DATA = {
user: { id: 'user-1', soup: { items: [] } },
};
@@ -270,7 +302,8 @@ describe('GraphQL entity property mutations', () => {
);
});
- it('returns optimistic data for saves queued behind a replacement', async () => {
+ it('retains the queued acknowledgement but waits for the replacement to commit', async () => {
+ const settlements = makeSettlementHost();
const property = {
propertyId: 'assignment-1',
propertyDefinitionId: 'definition-1',
@@ -314,18 +347,20 @@ describe('GraphQL entity property mutations', () => {
result = createGraphqlBulkSaveEntityPropertiesMutation();
});
- await expect(
- result.mutateAsync({
- properties: [
- {
- entityType: 'DOCUMENT',
- entityId: 'document-1',
- property,
- apiValues: { valueType: 'STRING', value: 'doing' },
- },
- ],
- })
- ).resolves.toMatchObject({
+ const pending = result.mutateAsync({
+ properties: [
+ {
+ entityType: 'DOCUMENT',
+ entityId: 'document-1',
+ property,
+ apiValues: { valueType: 'STRING', value: 'doing' },
+ },
+ ],
+ });
+ await vi.waitFor(() => expect(mutation).toHaveBeenCalledOnce());
+ expect(result.isPending).toBe(true);
+ settlements.emit({ transactionId: 'transaction-2', status: 'committed' });
+ await expect(pending).resolves.toMatchObject({
data: {
setEntityProperty: expect.objectContaining({ id: 'assignment-1' }),
},
@@ -363,6 +398,253 @@ describe('createGraphqlBulkSaveEntityPropertiesMutation', () => {
afterEach(() => dispose?.());
+ it('installs every bulk layer before the first HTTP result, while retaining enqueue order', async () => {
+ const onCommitted = vi.fn();
+ const acknowledgements: Array<() => void> = [];
+ const responses: Array<() => void> = [];
+ const mutation = vi.fn(
+ (
+ _document: unknown,
+ _variables: unknown,
+ context: Record<string, unknown>
+ ) => ({
+ toPromise: () =>
+ new Promise((resolve) => {
+ acknowledgements.push(
+ context.normalizedCacheOptimisticEnqueued as () => void
+ );
+ responses.push(() =>
+ resolve({
+ operation: { kind: 'mutation', context },
+ data: { setEntityProperty: { id: 'assignment' } },
+ stale: false,
+ hasNext: false,
+ })
+ );
+ }),
+ })
+ );
+ graphqlClientState.current = { mutation } as unknown as Client;
+ const save = createRoot((rootDispose) => {
+ dispose = rootDispose;
+ return createGraphqlBulkSaveEntityPropertiesMutation({ onCommitted });
+ });
+ const property = {
+ propertyId: 'assignment',
+ propertyDefinitionId: 'priority',
+ displayName: 'Priority',
+ valueType: 'SELECT_STRING',
+ isMultiSelect: false,
+ } as Property;
+ const pending = save.mutateAsync({
+ properties: ['task-1', 'task-2'].map((entityId) => ({
+ entityId,
+ entityType: 'TASK',
+ property,
+ apiValues: { valueType: 'SELECT_STRING', values: ['urgent'] },
+ })),
+ });
+ await vi.waitFor(() => expect(mutation).toHaveBeenCalledTimes(1));
+ // Preparing the next relation recipe must wait for cache installation.
+ expect(onCommitted).not.toHaveBeenCalled();
+ acknowledgements[0]();
+ await vi.waitFor(() => expect(mutation).toHaveBeenCalledTimes(2));
+ expect(onCommitted).not.toHaveBeenCalled();
+ acknowledgements[1]();
+ expect(save.isPending).toBe(true);
+ responses[1]();
+ await vi.waitFor(() => expect(onCommitted).toHaveBeenCalledTimes(1));
+ expect(save.isPending).toBe(true);
+ responses[0]();
+ await pending;
+ expect(onCommitted).toHaveBeenCalledTimes(2);
+ expect(save.isPending).toBe(false);
+ });
+
+ it.each(['committed', 'permanently-failed'] as const)(
+ 'waits for later queued saves and reports their %s settlement',
+ async (status) => {
+ const settlements = makeSettlementHost();
+ const onCommitted = vi.fn();
+ const onSuccess = vi.fn();
+ const onError = vi.fn();
+ const onSettled = vi.fn();
+ let resolveFirst!: () => void;
+ let submitted = 0;
+ const mutation = vi.fn(
+ (
+ _document: unknown,
+ _variables: unknown,
+ context: Record<string, unknown>
+ ) => ({
+ toPromise: async () => {
+ const index = submitted++;
+ (context.normalizedCacheOptimisticEnqueued as () => void)();
+ if (index === 0) {
+ await new Promise<void>((resolve) => {
+ resolveFirst = resolve;
+ });
+ }
+ return {
+ operation: { kind: 'mutation', context } as Operation,
+ data: { setEntityProperty: { id: `assignment-${index}` } },
+ extensions: {
+ normalizedCacheMutationDisposition:
+ index === 0
+ ? { kind: 'committed', transactionId: 'first' }
+ : { kind: 'queued', transactionId: 'second' },
+ },
+ stale: false,
+ hasNext: false,
+ };
+ },
+ })
+ );
+ graphqlClientState.current = { mutation } as unknown as Client;
+ const save = createRoot((rootDispose) => {
+ dispose = rootDispose;
+ return createGraphqlBulkSaveEntityPropertiesMutation({
+ onCommitted,
+ onSuccess,
+ onError,
+ onSettled,
+ });
+ });
+ const property = {
+ propertyId: 'assignment',
+ propertyDefinitionId: 'priority',
+ displayName: 'Priority',
+ valueType: 'SELECT_STRING',
+ isMultiSelect: false,
+ } as Property;
+ const pending = save.mutateAsync({
+ properties: ['task-1', 'task-2'].map((entityId) => ({
+ entityId,
+ entityType: 'TASK',
+ property,
+ apiValues: { valueType: 'SELECT_STRING', values: ['urgent'] },
+ })),
+ });
+ await vi.waitFor(() => expect(mutation).toHaveBeenCalledTimes(2));
+ resolveFirst();
+ await vi.waitFor(() => expect(onCommitted).toHaveBeenCalledOnce());
+ expect(save.isPending).toBe(true);
+ expect(onSuccess).not.toHaveBeenCalled();
+ expect(onSettled).not.toHaveBeenCalled();
+ settlements.emit(
+ status === 'committed'
+ ? { transactionId: 'second', status }
+ : {
+ transactionId: 'second',
+ status,
+ error: 'Second property rejected',
+ }
+ );
+ const result = await pending;
+ expect(save.isPending).toBe(false);
+ if (status === 'committed') {
+ expect(result.error).toBeUndefined();
+ expect(onCommitted).toHaveBeenCalledTimes(2);
+ expect(onCommitted).toHaveBeenLastCalledWith(
+ expect.objectContaining({ entityId: 'task-2' }),
+ { kind: 'committed' }
+ );
+ expect(onSuccess).toHaveBeenCalledOnce();
+ expect(onError).not.toHaveBeenCalled();
+ } else {
+ expect(result.error?.message).toContain('Second property rejected');
+ expect(onCommitted).toHaveBeenCalledOnce();
+ expect(onSuccess).not.toHaveBeenCalled();
+ expect(onError).toHaveBeenCalledOnce();
+ }
+ expect(onSettled).toHaveBeenCalledOnce();
+ expect(settlements.unsubscribe).toHaveBeenCalledOnce();
+ expect(settlements.unsubscribeGeneration).toHaveBeenCalledOnce();
+ }
+ );
+
+ it('links a task-grid placeholder when saving unset priority', async () => {
+ makeSettlementHost();
+ graphqlClientState.host = {
+ ...graphqlClientState.host,
+ inspectQuery: vi.fn(async () => [
+ {
+ variables: { input: { initial: { limit: 20 } } },
+ value: { items: [{ id: 'task-1' }] },
+ },
+ ]),
+ inspectQueryVariants: vi.fn(async () => []),
+ } as unknown as CacheHost;
+ const mutation = vi.fn(
+ (
+ _document: unknown,
+ _variables: unknown,
+ context: Record<string, unknown>
+ ) => ({
+ toPromise: async () => ({
+ operation: { kind: 'mutation', context },
+ data: { setEntityProperty: { id: 'server-assignment' } },
+ stale: false,
+ hasNext: false,
+ }),
+ })
+ );
+ graphqlClientState.current = { mutation } as unknown as Client;
+ const save = createRoot((rootDispose) => {
+ dispose = rootDispose;
+ return createGraphqlBulkSaveEntityPropertiesMutation();
+ });
+ try {
+ await save.mutateAsync({
+ properties: [
+ {
+ entityType: 'TASK',
+ entityId: 'task-1',
+ property: {
+ propertyId: 'pending:priority',
+ propertyDefinitionId: 'priority',
+ displayName: 'Priority',
+ valueType: 'SELECT_STRING',
+ isMultiSelect: false,
+ value: null,
+ } as Property,
+ apiValues: { valueType: 'SELECT_STRING', values: ['urgent'] },
+ },
+ ],
+ });
+ expect(mutation).toHaveBeenCalledWith(
+ expect.anything(),
+ expect.anything(),
+ expect.objectContaining({
+ normalizedCacheOptimistic: expect.objectContaining({
+ optimisticResponse: {
+ setEntityProperty: expect.objectContaining({
+ id: 'optimistic-property:DOCUMENT:task-1:priority',
+ value: {
+ __typename: 'GraphqlSelectOptionPropertyValue',
+ optionIds: ['urgent'],
+ },
+ }),
+ },
+ linkPatches: [
+ expect.objectContaining({
+ operation: {
+ kind: 'upsertByField',
+ entityKey:
+ 'GraphqlProperty:optimistic-property:DOCUMENT:task-1:priority',
+ whereField: 'propertyDefinitionId',
+ equals: 'priority',
+ },
+ }),
+ ],
+ }),
+ })
+ );
+ } finally {
+ graphqlClientState.host = undefined;
+ }
+ });
+
it('runs bulk side effects through mutation callbacks', async () => {
const events: string[] = [];
const property = {
diff --git a/apps/web/src/lib/queries/properties/graphql/entity.ts b/apps/web/src/lib/queries/properties/graphql/entity.ts
index b0ba007442..d8795c4f17 100644
--- a/apps/web/src/lib/queries/properties/graphql/entity.ts
+++ b/apps/web/src/lib/queries/properties/graphql/entity.ts
@@ -44,7 +44,12 @@ import {
buildOptimisticGroupedPropertyUpdates,
groupedPropertyKeys,
} from '../../soup/grouped/graphql-optimistic';
-import { buildOptimisticSetEntityProperty } from '../graphql-optimistic';
+import {
+ buildOptimisticSetEntityProperty,
+ isTemporaryGraphqlProperty,
+} from '../graphql-optimistic';
+import { buildPropertyAssignmentLinks } from './assignment-links';
+import { observePropertyMutationSettlements } from './mutation-settlements';
/** Builds the exact Soup input used to load one entity's properties. */
export const buildEntityPropertiesInput = buildGraphqlEntitySoupInput;
@@ -223,32 +228,48 @@ async function prepareMutationArgs(
};
}
+ const entityType = toGraphqlPropertyTargetEntityType(input.entityType);
+ const propertyDefinitionId = getPropertyDefinitionId(input.property);
const optimisticProperty = buildOptimisticSetEntityProperty(
input.property,
- input.apiValues
+ input.apiValues,
+ { entityType, entityId: input.entityId }
);
- let optimisticCache;
-
- if (isInstantiatedProperty(input.property)) {
- const host = getGraphqlCacheHost();
- if (host) {
- try {
- const oldGroupKeys = groupedPropertyKeys(input.property);
- const newGroupKeys = groupedPropertyKeys(input.apiValues);
- optimisticCache = await buildOptimisticGroupedPropertyUpdates({
+ const optimisticCache: NonNullable<SetEntityPropertyArgs['optimisticCache']> =
+ {
+ updates: [],
+ revalidations: [],
+ };
+ const host = getGraphqlCacheHost();
+ if (host) {
+ try {
+ if (
+ optimisticProperty &&
+ isTemporaryGraphqlProperty(optimisticProperty.id)
+ ) {
+ optimisticCache.updates = await buildPropertyAssignmentLinks(
host,
- entityId: input.entityId,
- propertyDefinitionId: input.property.propertyDefinitionId,
- oldGroupKeys: oldGroupKeys ?? [],
- newGroupKeys: newGroupKeys ?? [],
- revalidateOnly:
- oldGroupKeys === undefined || newGroupKeys === undefined,
- });
- } catch (error) {
- // Relation discovery is an optimization. The normalized property write
- // remains valid when cache inspection is unavailable.
- console.warn('Failed to build grouped Soup optimism', error);
+ input.entityId,
+ optimisticProperty.id,
+ propertyDefinitionId
+ );
}
+ const oldGroupKeys = groupedPropertyKeys(input.property);
+ const newGroupKeys = groupedPropertyKeys(input.apiValues);
+ const grouped = await buildOptimisticGroupedPropertyUpdates({
+ host,
+ entityId: input.entityId,
+ propertyDefinitionId,
+ oldGroupKeys: oldGroupKeys ?? [],
+ newGroupKeys: newGroupKeys ?? [],
+ revalidateOnly:
+ oldGroupKeys === undefined || newGroupKeys === undefined,
+ });
+ // Link the assignment before moving its owning row between groups.
+ optimisticCache.updates.push(...grouped.updates);
+ optimisticCache.revalidations.push(...grouped.revalidations);
+ } catch (error) {
+ console.warn('Failed to build property Soup optimism', error);
}
}
@@ -309,11 +330,18 @@ export function entityPropertyOptimisticMutationUuid(args: {
);
}
-const executeGraphqlEntityPropertyMutation: UrqlMutationExecutor<
- SetEntityPropertyMutation,
- SetEntityPropertyMutationVariables,
- GraphqlEntityPropertyMutationInput
-> = async ({ client, mutation, input, context }) => {
+type EntityPropertyExecution = Parameters<
+ UrqlMutationExecutor<
+ SetEntityPropertyMutation,
+ SetEntityPropertyMutationVariables,
+ GraphqlEntityPropertyMutationInput
+ >
+>[0];
+
+async function executeGraphqlEntityPropertyMutation(
+ { client, mutation, input, context }: EntityPropertyExecution,
+ onEnqueued?: () => void
+) {
const args = await prepareMutationArgs(input);
const variables: SetEntityPropertyMutationVariables = {
input: {
@@ -333,6 +361,7 @@ const executeGraphqlEntityPropertyMutation: UrqlMutationExecutor<
{
...args.optimisticCache,
uuid: entityPropertyOptimisticMutationUuid(args),
+ onEnqueued,
}
).toPromise()
: client.mutation(mutation, variables, context).toPromise());
@@ -358,7 +387,7 @@ const executeGraphqlEntityPropertyMutation: UrqlMutationExecutor<
? disposition.error
: new CombinedError({ networkError: disposition.error }),
};
-};
+}
export type AddEntityPropertyInput = {
entityType: EntityType | PropertyTargetEntityType;
@@ -448,7 +477,11 @@ type GraphqlBulkMutationOptions<Context> = {
) => void | Promise<void>;
};
-/** Creates one callback-driven urql mutation for a bulk property save. */
+/**
+ * Enqueues every optimistic layer before waiting for HTTP, but keeps the bulk
+ * lifecycle pending until queued saves commit or permanently fail. Replayed
+ * saves retain their submission payload; settlement events carry no response.
+ */
export function createGraphqlBulkSaveEntityPropertiesMutation<Context = void>(
options: GraphqlBulkMutationOptions<Context> = {}
) {
@@ -469,23 +502,67 @@ export function createGraphqlBulkSaveEntityPropertiesMutation<Context = void>(
| undefined;
let permanentError: Error | undefined;
- // Begin each durable layer sequentially so later relation recipes see
- // the effective result of earlier property edits.
- for (const item of input.properties) {
- latestResult = await executeGraphqlEntityPropertyMutation({
- client,
- mutation,
- input: { kind: 'save', ...item },
- context,
- });
- const disposition = mutationDisposition(latestResult);
- if (disposition.kind === 'committed') {
- await options.onCommitted?.(item, disposition);
- } else if (disposition.kind === 'permanently-failed') {
- permanentError ??= disposition.error;
+ const pending = [];
+ const settlements = observePropertyMutationSettlements(
+ getGraphqlCacheHost()
+ );
+ try {
+ for (const item of input.properties) {
+ let acknowledge!: () => void;
+ const enqueued = new Promise<void>((resolve) => {
+ acknowledge = resolve;
+ });
+ async function submitSave() {
+ try {
+ const result = await executeGraphqlEntityPropertyMutation(
+ {
+ client,
+ mutation,
+ input: { kind: 'save', ...item },
+ context,
+ },
+ acknowledge
+ );
+ acknowledge();
+ const disposition = mutationDisposition(result);
+ if (disposition.kind === 'queued') {
+ await settlements.waitForCommit(disposition.transactionId);
+ await options.onCommitted?.(item, { kind: 'committed' });
+ } else if (disposition.kind === 'committed') {
+ await options.onCommitted?.(item, disposition);
+ }
+ return { kind: 'result' as const, result };
+ } catch (error) {
+ return {
+ kind: 'error' as const,
+ error:
+ error instanceof Error ? error : new Error(String(error)),
+ };
+ } finally {
+ // Plain clients and failed preparation have no cache acknowledgement.
+ acknowledge();
+ }
+ }
+ pending.push(submitSave());
+ // Preserve layer ordering for relation recipes, not HTTP completion.
+ await enqueued;
+ }
+ for (const settled of await Promise.all(pending)) {
+ if (settled.kind === 'error') {
+ permanentError ??= settled.error;
+ continue;
+ }
+ latestResult = settled.result;
+ const disposition = mutationDisposition(latestResult);
+ if (disposition.kind === 'permanently-failed') {
+ permanentError ??= disposition.error;
+ }
}
+ } finally {
+ settlements.dispose();
}
+ if (!latestResult && permanentError) throw permanentError;
if (!latestResult) {
throw new Error(
'bulk property mutation requires at least one property'
diff --git a/apps/web/src/lib/queries/properties/graphql/mutation-settlements.test.ts b/apps/web/src/lib/queries/properties/graphql/mutation-settlements.test.ts
new file mode 100644
index 0000000000..69a4e4f608
--- /dev/null
+++ b/apps/web/src/lib/queries/properties/graphql/mutation-settlements.test.ts
@@ -0,0 +1,107 @@
+import type { CacheGenerationChange } from '@graphql-cache/host/types';
+import type { MutationSettlement } from '@graphql-cache/protocol';
+import { describe, expect, it, vi } from 'vitest';
+import { observePropertyMutationSettlements } from './mutation-settlements';
+
+function setup() {
+ let settle!: (settlement: MutationSettlement) => void;
+ let generation!: (change: CacheGenerationChange) => void;
+ const unsubscribeSettlement = vi.fn();
+ const unsubscribeGeneration = vi.fn();
+ const observer = observePropertyMutationSettlements({
+ onMutationSettled(callback) {
+ settle = callback;
+ return unsubscribeSettlement;
+ },
+ onCacheGenerationChanged(callback) {
+ generation = callback;
+ return unsubscribeGeneration;
+ },
+ });
+ return {
+ observer,
+ settle: (event: MutationSettlement) => settle(event),
+ generation: (event: CacheGenerationChange) => generation(event),
+ unsubscribeSettlement,
+ unsubscribeGeneration,
+ };
+}
+
+describe('property mutation settlements', () => {
+ it('buffers settlements that arrive before the queued acknowledgement', async () => {
+ const test = setup();
+ test.settle({ transactionId: '1', status: 'committed' });
+ await expect(test.observer.waitForCommit('1')).resolves.toBeUndefined();
+ test.observer.dispose();
+ expect(test.unsubscribeSettlement).toHaveBeenCalledOnce();
+ expect(test.unsubscribeGeneration).toHaveBeenCalledOnce();
+ });
+
+ it('follows superseded transactions, even when the replacement already settled', async () => {
+ const test = setup();
+ const pending = test.observer.waitForCommit('1');
+ test.settle({ transactionId: '3', status: 'committed' });
+ test.settle({
+ transactionId: '2',
+ status: 'superseded',
+ replacementTransactionId: '3',
+ });
+ test.settle({
+ transactionId: '1',
+ status: 'superseded',
+ replacementTransactionId: '2',
+ });
+ await expect(pending).resolves.toBeUndefined();
+ test.observer.dispose();
+ });
+
+ it('propagates a replacement failure to every waiter for the same slot', async () => {
+ const test = setup();
+ const first = expect(test.observer.waitForCommit('1')).rejects.toThrow(
+ 'rejected'
+ );
+ const second = expect(test.observer.waitForCommit('2')).rejects.toThrow(
+ 'rejected'
+ );
+ test.settle({
+ transactionId: '1',
+ status: 'superseded',
+ replacementTransactionId: '2',
+ });
+ test.settle({
+ transactionId: '2',
+ status: 'permanently-failed',
+ error: 'rejected',
+ });
+ await Promise.all([first, second]);
+ test.observer.dispose();
+ });
+
+ it('survives engine replacement with preserved storage', async () => {
+ const test = setup();
+ const pending = test.observer.waitForCommit('1');
+ test.generation({ storage: 'preserved' });
+ test.settle({ transactionId: '1', status: 'committed' });
+ await expect(pending).resolves.toBeUndefined();
+ test.observer.dispose();
+ });
+
+ it('fails pending and future waits when the durable queue is reset', async () => {
+ const test = setup();
+ const pending = expect(test.observer.waitForCommit('1')).rejects.toThrow(
+ 'cache reset'
+ );
+ test.generation({ storage: 'reset' });
+ await pending;
+ await expect(test.observer.waitForCommit('2')).rejects.toThrow(
+ 'cache reset'
+ );
+ test.observer.dispose();
+ });
+
+ it('does not report success for a queued result without a cache host', async () => {
+ const observer = observePropertyMutationSettlements(undefined);
+ await expect(observer.waitForCommit('1')).rejects.toThrow('no cache host');
+ observer.dispose();
+ });
+});
diff --git a/apps/web/src/lib/queries/properties/graphql/mutation-settlements.ts b/apps/web/src/lib/queries/properties/graphql/mutation-settlements.ts
new file mode 100644
index 0000000000..681087108d
--- /dev/null
+++ b/apps/web/src/lib/queries/properties/graphql/mutation-settlements.ts
@@ -0,0 +1,53 @@
+import type { CacheHost } from '@graphql-cache/host/types';
+import type { MutationSettlement } from '@graphql-cache/protocol';
+
+/** Observe before submitting: settlement pushes can precede the queued result. */
+export function observePropertyMutationSettlements(
+ host:
+ | Pick<CacheHost, 'onMutationSettled' | 'onCacheGenerationChanged'>
+ | undefined
+) {
+ const settlements = new Map<string, MutationSettlement>();
+ const pending = new Set<() => void>();
+ let resetError: Error | undefined;
+ const wake = () => {
+ const callbacks = [...pending];
+ pending.clear();
+ for (const callback of callbacks) callback();
+ };
+ const unsubscribeSettlement = host?.onMutationSettled((settlement) => {
+ settlements.set(settlement.transactionId, settlement);
+ wake();
+ });
+ const unsubscribeGeneration = host?.onCacheGenerationChanged((change) => {
+ if (change.storage !== 'reset') return;
+ resetError = new Error('Property save interrupted by a cache reset');
+ wake();
+ });
+
+ return {
+ async waitForCommit(transactionId: string): Promise<void> {
+ if (!host) throw new Error('Queued property save has no cache host');
+ let current = transactionId;
+ while (true) {
+ if (resetError) throw resetError;
+ const settlement = settlements.get(current);
+ if (!settlement) {
+ await new Promise<void>((resolve) => pending.add(resolve));
+ continue;
+ }
+ if (settlement.status === 'committed') return;
+ if (settlement.status === 'permanently-failed') {
+ throw new Error(settlement.error);
+ }
+ current = settlement.replacementTransactionId;
+ }
+ },
+ dispose() {
+ unsubscribeSettlement?.();
+ unsubscribeGeneration?.();
+ settlements.clear();
+ pending.clear();
+ },
+ };
+}
diff --git a/apps/web/src/lib/service-clients/service-storage/graphql/entity-properties.graphql b/apps/web/src/lib/service-clients/service-storage/graphql/entity-properties.graphql
index ba806d12fd..cd21254689 100644
--- a/apps/web/src/lib/service-clients/service-storage/graphql/entity-properties.graphql
+++ b/apps/web/src/lib/service-clients/service-storage/graphql/entity-properties.graphql
@@ -1,3 +1,4 @@
+# Also used as a typed entrypoint for optimistic property-list links.
query EntityProperties($input: SoupInput!) {
user {
id
@@ -12,3 +13,21 @@ query EntityProperties($input: SoupInput!) {
}
}
}
+
+query GroupEntityProperties($input: GroupedSoupInput!) {
+ user {
+ id
+ groupSoup(input: $input) {
+ bins {
+ key
+ items {
+ __typename
+ id
+ properties {
+ ...SoupPropertyFields
+ }
+ }
+ }
+ }
+ }
+}
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 3b12dca18c..0b2922c47d 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
@@ -7409,6 +7409,131 @@ export type EntityPropertiesQuery = { user: { id: string, soup: { items: Array<
| null }> }
> } } };
+export type GroupEntityPropertiesQueryVariables = Exact<{
+ input: GroupedSoupInput;
+}>;
+
+
+export type GroupEntityPropertiesQuery = { user: { id: string, groupSoup: { bins: Array<{ key: string, items: Array<
+ | { __typename: 'GraphqlSoupAgentSession', id: 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: 'GraphqlSoupCalendarEvent', id: 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: 'GraphqlSoupCall', id: 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: 'GraphqlSoupChannel', id: 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: 'GraphqlSoupChannelMessage', id: 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: 'GraphqlSoupChat', id: 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, 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, 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, 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, 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: 'GraphqlSoupInitiative', id: 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: 'GraphqlSoupProject', id: 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: 'GraphqlSoupReminder', id: 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 FavoriteFieldsFragment = { __typename: 'GraphqlFavorite', id: string, entityType: GraphqlEntityType, entityId: string, sortOrder: number, createdAt: string, fileType: string | null, documentSubType: string | null, channelType: string | null, channelId: string | null };
export type FavoritesQueryVariables = Exact<{
@@ -13925,6 +14050,7 @@ export const DeleteEntitiesPermanentlyDocument = {"kind":"Document","definitions
export const DuplicateEntitiesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DuplicateEntities"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"inputs"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DuplicateEntityInput"}}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"duplicateEntities"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"inputs"},"value":{"kind":"Variable","name":{"kind":"Name","value":"inputs"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EntityMutationPayloadFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupEntityIdentityFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"isFavorited"}}]}},{"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":"MailPreviewFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMailPreviewMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"snippet"}},{"kind":"Field","name":{"kind":"Name","value":"isDraft"}},{"kind":"Field","name":{"kind":"Name","value":"senderEmail"}},{"kind":"Field","name":{"kind":"Name","value":"senderName"}},{"kind":"Field","name":{"kind":"Name","value":"senderPhotoUrl"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupChannelMessageFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannelMessagePreview"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"messageId"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"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"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupItemPreviewFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"cacheProjection"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}]},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupEntityIdentityFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupAgentSession"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"sessionName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"harness"}},{"kind":"Field","name":{"kind":"Name","value":"repoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"repoBranch"}},{"kind":"Field","name":{"kind":"Name","value":"pullRequestUrl"}},{"kind":"Field","name":{"kind":"Name","value":"workingBranch"}},{"kind":"Field","name":{"kind":"Name","value":"pullRequestState"}},{"kind":"Field","name":{"kind":"Name","value":"pullRequestId"}},{"kind":"Field","name":{"kind":"Name","value":"turnState"}},{"kind":"Field","name":{"kind":"Name","value":"bot"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"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":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"frecencyScore"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupInitiative"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"descriptionDocumentId"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"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":"viewerPermission"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAccessLevelPermission"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accessLevel"}}]}}]}},{"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":"GraphqlSoupDocument"}},"selectionSet":{"kind":"SelectionSet","selections":[{"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":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTaskSubType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"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","alias":{"kind":"Name","value":"chatName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"model"}},{"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","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":"providerId"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"inboxVisible"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"latestInboundMessageTs"}},{"kind":"Field","name":{"kind":"Name","value":"mailAllPreview"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"mailDraftPreview"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"mailSentPreview"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}},{"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":"isSignal"}},{"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":"__typename"}},{"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","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":"isParticipant"}},{"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":"GraphqlSoupChannelMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"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","alias":{"kind":"Name","value":"callChannelId"},"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":"Field","name":{"kind":"Name","value":"guests"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"leftAt"}}]}},{"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":"GraphqlSoupCrmCompany"}},"selectionSet":{"kind":"SelectionSet","selections":[{"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":"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":"sourceMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupReminder"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"reminderDescription"},"name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"scheduleType"}},{"kind":"Field","name":{"kind":"Name","value":"remindAt"}},{"kind":"Field","name":{"kind":"Name","value":"cron"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"nextRunAt"}},{"kind":"Field","name":{"kind":"Name","value":"enabled"}},{"kind":"Field","name":{"kind":"Name","value":"completedAt"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"referencedEntity"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"subType"}}]}},{"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":"GraphqlSoupCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"calendarEventTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventStatus"},"name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationStateFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"sent"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDocumentMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"documentMentionDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMentionedInDocumentCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentMentionId"},"name":{"kind":"Name","value":"mentionId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlRepliedToDocumentCommentThreadMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCommentedOnDocumentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInitiativeDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionProjectName"},"name":{"kind":"Name","value":"projectName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCrmDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionRecordName"},"name":{"kind":"Name","value":"recordName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelInviteMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelInviteInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyUserId"},"name":{"kind":"Name","value":"userId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadParentSenderId"},"name":{"kind":"Name","value":"threadParentSenderId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCallStartedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"callStartedChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"callStartedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNewEmailMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"newEmailSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailToEmail"},"name":{"kind":"Name","value":"toEmail"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSubject"},"name":{"kind":"Name","value":"subject"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSnippet"},"name":{"kind":"Name","value":"snippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInboxReauthRequiredMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inboxReauthRequiredEmailAddress"},"name":{"kind":"Name","value":"emailAddress"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInviteToTeamMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamName"},"name":{"kind":"Name","value":"teamName"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamInviteId"},"name":{"kind":"Name","value":"teamInviteId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamRole"},"name":{"kind":"Name","value":"role"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTaskAssignedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskId"},"name":{"kind":"Name","value":"taskId"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskName"},"name":{"kind":"Name","value":"taskName"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedAssignedBy"},"name":{"kind":"Name","value":"assignedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"reminderReminderId"},"name":{"kind":"Name","value":"reminderId"}},{"kind":"Field","alias":{"kind":"Name","value":"reminderDescription"},"name":{"kind":"Name","value":"description"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEventReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEventId"},"name":{"kind":"Name","value":"eventId"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderOccurrenceKey"},"name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartsAt"},"name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEndsAt"},"name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartDate"},"name":{"kind":"Name","value":"startDate"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTimeZone"},"name":{"kind":"Name","value":"timeZone"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderMinutesBefore"},"name":{"kind":"Name","value":"minutesBefore"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAiResponseMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"aiResponseSummary"},"name":{"kind":"Name","value":"summary"}},{"kind":"Field","alias":{"kind":"Name","value":"aiResponseMessageId"},"name":{"kind":"Name","value":"messageId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrStatusChangedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedStatus"},"name":{"kind":"Name","value":"status"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedAction"},"name":{"kind":"Name","value":"action"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedPreviousStatus"},"name":{"kind":"Name","value":"previousStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedHeadBranch"},"name":{"kind":"Name","value":"headBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedBaseBranch"},"name":{"kind":"Name","value":"baseBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedMergedAt"},"name":{"kind":"Name","value":"mergedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCheckRunMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckRunGithubId"},"name":{"kind":"Name","value":"checkRunGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckName"},"name":{"kind":"Name","value":"checkName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckStatus"},"name":{"kind":"Name","value":"checkStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunConclusion"},"name":{"kind":"Name","value":"conclusion"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckUrl"},"name":{"kind":"Name","value":"checkUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCompletedAt"},"name":{"kind":"Name","value":"completedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubReviewRequestedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubLogin"},"name":{"kind":"Name","value":"requestedReviewerGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubUserId"},"name":{"kind":"Name","value":"requestedReviewerGithubUserId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentKind"},"name":{"kind":"Name","value":"commentKind"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentSnippet"},"name":{"kind":"Name","value":"commentSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionLocation"},"name":{"kind":"Name","value":"location"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTextSnippet"},"name":{"kind":"Name","value":"textSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrReviewMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewGithubId"},"name":{"kind":"Name","value":"reviewGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewUrl"},"name":{"kind":"Name","value":"reviewUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewSnippet"},"name":{"kind":"Name","value":"reviewSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionSettledMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledActor"},"name":{"kind":"Name","value":"actor"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledStopReason"},"name":{"kind":"Name","value":"stopReason"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledExcerpt"},"name":{"kind":"Name","value":"excerpt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionWaitingForInputMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputQuestion"},"name":{"kind":"Name","value":"question"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionMentionedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedMentionedBy"},"name":{"kind":"Name","value":"mentionedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedActionId"},"name":{"kind":"Name","value":"actionId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationStateFields"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationMetadataFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupItemPreviewFields"}},{"kind":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPatchFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SoupPatch"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SoupUpdated"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"item"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupItemFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCacheDeletion"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"graphqlTypeName"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EntityMutationResultFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEntityMutationResult"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMutationSuccess"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"effects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPatchFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMutationError"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"errorCode"}},{"kind":"Field","name":{"kind":"Name","value":"message"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EntityMutationPayloadFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EntityMutationPayload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"results"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EntityMutationResultFields"}}]}}]}}]} as unknown as DocumentNode<DuplicateEntitiesMutation, DuplicateEntitiesMutationVariables>;
export const SetEntityFavoriteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SetEntityFavorite"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"entity"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"EntityRefInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"favorite"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"setEntityFavorite"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"entity"},"value":{"kind":"Variable","name":{"kind":"Name","value":"entity"}}},{"kind":"Argument","name":{"kind":"Name","value":"favorite"},"value":{"kind":"Variable","name":{"kind":"Name","value":"favorite"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EntityMutationResultFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupEntityIdentityFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"isFavorited"}}]}},{"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":"MailPreviewFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMailPreviewMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"snippet"}},{"kind":"Field","name":{"kind":"Name","value":"isDraft"}},{"kind":"Field","name":{"kind":"Name","value":"senderEmail"}},{"kind":"Field","name":{"kind":"Name","value":"senderName"}},{"kind":"Field","name":{"kind":"Name","value":"senderPhotoUrl"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupChannelMessageFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannelMessagePreview"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"messageId"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"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"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupItemPreviewFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"cacheProjection"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}]},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupEntityIdentityFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupAgentSession"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"sessionName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"harness"}},{"kind":"Field","name":{"kind":"Name","value":"repoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"repoBranch"}},{"kind":"Field","name":{"kind":"Name","value":"pullRequestUrl"}},{"kind":"Field","name":{"kind":"Name","value":"workingBranch"}},{"kind":"Field","name":{"kind":"Name","value":"pullRequestState"}},{"kind":"Field","name":{"kind":"Name","value":"pullRequestId"}},{"kind":"Field","name":{"kind":"Name","value":"turnState"}},{"kind":"Field","name":{"kind":"Name","value":"bot"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"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":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"frecencyScore"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupInitiative"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"descriptionDocumentId"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"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":"viewerPermission"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAccessLevelPermission"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accessLevel"}}]}}]}},{"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":"GraphqlSoupDocument"}},"selectionSet":{"kind":"SelectionSet","selections":[{"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":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTaskSubType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"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","alias":{"kind":"Name","value":"chatName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"model"}},{"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","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":"providerId"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"inboxVisible"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"latestInboundMessageTs"}},{"kind":"Field","name":{"kind":"Name","value":"mailAllPreview"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"mailDraftPreview"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"mailSentPreview"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}},{"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":"isSignal"}},{"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":"__typename"}},{"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","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":"isParticipant"}},{"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":"GraphqlSoupChannelMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"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","alias":{"kind":"Name","value":"callChannelId"},"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":"Field","name":{"kind":"Name","value":"guests"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"leftAt"}}]}},{"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":"GraphqlSoupCrmCompany"}},"selectionSet":{"kind":"SelectionSet","selections":[{"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":"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":"sourceMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupReminder"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"reminderDescription"},"name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"scheduleType"}},{"kind":"Field","name":{"kind":"Name","value":"remindAt"}},{"kind":"Field","name":{"kind":"Name","value":"cron"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"nextRunAt"}},{"kind":"Field","name":{"kind":"Name","value":"enabled"}},{"kind":"Field","name":{"kind":"Name","value":"completedAt"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"referencedEntity"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"subType"}}]}},{"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":"GraphqlSoupCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"calendarEventTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventStatus"},"name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationStateFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"sent"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDocumentMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"documentMentionDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMentionedInDocumentCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentMentionId"},"name":{"kind":"Name","value":"mentionId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlRepliedToDocumentCommentThreadMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCommentedOnDocumentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInitiativeDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionProjectName"},"name":{"kind":"Name","value":"projectName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCrmDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionRecordName"},"name":{"kind":"Name","value":"recordName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelInviteMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelInviteInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyUserId"},"name":{"kind":"Name","value":"userId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadParentSenderId"},"name":{"kind":"Name","value":"threadParentSenderId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCallStartedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"callStartedChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"callStartedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNewEmailMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"newEmailSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailToEmail"},"name":{"kind":"Name","value":"toEmail"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSubject"},"name":{"kind":"Name","value":"subject"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSnippet"},"name":{"kind":"Name","value":"snippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInboxReauthRequiredMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inboxReauthRequiredEmailAddress"},"name":{"kind":"Name","value":"emailAddress"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInviteToTeamMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamName"},"name":{"kind":"Name","value":"teamName"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamInviteId"},"name":{"kind":"Name","value":"teamInviteId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamRole"},"name":{"kind":"Name","value":"role"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTaskAssignedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskId"},"name":{"kind":"Name","value":"taskId"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskName"},"name":{"kind":"Name","value":"taskName"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedAssignedBy"},"name":{"kind":"Name","value":"assignedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"reminderReminderId"},"name":{"kind":"Name","value":"reminderId"}},{"kind":"Field","alias":{"kind":"Name","value":"reminderDescription"},"name":{"kind":"Name","value":"description"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEventReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEventId"},"name":{"kind":"Name","value":"eventId"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderOccurrenceKey"},"name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartsAt"},"name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEndsAt"},"name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartDate"},"name":{"kind":"Name","value":"startDate"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTimeZone"},"name":{"kind":"Name","value":"timeZone"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderMinutesBefore"},"name":{"kind":"Name","value":"minutesBefore"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAiResponseMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"aiResponseSummary"},"name":{"kind":"Name","value":"summary"}},{"kind":"Field","alias":{"kind":"Name","value":"aiResponseMessageId"},"name":{"kind":"Name","value":"messageId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrStatusChangedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedStatus"},"name":{"kind":"Name","value":"status"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedAction"},"name":{"kind":"Name","value":"action"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedPreviousStatus"},"name":{"kind":"Name","value":"previousStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedHeadBranch"},"name":{"kind":"Name","value":"headBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedBaseBranch"},"name":{"kind":"Name","value":"baseBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedMergedAt"},"name":{"kind":"Name","value":"mergedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCheckRunMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckRunGithubId"},"name":{"kind":"Name","value":"checkRunGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckName"},"name":{"kind":"Name","value":"checkName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckStatus"},"name":{"kind":"Name","value":"checkStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunConclusion"},"name":{"kind":"Name","value":"conclusion"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckUrl"},"name":{"kind":"Name","value":"checkUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCompletedAt"},"name":{"kind":"Name","value":"completedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubReviewRequestedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubLogin"},"name":{"kind":"Name","value":"requestedReviewerGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubUserId"},"name":{"kind":"Name","value":"requestedReviewerGithubUserId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentKind"},"name":{"kind":"Name","value":"commentKind"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentSnippet"},"name":{"kind":"Name","value":"commentSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionLocation"},"name":{"kind":"Name","value":"location"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTextSnippet"},"name":{"kind":"Name","value":"textSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrReviewMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewGithubId"},"name":{"kind":"Name","value":"reviewGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewUrl"},"name":{"kind":"Name","value":"reviewUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewSnippet"},"name":{"kind":"Name","value":"reviewSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionSettledMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledActor"},"name":{"kind":"Name","value":"actor"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledStopReason"},"name":{"kind":"Name","value":"stopReason"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledExcerpt"},"name":{"kind":"Name","value":"excerpt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionWaitingForInputMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputQuestion"},"name":{"kind":"Name","value":"question"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionMentionedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedMentionedBy"},"name":{"kind":"Name","value":"mentionedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedActionId"},"name":{"kind":"Name","value":"actionId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationStateFields"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationMetadataFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupItemPreviewFields"}},{"kind":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPatchFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SoupPatch"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SoupUpdated"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"item"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupItemFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCacheDeletion"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"graphqlTypeName"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EntityMutationResultFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEntityMutationResult"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMutationSuccess"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"effects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPatchFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMutationError"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"errorCode"}},{"kind":"Field","name":{"kind":"Name","value":"message"}}]}}]}}]} as unknown as DocumentNode<SetEntityFavoriteMutation, SetEntityFavoriteMutationVariables>;
export const EntityPropertiesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"EntityProperties"},"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":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"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<EntityPropertiesQuery, EntityPropertiesQueryVariables>;
+export const GroupEntityPropertiesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GroupEntityProperties"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"GroupedSoupInput"}}}}],"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":"groupSoup"},"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":"bins"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"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<GroupEntityPropertiesQuery, GroupEntityPropertiesQueryVariables>;
export const FavoritesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Favorites"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"FavoritesFilterInput"}}}],"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":"favorites"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FavoriteFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FavoriteFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlFavorite"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"sortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"documentSubType"}},{"kind":"Field","name":{"kind":"Name","value":"channelType"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}}]}}]} as unknown as DocumentNode<FavoritesQuery, FavoritesQueryVariables>;
export const SetFavoriteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SetFavorite"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"entity"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"EntityRefInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"favorite"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"setFavorite"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"entity"},"value":{"kind":"Variable","name":{"kind":"Name","value":"entity"}}},{"kind":"Argument","name":{"kind":"Name","value":"favorite"},"value":{"kind":"Variable","name":{"kind":"Name","value":"favorite"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"result"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMutationSuccess"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"effects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SoupUpdated"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"item"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"isFavorited"}}]}}]}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMutationError"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"errorCode"}},{"kind":"Field","name":{"kind":"Name","value":"message"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"favorite"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FavoriteFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FavoriteFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlFavorite"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"sortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"documentSubType"}},{"kind":"Field","name":{"kind":"Name","value":"channelType"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}}]}}]} as unknown as DocumentNode<SetFavoriteMutation, SetFavoriteMutationVariables>;
export const ReorderFavoritesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ReorderFavorites"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ReorderFavoritesInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"reorderFavorites"},"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":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"sortOrder"}}]}}]}}]} as unknown as DocumentNode<ReorderFavoritesMutation, ReorderFavoritesMutationVariables>;
diff --git a/crates/client/cache-core/src/engine.rs b/crates/client/cache-core/src/engine.rs
index 1b2cadc86d..d3a0205e18 100644
--- a/crates/client/cache-core/src/engine.rs
+++ b/crates/client/cache-core/src/engine.rs
@@ -14,7 +14,7 @@ use crate::document::{Document, DocumentError, OperationKind};
use crate::entity_resolver::{EntityResolver, EntityResolverError, EntityResolverLookup};
use crate::link_patch::{
LinkPatchError, OptimisticLinkPatch, QueryRevalidation, apply_link_patches,
- deduplicate_patches, missing_patch_record,
+ deduplicate_patches, missing_patch_records,
};
use crate::normalize::{
DependencyCompleteness, NormalizeError, RecordUpdates, normalize, normalize_with_dependencies,
@@ -2166,7 +2166,7 @@ impl<S: Storage> Engine<S> {
// loop from retrying it.
let missing: BTreeSet<_> = patches
.iter()
- .filter_map(|patch| missing_patch_record(&effective, patch))
+ .flat_map(|patch| missing_patch_records(&effective, patch))
.chain(patches.iter().filter_map(|patch| {
let inserted = patch.operation.inserted_entity_key()?;
(!effective.contains_key(inserted)).then(|| inserted.clone())
diff --git a/crates/client/cache-core/src/link_patch.rs b/crates/client/cache-core/src/link_patch.rs
index 76f1a1d114..0cd1f728f1 100644
--- a/crates/client/cache-core/src/link_patch.rs
+++ b/crates/client/cache-core/src/link_patch.rs
@@ -16,6 +16,8 @@ use serde_json::Value as Json;
use std::collections::{BTreeSet, HashMap};
use thiserror::Error;
+mod upsert;
+
/// Maximum number of link recipes accepted for one mutation.
pub const MAX_PATCHES: usize = 128;
/// Maximum number of path segments accepted for one recipe.
@@ -68,6 +70,18 @@ pub enum LinkOperation {
#[serde(rename = "entityKey")]
entity_key: EntityKey<'static>,
},
+ /// Replaces links with the same scalar identity using the matching record
+ /// in this mutation's normalized response. The response may assign a new ID.
+ UpsertByField {
+ /// Optimistic identity; its type constrains the response record lookup.
+ #[serde(rename = "entityKey")]
+ entity_key: EntityKey<'static>,
+ /// Selected scalar field identifying one logical list member.
+ #[serde(rename = "whereField")]
+ where_field: FieldKey,
+ /// Stable logical identity shared by optimistic and server records.
+ equals: Json,
+ },
/// Removes a link from a matching embedded list item and decrements its
/// count when the link was present.
RemoveEmbeddedLink {
@@ -110,6 +124,7 @@ impl LinkOperation {
match self {
Self::Remove { entity_key }
| Self::PrependUnique { entity_key }
+ | Self::UpsertByField { entity_key, .. }
| Self::RemoveEmbeddedLink { entity_key, .. }
| Self::UpsertEmbeddedLink { entity_key, .. } => entity_key.borrowed(),
}
@@ -122,9 +137,9 @@ impl LinkOperation {
/// record — removing an absent reference is a natural no-op.
pub fn inserted_entity_key(&self) -> Option<&EntityKey<'static>> {
match self {
- Self::PrependUnique { entity_key } | Self::UpsertEmbeddedLink { entity_key, .. } => {
- Some(entity_key)
- }
+ Self::PrependUnique { entity_key }
+ | Self::UpsertByField { entity_key, .. }
+ | Self::UpsertEmbeddedLink { entity_key, .. } => Some(entity_key),
Self::Remove { .. } | Self::RemoveEmbeddedLink { .. } => None,
}
}
@@ -209,6 +224,9 @@ pub enum LinkPatchError {
/// A list selector did not resolve exactly one embedded object.
#[error("link patch list selector matched {0} items instead of exactly one")]
SelectorMatchCount(usize),
+ /// A logical upsert must identify exactly one record in the mutation response.
+ #[error("link upsert matched {0} response records instead of exactly one")]
+ ResponseMatchCount(usize),
/// A selector value is not a JSON scalar.
#[error("link patch selector values must be JSON scalars")]
NonScalarSelector,
@@ -272,6 +290,11 @@ fn validate_recipe(patch: &OptimisticLinkPatch) -> Result<(), LinkPatchError> {
}
}
match &patch.operation {
+ LinkOperation::UpsertByField { equals, .. } => {
+ if !is_json_scalar(equals) {
+ return Err(LinkPatchError::NonScalarSelector);
+ }
+ }
LinkOperation::RemoveEmbeddedLink {
list_item,
link_field,
@@ -397,7 +420,7 @@ pub fn apply_link_patches(
let mut staged_effective = effective.clone();
let mut staged_updates = updates.clone();
for patch in &patches {
- if let Err(error) = apply_one(&mut staged_effective, &mut staged_updates, patch) {
+ if let Err(error) = apply_one(&mut staged_effective, &mut staged_updates, updates, patch) {
if skip_not_applicable {
continue;
}
@@ -412,16 +435,20 @@ pub fn apply_link_patches(
fn apply_one(
effective: &mut HashMap<EntityKey<'static>, Record>,
updates: &mut RecordUpdates,
+ response_updates: &RecordUpdates,
patch: &OptimisticLinkPatch,
) -> Result<(), LinkPatchError> {
let resolved = resolve_target(effective, patch)?;
- if let Some(inserted) = patch.operation.inserted_entity_key()
+ let upsert = upsert::resolve(&patch.operation, &resolved, response_updates)?;
+ if let Some(inserted) = upsert
+ .as_ref()
+ .or_else(|| patch.operation.inserted_entity_key())
&& !effective.contains_key(inserted)
{
return Err(LinkPatchError::MissingLinkedRecord(inserted.clone()));
}
let record = effective
- .get_mut(&resolved.parent_entity_key)
+ .get(&resolved.parent_entity_key)
.ok_or_else(|| LinkPatchError::MissingParent(resolved.parent_entity_key.clone()))?;
let mut field_value = record
.fields
@@ -442,6 +469,18 @@ fn apply_one(
LinkOperation::PrependUnique { entity_key } => {
prepend_unique(normalized_links(target)?, entity_key.borrowed());
}
+ LinkOperation::UpsertByField { equals, .. } => {
+ upsert::apply(
+ normalized_links(target)?,
+ effective,
+ resolved
+ .match_field
+ .as_ref()
+ .ok_or(LinkPatchError::WrongShape)?,
+ equals,
+ upsert.as_ref().ok_or(LinkPatchError::WrongShape)?,
+ )?;
+ }
LinkOperation::RemoveEmbeddedLink { entity_key, .. } => {
let fields = resolved
.embedded_link
@@ -471,7 +510,9 @@ fn apply_one(
}
}
- record
+ effective
+ .get_mut(&resolved.parent_entity_key)
+ .ok_or_else(|| LinkPatchError::MissingParent(resolved.parent_entity_key.clone()))?
.fields
.insert(resolved.field_key.clone(), field_value.clone());
updates
@@ -670,6 +711,7 @@ struct ResolvedTarget {
field_key: FieldKey,
path: Vec<LinkPathSegment>,
embedded_link: Option<ResolvedEmbeddedLink>,
+ match_field: Option<FieldKey>,
}
#[derive(Debug)]
@@ -683,13 +725,14 @@ struct ResolvedEmbeddedLink {
/// Returns the next normalized record required to resolve one query-rooted
/// update. Engines use this to hydrate graph links from cold storage before
/// applying the update.
-pub fn missing_patch_record(
+pub fn missing_patch_records(
effective: &HashMap<EntityKey<'static>, Record>,
patch: &OptimisticLinkPatch,
-) -> Option<EntityKey<'static>> {
+) -> Vec<EntityKey<'static>> {
match resolve_target(effective, patch) {
- Err(LinkPatchError::MissingParent(key)) => Some(key),
- _ => None,
+ Err(LinkPatchError::MissingParent(key)) => vec![key],
+ Ok(target) if target.match_field.is_some() => upsert::missing_records(effective, &target),
+ _ => Vec::new(),
}
}
@@ -780,6 +823,12 @@ fn resolve_from_value(
parent_entity_key: cursor.owner,
field_key: cursor.anchor_field,
path: cursor.relative_path,
+ match_field: upsert::resolve_field(
+ cursor.selections,
+ cursor.type_name,
+ variables,
+ operation,
+ )?,
embedded_link: resolve_embedded_link_fields(
cursor.selections,
cursor.type_name,
@@ -847,19 +896,28 @@ fn resolve_from_value(
let selector =
selected_field(cursor.selections, cursor.type_name, &list_item.where_field)?;
let selector_key = selected_storage_key(selector, variables)?;
- let matches: Vec<_> = items
- .iter()
- .enumerate()
- .filter_map(|(index, value)| {
- let CacheValue::Object(object) = value else {
- return None;
- };
- object
+ let mut matches = Vec::new();
+ for (index, value) in items.iter().enumerate() {
+ let matches_item = match value {
+ CacheValue::Ref(key) if selector.name == "id" => key
+ .as_ref()
+ .split_once(':')
+ .is_some_and(|(_, id)| list_item.equals.as_str() == Some(id)),
+ CacheValue::Ref(key) => effective
+ .get(key)
+ .ok_or_else(|| LinkPatchError::MissingParent(key.clone()))?
+ .fields
.get(&selector_key)
- .is_some_and(|value| cache_scalar_equals(value, &list_item.equals))
- .then_some(index)
- })
- .collect();
+ .is_some_and(|value| cache_scalar_equals(value, &list_item.equals)),
+ CacheValue::Object(object) => object
+ .get(&selector_key)
+ .is_some_and(|value| cache_scalar_equals(value, &list_item.equals)),
+ _ => false,
+ };
+ if matches_item {
+ matches.push(index);
+ }
+ }
if matches.len() != 1 {
return Err(LinkPatchError::SelectorMatchCount(matches.len()));
}
@@ -909,7 +967,9 @@ fn resolve_embedded_link_fields(
insert_fields,
..
} => (list_item, link_field, count_field, Some(insert_fields)),
- LinkOperation::Remove { .. } | LinkOperation::PrependUnique { .. } => return Ok(None),
+ LinkOperation::Remove { .. }
+ | LinkOperation::PrependUnique { .. }
+ | LinkOperation::UpsertByField { .. } => return Ok(None),
};
let selector_key = selected_storage_key(
diff --git a/crates/client/cache-core/src/link_patch/upsert.rs b/crates/client/cache-core/src/link_patch/upsert.rs
new file mode 100644
index 0000000000..77bd4bed6c
--- /dev/null
+++ b/crates/client/cache-core/src/link_patch/upsert.rs
@@ -0,0 +1,114 @@
+//! Response-derived identities for logical members of normalized link lists.
+
+use super::*;
+
+#[cfg(test)]
+mod test;
+
+pub(super) fn resolve_field(
+ selections: &[Selection],
+ type_name: &str,
+ variables: &serde_json::Map<String, Json>,
+ operation: &LinkOperation,
+) -> Result<Option<FieldKey>, LinkPatchError> {
+ let LinkOperation::UpsertByField { where_field, .. } = operation else {
+ return Ok(None);
+ };
+ let selected = selected_field(selections, type_name, where_field)?;
+ if !selected.selection_set.is_empty() {
+ return Err(LinkPatchError::WrongShape);
+ }
+ Ok(Some(selected_storage_key(selected, variables)?))
+}
+
+pub(super) fn resolve(
+ operation: &LinkOperation,
+ target: &ResolvedTarget,
+ response: &RecordUpdates,
+) -> Result<Option<EntityKey<'static>>, LinkPatchError> {
+ let LinkOperation::UpsertByField {
+ entity_key, equals, ..
+ } = operation
+ else {
+ return Ok(None);
+ };
+ let field = target
+ .match_field
+ .as_ref()
+ .ok_or(LinkPatchError::WrongShape)?;
+ let typename = entity_key.as_ref().split_once(':').map(|(name, _)| name);
+ let matches: Vec<_> = response
+ .iter()
+ .filter(|(key, record)| {
+ key.as_ref().split_once(':').map(|(name, _)| name) == typename
+ && record
+ .fields
+ .get(field)
+ .is_some_and(|value| cache_scalar_equals(value, equals))
+ })
+ .collect();
+ if matches.len() != 1 {
+ return Err(LinkPatchError::ResponseMatchCount(matches.len()));
+ }
+ Ok(Some(matches[0].0.clone()))
+}
+
+pub(super) fn missing_records(
+ effective: &HashMap<EntityKey<'static>, Record>,
+ target: &ResolvedTarget,
+) -> Vec<EntityKey<'static>> {
+ let Some(mut value) = effective
+ .get(&target.parent_entity_key)
+ .and_then(|record| record.fields.get(&target.field_key))
+ .cloned()
+ else {
+ return Vec::new();
+ };
+ let Ok(value) = traverse(&mut value, &target.path) else {
+ return Vec::new();
+ };
+ let Ok(links) = normalized_links(value) else {
+ return Vec::new();
+ };
+ links
+ .iter()
+ .filter_map(|link| match link {
+ CacheValue::Ref(key) if !effective.contains_key(key) => Some(key.clone()),
+ _ => None,
+ })
+ .collect()
+}
+
+pub(super) fn apply(
+ links: &mut Vec<CacheValue>,
+ effective: &HashMap<EntityKey<'static>, Record>,
+ field: &str,
+ equals: &Json,
+ inserted: &EntityKey<'static>,
+) -> Result<(), LinkPatchError> {
+ let typename = inserted.as_ref().split_once(':').map(|(name, _)| name);
+ let mut retained = Vec::with_capacity(links.len() + 1);
+ for link in links.iter() {
+ if let CacheValue::Ref(key) = link
+ && key.as_ref().split_once(':').map(|(name, _)| name) == typename
+ {
+ let record = effective
+ .get(key)
+ .ok_or_else(|| LinkPatchError::MissingParent(key.clone()))?;
+ let value = record
+ .fields
+ .get(field)
+ .ok_or_else(|| LinkPatchError::MissingField {
+ parent: key.to_string(),
+ field: field.to_string(),
+ })?;
+ if cache_scalar_equals(value, equals) {
+ continue;
+ }
+ }
+ retained.push(link.clone());
+ }
+ retained.insert(0, CacheValue::Ref(inserted.clone()));
+ *links = retained;
+ Ok(())
+}
diff --git a/crates/client/cache-core/src/link_patch/upsert/test.rs b/crates/client/cache-core/src/link_patch/upsert/test.rs
new file mode 100644
index 0000000000..77f43e568b
--- /dev/null
+++ b/crates/client/cache-core/src/link_patch/upsert/test.rs
@@ -0,0 +1,80 @@
+use super::*;
+use serde_json::json;
+use std::collections::BTreeMap;
+
+fn property(definition: &str) -> Record {
+ Record {
+ fields: BTreeMap::from([(
+ "propertyDefinitionId".into(),
+ CacheValue::String(definition.into()),
+ )]),
+ }
+}
+
+#[test]
+fn upsert_preserves_other_types_without_resolving_their_records() {
+ let inserted = EntityKey("GraphqlProperty:server-1".into());
+ let replaced = EntityKey("GraphqlProperty:temporary-1".into());
+ let retained = EntityKey("GraphqlProperty:status-1".into());
+ let missing_other_type = EntityKey("GraphqlSoupDocument:missing".into());
+ let present_other_type = EntityKey("GraphqlSoupDocument:present".into());
+ let effective = HashMap::from([
+ (inserted.clone(), property("priority")),
+ (replaced.clone(), property("priority")),
+ (retained.clone(), property("status")),
+ (present_other_type.clone(), Record::default()),
+ ]);
+ let mut links = vec![
+ CacheValue::Ref(replaced.clone()),
+ CacheValue::Ref(missing_other_type.clone()),
+ CacheValue::Null,
+ CacheValue::Ref(present_other_type.clone()),
+ CacheValue::Ref(retained.clone()),
+ CacheValue::Ref(replaced),
+ ];
+ let expected = vec![
+ CacheValue::Ref(inserted.clone()),
+ CacheValue::Ref(missing_other_type),
+ CacheValue::Null,
+ CacheValue::Ref(present_other_type),
+ CacheValue::Ref(retained),
+ ];
+
+ // Replay remains idempotent, including when unrelated records are absent.
+ for _ in 0..2 {
+ apply(
+ &mut links,
+ &effective,
+ "propertyDefinitionId",
+ &json!("priority"),
+ &inserted,
+ )
+ .unwrap();
+ assert_eq!(links, expected);
+ }
+}
+
+#[test]
+fn upsert_rejects_missing_target_type_records_without_changing_links() {
+ let inserted = EntityKey("GraphqlProperty:server-1".into());
+ let replaced = EntityKey("GraphqlProperty:temporary-1".into());
+ let missing = EntityKey("GraphqlProperty:missing".into());
+ let effective = HashMap::from([
+ (inserted.clone(), property("priority")),
+ (replaced.clone(), property("priority")),
+ ]);
+ let mut links = vec![CacheValue::Ref(replaced), CacheValue::Ref(missing.clone())];
+ let original = links.clone();
+
+ assert_eq!(
+ apply(
+ &mut links,
+ &effective,
+ "propertyDefinitionId",
+ &json!("priority"),
+ &inserted,
+ ),
+ Err(LinkPatchError::MissingParent(missing))
+ );
+ assert_eq!(links, original);
+}
diff --git a/crates/client/cache-core/tests/property_assignment_optimistic.rs b/crates/client/cache-core/tests/property_assignment_optimistic.rs
new file mode 100644
index 0000000000..b68992c77f
--- /dev/null
+++ b/crates/client/cache-core/tests/property_assignment_optimistic.rs
@@ -0,0 +1,223 @@
+//! First assignments remain linked across enqueue, replay, settlement and rollback.
+
+use cache_core::engine::{BeginOptimisticWrite, Engine, ReadResult};
+use cache_core::link_patch::{
+ LinkOperation, LinkPathSegment, ListItemByScalar, OptimisticLinkPatch,
+};
+use cache_core::queue::{MutationClaimRequest, MutationClaimToken};
+use cache_core::store::InMemoryStorage;
+use cache_core::value::EntityKey;
+use pollster::block_on;
+use serde_json::{Value as Json, json};
+
+const QUERY: &str = r#"
+query Properties($input: SoupInput!) {
+ user { id soup(input: $input) { items { __typename id properties {
+ id definition: propertyDefinitionId value {
+ __typename ... on GraphqlSelectOptionPropertyValue { optionIds }
+ }
+ } } } }
+}"#;
+const MUTATION: &str = r#"
+mutation Set($input: SetEntityPropertyInput!) {
+ setEntityProperty(input: $input) { id propertyDefinitionId value {
+ __typename ... on GraphqlSelectOptionPropertyValue { optionIds }
+ } }
+}"#;
+const UUID: &str = "1697e6bc-0d9a-4dd2-bc3f-bd33bcb6f607";
+
+fn variables() -> serde_json::Map<String, Json> {
+ json!({"input":{}}).as_object().unwrap().clone()
+}
+fn response(id: &str, value: &str) -> Json {
+ json!({"setEntityProperty": {"id":id, "propertyDefinitionId":"priority",
+ "value":{"__typename":"GraphqlSelectOptionPropertyValue","optionIds":[value]}}})
+}
+fn patch() -> OptimisticLinkPatch {
+ OptimisticLinkPatch {
+ query: QUERY.into(),
+ operation_name: Some("Properties".into()),
+ variables_json: serde_json::to_string(&variables()).unwrap(),
+ path: vec![
+ LinkPathSegment::Field {
+ field: "user".into(),
+ },
+ LinkPathSegment::Field {
+ field: "soup".into(),
+ },
+ LinkPathSegment::Field {
+ field: "items".into(),
+ },
+ LinkPathSegment::ListItem {
+ list_item: ListItemByScalar {
+ where_field: "id".into(),
+ equals: json!("task-1"),
+ },
+ },
+ LinkPathSegment::Field {
+ field: "properties".into(),
+ },
+ ],
+ operation: LinkOperation::UpsertByField {
+ entity_key: EntityKey("GraphqlProperty:temporary-1".into()),
+ where_field: "definition".into(),
+ equals: json!("priority"),
+ },
+ }
+}
+async fn seeded() -> Engine<InMemoryStorage> {
+ let mut engine = Engine::new(InMemoryStorage::new());
+ engine
+ .write_query(
+ None,
+ QUERY,
+ Some("Properties"),
+ &variables(),
+ &json!({"user":{
+ "id":"user-1", "soup":{"items":[
+ {"__typename":"GraphqlSoupDocument","id":"task-1","properties":[]},
+ {"__typename":"GraphqlSoupDocument","id":"task-2","properties":[]}
+ ]}
+ }}),
+ None,
+ )
+ .await
+ .unwrap();
+ engine
+}
+async fn read(engine: &mut Engine<InMemoryStorage>) -> Json {
+ let ReadResult::Hit { data, .. } = engine
+ .read_query(Some(1), QUERY, Some("Properties"), &variables())
+ .await
+ .unwrap()
+ else {
+ panic!("properties must remain readable");
+ };
+ data
+}
+async fn enqueue(engine: &mut Engine<InMemoryStorage>, value: &str, now: i64) -> u64 {
+ engine
+ .begin_optimistic_write(
+ None,
+ BeginOptimisticWrite {
+ uuid: UUID,
+ query: MUTATION,
+ operation_name: Some("Set"),
+ variables: &variables(),
+ data: &response("temporary-1", value),
+ link_patches: &[patch()],
+ revalidations: &[],
+ created_at_ms: now,
+ },
+ )
+ .await
+ .unwrap()
+ .0
+}
+async fn claim(engine: &mut Engine<InMemoryStorage>, now: i64) -> MutationClaimToken {
+ let claimed = engine
+ .claim_next_mutation(MutationClaimRequest {
+ owner: "test".into(),
+ now_ms: now,
+ lease_expires_at_ms: now + 100,
+ })
+ .await
+ .unwrap()
+ .unwrap();
+ MutationClaimToken {
+ owner: "test".into(),
+ generation: claimed.lease_generation,
+ }
+}
+fn properties(data: &Json) -> &Json {
+ &data["user"]["soup"]["items"][0]["properties"]
+}
+
+#[test]
+fn new_assignment_is_visible_before_response_and_reconciles_server_identity() {
+ block_on(async {
+ let mut engine = seeded().await;
+ read(&mut engine).await;
+ let txn = enqueue(&mut engine, "urgent", 1).await;
+ let data = read(&mut engine).await;
+ assert_eq!(
+ properties(&data)[0]["value"]["optionIds"],
+ json!(["urgent"])
+ );
+ assert_eq!(data["user"]["soup"]["items"][1]["properties"], json!([]));
+ let mut engine = Engine::new(engine.storage().clone());
+ assert_eq!(properties(&read(&mut engine).await)[0]["id"], "temporary-1");
+ let claim = claim(&mut engine, 2).await;
+ engine
+ .commit_optimistic_write(
+ txn,
+ claim,
+ MUTATION,
+ Some("Set"),
+ &variables(),
+ &response("server-1", "urgent"),
+ )
+ .await
+ .unwrap();
+ let data = read(&mut engine).await;
+ assert_eq!(properties(&data).as_array().unwrap().len(), 1);
+ assert_eq!(properties(&data)[0]["id"], "server-1");
+ assert_eq!(
+ properties(&data)[0]["value"]["optionIds"],
+ json!(["urgent"])
+ );
+ let mut reopened = Engine::new(engine.storage().clone());
+ assert_eq!(read(&mut reopened).await, data);
+ });
+}
+
+#[test]
+fn failure_removes_the_temporary_link() {
+ block_on(async {
+ let mut engine = seeded().await;
+ let txn = enqueue(&mut engine, "urgent", 1).await;
+ let claim = claim(&mut engine, 2).await;
+ engine.rollback_optimistic_write(txn, claim).await.unwrap();
+ assert_eq!(properties(&read(&mut engine).await), &json!([]));
+ });
+}
+
+#[test]
+fn later_edit_rebases_over_new_server_id_without_duplicate_properties() {
+ block_on(async {
+ let mut engine = seeded().await;
+ let first = enqueue(&mut engine, "urgent", 1).await;
+ let first_claim = claim(&mut engine, 2).await;
+ let second = enqueue(&mut engine, "low", 3).await;
+ engine
+ .commit_optimistic_write(
+ first,
+ first_claim,
+ MUTATION,
+ Some("Set"),
+ &variables(),
+ &response("server-1", "urgent"),
+ )
+ .await
+ .unwrap();
+ let data = read(&mut engine).await;
+ assert_eq!(properties(&data).as_array().unwrap().len(), 1);
+ assert_eq!(properties(&data)[0]["value"]["optionIds"], json!(["low"]));
+ let second_claim = claim(&mut engine, 4).await;
+ engine
+ .commit_optimistic_write(
+ second,
+ second_claim,
+ MUTATION,
+ Some("Set"),
+ &variables(),
+ &response("server-1", "low"),
+ )
+ .await
+ .unwrap();
+ let data = read(&mut engine).await;
+ assert_eq!(properties(&data).as_array().unwrap().len(), 1);
+ assert_eq!(properties(&data)[0]["id"], "server-1");
+ assert_eq!(properties(&data)[0]["value"]["optionIds"], json!(["low"]));
+ });
+}
diff --git a/docs/AGENT_GUIDE/tasks.md b/docs/AGENT_GUIDE/tasks.md
index 625b9452b9..3fd62f6c1a 100644
--- a/docs/AGENT_GUIDE/tasks.md
+++ b/docs/AGENT_GUIDE/tasks.md
@@ -237,6 +237,26 @@ it during that delay should not let the earlier save close the new picker.
A failed save uses the mutation's rollback/error handling; it must not reopen
the picker or trigger a success refresh.
+In the task list, setting an **unset Priority to Urgent** also updates before the
+response, including when no priority assignment exists yet. Verify another task's
+unset priority stays unchanged. On success the temporary assignment is replaced
+by the server assignment without a blank cell or duplicate property; failure
+restores the unset cell. Bulk property edits install every optimistic layer before
+the first HTTP response, while network requests retain durable queue ordering.
+The bulk save remains pending until every queued item settles, including while
+offline; queue acceptance alone is not success. Delay the second response after
+the first succeeds: no success callback or refresh should run yet. Then reject
+the second request: the bulk save reports failure, the first task keeps its
+committed value, and only the second task rolls back. Repeat with both requests
+succeeding and with the first failing before the second succeeds.
+
+A self-contained browser regression uses the production list cell, mutation hooks,
+and worker/WASM cache with delayed fixture HTTP (no hosted task edits). From
+`apps/web`, run `just build-cache-wasm`, then
+`bunx playwright test -c src/features/tasks-view/browser-test/playwright.config.ts`.
+The harness defaults to port 3004; `TASK_PROPERTY_TEST_PORT` can select a verified
+same-worktree dev server.
+
For multi-tab status checks, open the same task in several browser tabs
and change status repeatedly in the visible tab. Hidden tabs defer cache-change
refreshes for Quick Access searches, its channel list, and history, plus