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/feat/turso cache search (#5719)

Sean Ayea5bbbc5c34c2
diff --git a/Cargo.lock b/Cargo.lock
index 63f163462f..6481dc2c83 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2563,6 +2563,7 @@ version = "0.1.0"
dependencies = [
"apollo-compiler",
"apollo-parser",
+ "chrono",
"lru",
"maybe_send",
"pollster",
@@ -2602,7 +2603,7 @@ dependencies = [
[[package]]
name = "cache-wasm"
-version = "0.4.0"
+version = "0.4.1"
dependencies = [
"async-lock",
"cache-core",
diff --git a/apps/web/src/features/command/useCommandItems.ts b/apps/web/src/features/command/useCommandItems.ts
index bddf334665..a83546557f 100644
--- a/apps/web/src/features/command/useCommandItems.ts
+++ b/apps/web/src/features/command/useCommandItems.ts
@@ -433,7 +433,10 @@ export function useCommandItems(
queryText: string
): CommandMenuItem[] => {
if (!queryText.trim()) return items.filter(showInRecencyList);
- if (!quickAccess.usesRecordSelection()) {
+ if (
+ !quickAccess.usesRecordSelection() &&
+ !quickAccess.usesSearchProjection()
+ ) {
return search()(items, queryText).map((result) => result.item);
}
diff --git a/apps/web/src/features/notifications/notification-source.ts b/apps/web/src/features/notifications/notification-source.ts
index 823e3b0eb2..29fe0cfaf6 100644
--- a/apps/web/src/features/notifications/notification-source.ts
+++ b/apps/web/src/features/notifications/notification-source.ts
@@ -18,12 +18,13 @@ import type {
import type { UseQueryResult } from '@tanstack/solid-query';
import {
type Accessor,
+ batch,
createEffect,
createMemo,
createRoot,
createSignal,
} from 'solid-js';
-import { reconcile } from 'solid-js/store';
+import { createStore, reconcile } from 'solid-js/store';
import { fromZodError } from 'zod-validation-error';
import { createMutedEntitiesQuery } from './queries/muted-entities-query';
import {
@@ -118,18 +119,13 @@ export function setDoneOverride(
// failure (that rollback is deliberate) and pruned once the cache confirms
// the seen state at a quiet moment.
const [seenOverrides, setSeenOverrides] = createRoot(() =>
- createSignal<ReadonlyMap<string, string>>(new Map())
+ createStore<Record<string, string | undefined>>({})
);
function setSeenOverride(ids: readonly string[], viewedAt: string | undefined) {
if (ids.length === 0) return;
- setSeenOverrides((prev) => {
- const next = new Map(prev);
- for (const id of ids) {
- if (viewedAt === undefined) next.delete(id);
- else next.set(id, viewedAt);
- }
- return next;
+ batch(() => {
+ for (const id of ids) setSeenOverrides(id, viewedAt);
});
}
@@ -157,16 +153,22 @@ export function createNotificationSource(
const raw = notificationsQuery.data;
if (!raw) return [];
const done = doneOverrides();
- const seen = seenOverrides();
- if (done.size === 0 && seen.size === 0) return raw;
- return raw.map((n) => {
- const doneOverride = done.get(n.id);
- const seenOverride = n.viewed_at ? undefined : seen.get(n.id);
- if (doneOverride === undefined && seenOverride === undefined) return n;
+ return raw.map((notification) => {
+ const doneOverride = done.get(notification.id);
+ if (notification.viewed_at && doneOverride === undefined) {
+ return notification;
+ }
+
return {
- ...n,
+ ...notification,
...(doneOverride !== undefined ? { done: doneOverride } : {}),
- ...(seenOverride !== undefined ? { viewed_at: seenOverride } : {}),
+ // Keep seen overrides granular. Reading one notification's viewed_at
+ // subscribes only to that id instead of invalidating the complete
+ // notifications array and every channel/favorite consumer.
+ get viewed_at() {
+ if (notification.viewed_at) return notification.viewed_at;
+ return seenOverrides[notification.id] ?? notification.viewed_at;
+ },
};
});
});
@@ -198,14 +200,14 @@ export function createNotificationSource(
createEffect(() => {
const raw = notificationsQuery.data;
if (!raw) return;
- const seen = seenOverrides();
- if (seen.size === 0) return;
+ const seenIds = Object.keys(seenOverrides);
+ if (seenIds.length === 0) return;
const quiet =
!notificationsQuery.isFetching &&
!markNotificationsAsSeenMutation.isPending;
const byId = new Map(raw.map((n) => [n.id, n]));
const toPrune: string[] = [];
- for (const id of seen.keys()) {
+ for (const id of seenIds) {
const row = byId.get(id);
if (!row) toPrune.push(id);
else if (row.viewed_at && quiet) toPrune.push(id);
diff --git a/apps/web/src/features/notifications/tests/notification-source.test.ts b/apps/web/src/features/notifications/tests/notification-source.test.ts
new file mode 100644
index 0000000000..c51b7d3bb1
--- /dev/null
+++ b/apps/web/src/features/notifications/tests/notification-source.test.ts
@@ -0,0 +1,147 @@
+import type { ConnectionGatewayWebsocket } from '@service-connection/websocket';
+import { createMemo, createRoot } from 'solid-js';
+import { beforeEach, describe, expect, it, vi } from 'vitest';
+import { createNotificationSource } from '../notification-source';
+import type { UnifiedNotification } from '../types';
+
+const mocks = vi.hoisted(() => ({
+ notificationsQuery: {} as Record<string, unknown>,
+ seenMutation: {
+ isPending: false,
+ mutateAsync: vi.fn(),
+ },
+ doneMutation: {
+ isPending: false,
+ mutateAsync: vi.fn(),
+ },
+}));
+
+vi.mock('@macro-inc/collaboration/websocket', () => ({
+ createSocketEffect: vi.fn(),
+}));
+
+vi.mock('@queries/notification/user-notifications', () => ({
+ optimisticInsertNotification: vi.fn(),
+ useMarkNotificationsAsDoneMutation: () => mocks.doneMutation,
+ useMarkNotificationsAsSeenMutation: () => mocks.seenMutation,
+ useUserNotificationsQuery: () => mocks.notificationsQuery,
+}));
+
+vi.mock('@service-notification/client', () => ({
+ notificationServiceClient: {
+ removeUnsubscribeItem: vi.fn(),
+ unsubscribeItem: vi.fn(),
+ },
+}));
+
+vi.mock('../queries/muted-entities-query', () => ({
+ createMutedEntitiesQuery: () => ({
+ data: undefined,
+ isLoading: false,
+ isSuccess: false,
+ refetch: vi.fn(),
+ }),
+}));
+
+function notification(
+ id: string,
+ entityType: UnifiedNotification['entity_type'],
+ entityId: string
+): UnifiedNotification {
+ return {
+ id,
+ entity_id: entityId,
+ entity_type: entityType,
+ created_at: '2026-08-17T00:00:00.000Z',
+ done: false,
+ notification_event_type: 'test',
+ notification_metadata: {} as UnifiedNotification['notification_metadata'],
+ sent: true,
+ updated_at: '2026-08-17T00:00:00.000Z',
+ viewed_at: null,
+ };
+}
+
+describe('createNotificationSource', () => {
+ beforeEach(() => {
+ mocks.seenMutation.mutateAsync.mockReset().mockResolvedValue(undefined);
+ mocks.doneMutation.mutateAsync.mockReset().mockResolvedValue(undefined);
+ });
+
+ it('updates only consumers that read the marked notification seen state', async () => {
+ const email = notification(
+ 'email-notification',
+ 'email_thread',
+ 'thread-1'
+ );
+ const channel = notification(
+ 'channel-notification',
+ 'channel',
+ 'channel-1'
+ );
+ mocks.notificationsQuery = {
+ data: [email, channel],
+ fetchNextPage: vi.fn(),
+ hasNextPage: false,
+ isFetching: false,
+ isLoading: false,
+ transport: 'graphql',
+ };
+
+ let dispose = () => {};
+ const result = createRoot((rootDispose) => {
+ dispose = rootDispose;
+ const source = createNotificationSource({} as ConnectionGatewayWebsocket);
+ let channelMemoRuns = 0;
+ let emailMemoRuns = 0;
+ const unreadChannels = createMemo(() => {
+ channelMemoRuns += 1;
+ return source
+ .notifications()
+ .filter((item) => item.entity_type === 'channel' && !item.viewed_at);
+ });
+ const emailViewedAt = createMemo(() => {
+ emailMemoRuns += 1;
+ return source.notifications().find((item) => item.id === email.id)
+ ?.viewed_at;
+ });
+
+ return {
+ channelMemoRuns: () => channelMemoRuns,
+ emailMemoRuns: () => emailMemoRuns,
+ emailViewedAt,
+ source,
+ unreadChannels,
+ };
+ });
+
+ try {
+ const notificationsBefore = result.source.notifications();
+ const groupedBefore = result.source.notificationsByEntity();
+ expect(result.unreadChannels()).toEqual([
+ expect.objectContaining({ id: channel.id }),
+ ]);
+ expect(result.emailViewedAt()).toBeNull();
+ expect(result.channelMemoRuns()).toBe(1);
+ expect(result.emailMemoRuns()).toBe(1);
+
+ const markPromise = result.source.bulkMarkAsRead([
+ notificationsBefore[0],
+ ]);
+
+ expect(result.source.notifications()).toBe(notificationsBefore);
+ expect(result.source.notificationsByEntity()).toBe(groupedBefore);
+ expect(result.unreadChannels()).toHaveLength(1);
+ expect(result.channelMemoRuns()).toBe(1);
+ expect(result.emailViewedAt()).toEqual(expect.any(String));
+ expect(result.emailMemoRuns()).toBe(2);
+
+ await markPromise;
+ expect(mocks.seenMutation.mutateAsync).toHaveBeenCalledWith({
+ notificationIds: [email.id],
+ });
+ } finally {
+ dispose();
+ }
+ });
+});
diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/MentionsMenu/hooks/useEntityMention.ts b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/MentionsMenu/hooks/useEntityMention.ts
index f03995ff73..52378a99e7 100644
--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/MentionsMenu/hooks/useEntityMention.ts
+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/MentionsMenu/hooks/useEntityMention.ts
@@ -34,22 +34,20 @@ export function useEntityMention(
buckets: options.buckets,
searchTerm: options.searchTerm,
}) as QuickAccessList<EntityItem>;
+ const usesRankedList = () =>
+ quickAccess.usesRecordSelection() || quickAccess.usesSearchProjection();
const entities = createLazyMemo(() => {
- if (quickAccess.usesRecordSelection()) return entityList.items();
+ if (usesRankedList()) return entityList.items();
return searchQuickAccessEntities(entityList.items(), options.searchTerm());
});
return {
entities,
totalCount: () =>
- quickAccess.usesRecordSelection()
- ? entityList.totalCount()
- : entities().length,
+ usesRankedList() ? entityList.totalCount() : entities().length,
hasMore: () => quickAccess.usesRecordSelection() && entityList.hasMore(),
isLoading: () =>
- quickAccess.usesRecordSelection()
- ? entityList.isLoading()
- : quickAccess.isLoading(),
+ usesRankedList() ? entityList.isLoading() : quickAccess.isLoading(),
isLoadingMore: () =>
quickAccess.usesRecordSelection() && entityList.isLoadingMore(),
loadMore: async () => {
diff --git a/apps/web/src/lib/core/context/quickAccess/QuickAccessProvider.tsx b/apps/web/src/lib/core/context/quickAccess/QuickAccessProvider.tsx
index e06508144d..ee5787999d 100644
--- a/apps/web/src/lib/core/context/quickAccess/QuickAccessProvider.tsx
+++ b/apps/web/src/lib/core/context/quickAccess/QuickAccessProvider.tsx
@@ -35,6 +35,7 @@ export const QuickAccessProvider: FlowComponent = (props) => {
const quickAccess: QuickAccessContextValue = {
useList,
usesRecordSelection: source.usesRecordSelection,
+ usesSearchProjection: source.usesSearchProjection,
isLoading: source.isLoading,
refresh: source.refresh,
getById: source.getById,
diff --git a/apps/web/src/lib/core/context/quickAccess/QuickAccessSource.tsx b/apps/web/src/lib/core/context/quickAccess/QuickAccessSource.tsx
index a634fa94c5..24f183b94d 100644
--- a/apps/web/src/lib/core/context/quickAccess/QuickAccessSource.tsx
+++ b/apps/web/src/lib/core/context/quickAccess/QuickAccessSource.tsx
@@ -14,6 +14,7 @@ import type {
SnippetEntity,
} from '@entity';
import { queryReadyGate } from '@queries/gate';
+import { materializeCachedGraphqlHistoryItems } from '@queries/history/graphql';
import { type HistoryItem, useHistoryQuery } from '@queries/history/history';
import { useQuickAccessCrmCompaniesQuery } from '@queries/soup/quick-access-crm-companies';
import { useQuickAccessSkillsQuery } from '@queries/soup/quick-access-skills';
@@ -21,10 +22,12 @@ import { useQuickAccessSnippetsQuery } from '@queries/soup/quick-access-snippets
import { useRecentlyViewedSoupQuery } from '@queries/soup/recently-viewed';
import { useInstructionsMdIdQuery } from '@queries/storage/instructions-md';
import type { ApiChannelWithLatest } from '@service-storage/channel-list-types';
+import { getGraphqlSoupCacheHost } from '@service-storage/graphql-soup';
import { formatDocumentName } from '@service-storage/util/filename';
import { createLazyMemo } from '@solid-primitives/memo';
import { toDate } from 'date-fns';
-import { createEffect, createSignal } from 'solid-js';
+import { createEffect, createSignal, onCleanup } from 'solid-js';
+import { searchQuickAccessItems } from './entity-search';
import type {
Bucket,
BucketCombination,
@@ -242,6 +245,12 @@ export function createQuickAccessValue(): QuickAccessContextValue {
const contacts = useContacts();
const augmentUserWithDmActivity = useAugmentUserWithDmActivity();
const isConnectedSecondaryInbox = useIsConnectedSecondaryInbox();
+ const cacheHost = getGraphqlSoupCacheHost();
+ const [cacheRevision, setCacheRevision] = createSignal(0);
+ const unsubscribeCacheChanges = cacheHost?.onCacheChanged(() => {
+ setCacheRevision((revision) => revision + 1);
+ });
+ onCleanup(() => unsubscribeCacheChanges?.());
const instructionsIdQuery = useInstructionsMdIdQuery();
const { query: crmCompaniesQuery, companies: crmCompaniesAccessor } =
useQuickAccessCrmCompaniesQuery();
@@ -757,7 +766,7 @@ export function createQuickAccessValue(): QuickAccessContextValue {
const first = args[0];
const options = typeof first === 'object' ? first : undefined;
const buckets = options ? [...options.buckets] : (args as Bucket[]);
- const list = createLazyMemo(() => {
+ const baseList = createLazyMemo(() => {
if (options?.enabled?.() === false) return [];
let indices: IndexEntry[];
@@ -783,6 +792,113 @@ export function createQuickAccessValue(): QuickAccessContextValue {
return resolveEntries(indices);
});
+
+ const [projectedItems, setProjectedItems] = createSignal<
+ | {
+ recordKeys: string[];
+ materialized: Map<string, QuickAccessItem>;
+ }
+ | undefined
+ >(undefined);
+ if (options && cacheHost) {
+ let generation = 0;
+ onCleanup(() => {
+ generation += 1;
+ });
+ createEffect(() => {
+ cacheRevision();
+ const enabled = options.enabled?.() !== false;
+ const query = options.searchTerm?.() ?? '';
+ const currentGeneration = ++generation;
+ if (!enabled) {
+ setProjectedItems(undefined);
+ return;
+ }
+ void (async () => {
+ try {
+ const page = await cacheHost.search({
+ profile: 'quick-access-v1',
+ buckets,
+ query,
+ limit: 500,
+ });
+ const missingDocuments = page.documents.filter(({ recordKey }) => {
+ const separator = recordKey.indexOf(':');
+ const id =
+ separator < 0 ? recordKey : recordKey.slice(separator + 1);
+ return !itemCache.has(id);
+ });
+ const historyItems = await materializeCachedGraphqlHistoryItems(
+ cacheHost,
+ missingDocuments
+ );
+ if (currentGeneration !== generation) return;
+ const materializedHistoryItems = new Map(
+ historyItems.map((item) => [item.id, item] as const)
+ );
+ const recordKeys: string[] = [];
+ const materialized = new Map<string, QuickAccessItem>();
+ const seen = new Set<string>();
+ for (const document of page.documents) {
+ const separator = document.recordKey.indexOf(':');
+ const id =
+ separator < 0
+ ? document.recordKey
+ : document.recordKey.slice(separator + 1);
+ if (seen.has(id)) continue;
+ if (itemCache.get(id)?.item) {
+ seen.add(id);
+ recordKeys.push(document.recordKey);
+ continue;
+ }
+ const historyItem = materializedHistoryItems.get(id);
+ if (!historyItem) continue;
+ const entity = historyItemToEntity(historyItem);
+ const item: QuickAccessItem = {
+ kind: 'entity',
+ id,
+ bucket: getBucketForHistoryItem(historyItem),
+ searchText: getEntitySearchText(entity),
+ sortTimestamp: document.timestampMs,
+ timestamps: {
+ updatedAt: historyItem.updatedAt,
+ createdAt: historyItem.createdAt,
+ },
+ data: entity,
+ };
+ seen.add(id);
+ recordKeys.push(document.recordKey);
+ materialized.set(id, item);
+ }
+ setProjectedItems({ recordKeys, materialized });
+ } catch {
+ if (currentGeneration === generation) {
+ setProjectedItems({ recordKeys: [], materialized: new Map() });
+ }
+ }
+ })();
+ });
+ }
+
+ const list = createLazyMemo(() => {
+ const base = baseList();
+ if (!options) return base;
+ const local = searchQuickAccessItems(base, options.searchTerm?.() ?? '');
+ const projected = projectedItems();
+ if (!projected) return local;
+
+ // Search describes cached contents, not corpus completeness. Preserve
+ // projection rank, then append server/local candidates as fallback.
+ const ranked = projected.recordKeys.flatMap((recordKey) => {
+ const separator = recordKey.indexOf(':');
+ const key = separator < 0 ? recordKey : recordKey.slice(separator + 1);
+ const item =
+ itemCache.get(key)?.item ?? projected.materialized.get(key);
+ return item ? [item] : [];
+ });
+ const seen = new Set(ranked.map((item) => item.id));
+ return ranked.concat(local.filter((item) => !seen.has(item.id)));
+ });
return {
items: list,
totalCount: () => list().length,
@@ -807,6 +923,7 @@ export function createQuickAccessValue(): QuickAccessContextValue {
return {
useList,
usesRecordSelection: () => false,
+ usesSearchProjection: () => cacheHost !== undefined,
isLoading,
refresh,
getById,
diff --git a/apps/web/src/lib/core/context/quickAccess/entity-search.ts b/apps/web/src/lib/core/context/quickAccess/entity-search.ts
index f12249142e..c13c4ae195 100644
--- a/apps/web/src/lib/core/context/quickAccess/entity-search.ts
+++ b/apps/web/src/lib/core/context/quickAccess/entity-search.ts
@@ -1,18 +1,26 @@
import { createFreshSearch } from '@core/util/freshSort';
-import type { EntityItem } from './types';
+import type { EntityItem, QuickAccessItem } from './types';
-const entitySearch = createFreshSearch<EntityItem>({
+const quickAccessSearch = createFreshSearch<QuickAccessItem>({
config: { useViewedAt: true },
getName: (item) => item.searchText,
isChannelItem: (item) => item.bucket === 'channel',
getTimestamp: (item) => item.timestamps,
});
+/** Fuzzy-ranks entity candidates using the existing mentions semantics. */
+export function searchQuickAccessItems(
+ items: QuickAccessItem[],
+ query: string
+): QuickAccessItem[] {
+ if (!query.trim()) return items;
+ return quickAccessSearch(items, query).map(({ item }) => item);
+}
+
/** Fuzzy-ranks entity candidates using the existing mentions semantics. */
export function searchQuickAccessEntities(
items: EntityItem[],
query: string
): EntityItem[] {
- if (!query.trim()) return items;
- return entitySearch(items, query).map(({ item }) => item);
+ return searchQuickAccessItems(items, query) as EntityItem[];
}
diff --git a/apps/web/src/lib/core/context/quickAccess/types.ts b/apps/web/src/lib/core/context/quickAccess/types.ts
index 167d7bc61c..1449e410ee 100644
--- a/apps/web/src/lib/core/context/quickAccess/types.ts
+++ b/apps/web/src/lib/core/context/quickAccess/types.ts
@@ -189,6 +189,9 @@ export type QuickAccessContextValue = {
/** Whether this source reads normalized records through cache fragments. */
usesRecordSelection: Accessor<boolean>;
+ /** Whether scoped lists are ranked by the cache materialized projection. */
+ usesSearchProjection: Accessor<boolean>;
+
/**
* Whether any data sources are still loading.
*/
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 c9330f4169..fb8cf3e3b1 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
@@ -243,8 +243,11 @@ function makeFakeHost(): FakeHost {
});
return readResult;
},
- async readRecords() {
- return { records: [], nextCursor: null };
+ async readRecordsByKeys() {
+ return [];
+ },
+ async search() {
+ return { documents: [], nextCursor: null };
},
async writeQuery(args): Promise<WriteResult> {
host.writes.push({
diff --git a/apps/web/src/lib/graphql-cache/exchange/record-selection.test.ts b/apps/web/src/lib/graphql-cache/exchange/record-selection.test.ts
index b2cf207c32..0b2cd3a969 100644
--- a/apps/web/src/lib/graphql-cache/exchange/record-selection.test.ts
+++ b/apps/web/src/lib/graphql-cache/exchange/record-selection.test.ts
@@ -5,48 +5,52 @@ import {
} from '@service-storage/graphql/generated/graphql';
import { describe, expect, expectTypeOf, it, vi } from 'vitest';
import type { CacheHost } from '../host/types';
-import { readRecords, selectRecords } from './record-selection';
+import { readRecordsByKeys, selectRecords } from './record-selection';
describe('typed record selection', () => {
- it('extracts the root fragment and infers generated result types', async () => {
- const readRecordsHost = vi.fn().mockResolvedValue({
- records: [{ id: 'item-1' }],
- nextCursor: 'cursor-1',
- });
- const host = { readRecords: readRecordsHost } as unknown as CacheHost;
+ it('projects explicit keys and infers generated result types', async () => {
+ const readRecordsByKeysHost = vi.fn().mockResolvedValue([
+ {
+ recordKey: 'GraphqlSoupDocument:item-1',
+ record: { id: 'item-1' },
+ },
+ ]);
+ const host = {
+ readRecordsByKeys: readRecordsByKeysHost,
+ } as unknown as CacheHost;
const selection = selectRecords(SoupItemFieldsFragmentDoc);
- const page = await readRecords(host, selection, { limit: 25 });
+ const records = await readRecordsByKeys(host, selection, [
+ 'GraphqlSoupDocument:item-1',
+ ]);
- expect(readRecordsHost).toHaveBeenCalledWith({
+ expect(readRecordsByKeysHost).toHaveBeenCalledWith({
document: expect.stringContaining('fragment SoupItemFields'),
fragmentName: 'SoupItemFields',
- cursor: undefined,
- limit: 25,
+ keys: ['GraphqlSoupDocument:item-1'],
});
- expect(page.nextCursor).toBe('cursor-1');
- expectTypeOf(page.records).toEqualTypeOf<SoupItemFieldsFragment[]>();
+ expectTypeOf(records).toEqualTypeOf<
+ Array<{ recordKey: string; record: SoupItemFieldsFragment }>
+ >();
// @ts-expect-error Generated fragment records have no arbitrary field.
- page.records[0]?.missing;
+ records[0]?.record.missing;
});
- it('rejects operation documents and malformed host pages', async () => {
+ it('rejects operation documents and malformed host records', async () => {
expect(() => selectRecords(SoupDocument)).toThrow(
'requires a fragment-only document'
);
const selection = selectRecords(SoupItemFieldsFragmentDoc);
for (const result of [
- null,
- { records: null, nextCursor: null },
- { records: [null], nextCursor: null },
- { records: [], nextCursor: 42 },
+ [{ recordKey: '', record: {} }],
+ [{ recordKey: 'GraphqlSoupDocument:1', record: null }],
]) {
const host = {
- readRecords: async () => result,
+ readRecordsByKeys: async () => result,
} as unknown as CacheHost;
- await expect(readRecords(host, selection, { limit: 1 })).rejects.toThrow(
- 'invalid cache'
- );
+ await expect(
+ readRecordsByKeys(host, selection, ['GraphqlSoupDocument:1'])
+ ).rejects.toThrow('invalid cache');
}
});
});
diff --git a/apps/web/src/lib/graphql-cache/exchange/record-selection.ts b/apps/web/src/lib/graphql-cache/exchange/record-selection.ts
index 638306b7d4..57c9b5f6fd 100644
--- a/apps/web/src/lib/graphql-cache/exchange/record-selection.ts
+++ b/apps/web/src/lib/graphql-cache/exchange/record-selection.ts
@@ -2,7 +2,7 @@ import type { TypedDocumentNode } from '@graphql-typed-document-node/core';
import { stringifyDocument } from '@urql/core';
import { type FragmentDefinitionNode, Kind } from 'graphql';
import type { CacheHost } from '../host/types';
-import type { RecordCursor } from '../protocol';
+import type { SelectedRecordByKeyWire } from '../protocol';
const recordResultType: unique symbol = Symbol('recordResultType');
@@ -17,12 +17,6 @@ export type RecordSelection<TResult> = RecordSelectionState & {
readonly [recordResultType]: TResult;
};
-/** One typed page of complete selected records. */
-export type SelectedRecordPage<TResult> = {
- records: TResult[];
- nextCursor: RecordCursor | null;
-};
-
/** Prepares a generated, fragment-only document for record selection. */
export function selectRecords<TResult, TVariables>(
document: TypedDocumentNode<TResult, TVariables>
@@ -51,33 +45,21 @@ function isRecord(value: unknown): value is Record<string, unknown> {
return typeof value === 'object' && value !== null && !Array.isArray(value);
}
-function validatePage(value: unknown): SelectedRecordPage<unknown> {
- if (!isRecord(value) || !Array.isArray(value.records)) {
- throw new Error('invalid cache record-selection page');
- }
- if (value.nextCursor !== null && typeof value.nextCursor !== 'string') {
- throw new Error('invalid cache record-selection cursor');
- }
- if (value.records.some((record) => !isRecord(record))) {
- throw new Error('invalid cache selected record');
- }
- return {
- records: value.records,
- nextCursor: value.nextCursor,
- };
-}
-
-/** Reads one typed page from a cache host using a prepared fragment. */
-export async function readRecords<TResult>(
- host: Pick<CacheHost, 'readRecords'>,
+/** Projects a bounded explicit key set through a prepared fragment. */
+export async function readRecordsByKeys<TResult>(
+ host: Pick<CacheHost, 'readRecordsByKeys'>,
selection: RecordSelection<TResult>,
- options: { cursor?: RecordCursor; limit: number }
-): Promise<SelectedRecordPage<TResult>> {
- const page: unknown = await host.readRecords({
+ keys: string[]
+): Promise<Array<{ recordKey: string; record: TResult }>> {
+ const records: SelectedRecordByKeyWire[] = await host.readRecordsByKeys({
document: selection.document,
fragmentName: selection.fragmentName,
- cursor: options.cursor,
- limit: options.limit,
+ keys,
+ });
+ return records.map(({ recordKey, record }) => {
+ if (!recordKey || !isRecord(record)) {
+ throw new Error('invalid cache selected record by key');
+ }
+ return { recordKey, record: record as TResult };
});
- return validatePage(page) as SelectedRecordPage<TResult>;
}
diff --git a/apps/web/src/lib/graphql-cache/host/noop-host.ts b/apps/web/src/lib/graphql-cache/host/noop-host.ts
index c2013c4a68..70c9d70d8f 100644
--- a/apps/web/src/lib/graphql-cache/host/noop-host.ts
+++ b/apps/web/src/lib/graphql-cache/host/noop-host.ts
@@ -1,9 +1,7 @@
-import {
- type EnqueueOptimisticMutationResult,
- type ReadRecordsArgs,
- type ReadResult,
- validateRecordSelectionLimit,
- type WriteResult,
+import type {
+ EnqueueOptimisticMutationResult,
+ ReadResult,
+ WriteResult,
} from '../protocol';
import type { CacheHost } from './types';
@@ -27,9 +25,11 @@ export function createNoopCacheHost(reason: string): CacheHost {
async readQuery(): Promise<ReadResult> {
return { kind: 'miss' };
},
- async readRecords(args: ReadRecordsArgs) {
- validateRecordSelectionLimit(args.limit);
- return { records: [], nextCursor: null };
+ async readRecordsByKeys() {
+ return [];
+ },
+ async search() {
+ return { documents: [], nextCursor: null };
},
async writeQuery(): Promise<WriteResult> {
return emptyWriteResult();
diff --git a/apps/web/src/lib/graphql-cache/host/tauri-host.test.ts b/apps/web/src/lib/graphql-cache/host/tauri-host.test.ts
index 068f1efdb7..9d18113415 100644
--- a/apps/web/src/lib/graphql-cache/host/tauri-host.test.ts
+++ b/apps/web/src/lib/graphql-cache/host/tauri-host.test.ts
@@ -82,27 +82,61 @@ describe('createTauriCacheHost', () => {
host.dispose();
});
- it('reads selected records with fragment and cursor arguments', async () => {
- const page = { records: [], nextCursor: null };
+ it('projects selected records by explicit key', async () => {
+ const records = [
+ {
+ recordKey: 'GraphqlSoupDocument:item-1',
+ record: { id: 'item-1' },
+ },
+ ];
invokeMock.mockImplementation((command: string) =>
- Promise.resolve(command === 'graphql_cache_read_records' ? page : null)
+ Promise.resolve(
+ command === 'graphql_cache_read_records_by_keys' ? records : null
+ )
);
const host = createTauriCacheHost({ scope: 'scope-1' });
- const cursor = 'cursor-1';
await expect(
- host.readRecords({
- document: 'fragment Item on GraphqlSoupItem { id }',
+ host.readRecordsByKeys({
+ document: 'fragment Item on GraphqlSoupDocument { id }',
fragmentName: 'Item',
- cursor,
+ keys: ['GraphqlSoupDocument:item-1'],
+ })
+ ).resolves.toEqual(records);
+ expect(invokeMock).toHaveBeenCalledWith(
+ 'graphql_cache_read_records_by_keys',
+ {
+ document: 'fragment Item on GraphqlSoupDocument { id }',
+ fragmentName: 'Item',
+ keys: ['GraphqlSoupDocument:item-1'],
+ }
+ );
+ });
+
+ it('searches the compact native projection with the same typed request', async () => {
+ const page = { documents: [], nextCursor: null };
+ invokeMock.mockImplementation((command: string) =>
+ Promise.resolve(command === 'graphql_cache_search' ? page : null)
+ );
+ const host = createTauriCacheHost({ scope: 'scope-1' });
+
+ await expect(
+ host.search({
+ profile: 'quick-access-v1',
+ buckets: ['document'],
+ query: 'plan',
limit: 25,
+ nowMs: 123,
})
).resolves.toEqual(page);
- expect(invokeMock).toHaveBeenCalledWith('graphql_cache_read_records', {
- document: 'fragment Item on GraphqlSoupItem { id }',
- fragmentName: 'Item',
- cursor,
- limit: 25,
+ expect(invokeMock).toHaveBeenCalledWith('graphql_cache_search', {
+ request: {
+ profile: 'quick-access-v1',
+ buckets: ['document'],
+ query: 'plan',
+ limit: 25,
+ nowMs: 123,
+ },
});
});
diff --git a/apps/web/src/lib/graphql-cache/host/tauri-host.ts b/apps/web/src/lib/graphql-cache/host/tauri-host.ts
index f3c7b6359a..4ec259dad7 100644
--- a/apps/web/src/lib/graphql-cache/host/tauri-host.ts
+++ b/apps/web/src/lib/graphql-cache/host/tauri-host.ts
@@ -16,10 +16,13 @@ import {
type EnqueueOptimisticMutationResult,
type MutationClaim,
type MutationSettlement,
- type ReadRecordsArgs,
+ type ReadRecordsByKeysArgs,
type ReadResult,
- type SelectedRecordPageWire,
- validateRecordSelectionLimit,
+ type SearchCacheArgs,
+ type SearchCachePage,
+ type SelectedRecordByKeyWire,
+ validateCacheSearchArgs,
+ validateRecordSelectionKeys,
type WriteResult,
} from '../protocol';
import type {
@@ -160,20 +163,29 @@ export function createTauriCacheHost(options: TauriHostOptions): CacheHost {
});
},
- async readRecords(args: ReadRecordsArgs): Promise<SelectedRecordPageWire> {
- const limit = validateRecordSelectionLimit(args.limit);
+ async readRecordsByKeys(
+ args: ReadRecordsByKeysArgs
+ ): Promise<SelectedRecordByKeyWire[]> {
+ const keys = validateRecordSelectionKeys(args.keys);
await ready;
- return await request<SelectedRecordPageWire>(
- 'graphql_cache_read_records',
+ return await request<SelectedRecordByKeyWire[]>(
+ 'graphql_cache_read_records_by_keys',
{
document: args.document,
fragmentName: args.fragmentName,
- cursor: args.cursor,
- limit,
+ keys,
}
);
},
+ async search(args: SearchCacheArgs): Promise<SearchCachePage> {
+ const searchRequest = validateCacheSearchArgs(args);
+ await ready;
+ return await request<SearchCachePage>('graphql_cache_search', {
+ request: searchRequest,
+ });
+ },
+
async writeQuery(args: CacheWriteArgs): Promise<WriteResult> {
await ready;
return await request<WriteResult>('graphql_cache_write', {
diff --git a/apps/web/src/lib/graphql-cache/host/types.ts b/apps/web/src/lib/graphql-cache/host/types.ts
index e9125f5ad1..ee35d9748b 100644
--- a/apps/web/src/lib/graphql-cache/host/types.ts
+++ b/apps/web/src/lib/graphql-cache/host/types.ts
@@ -18,9 +18,11 @@ import type {
OptimisticLinkPatchWire,
QueryRevalidationWire,
QueryVariableFilter,
- ReadRecordsArgs,
+ ReadRecordsByKeysArgs,
ReadResult,
- SelectedRecordPageWire,
+ SearchCacheArgs,
+ SearchCachePage,
+ SelectedRecordByKeyWire,
WriteResult,
} from '../protocol';
@@ -77,8 +79,12 @@ export interface CacheHost {
readonly disabled?: boolean;
readQuery(args: CacheReadArgs): Promise<ReadResult>;
- /** Projects normalized records through a named GraphQL fragment. */
- readRecords(args: ReadRecordsArgs): Promise<SelectedRecordPageWire>;
+ /** Projects a bounded explicit set of normalized entity keys. */
+ readRecordsByKeys(
+ args: ReadRecordsByKeysArgs
+ ): Promise<SelectedRecordByKeyWire[]>;
+ /** Searches the compact write-through materialized projection. */
+ search(args: SearchCacheArgs): Promise<SearchCachePage>;
writeQuery(args: CacheWriteArgs): Promise<WriteResult>;
/** Durably queues an optimistic mutation and claims the strict head. */
enqueueOptimisticMutation(
diff --git a/apps/web/src/lib/graphql-cache/host/worker-host.test.ts b/apps/web/src/lib/graphql-cache/host/worker-host.test.ts
index 637fd8e14b..8705cc5c96 100644
--- a/apps/web/src/lib/graphql-cache/host/worker-host.test.ts
+++ b/apps/web/src/lib/graphql-cache/host/worker-host.test.ts
@@ -30,8 +30,10 @@ function responseFor(request: CacheRequest): unknown {
switch (request.kind) {
case 'read':
return { kind: 'miss' };
- case 'read-records':
- return { records: [], nextCursor: null };
+ case 'read-records-by-keys':
+ return [];
+ case 'search':
+ return { documents: [], nextCursor: null };
case 'write':
case 'commit-optimistic-write':
case 'rollback-optimistic-write':
@@ -314,11 +316,17 @@ describe('createWorkerCacheHost', () => {
},
],
}),
- host.readRecords({
- document: 'fragment Item on GraphqlSoupItem { id }',
+ host.readRecordsByKeys({
+ document: 'fragment Item on GraphqlSoupDocument { id }',
fragmentName: 'Item',
- cursor: 'cursor-1',
+ keys: ['GraphqlSoupDocument:item-1'],
+ }),
+ host.search({
+ profile: 'quick-access-v1',
+ buckets: ['document'],
+ query: 'plan',
limit: 20,
+ nowMs: 123,
}),
host.writeQuery({
opKey: 8,
@@ -360,19 +368,20 @@ describe('createWorkerCacheHost', () => {
expect(requests.map(({ id, kind }) => [id, kind])).toEqual([
[1, 'init'],
[2, 'read'],
- [3, 'read-records'],
- [4, 'write'],
- [5, 'enqueue-optimistic-mutation'],
- [6, 'inspect-query-variants'],
- [7, 'inspect-query'],
- [8, 'claim-next-mutation'],
- [9, 'defer-optimistic-write'],
- [10, 'commit-optimistic-write'],
- [11, 'rollback-optimistic-write'],
- [12, 'invalidate'],
- [13, 'delete-records'],
- [14, 'teardown'],
- [15, 'clear'],
+ [3, 'read-records-by-keys'],
+ [4, 'search'],
+ [5, 'write'],
+ [6, 'enqueue-optimistic-mutation'],
+ [7, 'inspect-query-variants'],
+ [8, 'inspect-query'],
+ [9, 'claim-next-mutation'],
+ [10, 'defer-optimistic-write'],
+ [11, 'commit-optimistic-write'],
+ [12, 'rollback-optimistic-write'],
+ [13, 'invalidate'],
+ [14, 'delete-records'],
+ [15, 'teardown'],
+ [16, 'clear'],
]);
expect(requests[0]).toEqual({
id: 1,
@@ -392,10 +401,21 @@ describe('createWorkerCacheHost', () => {
],
})
);
- expect(requests[3]).toEqual(
+ expect(requests[3]).toEqual({
+ id: 4,
+ kind: 'search',
+ request: {
+ profile: 'quick-access-v1',
+ buckets: ['document'],
+ query: 'plan',
+ limit: 20,
+ nowMs: 123,
+ },
+ });
+ expect(requests[4]).toEqual(
expect.objectContaining({ originOpId: `${CLIENT_ID}:8` })
);
- expect(requests[4]).toEqual(
+ expect(requests[5]).toEqual(
expect.objectContaining({
originOpId: `${CLIENT_ID}:9`,
owner: 'runner',
@@ -404,13 +424,14 @@ describe('createWorkerCacheHost', () => {
leaseExpiresAtMs: 1_100,
})
);
- expect(requests[13]).toEqual({
- id: 14,
+ expect(requests[14]).toEqual({
+ id: 15,
kind: 'teardown',
opId: `${CLIENT_ID}:7`,
});
expect(results[0]).toEqual({ kind: 'miss' });
- expect(results[3]).toEqual(expect.objectContaining({ transactionId: '1' }));
+ expect(results[2]).toEqual({ documents: [], nextCursor: null });
+ expect(results[4]).toEqual(expect.objectContaining({ transactionId: '1' }));
host.dispose();
});
diff --git a/apps/web/src/lib/graphql-cache/host/worker-host.ts b/apps/web/src/lib/graphql-cache/host/worker-host.ts
index e7de02b2fe..ad7c01ebc9 100644
--- a/apps/web/src/lib/graphql-cache/host/worker-host.ts
+++ b/apps/web/src/lib/graphql-cache/host/worker-host.ts
@@ -18,10 +18,13 @@ import {
type MutationClaim,
type MutationSettlement,
OWNER_EPOCH_LOST_ERROR_CODE,
- type ReadRecordsArgs,
+ type ReadRecordsByKeysArgs,
type ReadResult,
- type SelectedRecordPageWire,
- validateRecordSelectionLimit,
+ type SearchCacheArgs,
+ type SearchCachePage,
+ type SelectedRecordByKeyWire,
+ validateCacheSearchArgs,
+ validateRecordSelectionKeys,
type WorkerMessage,
type WriteResult,
} from '../protocol';
@@ -605,7 +608,8 @@ export function createWorkerCacheHost(options: WorkerHostOptions): CacheHost {
msg.kind === 'init'
? initializationTimeoutMs
: msg.kind === 'read' ||
- msg.kind === 'read-records' ||
+ msg.kind === 'read-records-by-keys' ||
+ msg.kind === 'search' ||
msg.kind === 'inspect-query' ||
msg.kind === 'inspect-query-variants'
? requestTimeoutMs
@@ -775,16 +779,26 @@ export function createWorkerCacheHost(options: WorkerHostOptions): CacheHost {
)) as ReadResult;
},
- async readRecords(args: ReadRecordsArgs): Promise<SelectedRecordPageWire> {
- const limit = validateRecordSelectionLimit(args.limit);
+ async readRecordsByKeys(
+ args: ReadRecordsByKeysArgs
+ ): Promise<SelectedRecordByKeyWire[]> {
+ const keys = validateRecordSelectionKeys(args.keys);
await ensureInitialized();
return (await request({
- kind: 'read-records',
+ kind: 'read-records-by-keys',
document: args.document,
fragmentName: args.fragmentName,
- cursor: args.cursor,
- limit,
- })) as SelectedRecordPageWire;
+ keys,
+ })) as SelectedRecordByKeyWire[];
+ },
+
+ async search(args: SearchCacheArgs): Promise<SearchCachePage> {
+ const requestArgs = validateCacheSearchArgs(args);
+ await ensureInitialized();
+ return (await request({
+ kind: 'search',
+ request: requestArgs,
+ })) as SearchCachePage;
},
async writeQuery(args: CacheWriteArgs): Promise<WriteResult> {
diff --git a/apps/web/src/lib/graphql-cache/index.ts b/apps/web/src/lib/graphql-cache/index.ts
index e25927a81b..dcbbee8f12 100644
--- a/apps/web/src/lib/graphql-cache/index.ts
+++ b/apps/web/src/lib/graphql-cache/index.ts
@@ -37,8 +37,7 @@ export {
} from './exchange/optimistic';
export {
type RecordSelection,
- readRecords,
- type SelectedRecordPage,
+ readRecordsByKeys,
selectRecords,
} from './exchange/record-selection';
export { createTauriCacheHost } from './host/tauri-host';
@@ -62,13 +61,19 @@ export type {
MutationSettlement,
OptimisticWriteResult,
QueryVariableFilter,
- ReadRecordsArgs,
+ ReadRecordsByKeysArgs,
ReadResult,
- RecordCursor,
- SelectedRecordPageWire,
+ SearchCacheArgs,
+ SearchCachePage,
+ SearchCursor,
+ SearchDocumentWire,
+ SearchProfile,
+ SelectedRecordByKeyWire,
WriteResult,
} from './protocol';
export {
+ MAX_CACHE_SEARCH_QUERY_BYTES,
MAX_RECORD_SELECTION_PAGE_SIZE,
- validateRecordSelectionLimit,
+ validateCacheSearchArgs,
+ validateRecordSelectionKeys,
} from './protocol';
diff --git a/apps/web/src/lib/graphql-cache/protocol.test.ts b/apps/web/src/lib/graphql-cache/protocol.test.ts
index de01eafe18..6814e7095d 100644
--- a/apps/web/src/lib/graphql-cache/protocol.test.ts
+++ b/apps/web/src/lib/graphql-cache/protocol.test.ts
@@ -1,31 +1,112 @@
import { describe, expect, it } from 'vitest';
+import type { SearchCacheArgs } from './protocol';
import {
isCachePush,
isCacheResponse,
isWorkerMessage,
MAX_RECORD_SELECTION_PAGE_SIZE,
- validateRecordSelectionLimit,
+ validateCacheSearchArgs,
+ validateRecordSelectionKeys,
} from './protocol';
-describe('validateRecordSelectionLimit', () => {
- it('accepts bounded positive integers', () => {
- expect(validateRecordSelectionLimit(1)).toBe(1);
- expect(validateRecordSelectionLimit(MAX_RECORD_SELECTION_PAGE_SIZE)).toBe(
- MAX_RECORD_SELECTION_PAGE_SIZE
- );
+describe('validateRecordSelectionKeys', () => {
+ it('accepts bounded canonical entity keys, including an empty set', () => {
+ expect(validateRecordSelectionKeys([])).toEqual([]);
+ expect(validateRecordSelectionKeys(['GraphqlSoupDocument:one'])).toEqual([
+ 'GraphqlSoupDocument:one',
+ ]);
});
- it.each([
- 0,
- -1,
- 1.5,
- MAX_RECORD_SELECTION_PAGE_SIZE + 1,
- Number.NaN,
- Number.POSITIVE_INFINITY,
- ])('rejects invalid limit %s', (limit) => {
- expect(() => validateRecordSelectionLimit(limit)).toThrow(
- 'record selection limit must be an integer between 1 and 500'
+ it('rejects invalid or unbounded key sets', () => {
+ expect(() => validateRecordSelectionKeys(['ROOT_QUERY'])).toThrow(
+ 'invalid normalized record key'
);
+ expect(() =>
+ validateRecordSelectionKeys([`Thing:${'x'.repeat(1024)}`])
+ ).toThrow('invalid normalized record key');
+ expect(() =>
+ validateRecordSelectionKeys(
+ Array.from(
+ { length: MAX_RECORD_SELECTION_PAGE_SIZE + 1 },
+ (_, index) => `Thing:${index}`
+ )
+ )
+ ).toThrow('accepts at most 500 keys');
+ });
+});
+
+describe('validateCacheSearchArgs', () => {
+ it('fills transport-neutral defaults and preserves deterministic clocks', () => {
+ expect(
+ validateCacheSearchArgs({
+ profile: 'quick-access-v1',
+ limit: 25,
+ nowMs: 123,
+ })
+ ).toEqual({
+ profile: 'quick-access-v1',
+ buckets: [],
+ query: '',
+ limit: 25,
+ nowMs: 123,
+ });
+ });
+
+ it('rejects unbounded text, invalid buckets and page sizes', () => {
+ expect(() =>
+ validateCacheSearchArgs({
+ profile: 'quick-access-v1',
+ query: 'x'.repeat(513),
+ limit: 25,
+ })
+ ).toThrow('query is too long');
+ expect(() =>
+ validateCacheSearchArgs({
+ profile: 'quick-access-v1',
+ query: 'é'.repeat(257),
+ limit: 25,
+ })
+ ).toThrow('query is too long');
+ expect(() =>
+ validateCacheSearchArgs({
+ profile: 'quick-access-v1',
+ buckets: ['Document; DROP TABLE records'],
+ limit: 25,
+ })
+ ).toThrow('invalid cache search bucket');
+ expect(() =>
+ validateCacheSearchArgs({ profile: 'quick-access-v1', limit: 501 })
+ ).toThrow('cache search limit');
+ });
+
+ it('rejects invalid profiles, clocks and cursors at the public ingress', () => {
+ expect(() =>
+ validateCacheSearchArgs({
+ profile: 'future-profile',
+ limit: 25,
+ } as unknown as SearchCacheArgs)
+ ).toThrow('invalid cache search profile');
+ expect(() =>
+ validateCacheSearchArgs({
+ profile: 'quick-access-v1',
+ limit: 25,
+ nowMs: -1,
+ })
+ ).toThrow('invalid cache search nowMs');
+ expect(() =>
+ validateCacheSearchArgs({
+ profile: 'quick-access-v1',
+ limit: 25,
+ cursor: { timestampMs: 1.5, recordKey: 'Thing:one' },
+ })
+ ).toThrow('invalid cache search cursor');
+ expect(() =>
+ validateCacheSearchArgs({
+ profile: 'quick-access-v1',
+ limit: 25,
+ cursor: { timestampMs: 1, recordKey: 'ROOT_QUERY' },
+ })
+ ).toThrow('invalid cache search cursor');
});
});
diff --git a/apps/web/src/lib/graphql-cache/protocol.ts b/apps/web/src/lib/graphql-cache/protocol.ts
index f6b079a9ff..484ccd3f82 100644
--- a/apps/web/src/lib/graphql-cache/protocol.ts
+++ b/apps/web/src/lib/graphql-cache/protocol.ts
@@ -20,38 +20,164 @@ export type CacheReadPriority = 'user-visible';
/** Recursive partial-variable object used to limit query inspection work. */
export type QueryVariableFilter = Record<string, unknown>;
-/** Opaque exclusive cursor for deterministic normalized-record scans. */
-export type RecordCursor = string;
+export type SearchProfile = 'quick-access-v1';
-/** Untyped wire page returned by cache hosts. */
-export type SelectedRecordPageWire = {
- records: unknown[];
- nextCursor: RecordCursor | null;
+export type SearchCursor = {
+ timestampMs: number;
+ recordKey: string;
};
-export type ReadRecordsArgs = {
+export type SearchDocumentWire = {
+ profile: SearchProfile;
+ recordKey: string;
+ bucket: string;
+ searchText: string;
+ timestampMs: number;
+ sourceHash: string;
+};
+
+export type SearchCacheArgs = {
+ profile: SearchProfile;
+ buckets?: string[];
+ query?: string;
+ cursor?: SearchCursor;
+ limit: number;
+ /** Injected for deterministic freshness scoring. Defaults to Date.now(). */
+ nowMs?: number;
+};
+
+export type SearchCachePage = {
+ documents: SearchDocumentWire[];
+ nextCursor: SearchCursor | null;
+};
+
+export type ReadRecordsByKeysArgs = {
/** Serialized generated fragment document. */
document: string;
- /** Root fragment to apply to matching normalized records. */
+ /** Root fragment to apply to the requested normalized records. */
fragmentName: string;
- cursor?: RecordCursor;
- limit: number;
+ /** Canonical normalized entity keys; bounded by the selection page size. */
+ keys: string[];
+};
+
+export type SelectedRecordByKeyWire = {
+ recordKey: string;
+ record: unknown;
};
export const MAX_RECORD_SELECTION_PAGE_SIZE = 500;
+export const MAX_CACHE_SEARCH_QUERY_BYTES = 512;
+export const MAX_NORMALIZED_RECORD_KEY_LENGTH = 1024;
-/** Validates a record-selection page size before crossing a host boundary. */
-export function validateRecordSelectionLimit(limit: number): number {
- if (
- !Number.isSafeInteger(limit) ||
- limit < 1 ||
- limit > MAX_RECORD_SELECTION_PAGE_SIZE
- ) {
+const isRecord = (value: unknown): value is Record<string, unknown> =>
+ typeof value === 'object' && value !== null && !Array.isArray(value);
+
+/** Non-throwing canonical normalized-record key validation for wire ingress. */
+export function isValidNormalizedRecordKey(value: unknown): value is string {
+ return (
+ typeof value === 'string' &&
+ value.length <= MAX_NORMALIZED_RECORD_KEY_LENGTH &&
+ /^[A-Za-z_][A-Za-z0-9_]*:/.test(value)
+ );
+}
+
+/** Non-throwing cache-search profile validation for wire ingress. */
+export function isValidCacheSearchProfile(
+ value: unknown
+): value is SearchProfile {
+ return value === 'quick-access-v1';
+}
+
+/** Non-throwing cache-search limit validation for wire ingress. */
+export function isValidCacheSearchLimit(value: unknown): value is number {
+ return (
+ Number.isSafeInteger(value) &&
+ (value as number) >= 1 &&
+ (value as number) <= MAX_RECORD_SELECTION_PAGE_SIZE
+ );
+}
+
+/** Non-throwing cache-search query validation for wire ingress. */
+export function isValidCacheSearchQuery(value: unknown): value is string {
+ return (
+ typeof value === 'string' &&
+ new TextEncoder().encode(value).length <= MAX_CACHE_SEARCH_QUERY_BYTES
+ );
+}
+
+/** Non-throwing cache-search bucket validation for wire ingress. */
+export function isValidCacheSearchBucket(value: unknown): value is string {
+ return typeof value === 'string' && /^[a-z_]{1,64}$/.test(value);
+}
+
+/** Non-throwing cache-search clock validation for wire ingress. */
+export function isValidCacheSearchNowMs(value: unknown): value is number {
+ return Number.isSafeInteger(value) && (value as number) >= 0;
+}
+
+/** Non-throwing cache-search cursor validation for wire ingress. */
+export function isValidCacheSearchCursor(
+ value: unknown
+): value is SearchCursor {
+ return (
+ isRecord(value) &&
+ Object.keys(value).every(
+ (key) => key === 'timestampMs' || key === 'recordKey'
+ ) &&
+ Object.hasOwn(value, 'timestampMs') &&
+ Object.hasOwn(value, 'recordKey') &&
+ Number.isSafeInteger(value.timestampMs) &&
+ isValidNormalizedRecordKey(value.recordKey)
+ );
+}
+
+export function validateRecordSelectionKeys(keys: string[]): string[] {
+ if (keys.length > MAX_RECORD_SELECTION_PAGE_SIZE) {
throw new RangeError(
- `record selection limit must be an integer between 1 and ${MAX_RECORD_SELECTION_PAGE_SIZE}`
+ `record selection accepts at most ${MAX_RECORD_SELECTION_PAGE_SIZE} keys`
);
}
- return limit;
+ if (keys.some((key) => !isValidNormalizedRecordKey(key))) {
+ throw new RangeError('invalid normalized record key');
+ }
+ return keys;
+}
+
+export function validateCacheSearchArgs(
+ args: SearchCacheArgs
+): SearchCacheArgs & { nowMs: number } {
+ if (!isValidCacheSearchProfile(args.profile)) {
+ throw new RangeError('invalid cache search profile');
+ }
+ if (!isValidCacheSearchLimit(args.limit)) {
+ throw new RangeError(
+ `cache search limit must be an integer between 1 and ${MAX_RECORD_SELECTION_PAGE_SIZE}`
+ );
+ }
+ const query = args.query === undefined ? '' : args.query;
+ if (!isValidCacheSearchQuery(query)) {
+ throw new RangeError('cache search query is too long');
+ }
+ const buckets = args.buckets === undefined ? [] : args.buckets;
+ if (
+ !Array.isArray(buckets) ||
+ buckets.some((bucket) => !isValidCacheSearchBucket(bucket))
+ ) {
+ throw new RangeError('invalid cache search bucket');
+ }
+ const nowMs = args.nowMs === undefined ? Date.now() : args.nowMs;
+ if (!isValidCacheSearchNowMs(nowMs)) {
+ throw new RangeError('invalid cache search nowMs');
+ }
+ if (args.cursor !== undefined && !isValidCacheSearchCursor(args.cursor)) {
+ throw new RangeError('invalid cache search cursor');
+ }
+ return {
+ ...args,
+ query,
+ buckets,
+ nowMs,
+ };
}
export type QueryRevalidationWire = {
@@ -253,11 +379,14 @@ export type CacheRequest = { id: number } & (
error: string;
}
| {
- kind: 'read-records';
+ kind: 'read-records-by-keys';
document: string;
fragmentName: string;
- cursor?: RecordCursor;
- limit: number;
+ keys: string[];
+ }
+ | {
+ kind: 'search';
+ request: SearchCacheArgs & { nowMs: number };
}
| {
kind: 'inspect-query';
diff --git a/apps/web/src/lib/graphql-cache/telemetry.test.ts b/apps/web/src/lib/graphql-cache/telemetry.test.ts
index 192a9bb8fa..aa061702ad 100644
--- a/apps/web/src/lib/graphql-cache/telemetry.test.ts
+++ b/apps/web/src/lib/graphql-cache/telemetry.test.ts
@@ -143,7 +143,8 @@ describe('cache telemetry privacy contract', () => {
const cases = {
init: 'initialization',
read: 'read',
- 'read-records': 'read',
+ 'read-records-by-keys': 'read',
+ search: 'read',
write: 'write',
'enqueue-optimistic-mutation': 'transaction',
'inspect-query-variants': 'inspection',
diff --git a/apps/web/src/lib/graphql-cache/telemetry.ts b/apps/web/src/lib/graphql-cache/telemetry.ts
index b0d94111d3..776174e0db 100644
--- a/apps/web/src/lib/graphql-cache/telemetry.ts
+++ b/apps/web/src/lib/graphql-cache/telemetry.ts
@@ -467,7 +467,7 @@ export function operationCategoryForRequest(
): CacheOperationCategory {
return match(request.kind)
.with('init', () => 'initialization' as const)
- .with('read', 'read-records', () => 'read' as const)
+ .with('read', 'read-records-by-keys', 'search', () => 'read' as const)
.with('write', () => 'write' as const)
.with(
'enqueue-optimistic-mutation',
diff --git a/apps/web/src/lib/graphql-cache/worker/browser-test/fake-cache.engine-worker.ts b/apps/web/src/lib/graphql-cache/worker/browser-test/fake-cache.engine-worker.ts
index be7852b2b4..75ecb37ef3 100644
--- a/apps/web/src/lib/graphql-cache/worker/browser-test/fake-cache.engine-worker.ts
+++ b/apps/web/src/lib/graphql-cache/worker/browser-test/fake-cache.engine-worker.ts
@@ -12,7 +12,7 @@ import {
declare const self: DedicatedWorkerGlobalScope;
-const withVersion = <T extends { coordinatorVersion: 1 }>(
+const withVersion = <T extends { coordinatorVersion: 2 }>(
value: T extends unknown ? Omit<T, 'coordinatorVersion'> : never
): T =>
({
diff --git a/apps/web/src/lib/graphql-cache/worker/cache-engine-runtime.ts b/apps/web/src/lib/graphql-cache/worker/cache-engine-runtime.ts
index c91d57954c..d7b5ee1ceb 100644
--- a/apps/web/src/lib/graphql-cache/worker/cache-engine-runtime.ts
+++ b/apps/web/src/lib/graphql-cache/worker/cache-engine-runtime.ts
@@ -73,7 +73,7 @@ export interface CacheEngineRuntimeOptions {
memoryTelemetryIntervalMs?: number;
}
-const withVersion = <T extends { coordinatorVersion: 1 }>(
+const withVersion = <T extends { coordinatorVersion: 2 }>(
value: T extends unknown ? Omit<T, 'coordinatorVersion'> : never
): T =>
({
diff --git a/apps/web/src/lib/graphql-cache/worker/coordinator-page-adapter.ts b/apps/web/src/lib/graphql-cache/worker/coordinator-page-adapter.ts
index 7e5b36de67..b395f67d58 100644
--- a/apps/web/src/lib/graphql-cache/worker/coordinator-page-adapter.ts
+++ b/apps/web/src/lib/graphql-cache/worker/coordinator-page-adapter.ts
@@ -55,7 +55,7 @@ export interface PageAdapterDisposeOptions {
const DEFAULT_GRACEFUL_TIMEOUT_MS = 10_000;
-const withVersion = <T extends { coordinatorVersion: 1 }>(
+const withVersion = <T extends { coordinatorVersion: 2 }>(
value: T extends unknown ? Omit<T, 'coordinatorVersion'> : never
): T =>
({
diff --git a/apps/web/src/lib/graphql-cache/worker/coordinator-protocol.test.ts b/apps/web/src/lib/graphql-cache/worker/coordinator-protocol.test.ts
index 4996822461..6a0a6dd15f 100644
--- a/apps/web/src/lib/graphql-cache/worker/coordinator-protocol.test.ts
+++ b/apps/web/src/lib/graphql-cache/worker/coordinator-protocol.test.ts
@@ -17,9 +17,45 @@ const version = {
} as const;
describe('coordinator runtime protocol', () => {
- it('validates unchanged cache RPC and rejects unknown fields or kinds', () => {
+ it('validates cache RPCs and rejects unknown fields or kinds', () => {
expect(isCacheRequest({ id: 0, kind: 'clear' })).toBe(true);
expect(isCacheRequest({ id: 1, kind: 'read', query: '{ x }' })).toBe(true);
+ expect(
+ isCacheRequest({
+ id: 2,
+ kind: 'read-records-by-keys',
+ document: 'fragment Item on GraphqlSoupDocument { name }',
+ fragmentName: 'Item',
+ keys: ['GraphqlSoupDocument:one'],
+ })
+ ).toBe(true);
+ expect(
+ isCacheRequest({
+ id: 2,
+ kind: 'search',
+ request: {
+ profile: 'quick-access-v1',
+ buckets: ['document'],
+ query: 'plan',
+ limit: 20,
+ nowMs: 123,
+ },
+ })
+ ).toBe(true);
+ expect(
+ isCacheRequest({
+ id: 2,
+ kind: 'search',
+ request: {
+ profile: 'quick-access-v1',
+ buckets: ['document'],
+ query: 'plan',
+ limit: 20,
+ nowMs: 123,
+ extra: true,
+ },
+ })
+ ).toBe(false);
expect(isCacheRequest({ id: 1, kind: 'clear', surprise: true })).toBe(
false
);
@@ -52,6 +88,42 @@ describe('coordinator runtime protocol', () => {
).toBe(true);
});
+ it('enforces search and record-key bounds at coordinator ingress', () => {
+ const validSearch = {
+ profile: 'quick-access-v1',
+ buckets: ['document'],
+ query: 'plan',
+ limit: 20,
+ nowMs: 123,
+ };
+ const acceptsSearch = (request: Record<string, unknown>) =>
+ isCacheRequest({ id: 2, kind: 'search', request });
+
+ expect(acceptsSearch({ ...validSearch, limit: 501 })).toBe(false);
+ expect(acceptsSearch({ ...validSearch, query: 'é'.repeat(257) })).toBe(
+ false
+ );
+ expect(acceptsSearch({ ...validSearch, buckets: ['Invalid'] })).toBe(false);
+ expect(acceptsSearch({ ...validSearch, nowMs: -1 })).toBe(false);
+ expect(
+ acceptsSearch({
+ ...validSearch,
+ cursor: { timestampMs: 1, recordKey: 'ROOT_QUERY' },
+ })
+ ).toBe(false);
+
+ const selectionRequest = (keys: string[]) =>
+ isCacheRequest({
+ id: 2,
+ kind: 'read-records-by-keys',
+ document: 'fragment Item on GraphqlSoupDocument { name }',
+ fragmentName: 'Item',
+ keys,
+ });
+ expect(selectionRequest(['ROOT_QUERY'])).toBe(false);
+ expect(selectionRequest([`Thing:${'x'.repeat(1024)}`])).toBe(false);
+ });
+
it.each([
{
...version,
diff --git a/apps/web/src/lib/graphql-cache/worker/coordinator-protocol.ts b/apps/web/src/lib/graphql-cache/worker/coordinator-protocol.ts
index d1114fc7ea..40698fc84b 100644
--- a/apps/web/src/lib/graphql-cache/worker/coordinator-protocol.ts
+++ b/apps/web/src/lib/graphql-cache/worker/coordinator-protocol.ts
@@ -4,14 +4,22 @@ import {
type CacheResponse,
isCachePush,
isCacheResponse,
+ isValidCacheSearchBucket,
+ isValidCacheSearchCursor,
+ isValidCacheSearchLimit,
+ isValidCacheSearchNowMs,
+ isValidCacheSearchProfile,
+ isValidCacheSearchQuery,
+ isValidNormalizedRecordKey,
isWorkerMessage,
+ MAX_RECORD_SELECTION_PAGE_SIZE,
type WorkerMessage,
} from '../protocol';
export { isCachePush, isCacheResponse, isWorkerMessage };
-/** Version of the topology envelope around the unchanged cache RPC. */
-export const CACHE_COORDINATOR_PROTOCOL_VERSION = 1 as const;
+/** Version of the topology envelope and routed cache RPC surface. */
+export const CACHE_COORDINATOR_PROTOCOL_VERSION = 2 as const;
export type OwnerEpoch = number;
export type RouteId = number;
@@ -30,7 +38,7 @@ export type ActivationFailureCode =
export type TabToCoordinatorEnvelope =
| {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'register-tab';
scope: string;
tabId: string;
@@ -38,32 +46,32 @@ export type TabToCoordinatorEnvelope =
hotCapacity?: number;
}
| {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'cache-request';
tabId: string;
request: CacheRequest;
}
| {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'attach-engine-port';
tabId: string;
ownerEpoch: OwnerEpoch;
}
| {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'graceful-departure';
tabId: string;
ownerEpoch: OwnerEpoch;
}
| {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'engine-lost';
tabId: string;
ownerEpoch: OwnerEpoch;
reason: string;
}
| {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'disconnect-tab';
tabId: string;
reason: string;
@@ -71,12 +79,12 @@ export type TabToCoordinatorEnvelope =
export type CoordinatorToTabEnvelope =
| {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'registered';
tabId: string;
}
| {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'become-owner';
scope: string;
tabId: string;
@@ -86,36 +94,36 @@ export type CoordinatorToTabEnvelope =
hotCapacity?: number;
}
| {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'cache-message';
message: WorkerMessage;
}
| {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'terminate-engine';
tabId: string;
ownerEpoch: OwnerEpoch;
reason: string;
}
| {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'retire-complete';
tabId: string;
ownerEpoch: OwnerEpoch;
}
| {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'engine-replaced';
ownerEpoch: OwnerEpoch;
}
| {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'protocol-error';
error: string;
};
export type PageToEngineEnvelope = {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'activate-engine';
scope: string;
tabId: string;
@@ -127,19 +135,19 @@ export type PageToEngineEnvelope = {
export type CoordinatorToEngineEnvelope =
| {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'engine-request';
ownerEpoch: OwnerEpoch;
routeId: RouteId;
request: CacheRequest;
}
| {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'drain-engine';
ownerEpoch: OwnerEpoch;
}
| {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'heartbeat';
ownerEpoch: OwnerEpoch;
heartbeatId: number;
@@ -147,7 +155,7 @@ export type CoordinatorToEngineEnvelope =
export type EngineToCoordinatorEnvelope =
| {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'engine-ready';
tabId: string;
ownerEpoch: OwnerEpoch;
@@ -157,26 +165,26 @@ export type EngineToCoordinatorEnvelope =
openOutcome: EngineOpenOutcome;
}
| {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'engine-response';
ownerEpoch: OwnerEpoch;
routeId: RouteId;
response: CacheResponse;
}
| {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'engine-push';
ownerEpoch: OwnerEpoch;
push: CachePush;
}
| {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'engine-drained';
tabId: string;
ownerEpoch: OwnerEpoch;
}
| {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'engine-fatal';
tabId: string;
ownerEpoch: OwnerEpoch;
@@ -184,7 +192,7 @@ export type EngineToCoordinatorEnvelope =
fatalCode: EngineFatalCode;
}
| {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'activation-failed';
tabId: string;
ownerEpoch: OwnerEpoch;
@@ -192,7 +200,7 @@ export type EngineToCoordinatorEnvelope =
failureCode: ActivationFailureCode;
}
| {
- coordinatorVersion: 1;
+ coordinatorVersion: 2;
kind: 'heartbeat-ack';
ownerEpoch: OwnerEpoch;
heartbeatId: number;
@@ -222,8 +230,11 @@ const isNonEmptyString = (value: unknown): value is string =>
const isOptionalString = (value: unknown): value is string | undefined =>
value === undefined || isString(value);
+const isSafeInteger = (value: unknown): value is number =>
+ Number.isSafeInteger(value);
+
const isSafeNonNegativeInteger = (value: unknown): value is number =>
- Number.isSafeInteger(value) && (value as number) >= 0;
+ isSafeInteger(value) && (value as number) >= 0;
const isPositiveInteger = (value: unknown): value is number =>
Number.isSafeInteger(value) && (value as number) > 0;
@@ -295,6 +306,27 @@ const isEntityResolvers = (value: unknown): boolean =>
isStringArray(resolver.argumentPath)
));
+const isSearchRequest = (value: unknown): boolean => {
+ if (!isRecord(value)) return false;
+ return (
+ hasOnlyKeys(value, [
+ 'profile',
+ 'buckets',
+ 'query',
+ 'cursor',
+ 'limit',
+ 'nowMs',
+ ]) &&
+ isValidCacheSearchProfile(value.profile) &&
+ Array.isArray(value.buckets) &&
+ value.buckets.every(isValidCacheSearchBucket) &&
+ isValidCacheSearchQuery(value.query) &&
+ isValidCacheSearchLimit(value.limit) &&
+ isValidCacheSearchNowMs(value.nowMs) &&
+ (value.cursor === undefined || isValidCacheSearchCursor(value.cursor))
+ );
+};
+
const commonRequest = (record: UnknownRecord): boolean =>
isSafeNonNegativeInteger(record.id) && isNonEmptyString(record.kind);
@@ -442,20 +474,25 @@ export function isCacheRequest(value: unknown): value is CacheRequest {
isString(value.leaseGeneration) &&
isString(value.error)
);
- case 'read-records':
+ case 'read-records-by-keys':
return (
hasOnlyKeys(value, [
'id',
'kind',
'document',
'fragmentName',
- 'cursor',
- 'limit',
+ 'keys',
]) &&
isString(value.document) &&
isString(value.fragmentName) &&
- isOptionalString(value.cursor) &&
- isPositiveInteger(value.limit)
+ Array.isArray(value.keys) &&
+ value.keys.length <= MAX_RECORD_SELECTION_PAGE_SIZE &&
+ value.keys.every(isValidNormalizedRecordKey)
+ );
+ case 'search':
+ return (
+ hasOnlyKeys(value, ['id', 'kind', 'request']) &&
+ isSearchRequest(value.request)
);
case 'inspect-query':
return (
diff --git a/apps/web/src/lib/graphql-cache/worker/coordinator-router.ts b/apps/web/src/lib/graphql-cache/worker/coordinator-router.ts
index f0c6e83c65..4a6f5241e1 100644
--- a/apps/web/src/lib/graphql-cache/worker/coordinator-router.ts
+++ b/apps/web/src/lib/graphql-cache/worker/coordinator-router.ts
@@ -86,7 +86,7 @@ type WithoutVersion<T> = T extends unknown
? Omit<T, 'coordinatorVersion'>
: never;
-const envelope = <T extends { coordinatorVersion: 1 }>(
+const envelope = <T extends { coordinatorVersion: 2 }>(
value: WithoutVersion<T>
): T =>
({
diff --git a/apps/web/src/lib/graphql-cache/worker/wasm-module.ts b/apps/web/src/lib/graphql-cache/worker/wasm-module.ts
index ce5f14f701..e0e1160d76 100644
--- a/apps/web/src/lib/graphql-cache/worker/wasm-module.ts
+++ b/apps/web/src/lib/graphql-cache/worker/wasm-module.ts
@@ -17,8 +17,9 @@ import type {
OptimisticLinkPatchWire,
QueryRevalidationWire,
ReadResult,
- RecordCursor,
- SelectedRecordPageWire,
+ SearchCacheArgs,
+ SearchCachePage,
+ SelectedRecordByKeyWire,
WriteResult,
} from '../protocol';
import { workerCacheTelemetry } from '../telemetry-relay';
@@ -65,12 +66,14 @@ export interface CacheEngine {
variables: Record<string, unknown> | undefined,
entityResolvers: readonly EntityResolverWire[] | undefined
): Promise<ReadResult>;
- readRecords(
+ readRecordsByKeys(
document: string,
fragmentName: string,
- cursor: RecordCursor | undefined,
- limit: number
- ): Promise<SelectedRecordPageWire>;
+ keys: string[]
+ ): Promise<SelectedRecordByKeyWire[]>;
+ search(
+ request: SearchCacheArgs & { nowMs: number }
+ ): Promise<SearchCachePage>;
writeQuery(
originOpId: string | undefined,
query: string,
diff --git a/apps/web/src/lib/graphql-cache/worker/worker-core.test.ts b/apps/web/src/lib/graphql-cache/worker/worker-core.test.ts
index 3138363657..3d3957b279 100644
--- a/apps/web/src/lib/graphql-cache/worker/worker-core.test.ts
+++ b/apps/web/src/lib/graphql-cache/worker/worker-core.test.ts
@@ -4,7 +4,6 @@ const loadCacheWasmMock = vi.hoisted(() => vi.fn());
vi.mock('./wasm-module', () => ({ loadCacheWasm: loadCacheWasmMock }));
-import type { SelectedRecordPageWire } from '../protocol';
import { CacheWorkerCore } from './worker-core';
describe('CacheWorkerCore', () => {
@@ -16,14 +15,16 @@ describe('CacheWorkerCore', () => {
vi.useRealTimers();
});
- it('dispatches read-records to the wasm engine', async () => {
- const page: SelectedRecordPageWire = {
- records: [{ id: 'item-1' }],
- nextCursor: null,
- };
- const readRecords = vi.fn().mockResolvedValue(page);
+ it('dispatches explicit-key projection to the wasm engine', async () => {
+ const records = [
+ {
+ recordKey: 'GraphqlSoupDocument:item-1',
+ record: { id: 'item-1' },
+ },
+ ];
+ const readRecordsByKeys = vi.fn().mockResolvedValue(records);
loadCacheWasmMock.mockResolvedValue({
- openCache: vi.fn().mockResolvedValue({ readRecords }),
+ openCache: vi.fn().mockResolvedValue({ readRecordsByKeys }),
});
const messages: unknown[] = [];
const port = { postMessage: (message: unknown) => messages.push(message) };
@@ -36,19 +37,57 @@ describe('CacheWorkerCore', () => {
});
await core.handleRequest(port, {
id: 2,
- kind: 'read-records',
- document: 'fragment Item on GraphqlSoupItem { id }',
+ kind: 'read-records-by-keys',
+ document: 'fragment Item on GraphqlSoupDocument { id }',
fragmentName: 'Item',
- cursor: 'cursor-1',
- limit: 25,
+ keys: ['GraphqlSoupDocument:item-1'],
});
- expect(readRecords).toHaveBeenCalledWith(
- 'fragment Item on GraphqlSoupItem { id }',
+ expect(readRecordsByKeys).toHaveBeenCalledWith(
+ 'fragment Item on GraphqlSoupDocument { id }',
'Item',
- 'cursor-1',
- 25
+ ['GraphqlSoupDocument:item-1']
);
+ expect(messages.at(-1)).toEqual({ id: 2, ok: true, result: records });
+ });
+
+ it('dispatches bounded search to the wasm compact projection', async () => {
+ const page = {
+ documents: [
+ {
+ profile: 'quick-access-v1' as const,
+ recordKey: 'GraphqlSoupDocument:d1',
+ bucket: 'document',
+ searchText: 'quarterly plan',
+ timestampMs: 123,
+ sourceHash: 'abc',
+ },
+ ],
+ nextCursor: null,
+ };
+ const search = vi.fn().mockResolvedValue(page);
+ loadCacheWasmMock.mockResolvedValue({
+ openCache: vi.fn().mockResolvedValue({ search }),
+ });
+ const messages: unknown[] = [];
+ const port = { postMessage: (message: unknown) => messages.push(message) };
+ const core = new CacheWorkerCore();
+
+ await core.handleRequest(port, {
+ id: 1,
+ kind: 'init',
+ scope: 'scope-1',
+ });
+ const request = {
+ profile: 'quick-access-v1' as const,
+ buckets: ['document'],
+ query: 'plan',
+ limit: 20,
+ nowMs: 456,
+ };
+ await core.handleRequest(port, { id: 2, kind: 'search', request });
+
+ expect(search).toHaveBeenCalledWith(request);
expect(messages.at(-1)).toEqual({ id: 2, ok: true, result: page });
});
diff --git a/apps/web/src/lib/graphql-cache/worker/worker-core.ts b/apps/web/src/lib/graphql-cache/worker/worker-core.ts
index 502a72d888..5ff408279c 100644
--- a/apps/web/src/lib/graphql-cache/worker/worker-core.ts
+++ b/apps/web/src/lib/graphql-cache/worker/worker-core.ts
@@ -10,7 +10,8 @@ import type {
CacheResponse,
EnqueueOptimisticMutationResult,
ReadResult,
- SelectedRecordPageWire,
+ SearchCachePage,
+ SelectedRecordByKeyWire,
WriteResult,
} from '../protocol';
import {
@@ -372,13 +373,18 @@ export class CacheWorkerCore {
);
return result;
})
- .with({ kind: 'read-records' }, async (request) => {
- const engine = this.requireEngine();
- const result: SelectedRecordPageWire = await engine.readRecords(
- request.document,
- request.fragmentName,
- request.cursor,
- request.limit
+ .with({ kind: 'read-records-by-keys' }, async (request) => {
+ const result: SelectedRecordByKeyWire[] =
+ await this.requireEngine().readRecordsByKeys(
+ request.document,
+ request.fragmentName,
+ request.keys
+ );
+ return result;
+ })
+ .with({ kind: 'search' }, async (request) => {
+ const result: SearchCachePage = await this.requireEngine().search(
+ request.request
);
return result;
})
diff --git a/apps/web/src/lib/queries/history/graphql.ts b/apps/web/src/lib/queries/history/graphql.ts
index c22e5253f2..95b76e1906 100644
--- a/apps/web/src/lib/queries/history/graphql.ts
+++ b/apps/web/src/lib/queries/history/graphql.ts
@@ -1,155 +1,158 @@
-import { itemToSafeName } from '@core/constant/allBlocks';
import {
type CacheHost,
- MAX_RECORD_SELECTION_PAGE_SIZE,
- readRecords,
+ type RecordSelection,
+ readRecordsByKeys,
+ type SearchDocumentWire,
selectRecords,
} from '@graphql-cache/index';
import {
- type GraphqlHistoryItemFieldsFragment,
- GraphqlHistoryItemFieldsFragmentDoc,
+ type GraphqlChatQuickAccessNameFragment,
+ GraphqlChatQuickAccessNameFragmentDoc,
+ type GraphqlDocumentQuickAccessNameFragment,
+ GraphqlDocumentQuickAccessNameFragmentDoc,
+ type GraphqlProjectQuickAccessNameFragment,
+ GraphqlProjectQuickAccessNameFragmentDoc,
} from '@service-storage/graphql/generated/graphql';
-import { formatDocumentName } from '@service-storage/util/filename';
-import type { DocumentHistoryItem, HistoryItem } from './types';
+import type { HistoryItem } from './types';
-const graphqlHistorySelection = selectRecords(
- GraphqlHistoryItemFieldsFragmentDoc
-);
+type NameProjection =
+ | GraphqlDocumentQuickAccessNameFragment
+ | GraphqlChatQuickAccessNameFragment
+ | GraphqlProjectQuickAccessNameFragment;
-type GraphqlHistoryRecord = GraphqlHistoryItemFieldsFragment;
-type GraphqlHistoryEntity = GraphqlHistoryRecord;
-type GraphqlDocumentHistoryEntity = Extract<
- GraphqlHistoryEntity,
- { __typename: 'GraphqlSoupDocument' }
->;
+const HISTORY_TYPENAMES = [
+ 'GraphqlSoupDocument',
+ 'GraphqlSoupChat',
+ 'GraphqlSoupProject',
+] as const;
-function transformDocumentSubType(
- subType: GraphqlDocumentHistoryEntity['subType']
-): DocumentHistoryItem['subType'] {
- if (!subType) return subType;
+type HistoryTypename = (typeof HISTORY_TYPENAMES)[number];
- switch (subType.__typename) {
- case 'GraphqlTaskSubType':
- return {
- type: 'task',
- is_completed: subType.isCompleted,
- };
- case 'GraphqlSnippetSubType':
- return { type: 'snippet' };
- case 'GraphqlSkillSubType':
- return { type: 'skill' };
+function nameSelection(
+ typename: HistoryTypename
+): RecordSelection<NameProjection> {
+ switch (typename) {
+ case 'GraphqlSoupDocument':
+ return selectRecords(GraphqlDocumentQuickAccessNameFragmentDoc);
+ case 'GraphqlSoupChat':
+ return selectRecords(GraphqlChatQuickAccessNameFragmentDoc);
+ case 'GraphqlSoupProject':
+ return selectRecords(GraphqlProjectQuickAccessNameFragmentDoc);
}
}
-/** Maps a normalized GraphQL Soup item to the legacy history shape. */
-export function transformGraphqlHistoryItem(
- record: GraphqlHistoryRecord
+function historyItemFromSearchDocument(
+ document: SearchDocumentWire,
+ record: NameProjection
): HistoryItem | undefined {
- const entity = record;
- switch (entity.__typename) {
+ const separator = document.recordKey.indexOf(':');
+ if (separator < 0) return undefined;
+ const typename = document.recordKey.slice(0, separator);
+ const id = document.recordKey.slice(separator + 1);
+ const date = new Date(document.timestampMs);
+ const updatedAt = Number.isNaN(date.getTime())
+ ? undefined
+ : date.toISOString();
+ const base = {
+ id,
+ name: record.name,
+ rawName: record.name,
+ ownerId: record.ownerId,
+ createdAt: record.createdAt,
+ updatedAt,
+ deletedAt: null,
+ };
+ switch (typename) {
case 'GraphqlSoupDocument': {
- const subType = transformDocumentSubType(entity.subType);
- const safeName = itemToSafeName({
- type: 'document',
- name: entity.documentName,
- fileType: entity.fileType,
- subType,
- });
+ if (record.__typename !== 'GraphqlSoupDocument') return undefined;
+ const markdown = document.bucket !== 'document';
+ const subType =
+ document.bucket === 'task' ||
+ document.bucket === 'snippet' ||
+ document.bucket === 'skill'
+ ? {
+ type: document.bucket,
+ ...(document.bucket === 'task'
+ ? {
+ is_completed:
+ record.subType?.__typename === 'GraphqlTaskSubType'
+ ? record.subType.isCompleted
+ : undefined,
+ }
+ : {}),
+ }
+ : null;
return {
- id: entity.id,
+ ...base,
type: 'document',
- name: formatDocumentName(safeName, entity.fileType, {
- fullyQualifiedBlockName: true,
- }),
- rawName: entity.documentName,
- ownerId: entity.ownerId,
- fileType: entity.fileType,
+ fileType: markdown ? 'md' : undefined,
subType,
- createdAt: entity.createdAt,
- updatedAt: entity.updatedAt,
- deletedAt: entity.deletedAt,
- };
+ } as HistoryItem;
}
case 'GraphqlSoupChat':
- return {
- id: entity.id,
- type: 'chat',
- name: itemToSafeName({ type: 'chat', name: entity.chatName }),
- rawName: entity.chatName,
- ownerId: entity.ownerId,
- isPersistent: entity.isPersistent,
- createdAt: entity.createdAt,
- updatedAt: entity.updatedAt,
- deletedAt: entity.deletedAt,
- };
+ return { ...base, type: 'chat', isPersistent: true };
case 'GraphqlSoupProject':
- return {
- id: entity.id,
- type: 'project',
- name: itemToSafeName({ type: 'project', name: entity.projectName }),
- rawName: entity.projectName,
- ownerId: entity.ownerId,
- createdAt: entity.createdAt,
- updatedAt: entity.updatedAt,
- deletedAt: entity.deletedAt,
- };
+ return { ...base, type: 'project' };
default:
return undefined;
}
}
-function getSortTimestamp(record: GraphqlHistoryRecord): number {
- const entity = record;
- switch (entity.__typename) {
- case 'GraphqlSoupDocument':
- case 'GraphqlSoupChat':
- case 'GraphqlSoupProject': {
- const timestamp = Date.parse(
- entity.viewedAt ?? entity.updatedAt ?? entity.createdAt
+/** Materializes only the supplied compact document/chat/project search hits. */
+export async function materializeCachedGraphqlHistoryItems(
+ cacheHost: Pick<CacheHost, 'readRecordsByKeys'>,
+ documents: SearchDocumentWire[]
+): Promise<HistoryItem[]> {
+ const supported = documents.filter((document) =>
+ /^(GraphqlSoupDocument|GraphqlSoupChat|GraphqlSoupProject):/.test(
+ document.recordKey
+ )
+ );
+ const recordsByKey = new Map<string, NameProjection>();
+ await Promise.all(
+ HISTORY_TYPENAMES.map(async (typename) => {
+ const keys = supported
+ .filter((document) => document.recordKey.startsWith(`${typename}:`))
+ .map((document) => document.recordKey);
+ if (keys.length === 0) return;
+ const records = await readRecordsByKeys(
+ cacheHost,
+ nameSelection(typename),
+ keys
);
- return Number.isNaN(timestamp) ? 0 : timestamp;
- }
- default:
- return 0;
- }
+ for (const { recordKey, record } of records) {
+ recordsByKey.set(recordKey, record);
+ }
+ })
+ );
+
+ return supported.flatMap((document) => {
+ const record = recordsByKey.get(document.recordKey);
+ const item = record
+ ? historyItemFromSearchDocument(document, record)
+ : undefined;
+ return item ? [item] : [];
+ });
}
-/**
- * Reads complete Soup item projections and maps document, chat, and project
- * entities to the history shape.
- */
+/** Reads a bounded recent history through the indexed search projection, then
+ * materializes only those final normalized entity keys. */
export async function readCachedGraphqlHistoryItems(
- cacheHost: Pick<CacheHost, 'readRecords'>
+ cacheHost: Pick<CacheHost, 'search' | 'readRecordsByKeys'>
): Promise<HistoryItem[]> {
- const records: GraphqlHistoryRecord[] = [];
- let cursor: string | undefined;
- const seenCursors = new Set<string>();
-
- do {
- const page = await readRecords(cacheHost, graphqlHistorySelection, {
- cursor,
- limit: MAX_RECORD_SELECTION_PAGE_SIZE,
- });
- records.push(...page.records);
- cursor = page.nextCursor ?? undefined;
- if (cursor) {
- if (seenCursors.has(cursor)) {
- throw new Error('cache record selection returned a repeated cursor');
- }
- seenCursors.add(cursor);
- }
- } while (cursor);
-
- return records
- .flatMap((record) => {
- const item = transformGraphqlHistoryItem(record);
- return item && !item.deletedAt
- ? [{ item, sortTimestamp: getSortTimestamp(record) }]
- : [];
- })
- .sort(
- (a, b) =>
- b.sortTimestamp - a.sortTimestamp || a.item.id.localeCompare(b.item.id)
- )
- .map(({ item }) => item);
+ const page = await cacheHost.search({
+ profile: 'quick-access-v1',
+ buckets: [
+ 'document',
+ 'note',
+ 'task',
+ 'snippet',
+ 'skill',
+ 'chat',
+ 'project',
+ ],
+ query: '',
+ limit: 500,
+ });
+ return materializeCachedGraphqlHistoryItems(cacheHost, page.documents);
}
diff --git a/apps/web/src/lib/queries/history/tests/graphql.test.ts b/apps/web/src/lib/queries/history/tests/graphql.test.ts
new file mode 100644
index 0000000000..fd477a4cd7
--- /dev/null
+++ b/apps/web/src/lib/queries/history/tests/graphql.test.ts
@@ -0,0 +1,146 @@
+import type {
+ CacheHost,
+ ReadRecordsByKeysArgs,
+ SearchCacheArgs,
+ SearchCachePage,
+} from '@graphql-cache/index';
+import { describe, expect, it, vi } from 'vitest';
+import { readCachedGraphqlHistoryItems } from '../graphql';
+
+function cacheHost(
+ search: (args: SearchCacheArgs) => Promise<SearchCachePage>,
+ readRecordsByKeys: (
+ args: ReadRecordsByKeysArgs
+ ) => Promise<Array<{ recordKey: string; record: unknown }>>
+): Pick<CacheHost, 'search' | 'readRecordsByKeys'> {
+ return { search, readRecordsByKeys };
+}
+
+describe('cached GraphQL history', () => {
+ it('browses the indexed recent projection and materializes only final keys', async () => {
+ const search = vi.fn(
+ async (): Promise<SearchCachePage> => ({
+ documents: [
+ {
+ profile: 'quick-access-v1',
+ recordKey: 'GraphqlSoupDocument:document-newest',
+ bucket: 'note',
+ searchText: 'newest document',
+ timestampMs: Date.parse('2025-01-05T00:00:00.000Z'),
+ sourceHash: 'one',
+ },
+ {
+ profile: 'quick-access-v1',
+ recordKey: 'GraphqlSoupChat:chat-middle',
+ bucket: 'chat',
+ searchText: 'middle chat',
+ timestampMs: Date.parse('2025-01-04T00:00:00.000Z'),
+ sourceHash: 'two',
+ },
+ {
+ profile: 'quick-access-v1',
+ recordKey: 'GraphqlSoupDocument:document-task',
+ bucket: 'task',
+ searchText: 'task document',
+ timestampMs: Date.parse('2025-01-03T00:00:00.000Z'),
+ sourceHash: 'three',
+ },
+ ],
+ nextCursor: null,
+ })
+ );
+ const readRecordsByKeys = vi.fn(async (args: ReadRecordsByKeysArgs) =>
+ args.keys.map((recordKey) => {
+ const isChat = recordKey === 'GraphqlSoupChat:chat-middle';
+ const isTask = recordKey === 'GraphqlSoupDocument:document-task';
+ return {
+ recordKey,
+ record: {
+ __typename: isChat ? 'GraphqlSoupChat' : 'GraphqlSoupDocument',
+ name:
+ recordKey === 'GraphqlSoupDocument:document-newest'
+ ? 'Newest Document'
+ : isChat
+ ? 'Middle Chat'
+ : 'Task Document',
+ ownerId: isChat ? 'chat-owner' : 'document-owner',
+ createdAt: isChat
+ ? '2025-01-01T00:00:00.000Z'
+ : '2024-12-31T00:00:00.000Z',
+ ...(!isChat && {
+ subType: isTask
+ ? { __typename: 'GraphqlTaskSubType', isCompleted: true }
+ : null,
+ }),
+ },
+ };
+ })
+ );
+
+ const result = await readCachedGraphqlHistoryItems(
+ cacheHost(search, readRecordsByKeys)
+ );
+
+ expect(search).toHaveBeenCalledWith({
+ profile: 'quick-access-v1',
+ buckets: [
+ 'document',
+ 'note',
+ 'task',
+ 'snippet',
+ 'skill',
+ 'chat',
+ 'project',
+ ],
+ query: '',
+ limit: 500,
+ });
+ expect(result.map(({ id }) => id)).toEqual([
+ 'document-newest',
+ 'chat-middle',
+ 'document-task',
+ ]);
+ expect(result[0]).toMatchObject({
+ ownerId: 'document-owner',
+ createdAt: '2024-12-31T00:00:00.000Z',
+ });
+ expect(result[2]).toMatchObject({
+ type: 'document',
+ fileType: 'md',
+ ownerId: 'document-owner',
+ createdAt: '2024-12-31T00:00:00.000Z',
+ subType: { type: 'task', is_completed: true },
+ });
+ expect(readRecordsByKeys).toHaveBeenCalledTimes(2);
+ expect(
+ readRecordsByKeys.mock.calls.map(([{ fragmentName }]) => fragmentName)
+ ).toEqual(['GraphqlDocumentQuickAccessName', 'GraphqlChatQuickAccessName']);
+ for (const [{ document }] of readRecordsByKeys.mock.calls) {
+ expect(document).toMatch(/QuickAccessName on GraphqlSoup/);
+ expect(document).toMatch(/name/);
+ }
+ });
+
+ it('omits keys whose minimal name projection is incomplete', async () => {
+ const search = vi.fn(
+ async (): Promise<SearchCachePage> => ({
+ documents: [
+ {
+ profile: 'quick-access-v1',
+ recordKey: 'GraphqlSoupDocument:missing-name',
+ bucket: 'document',
+ searchText: 'fallback text',
+ timestampMs: 1,
+ sourceHash: 'hash',
+ },
+ ],
+ nextCursor: null,
+ })
+ );
+ const readRecordsByKeys = vi.fn(async () => []);
+
+ await expect(
+ readCachedGraphqlHistoryItems(cacheHost(search, readRecordsByKeys))
+ ).resolves.toEqual([]);
+ });
+});
diff --git a/apps/web/src/lib/service-clients/service-storage/graphql-soup.test.ts b/apps/web/src/lib/service-clients/service-storage/graphql-soup.test.ts
index f7a624e230..b5e1d6af49 100644
--- a/apps/web/src/lib/service-clients/service-storage/graphql-soup.test.ts
+++ b/apps/web/src/lib/service-clients/service-storage/graphql-soup.test.ts
@@ -80,15 +80,19 @@ vi.mock('@core/util/fetchWithToken', () => ({ fetchToken: vi.fn() }));
vi.mock('@core/util/platform', () => ({ isTauri: () => mocks.tauri }));
vi.mock('@core/util/platformFetch', () => ({ platformFetch: vi.fn() }));
vi.mock('@graphql-cache/rollout', () => ({
- getBrowserTursoCacheRolloutDecision:
- (): BrowserTursoCacheRolloutDecision => ({
- enabled: mocks.tauri ? mocks.graphqlEnabled : mocks.enabled,
- cohort: mocks.tauri ? 'unknown' : 'treatment',
+ getBrowserTursoCacheRolloutDecision: (): BrowserTursoCacheRolloutDecision => {
+ const enabled = mocks.tauri ? mocks.graphqlEnabled : mocks.enabled;
+ return {
+ enabled,
+ cohort: mocks.tauri ? 'unknown' : enabled ? 'treatment' : 'control',
reason: mocks.tauri
? 'tauri-native-unchanged'
- : 'graphql-transport-enabled',
+ : enabled
+ ? 'graphql-transport-enabled'
+ : 'graphql-transport-disabled',
nativeCacheUnchanged: mocks.tauri,
- }),
+ };
+ },
}));
vi.mock('@graphql-cache/index', () => ({
createWorkerCacheHost: mocks.createWorkerCacheHost,
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 3bf27597f1..e89b994ce7 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
@@ -5431,269 +5431,25 @@ export type GroupSoupQuery = { user: { id: string, groupSoup: { bins: Array<{ ke
}> }
> }> } } };
-type GraphqlHistoryItemFields_GraphqlSoupCalendarEvent_Fragment = { __typename: 'GraphqlSoupCalendarEvent', id: string, entityType: GraphqlSoupEntityType, frecencyScore: number | null };
-
-type GraphqlHistoryItemFields_GraphqlSoupCall_Fragment = { __typename: 'GraphqlSoupCall', id: string, channelId: string, channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, entityType: GraphqlSoupEntityType, frecencyScore: number | null, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
- | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
- | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
- | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
- | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
- | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
- | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
- | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
- | null }>, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
- | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
- | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
- | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelMentionMetadata', channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionHasAttachments: boolean, channelMentionThreadId: string | null, channelMentionSenderDisplayName: string | null, channelMentionChannelType: GraphqlNotificationChannelType, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendSender: string | null, channelMessageSendSenderDisplayName: string | null, channelMessageSendMessageContent: string, channelMessageSendMessageId: string, channelMessageSendHasAttachments: boolean, channelMessageSendChannelType: GraphqlNotificationChannelType, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelReplyMetadata', channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplySenderDisplayName: string | null, channelReplyMessageContent: string, channelReplyHasAttachments: boolean, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: number, commentedOnDocumentThreadId: number, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
- | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
- | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
- | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
- | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
- | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
- | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
- | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: number, mentionedInDocumentCommentThreadId: number, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
- | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
- | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: number, repliedToDocumentCommentThreadThreadId: number, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
- }> };
-
-type GraphqlHistoryItemFields_GraphqlSoupChannel_Fragment = { __typename: 'GraphqlSoupChannel', id: string, channelType: string, ownerId: string, organizationId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, interactedAt: string | null, entityType: GraphqlSoupEntityType, frecencyScore: number | null, channelName: string | null, channelTeamId: string | null, participants: Array<{ channelId: string, userId: string, role: string, joinedAt: string, leftAt: string | null }>, latestMessage: { messageId: string, channelId: string, threadId: string | null, senderId: string, content: string, createdAt: string, updatedAt: string, deletedAt: string | null, mentions: Array<string> } | null, latestNonThreadMessage: { messageId: string, channelId: string, threadId: string | null, senderId: string, content: string, createdAt: string, updatedAt: string, deletedAt: string | null, mentions: Array<string> } | null, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
- | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
- | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
- | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelMentionMetadata', channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionHasAttachments: boolean, channelMentionThreadId: string | null, channelMentionSenderDisplayName: string | null, channelMentionChannelType: GraphqlNotificationChannelType, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendSender: string | null, channelMessageSendSenderDisplayName: string | null, channelMessageSendMessageContent: string, channelMessageSendMessageId: string, channelMessageSendHasAttachments: boolean, channelMessageSendChannelType: GraphqlNotificationChannelType, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelReplyMetadata', channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplySenderDisplayName: string | null, channelReplyMessageContent: string, channelReplyHasAttachments: boolean, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: number, commentedOnDocumentThreadId: number, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
- | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
- | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
- | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
- | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
- | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
- | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
- | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: number, mentionedInDocumentCommentThreadId: number, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
- | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
- | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: number, repliedToDocumentCommentThreadThreadId: number, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
- }> };
-
-type GraphqlHistoryItemFields_GraphqlSoupChannelMessage_Fragment = { __typename: 'GraphqlSoupChannelMessage', id: string, channelId: string, senderId: string, content: string, createdAt: string, updatedAt: string, effectiveUpdatedAt: string, replyCount: number, entityType: GraphqlSoupEntityType, frecencyScore: number | null, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
- | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
- | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
- | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelMentionMetadata', channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionHasAttachments: boolean, channelMentionThreadId: string | null, channelMentionSenderDisplayName: string | null, channelMentionChannelType: GraphqlNotificationChannelType, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendSender: string | null, channelMessageSendSenderDisplayName: string | null, channelMessageSendMessageContent: string, channelMessageSendMessageId: string, channelMessageSendHasAttachments: boolean, channelMessageSendChannelType: GraphqlNotificationChannelType, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelReplyMetadata', channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplySenderDisplayName: string | null, channelReplyMessageContent: string, channelReplyHasAttachments: boolean, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: number, commentedOnDocumentThreadId: number, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
- | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
- | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
- | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
- | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
- | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
- | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
- | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: number, mentionedInDocumentCommentThreadId: number, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
- | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
- | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: number, repliedToDocumentCommentThreadThreadId: number, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
- }> };
+export type GraphqlDocumentHistoryFieldsFragment = { __typename: 'GraphqlSoupDocument', id: string, ownerId: string, fileType: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, documentName: string, subType:
+ | { __typename: 'GraphqlSkillSubType' }
+ | { __typename: 'GraphqlSnippetSubType' }
+ | { __typename: 'GraphqlTaskSubType', isCompleted: boolean }
+ | null };
-type GraphqlHistoryItemFields_GraphqlSoupChat_Fragment = { __typename: 'GraphqlSoupChat', id: string, ownerId: string, projectId: string | null, isPersistent: boolean, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, entityType: GraphqlSoupEntityType, frecencyScore: number | null, chatName: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
- | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
- | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
- | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
- | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
- | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
- | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
- | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
- | null }>, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
- | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
- | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
- | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelMentionMetadata', channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionHasAttachments: boolean, channelMentionThreadId: string | null, channelMentionSenderDisplayName: string | null, channelMentionChannelType: GraphqlNotificationChannelType, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendSender: string | null, channelMessageSendSenderDisplayName: string | null, channelMessageSendMessageContent: string, channelMessageSendMessageId: string, channelMessageSendHasAttachments: boolean, channelMessageSendChannelType: GraphqlNotificationChannelType, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelReplyMetadata', channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplySenderDisplayName: string | null, channelReplyMessageContent: string, channelReplyHasAttachments: boolean, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: number, commentedOnDocumentThreadId: number, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
- | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
- | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
- | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
- | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
- | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
- | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
- | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: number, mentionedInDocumentCommentThreadId: number, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
- | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
- | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: number, repliedToDocumentCommentThreadThreadId: number, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
- }> };
+export type GraphqlChatHistoryFieldsFragment = { __typename: 'GraphqlSoupChat', id: string, ownerId: string, isPersistent: boolean, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, chatName: string };
-type GraphqlHistoryItemFields_GraphqlSoupCrmCompany_Fragment = { __typename: 'GraphqlSoupCrmCompany', id: string, description: string | null, emailSync: boolean, hidden: boolean, createdAt: string, updatedAt: string, viewedAt: string | null, domains: Array<string>, entityType: GraphqlSoupEntityType, frecencyScore: number | null, crmTeamId: string, crmCompanyName: string | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
- | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
- | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
- | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
- | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
- | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
- | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
- | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
- | null }>, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
- | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
- | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
- | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelMentionMetadata', channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionHasAttachments: boolean, channelMentionThreadId: string | null, channelMentionSenderDisplayName: string | null, channelMentionChannelType: GraphqlNotificationChannelType, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendSender: string | null, channelMessageSendSenderDisplayName: string | null, channelMessageSendMessageContent: string, channelMessageSendMessageId: string, channelMessageSendHasAttachments: boolean, channelMessageSendChannelType: GraphqlNotificationChannelType, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelReplyMetadata', channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplySenderDisplayName: string | null, channelReplyMessageContent: string, channelReplyHasAttachments: boolean, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: number, commentedOnDocumentThreadId: number, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
- | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
- | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
- | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
- | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
- | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
- | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
- | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: number, mentionedInDocumentCommentThreadId: number, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
- | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
- | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: number, repliedToDocumentCommentThreadThreadId: number, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
- }> };
+export type GraphqlProjectHistoryFieldsFragment = { __typename: 'GraphqlSoupProject', id: string, ownerId: string, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, projectName: string };
-type GraphqlHistoryItemFields_GraphqlSoupDocument_Fragment = { __typename: 'GraphqlSoupDocument', id: string, ownerId: string, fileType: string | null, projectId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, entityType: GraphqlSoupEntityType, frecencyScore: number | null, documentName: string, subType:
+export type GraphqlDocumentQuickAccessNameFragment = { __typename: 'GraphqlSoupDocument', name: string, ownerId: string, createdAt: string, subType:
| { __typename: 'GraphqlSkillSubType' }
| { __typename: 'GraphqlSnippetSubType' }
| { __typename: 'GraphqlTaskSubType', isCompleted: boolean }
- | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
- | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
- | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
- | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
- | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
- | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
- | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
- | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
- | null }>, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
- | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
- | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
- | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelMentionMetadata', channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionHasAttachments: boolean, channelMentionThreadId: string | null, channelMentionSenderDisplayName: string | null, channelMentionChannelType: GraphqlNotificationChannelType, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendSender: string | null, channelMessageSendSenderDisplayName: string | null, channelMessageSendMessageContent: string, channelMessageSendMessageId: string, channelMessageSendHasAttachments: boolean, channelMessageSendChannelType: GraphqlNotificationChannelType, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelReplyMetadata', channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplySenderDisplayName: string | null, channelReplyMessageContent: string, channelReplyHasAttachments: boolean, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: number, commentedOnDocumentThreadId: number, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
- | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
- | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
- | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
- | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
- | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
- | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
- | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: number, mentionedInDocumentCommentThreadId: number, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
- | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
- | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: number, repliedToDocumentCommentThreadThreadId: number, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
- }> };
-
-type GraphqlHistoryItemFields_GraphqlSoupEmailThread_Fragment = { __typename: 'GraphqlSoupEmailThread', attachmentCount: number, participantCount: number, id: string, entityType: GraphqlSoupEntityType, frecencyScore: number | null };
+ | null };
-type GraphqlHistoryItemFields_GraphqlSoupForeignEntity_Fragment = { __typename: 'GraphqlSoupForeignEntity', id: string, foreignEntityId: string, foreignEntitySource: string, storedForId: string, storedForAuthEntity: string, sourceMetadata: unknown, createdAt: string, updatedAt: string, entityType: GraphqlSoupEntityType, frecencyScore: number | null, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
- | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
- | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
- | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelMentionMetadata', channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionHasAttachments: boolean, channelMentionThreadId: string | null, channelMentionSenderDisplayName: string | null, channelMentionChannelType: GraphqlNotificationChannelType, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendSender: string | null, channelMessageSendSenderDisplayName: string | null, channelMessageSendMessageContent: string, channelMessageSendMessageId: string, channelMessageSendHasAttachments: boolean, channelMessageSendChannelType: GraphqlNotificationChannelType, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelReplyMetadata', channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplySenderDisplayName: string | null, channelReplyMessageContent: string, channelReplyHasAttachments: boolean, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: number, commentedOnDocumentThreadId: number, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
- | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
- | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
- | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
- | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
- | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
- | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
- | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: number, mentionedInDocumentCommentThreadId: number, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
- | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
- | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: number, repliedToDocumentCommentThreadThreadId: number, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
- }> };
+export type GraphqlChatQuickAccessNameFragment = { __typename: 'GraphqlSoupChat', name: string, ownerId: string, createdAt: string };
-type GraphqlHistoryItemFields_GraphqlSoupProject_Fragment = { __typename: 'GraphqlSoupProject', id: string, ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, entityType: GraphqlSoupEntityType, frecencyScore: number | null, projectName: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
- | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
- | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
- | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
- | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
- | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
- | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
- | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
- | null }>, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
- | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
- | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
- | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelMentionMetadata', channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionHasAttachments: boolean, channelMentionThreadId: string | null, channelMentionSenderDisplayName: string | null, channelMentionChannelType: GraphqlNotificationChannelType, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendSender: string | null, channelMessageSendSenderDisplayName: string | null, channelMessageSendMessageContent: string, channelMessageSendMessageId: string, channelMessageSendHasAttachments: boolean, channelMessageSendChannelType: GraphqlNotificationChannelType, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelReplyMetadata', channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplySenderDisplayName: string | null, channelReplyMessageContent: string, channelReplyHasAttachments: boolean, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: number, commentedOnDocumentThreadId: number, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
- | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
- | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
- | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
- | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
- | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
- | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
- | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: number, mentionedInDocumentCommentThreadId: number, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
- | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
- | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: number, repliedToDocumentCommentThreadThreadId: number, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
- }> };
-
-type GraphqlHistoryItemFields_GraphqlSoupReminder_Fragment = { __typename: 'GraphqlSoupReminder', id: string, entityType: GraphqlSoupEntityType, frecencyScore: number | null };
-
-export type GraphqlHistoryItemFieldsFragment =
- | GraphqlHistoryItemFields_GraphqlSoupCalendarEvent_Fragment
- | GraphqlHistoryItemFields_GraphqlSoupCall_Fragment
- | GraphqlHistoryItemFields_GraphqlSoupChannel_Fragment
- | GraphqlHistoryItemFields_GraphqlSoupChannelMessage_Fragment
- | GraphqlHistoryItemFields_GraphqlSoupChat_Fragment
- | GraphqlHistoryItemFields_GraphqlSoupCrmCompany_Fragment
- | GraphqlHistoryItemFields_GraphqlSoupDocument_Fragment
- | GraphqlHistoryItemFields_GraphqlSoupEmailThread_Fragment
- | GraphqlHistoryItemFields_GraphqlSoupForeignEntity_Fragment
- | GraphqlHistoryItemFields_GraphqlSoupProject_Fragment
- | GraphqlHistoryItemFields_GraphqlSoupReminder_Fragment
-;
+export type GraphqlProjectQuickAccessNameFragment = { __typename: 'GraphqlSoupProject', name: string, ownerId: string, createdAt: string };
export type NotificationUpdatesSubscriptionVariables = Exact<{ [key: string]: never; }>;
@@ -8435,7 +8191,12 @@ export const SoupItemFieldsFragmentDoc = {"kind":"Document","definitions":[{"kin
export const SoupPatchFieldsFragmentDoc = {"kind":"Document","definitions":[{"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":"SoupNotificationMetadataFields"},"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":"channelMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"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":"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":"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":"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":"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":"channelMessageSendSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelType"},"name":{"kind":"Name","value":"channelType"}},{"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":"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":"channelReplySenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"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":"Field","alias":{"kind":"Name","value":"channelReplyChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationFields"},"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":"done"}},{"kind":"Field","name":{"kind":"Name","value":"seen"}},{"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":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationMetadataFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupEntityCoreFields"},"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":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlProperty"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"propertyDefinitionId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}},{"kind":"Field","name":{"kind":"Name","value":"isMultiSelect"}},{"kind":"Field","name":{"kind":"Name","value":"specificEntityType"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"value"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlBooleanPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"boolValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNumberPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"numberValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlStringPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stringValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDatePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dateValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSelectOptionPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"optionIds"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEntityReferencePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"references"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"specificMessageId"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlLinkPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"urls"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupChannelMessageFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"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":"SoupItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupEntityCoreFields"}},{"kind":"Field","name":{"kind":"Name","value":"frecencyScore"}},{"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":"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","alias":{"kind":"Name","value":"emailName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"snippet"}},{"kind":"Field","name":{"kind":"Name","value":"senderEmail"}},{"kind":"Field","name":{"kind":"Name","value":"senderName"}},{"kind":"Field","name":{"kind":"Name","value":"senderPhotoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isRead"}},{"kind":"Field","name":{"kind":"Name","value":"isDraft"}},{"kind":"Field","name":{"kind":"Name","value":"isImportant"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"sortTs"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"sfsPhotoUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"attachments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"messageId"}},{"kind":"Field","name":{"kind":"Name","value":"providerAttachmentId"}},{"kind":"Field","name":{"kind":"Name","value":"filename"}},{"kind":"Field","name":{"kind":"Name","value":"mimeType"}},{"kind":"Field","name":{"kind":"Name","value":"sizeBytes"}},{"kind":"Field","name":{"kind":"Name","value":"contentId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"labels"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__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","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":"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"}}]}}]}}]}}]} as unknown as DocumentNode<SoupPatchFieldsFragment, unknown>;
export const EntityMutationResultFieldsFragmentDoc = {"kind":"Document","definitions":[{"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":"SoupNotificationMetadataFields"},"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":"channelMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"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":"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":"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":"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":"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":"channelMessageSendSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelType"},"name":{"kind":"Name","value":"channelType"}},{"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":"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":"channelReplySenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"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":"Field","alias":{"kind":"Name","value":"channelReplyChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationFields"},"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":"done"}},{"kind":"Field","name":{"kind":"Name","value":"seen"}},{"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":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationMetadataFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupEntityCoreFields"},"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":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlProperty"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"propertyDefinitionId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}},{"kind":"Field","name":{"kind":"Name","value":"isMultiSelect"}},{"kind":"Field","name":{"kind":"Name","value":"specificEntityType"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"value"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlBooleanPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"boolValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNumberPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"numberValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlStringPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stringValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDatePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dateValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSelectOptionPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"optionIds"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEntityReferencePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"references"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"specificMessageId"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlLinkPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"urls"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupChannelMessageFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"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":"SoupItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupEntityCoreFields"}},{"kind":"Field","name":{"kind":"Name","value":"frecencyScore"}},{"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":"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","alias":{"kind":"Name","value":"emailName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"snippet"}},{"kind":"Field","name":{"kind":"Name","value":"senderEmail"}},{"kind":"Field","name":{"kind":"Name","value":"senderName"}},{"kind":"Field","name":{"kind":"Name","value":"senderPhotoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isRead"}},{"kind":"Field","name":{"kind":"Name","value":"isDraft"}},{"kind":"Field","name":{"kind":"Name","value":"isImportant"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"sortTs"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"sfsPhotoUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"attachments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"messageId"}},{"kind":"Field","name":{"kind":"Name","value":"providerAttachmentId"}},{"kind":"Field","name":{"kind":"Name","value":"filename"}},{"kind":"Field","name":{"kind":"Name","value":"mimeType"}},{"kind":"Field","name":{"kind":"Name","value":"sizeBytes"}},{"kind":"Field","name":{"kind":"Name","value":"contentId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"labels"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__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","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":"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":"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"}}]}}]}}]} as unknown as DocumentNode<EntityMutationResultFieldsFragment, unknown>;
export const EntityMutationPayloadFieldsFragmentDoc = {"kind":"Document","definitions":[{"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"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationMetadataFields"},"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":"channelMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"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":"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":"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":"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":"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":"channelMessageSendSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelType"},"name":{"kind":"Name","value":"channelType"}},{"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":"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":"channelReplySenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"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":"Field","alias":{"kind":"Name","value":"channelReplyChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationFields"},"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":"done"}},{"kind":"Field","name":{"kind":"Name","value":"seen"}},{"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":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationMetadataFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupEntityCoreFields"},"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":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlProperty"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"propertyDefinitionId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}},{"kind":"Field","name":{"kind":"Name","value":"isMultiSelect"}},{"kind":"Field","name":{"kind":"Name","value":"specificEntityType"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"value"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlBooleanPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"boolValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNumberPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"numberValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlStringPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stringValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDatePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dateValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSelectOptionPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"optionIds"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEntityReferencePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"references"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"specificMessageId"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlLinkPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"urls"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupChannelMessageFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"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":"SoupItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupEntityCoreFields"}},{"kind":"Field","name":{"kind":"Name","value":"frecencyScore"}},{"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":"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","alias":{"kind":"Name","value":"emailName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"snippet"}},{"kind":"Field","name":{"kind":"Name","value":"senderEmail"}},{"kind":"Field","name":{"kind":"Name","value":"senderName"}},{"kind":"Field","name":{"kind":"Name","value":"senderPhotoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isRead"}},{"kind":"Field","name":{"kind":"Name","value":"isDraft"}},{"kind":"Field","name":{"kind":"Name","value":"isImportant"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"sortTs"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"sfsPhotoUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"attachments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"messageId"}},{"kind":"Field","name":{"kind":"Name","value":"providerAttachmentId"}},{"kind":"Field","name":{"kind":"Name","value":"filename"}},{"kind":"Field","name":{"kind":"Name","value":"mimeType"}},{"kind":"Field","name":{"kind":"Name","value":"sizeBytes"}},{"kind":"Field","name":{"kind":"Name","value":"contentId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"labels"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__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","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":"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":"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<EntityMutationPayloadFieldsFragment, unknown>;
-export const GraphqlHistoryItemFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"GraphqlHistoryItemFields"},"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":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"frecencyScore"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupDocument"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"documentName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"subType"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__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":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChat"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"chatName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"isPersistent"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupProject"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"projectName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"parentId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEmailThread"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"attachmentCount"}},{"kind":"Field","name":{"kind":"Name","value":"participantCount"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannel"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"channelName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"channelType"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"organizationId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"interactedAt"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"leftAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"latestMessage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupChannelMessageFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"latestNonThreadMessage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupChannelMessageFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannelMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"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":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCall"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"channelName"}},{"kind":"Field","name":{"kind":"Name","value":"createdBy"}},{"kind":"Field","name":{"kind":"Name","value":"customName"}},{"kind":"Field","name":{"kind":"Name","value":"summary"}},{"kind":"Field","name":{"kind":"Name","value":"startedAt"}},{"kind":"Field","name":{"kind":"Name","value":"endedAt"}},{"kind":"Field","name":{"kind":"Name","value":"durationMs"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"attended"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"leftAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCrmCompany"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"crmTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmCompanyName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"emailSync"}},{"kind":"Field","name":{"kind":"Name","value":"hidden"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"domains"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupForeignEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","name":{"kind":"Name","value":"foreignEntitySource"}},{"kind":"Field","name":{"kind":"Name","value":"storedForId"}},{"kind":"Field","name":{"kind":"Name","value":"storedForAuthEntity"}},{"kind":"Field","name":{"kind":"Name","value":"sourceMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationMetadataFields"},"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":"channelMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"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":"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":"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":"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":"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":"channelMessageSendSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelType"},"name":{"kind":"Name","value":"channelType"}},{"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":"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":"channelReplySenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"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":"Field","alias":{"kind":"Name","value":"channelReplyChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"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":"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":"SoupNotificationFields"},"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":"done"}},{"kind":"Field","name":{"kind":"Name","value":"seen"}},{"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":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationMetadataFields"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<GraphqlHistoryItemFieldsFragment, unknown>;
+export const GraphqlDocumentHistoryFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"GraphqlDocumentHistoryFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupDocument"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"documentName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"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"}}]}}]}}]}}]} as unknown as DocumentNode<GraphqlDocumentHistoryFieldsFragment, unknown>;
+export const GraphqlChatHistoryFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"GraphqlChatHistoryFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChat"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"chatName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"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"}}]}}]} as unknown as DocumentNode<GraphqlChatHistoryFieldsFragment, unknown>;
+export const GraphqlProjectHistoryFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"GraphqlProjectHistoryFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupProject"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"projectName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}}]}}]} as unknown as DocumentNode<GraphqlProjectHistoryFieldsFragment, unknown>;
+export const GraphqlDocumentQuickAccessNameFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"GraphqlDocumentQuickAccessName"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupDocument"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"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"}}]}}]}}]}}]} as unknown as DocumentNode<GraphqlDocumentQuickAccessNameFragment, unknown>;
+export const GraphqlChatQuickAccessNameFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"GraphqlChatQuickAccessName"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChat"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}}]} as unknown as DocumentNode<GraphqlChatQuickAccessNameFragment, unknown>;
+export const GraphqlProjectQuickAccessNameFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"GraphqlProjectQuickAccessName"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupProject"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}}]} as unknown as DocumentNode<GraphqlProjectQuickAccessNameFragment, unknown>;
export const SoupNotificationsEntityFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationsEntityFields"},"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":"id"}},{"kind":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationMetadataFields"},"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":"channelMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"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":"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":"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":"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":"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":"channelMessageSendSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelType"},"name":{"kind":"Name","value":"channelType"}},{"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":"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":"channelReplySenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"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":"Field","alias":{"kind":"Name","value":"channelReplyChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationFields"},"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":"done"}},{"kind":"Field","name":{"kind":"Name","value":"seen"}},{"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":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationMetadataFields"}}]}}]}}]} as unknown as DocumentNode<SoupNotificationsEntityFieldsFragment, unknown>;
export const MyActivityDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"MyActivity"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ActivityFeedInput"}}}}],"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":"activity"},"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":"FragmentSpread","name":{"kind":"Name","value":"ActivityEventFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"nextCursor"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActivityEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"actorId"}},{"kind":"Field","name":{"kind":"Name","value":"subjectId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"occurredAt"}},{"kind":"Field","name":{"kind":"Name","value":"action"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityPropertyChanged"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"property"}},{"kind":"Field","name":{"kind":"Name","value":"from"}},{"kind":"Field","name":{"kind":"Name","value":"to"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityParticipantAdded"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"participant"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityParticipantRemoved"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"participant"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityCallStarted"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"callId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityUnknownAction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"tag"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}}]}}]}}]}}]} as unknown as DocumentNode<MyActivityQuery, MyActivityQueryVariables>;
export const EntityActivityDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"EntityActivity"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SoupInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"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":"FragmentSpread","name":{"kind":"Name","value":"EntityActivityFields"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActivityEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"actorId"}},{"kind":"Field","name":{"kind":"Name","value":"subjectId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"occurredAt"}},{"kind":"Field","name":{"kind":"Name","value":"action"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityPropertyChanged"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"property"}},{"kind":"Field","name":{"kind":"Name","value":"from"}},{"kind":"Field","name":{"kind":"Name","value":"to"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityParticipantAdded"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"participant"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityParticipantRemoved"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"participant"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityCallStarted"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"callId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityUnknownAction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"tag"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EntityActivityFields"},"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":"id"}},{"kind":"Field","name":{"kind":"Name","value":"activity"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ActivityEventFields"}}]}}]}}]} as unknown as DocumentNode<EntityActivityQuery, EntityActivityQueryVariables>;
diff --git a/apps/web/src/lib/service-clients/service-storage/graphql/history.graphql b/apps/web/src/lib/service-clients/service-storage/graphql/history.graphql
index 78a8cbc26d..78d7427e6f 100644
--- a/apps/web/src/lib/service-clients/service-storage/graphql/history.graphql
+++ b/apps/web/src/lib/service-clients/service-storage/graphql/history.graphql
@@ -1,166 +1,67 @@
-fragment GraphqlHistoryItemFields on GraphqlSoupEntity {
+fragment GraphqlDocumentHistoryFields on GraphqlSoupDocument {
__typename
id
- entityType
- frecencyScore
- ... on GraphqlSoupDocument {
- id
- documentName: name
- ownerId
- fileType
- projectId
- createdAt
- updatedAt
- viewedAt
- deletedAt
- subType {
- __typename
- ... on GraphqlTaskSubType {
- isCompleted
- }
+ documentName: name
+ ownerId
+ fileType
+ createdAt
+ updatedAt
+ viewedAt
+ deletedAt
+ subType {
+ __typename
+ ... on GraphqlTaskSubType {
+ isCompleted
}
- properties {
- ...SoupPropertyFields
- }
- notifications {
- ...SoupNotificationFields
- }
- }
- ... on GraphqlSoupChat {
- id
- chatName: name
- ownerId
- projectId
- isPersistent
- createdAt
- updatedAt
- viewedAt
- deletedAt
- properties {
- ...SoupPropertyFields
- }
- notifications {
- ...SoupNotificationFields
- }
- }
- ... on GraphqlSoupProject {
- id
- projectName: name
- ownerId
- parentId
- createdAt
- updatedAt
- viewedAt
- deletedAt
- properties {
- ...SoupPropertyFields
- }
- notifications {
- ...SoupNotificationFields
- }
- }
- # These fields are intentionally absent from cached Soup email records.
- # Their absence makes email projections incomplete, so record selection
- # omits email wrappers instead of returning typename-only shells.
- ... on GraphqlSoupEmailThread {
- attachmentCount
- participantCount
}
- ... on GraphqlSoupChannel {
- id
- channelName: name
- channelType
- ownerId
- organizationId
- channelTeamId: teamId
- createdAt
- updatedAt
- viewedAt
- interactedAt
- participants {
- channelId
- userId
- role
- joinedAt
- leftAt
- }
- latestMessage {
- ...SoupChannelMessageFields
- }
- latestNonThreadMessage {
- ...SoupChannelMessageFields
- }
- notifications {
- ...SoupNotificationFields
- }
- }
- ... on GraphqlSoupChannelMessage {
- id
- channelId
- senderId
- content
- createdAt
- updatedAt
- effectiveUpdatedAt
- replyCount
- notifications {
- ...SoupNotificationFields
- }
- }
- ... on GraphqlSoupCall {
- id
- channelId
- channelName
- createdBy
- customName
- summary
- startedAt
- endedAt
- durationMs
- isActive
- status
- attended
- participants {
- userId
- joinedAt
- leftAt
- }
- properties {
- ...SoupPropertyFields
- }
- notifications {
- ...SoupNotificationFields
- }
- }
- ... on GraphqlSoupCrmCompany {
- id
- crmTeamId: teamId
- crmCompanyName: name
- description
- emailSync
- hidden
- createdAt
- updatedAt
- viewedAt
- domains
- properties {
- ...SoupPropertyFields
- }
- notifications {
- ...SoupNotificationFields
- }
- }
- ... on GraphqlSoupForeignEntity {
- id
- foreignEntityId
- foreignEntitySource
- storedForId
- storedForAuthEntity
- sourceMetadata
- createdAt
- updatedAt
- notifications {
- ...SoupNotificationFields
+}
+
+fragment GraphqlChatHistoryFields on GraphqlSoupChat {
+ __typename
+ id
+ chatName: name
+ ownerId
+ isPersistent
+ createdAt
+ updatedAt
+ viewedAt
+ deletedAt
+}
+
+fragment GraphqlProjectHistoryFields on GraphqlSoupProject {
+ __typename
+ id
+ projectName: name
+ ownerId
+ createdAt
+ updatedAt
+ viewedAt
+ deletedAt
+}
+
+fragment GraphqlDocumentQuickAccessName on GraphqlSoupDocument {
+ __typename
+ name
+ ownerId
+ createdAt
+ subType {
+ __typename
+ ... on GraphqlTaskSubType {
+ isCompleted
}
}
}
+
+fragment GraphqlChatQuickAccessName on GraphqlSoupChat {
+ __typename
+ name
+ ownerId
+ createdAt
+}
+
+fragment GraphqlProjectQuickAccessName on GraphqlSoupProject {
+ __typename
+ name
+ ownerId
+ createdAt
+}
diff --git a/apps/web/tauri/Cargo.lock b/apps/web/tauri/Cargo.lock
index ce10adf788..301d11f10a 100644
--- a/apps/web/tauri/Cargo.lock
+++ b/apps/web/tauri/Cargo.lock
@@ -640,6 +640,7 @@ version = "0.1.0"
dependencies = [
"apollo-compiler",
"apollo-parser",
+ "chrono",
"lru",
"maybe_send",
"postcard",
@@ -783,8 +784,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0"
dependencies = [
"iana-time-zone",
+ "js-sys",
"num-traits",
"serde",
+ "wasm-bindgen",
"windows-link 0.2.1",
]
diff --git a/apps/web/tauri/graphql_cache_plugin/src/commands.rs b/apps/web/tauri/graphql_cache_plugin/src/commands.rs
index 232707e76d..2fdc3684cb 100644
--- a/apps/web/tauri/graphql_cache_plugin/src/commands.rs
+++ b/apps/web/tauri/graphql_cache_plugin/src/commands.rs
@@ -19,20 +19,14 @@ use crate::{
use cache_core::entity_resolver::EntityResolver;
use cache_core::link_patch::{OptimisticLinkPatch, QueryRevalidation};
use cache_core::query_inspection::{CachedQueryInstance, CachedQueryVariant};
-use cache_core::record_selection::{RecordCursor, SelectedRecordPage};
+use cache_core::record_selection::SelectedRecord;
+use cache_core::search::{SearchPage, SearchRequest};
use cache_sqlite::SqliteStorage;
use serde::Deserialize;
use tauri::{AppHandle, Manager, Runtime, State};
type Variables = serde_json::Map<String, serde_json::Value>;
-fn parse_record_cursor(cursor: Option<String>) -> Result<Option<RecordCursor>, String> {
- cursor
- .map(|value| serde_json::from_value(serde_json::Value::String(value)))
- .transpose()
- .map_err(|error| error.to_string())
-}
-
fn engine_handle(state: &State<'_, CacheState>) -> Result<EngineHandle, String> {
state
.0
@@ -103,20 +97,28 @@ pub async fn graphql_cache_read(
.await
}
-/// Projects normalized records through a named GraphQL fragment.
+/// Projects explicit normalized entity keys without scanning storage.
#[tauri::command]
-pub async fn graphql_cache_read_records(
+pub async fn graphql_cache_read_records_by_keys(
state: State<'_, CacheState>,
document: String,
fragment_name: String,
- cursor: Option<String>,
- limit: u32,
-) -> Result<SelectedRecordPage, String> {
+ keys: Vec<String>,
+) -> Result<Vec<SelectedRecord>, String> {
engine_handle(&state)?
- .read_records(document, fragment_name, parse_record_cursor(cursor)?, limit)
+ .read_records_by_keys(document, fragment_name, keys)
.await
}
+/// Searches the compact cache projection without scanning normalized records.
+#[tauri::command]
+pub async fn graphql_cache_search(
+ state: State<'_, CacheState>,
+ request: SearchRequest,
+) -> Result<SearchPage, String> {
+ engine_handle(&state)?.search(request).await
+}
+
/// Normalizes and stores a network response; broadcasts affected operations
/// to every webview.
#[tauri::command]
diff --git a/apps/web/tauri/graphql_cache_plugin/src/engine.rs b/apps/web/tauri/graphql_cache_plugin/src/engine.rs
index cf445640b6..d92337a192 100644
--- a/apps/web/tauri/graphql_cache_plugin/src/engine.rs
+++ b/apps/web/tauri/graphql_cache_plugin/src/engine.rs
@@ -19,7 +19,8 @@ use cache_core::entity_resolver::EntityResolver;
use cache_core::link_patch::{OptimisticLinkPatch, QueryRevalidation};
use cache_core::query_inspection::{CachedQueryInstance, CachedQueryVariant, QueryInspection};
use cache_core::queue::{ClaimedMutation, MutationClaimRequest, MutationClaimToken};
-use cache_core::record_selection::{RecordCursor, RecordSelection, SelectedRecordPage};
+use cache_core::record_selection::RecordSelection;
+use cache_core::search::{SearchPage, SearchRequest};
use cache_core::value::EntityKey;
use cache_sqlite::SqliteStorage;
use serde::Serialize;
@@ -241,21 +242,35 @@ impl EngineHandle {
.map_err(|e| e.to_string())
}
- /// Projects normalized records through a named GraphQL fragment.
- pub async fn read_records(
+ /// Projects explicit normalized entity keys without scanning storage.
+ pub async fn read_records_by_keys(
&self,
document: String,
fragment_name: String,
- cursor: Option<RecordCursor>,
- limit: u32,
- ) -> Result<SelectedRecordPage, String> {
+ keys: Vec<String>,
+ ) -> Result<Vec<cache_core::record_selection::SelectedRecord>, String> {
let selection =
RecordSelection::parse(&document, &fragment_name).map_err(|error| error.to_string())?;
+ let keys: Vec<_> = keys
+ .into_iter()
+ .map(|key| EntityKey(key.into()))
+ .collect();
+ self.inner
+ .lock()
+ .await
+ .engine
+ .read_records_by_keys(&selection, &keys)
+ .await
+ .map_err(|error| error.to_string())
+ }
+
+ /// Searches the compact materialized projection without record scans.
+ pub async fn search(&self, request: SearchRequest) -> Result<SearchPage, String> {
self.inner
.lock()
.await
.engine
- .read_records(&selection, cursor.as_ref(), limit as usize)
+ .search(&request)
.await
.map_err(|error| error.to_string())
}
diff --git a/apps/web/tauri/graphql_cache_plugin/src/engine/test.rs b/apps/web/tauri/graphql_cache_plugin/src/engine/test.rs
index f17e14a19a..f85b90cf3e 100644
--- a/apps/web/tauri/graphql_cache_plugin/src/engine/test.rs
+++ b/apps/web/tauri/graphql_cache_plugin/src/engine/test.rs
@@ -120,7 +120,7 @@ fn entity_resolvers_cross_the_native_engine_boundary() {
}
#[test]
-fn record_selection_returns_native_cache_entities() {
+fn explicit_key_selection_returns_native_cache_entities() {
let handle = spawn_handle();
let query = r#"query Soup($input: SoupInput!) {
user {
@@ -167,18 +167,71 @@ fn record_selection_returns_native_cache_entities() {
))
.unwrap();
- let page = block_on(handle.read_records(
+ let records = block_on(handle.read_records_by_keys(
"fragment Document on GraphqlSoupDocument { id name }".to_string(),
"Document".to_string(),
+ vec!["GraphqlSoupDocument:doc-1".to_string()],
+ ))
+ .unwrap();
+ assert_eq!(
+ records[0].record,
+ serde_json::json!({"id": "doc-1", "name": "A note"})
+ );
+}
+
+#[test]
+fn search_uses_native_materialized_projection() {
+ let handle = spawn_handle();
+ let query = r#"query Soup($input: SoupInput!) {
+ user {
+ id
+ soup(input: $input) {
+ items {
+ __typename
+ id
+ ... on GraphqlSoupDocument { name updatedAt }
+ }
+ nextCursor
+ }
+ }
+ }"#;
+ block_on(handle.write(
+ None,
+ query.to_string(),
+ Some("Soup".to_string()),
+ variables(),
+ serde_json::json!({
+ "user": {
+ "id": "user-1",
+ "soup": {
+ "items": [{
+ "__typename": "GraphqlSoupDocument",
+ "id": "doc-1",
+ "name": "Quarterly Plan",
+ "updatedAt": "2025-01-02T03:04:05Z"
+ }],
+ "nextCursor": null
+ }
+ }
+ }),
None,
- 10,
))
.unwrap();
+
+ let page = block_on(handle.search(SearchRequest {
+ profile: cache_core::search::SearchProfile::QuickAccessV1,
+ buckets: vec!["document".into()],
+ query: "quarter".into(),
+ cursor: None,
+ limit: 20,
+ now_ms: 1_735_787_046_000,
+ }))
+ .unwrap();
+ assert_eq!(page.documents.len(), 1);
assert_eq!(
- page.records,
- vec![serde_json::json!({"id": "doc-1", "name": "A note"})]
+ page.documents[0].record_key.as_ref(),
+ "GraphqlSoupDocument:doc-1"
);
- assert!(page.next_cursor.is_none());
}
#[test]
diff --git a/apps/web/tauri/src-tauri/src/lib.rs b/apps/web/tauri/src-tauri/src/lib.rs
index 8759fb9549..2fb6a5f5e5 100644
--- a/apps/web/tauri/src-tauri/src/lib.rs
+++ b/apps/web/tauri/src-tauri/src/lib.rs
@@ -252,7 +252,8 @@ pub fn run() {
.invoke_handler(tauri::generate_handler![
graphql_cache_plugin::commands::graphql_cache_init,
graphql_cache_plugin::commands::graphql_cache_read,
- graphql_cache_plugin::commands::graphql_cache_read_records,
+ graphql_cache_plugin::commands::graphql_cache_read_records_by_keys,
+ graphql_cache_plugin::commands::graphql_cache_search,
graphql_cache_plugin::commands::graphql_cache_write,
graphql_cache_plugin::commands::graphql_cache_enqueue_optimistic_mutation,
graphql_cache_plugin::commands::graphql_cache_inspect_query_variants,
diff --git a/crates/client/cache-core/Cargo.toml b/crates/client/cache-core/Cargo.toml
index 1b39980c57..dce53c09a2 100644
--- a/crates/client/cache-core/Cargo.toml
+++ b/crates/client/cache-core/Cargo.toml
@@ -6,6 +6,7 @@ version = "0.1.0"
[dependencies]
apollo-parser = { workspace = true }
+chrono = { workspace = true }
lru = { workspace = true }
maybe_send = { path = "../../maybe_send" }
postcard = { workspace = true }
diff --git a/crates/client/cache-core/src/engine.rs b/crates/client/cache-core/src/engine.rs
index 8046a817a6..d6ad23e3ef 100644
--- a/crates/client/cache-core/src/engine.rs
+++ b/crates/client/cache-core/src/engine.rs
@@ -25,7 +25,11 @@ use crate::queue::{
decode_optimistic_source, encode_optimistic_source,
};
use crate::record_selection::{
- RecordCursor, RecordSelection, RecordSelectionError, SelectedRecordPage, validate_limit,
+ MAX_RECORD_SELECTION_KEYS, RecordSelection, RecordSelectionError, SelectedRecord,
+};
+use crate::search::{
+ SearchCursor, SearchDocument, SearchError, SearchPage, SearchProfile, SearchRequest,
+ compare_recent, fuzzy_freshness_score, project_search_documents, validate_search_request,
};
use crate::store::{QueueDiagnostics, Storage};
use crate::value::{EntityKey, Record, canonical_json};
@@ -51,6 +55,8 @@ pub enum EngineError<S: std::error::Error + 'static> {
QueryInspection(#[from] QueryInspectionError),
#[error(transparent)]
RecordSelection(#[from] RecordSelectionError),
+ #[error(transparent)]
+ Search(#[from] SearchError),
#[error("unknown or already-settled optimistic transaction {0}")]
UnknownTransaction(OptimisticTransactionId),
#[error("stale claim for optimistic transaction {0}")]
@@ -179,6 +185,9 @@ pub struct Engine<S: Storage> {
/// Ordered optimistic mutation layers hydrated from durable storage.
optimistic: Vec<OptimisticLayer>,
optimistic_hydrated: bool,
+ /// Compact durable catalogs are loaded lazily for text search. Empty
+ /// queries use the storage index directly and do not populate this map.
+ search_catalogs: HashMap<SearchProfile, HashMap<EntityKey<'static>, SearchDocument>>,
}
impl<S: Storage> Engine<S> {
@@ -195,6 +204,7 @@ impl<S: Storage> Engine<S> {
identity: IdentityState::NotHydrated,
optimistic: Vec::new(),
optimistic_hydrated: false,
+ search_catalogs: HashMap::new(),
}
}
@@ -485,94 +495,74 @@ impl<S: Storage> Engine<S> {
Ok(outcome)
}
- /// Reads complete cached records selected by a named fragment.
- ///
- /// Durable and optimistic-only records are merged in ascending entity-key
- /// order. Incomplete projections are omitted, and one complete record is
- /// read ahead before a continuation cursor is returned.
- pub async fn read_records(
+ /// Projects a bounded explicit set of normalized entity keys through a
+ /// named fragment without scanning storage. Missing, wrong-type, and
+ /// incomplete records are omitted; output preserves first-occurrence key
+ /// order.
+ pub async fn read_records_by_keys(
&mut self,
selection: &RecordSelection,
- cursor: Option<&RecordCursor>,
- limit: usize,
- ) -> Result<SelectedRecordPage, EngineError<S::Error>> {
- validate_limit(limit)?;
+ keys: &[EntityKey<'static>],
+ ) -> Result<Vec<SelectedRecord>, EngineError<S::Error>> {
+ if keys.len() > MAX_RECORD_SELECTION_KEYS {
+ return Err(RecordSelectionError::TooManyKeys {
+ count: keys.len(),
+ max: MAX_RECORD_SELECTION_KEYS,
+ }
+ .into());
+ }
+ if keys.iter().any(|key| {
+ key.as_ref().len() > 1024
+ || key.as_ref().split_once(':').is_none_or(|(typename, _)| {
+ typename.is_empty()
+ || !typename.bytes().enumerate().all(|(index, byte)| {
+ byte == b'_'
+ || byte.is_ascii_alphabetic()
+ || (index > 0 && byte.is_ascii_digit())
+ })
+ })
+ }) {
+ return Err(RecordSelectionError::InvalidKey.into());
+ }
+ if keys.is_empty() {
+ return Ok(Vec::new());
+ }
self.hydrate_optimistic().await?;
- const SCAN_BATCH_SIZE: usize = 128;
- let after: Option<EntityKey<'static>> = cursor.map(RecordCursor::entity_key).cloned();
- let type_names: BTreeSet<_> = selection.type_names().iter().map(String::as_str).collect();
- let optimistic = merged_optimistic(&self.optimistic);
- let mut optimistic_candidates: BTreeSet<_> = optimistic
- .keys()
+ let selected_types: BTreeSet<_> =
+ selection.type_names().iter().map(String::as_str).collect();
+ let mut seen = BTreeSet::new();
+ let ordered_keys: Vec<_> = keys
+ .iter()
.filter(|key| {
- after.as_ref().is_none_or(|after| *key > after)
- && record_key_type(key).is_some_and(|name| type_names.contains(name))
+ record_key_type(key).is_some_and(|name| selected_types.contains(name))
+ && seen.insert((*key).clone())
})
.cloned()
.collect();
- let mut storage_after = after;
- let mut selected = Vec::new();
- let target = limit.saturating_add(1);
-
- loop {
- let rows = self
- .storage
- .scan_records(
- selection.type_names(),
- storage_after.as_ref(),
- SCAN_BATCH_SIZE,
- )
- .await
- .map_err(EngineError::Storage)?;
- let storage_exhausted = rows.len() < SCAN_BATCH_SIZE;
- let high_key = rows.last().map(|(key, _)| key.clone());
- if let Some(high_key) = &high_key {
- storage_after = Some(high_key.clone());
- }
-
- let mut candidates: BTreeMap<EntityKey<'static>, Option<Record>> = rows
- .into_iter()
- .map(|(key, record)| (key, Some(record)))
- .collect();
- let optimistic_in_batch: Vec<_> = if storage_exhausted {
- optimistic_candidates.iter().cloned().collect()
- } else {
- optimistic_candidates
- .iter()
- .take_while(|key| high_key.as_ref().is_some_and(|high| *key <= high))
- .cloned()
- .collect()
- };
- for key in optimistic_in_batch {
- optimistic_candidates.remove(&key);
- candidates.entry(key).or_insert(None);
- }
-
- let projected = self
- .project_record_batch(selection, candidates, &optimistic)
- .await?;
- selected.extend(projected);
- if selected.len() >= target || storage_exhausted {
- break;
- }
- }
-
- let has_more = selected.len() > limit;
- selected.truncate(limit);
- let next_cursor = has_more.then(|| {
- RecordCursor::new(
- selected
- .last()
- .expect("a page with lookahead contains a record")
- .0
- .clone(),
- )
- });
- Ok(SelectedRecordPage {
- records: selected.into_iter().map(|(_, record)| record).collect(),
- next_cursor,
- })
+ let key_set: BTreeSet<_> = ordered_keys.iter().cloned().collect();
+ let mut bases = self.load_bases(&key_set).await?;
+ let candidates = ordered_keys
+ .iter()
+ .cloned()
+ .map(|key| {
+ let record = bases.remove(&key);
+ (key, record)
+ })
+ .collect();
+ let optimistic = merged_optimistic(&self.optimistic);
+ let projected = self
+ .project_record_batch(selection, candidates, &optimistic)
+ .await?;
+ let mut projected: HashMap<_, _> = projected.into_iter().collect();
+ Ok(ordered_keys
+ .into_iter()
+ .filter_map(|record_key| {
+ projected
+ .remove(&record_key)
+ .map(|record| SelectedRecord { record_key, record })
+ })
+ .collect())
}
async fn project_record_batch(
@@ -685,6 +675,164 @@ impl<S: Storage> Engine<S> {
.collect())
}
+ /// Searches the compact materialized projection without scanning or
+ /// decoding normalized-record payloads.
+ ///
+ /// Empty queries fan out over the per-profile/per-bucket timestamp index.
+ /// Text queries lazily load one compact catalog and rank it in memory.
+ /// Active optimistic layers are projected from their fully composed record
+ /// values and overlaid explicitly on either durable path.
+ pub async fn search(
+ &mut self,
+ request: &SearchRequest,
+ ) -> Result<SearchPage, EngineError<S::Error>> {
+ let requested_buckets = validate_search_request(request)?;
+ self.hydrate_optimistic().await?;
+ let buckets: Vec<String> = if requested_buckets.is_empty() {
+ request
+ .profile
+ .buckets()
+ .iter()
+ .map(|bucket| (*bucket).to_owned())
+ .collect()
+ } else {
+ requested_buckets
+ };
+ let bucket_set: BTreeSet<_> = buckets.iter().map(String::as_str).collect();
+ let overlay = self.optimistic_search_overlay(request.profile).await?;
+ let trimmed_query = request.query.trim();
+
+ let mut candidates: HashMap<EntityKey<'static>, SearchDocument> =
+ if trimmed_query.is_empty() {
+ // Fetch enough extra durable rows to compensate for optimistic
+ // replacements/removals without turning this into a record scan.
+ let per_bucket_limit = request
+ .limit
+ .saturating_add(overlay.len())
+ .saturating_add(1);
+ let mut candidates = HashMap::new();
+ for bucket in &buckets {
+ let rows = self
+ .storage
+ .browse_search_documents(
+ request.profile,
+ bucket,
+ request.cursor.as_ref(),
+ per_bucket_limit,
+ )
+ .await
+ .map_err(EngineError::Storage)?;
+ for document in rows {
+ candidates.insert(document.record_key.clone(), document);
+ }
+ }
+ candidates
+ } else {
+ if !self.search_catalogs.contains_key(&request.profile) {
+ let documents = self
+ .storage
+ .load_search_documents(request.profile)
+ .await
+ .map_err(EngineError::Storage)?;
+ self.search_catalogs.insert(
+ request.profile,
+ documents
+ .into_iter()
+ .map(|document| (document.record_key.clone(), document))
+ .collect(),
+ );
+ }
+ self.search_catalogs[&request.profile].clone()
+ };
+
+ for (key, document) in overlay {
+ candidates.remove(&key);
+ if let Some(document) = document
+ && bucket_set.contains(document.bucket.as_str())
+ && cursor_allows(request.cursor.as_ref(), &document)
+ {
+ candidates.insert(key, document);
+ }
+ }
+
+ let mut scored: Vec<(SearchDocument, f64)> = candidates
+ .into_values()
+ .filter(|document| bucket_set.contains(document.bucket.as_str()))
+ .filter(|document| cursor_allows(request.cursor.as_ref(), document))
+ .filter_map(|document| {
+ let score = if trimmed_query.is_empty() {
+ Some(0.0)
+ } else {
+ fuzzy_freshness_score(&document, trimmed_query, request.now_ms)
+ }?;
+ Some((document, score))
+ })
+ .collect();
+ if trimmed_query.is_empty() {
+ scored.sort_by(|(left, _), (right, _)| compare_recent(left, right));
+ } else {
+ scored.sort_by(|(left, left_score), (right, right_score)| {
+ right_score
+ .total_cmp(left_score)
+ .then_with(|| compare_recent(left, right))
+ });
+ }
+ let has_more = scored.len() > request.limit;
+ scored.truncate(request.limit);
+ let documents: Vec<_> = scored.into_iter().map(|(document, _)| document).collect();
+ let next_cursor = (trimmed_query.is_empty() && has_more).then(|| {
+ let last = documents
+ .last()
+ .expect("a truncated search page contains a document");
+ SearchCursor {
+ timestamp_ms: last.timestamp_ms,
+ record_key: last.record_key.clone(),
+ }
+ });
+ Ok(SearchPage {
+ documents,
+ next_cursor,
+ })
+ }
+
+ async fn optimistic_search_overlay(
+ &mut self,
+ profile: SearchProfile,
+ ) -> Result<HashMap<EntityKey<'static>, Option<SearchDocument>>, EngineError<S::Error>> {
+ let keys = layer_keys(&self.optimistic);
+ if keys.is_empty() {
+ return Ok(HashMap::new());
+ }
+ let bases = self.load_bases(&keys).await?;
+ Ok(effective_records(&bases, &self.optimistic, &keys)
+ .into_iter()
+ .map(|(key, record)| {
+ let document = record.and_then(|record| {
+ project_search_documents(&key, &record)
+ .into_iter()
+ .find(|document| document.profile == profile)
+ });
+ (key, document)
+ })
+ .collect())
+ }
+
+ fn update_loaded_search_catalogs(&mut self, entries: &[(EntityKey<'static>, Record)]) {
+ if self.search_catalogs.is_empty() {
+ return;
+ }
+ for (key, record) in entries {
+ for catalog in self.search_catalogs.values_mut() {
+ catalog.remove(key);
+ }
+ for document in project_search_documents(key, record) {
+ if let Some(catalog) = self.search_catalogs.get_mut(&document.profile) {
+ catalog.insert(key.clone(), document);
+ }
+ }
+ }
+ }
+
/// Normalizes and stores a network response. Returns changed records and
/// the affected active operations (excluding `origin_op`).
///
@@ -719,6 +867,7 @@ impl<S: Storage> Engine<S> {
// mutations belong to the old identity — discard them.
self.optimistic.clear();
self.optimistic_hydrated = true;
+ self.search_catalogs.clear();
self.storage.clear().await.map_err(EngineError::Storage)?;
self.bind_identity(observed).await?;
reset = true;
@@ -823,9 +972,10 @@ impl<S: Storage> Engine<S> {
// keeps storage authoritative even if the hot tier evicted them
// between loads).
self.storage
- .put_batch(to_persist)
+ .put_batch(to_persist.clone())
.await
.map_err(EngineError::Storage)?;
+ self.update_loaded_search_catalogs(&to_persist);
Ok(changed)
}
@@ -1027,6 +1177,7 @@ impl<S: Storage> Engine<S> {
{
return Err(EngineError::StaleMutationClaim(transaction));
}
+ self.update_loaded_search_catalogs(&entries);
for (key, record) in entries {
self.hot.put(key, record);
}
@@ -1243,6 +1394,7 @@ impl<S: Storage> Engine<S> {
self.hot.clear();
self.docs.clear();
self.optimistic.clear();
+ self.search_catalogs.clear();
// Another engine may have rebound the shared storage and changed the
// durable queue, so both identity and optimism must re-hydrate.
self.optimistic_hydrated = false;
@@ -1268,6 +1420,9 @@ impl<S: Storage> Engine<S> {
self.hot.pop(key);
affected.extend(self.deps.ops_for_keys([key]));
}
+ // The durable projection was updated by the writing context. Reload
+ // only the compact catalog on the next text search.
+ self.search_catalogs.clear();
affected
}
@@ -1289,6 +1444,9 @@ impl<S: Storage> Engine<S> {
.map_err(EngineError::Storage)?;
for key in keys {
self.hot.pop(key);
+ for catalog in self.search_catalogs.values_mut() {
+ catalog.remove(key);
+ }
}
Ok(affected)
}
@@ -1299,6 +1457,7 @@ impl<S: Storage> Engine<S> {
self.hot.clear();
self.optimistic.clear();
self.optimistic_hydrated = true;
+ self.search_catalogs.clear();
self.deps = DepIndex::new();
// The wipe below removes the binding record too.
self.identity = IdentityState::Missing;
@@ -1463,6 +1622,14 @@ fn record_key_type<'a>(key: &'a EntityKey<'a>) -> Option<&'a str> {
key.0.split_once(':').map(|(type_name, _)| type_name)
}
+fn cursor_allows(cursor: Option<&SearchCursor>, document: &SearchDocument) -> bool {
+ cursor.is_none_or(|cursor| {
+ document.timestamp_ms < cursor.timestamp_ms
+ || (document.timestamp_ms == cursor.timestamp_ms
+ && document.record_key > cursor.record_key)
+ })
+}
+
fn deduplicate_revalidations(
revalidations: impl IntoIterator<Item = QueryRevalidation>,
) -> Vec<QueryRevalidation> {
diff --git a/crates/client/cache-core/src/lib.rs b/crates/client/cache-core/src/lib.rs
index 086023df18..74bfe43240 100644
--- a/crates/client/cache-core/src/lib.rs
+++ b/crates/client/cache-core/src/lib.rs
@@ -15,5 +15,6 @@ pub mod query_inspection;
mod query_path;
pub mod queue;
pub mod record_selection;
+pub mod search;
pub mod store;
pub mod value;
diff --git a/crates/client/cache-core/src/record_selection.rs b/crates/client/cache-core/src/record_selection.rs
index 0f4a0e2414..3ee2acd572 100644
--- a/crates/client/cache-core/src/record_selection.rs
+++ b/crates/client/cache-core/src/record_selection.rs
@@ -1,20 +1,19 @@
//! Fragment-rooted selection over normalized cache records.
//!
//! A selection is a named GraphQL fragment whose type condition resolves
-//! only to normalized entity objects. Records are returned in stable entity
-//! key order and projected with the ordinary denormalizer.
+//! only to normalized entity objects. Explicit entity keys are projected with
+//! the ordinary denormalizer without scanning normalized storage.
use crate::document::{ArgValue, Document, DocumentError, FieldNode, Selection};
use crate::meta::{self, FieldKind, TypeKind};
use crate::value::EntityKey;
-use serde::{Deserialize, Deserializer, Serialize, Serializer, de::Error as _};
+use serde::{Deserialize, Serialize};
use serde_json::Value as Json;
-use std::borrow::Cow;
use std::collections::BTreeSet;
use thiserror::Error;
-/// Largest record-selection page accepted by the engine.
-pub const MAX_RECORD_SELECTION_PAGE_SIZE: usize = 500;
+/// Largest explicit entity-key set accepted by one projection call.
+pub const MAX_RECORD_SELECTION_KEYS: usize = 500;
/// A validated named fragment that can be applied to normalized records.
#[derive(Debug, Clone)]
@@ -61,48 +60,14 @@ impl RecordSelection {
}
}
-/// Opaque exclusive cursor into entity-key record ordering.
-#[derive(Debug, Clone, PartialEq, Eq)]
-pub struct RecordCursor(EntityKey<'static>);
-
-impl RecordCursor {
- pub(crate) fn new(entity_key: EntityKey<'static>) -> Self {
- Self(entity_key)
- }
-
- pub(crate) fn entity_key(&self) -> &EntityKey<'static> {
- &self.0
- }
-}
-
-impl Serialize for RecordCursor {
- fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
- where
- S: Serializer,
- {
- serializer.serialize_str(&encode_cursor(&self.0))
- }
-}
-
-impl<'de> Deserialize<'de> for RecordCursor {
- fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
- where
- D: Deserializer<'de>,
- {
- let value = String::deserialize(deserializer)?;
- decode_cursor(&value).map(Self).map_err(D::Error::custom)
- }
-}
-
-/// One page of projected normalized records.
+/// One normalized record projected by an explicit entity key.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
-pub struct SelectedRecordPage {
- /// Complete fragment projections in deterministic entity-key order.
- pub records: Vec<Json>,
- /// Exclusive cursor for the next page, present only when another complete
- /// matching record exists.
- pub next_cursor: Option<RecordCursor>,
+pub struct SelectedRecord {
+ /// Canonical normalized-cache entity key.
+ pub record_key: EntityKey<'static>,
+ /// Complete fragment projection for that entity.
+ pub record: Json,
}
/// Invalid fragment selection, cursor, or page request.
@@ -132,20 +97,12 @@ pub enum RecordSelectionError {
/// A leaf field has sub-selections or a composite field has none.
#[error("field `{type_name}.{field}` has an invalid selection shape")]
InvalidFieldShape { type_name: String, field: String },
- /// Page limits must be nonzero and no larger than the safety bound.
- #[error("record-selection limit must be between 1 and {max}, got {limit}")]
- InvalidLimit { limit: usize, max: usize },
-}
-
-/// Validates a requested page size.
-pub fn validate_limit(limit: usize) -> Result<(), RecordSelectionError> {
- if !(1..=MAX_RECORD_SELECTION_PAGE_SIZE).contains(&limit) {
- return Err(RecordSelectionError::InvalidLimit {
- limit,
- max: MAX_RECORD_SELECTION_PAGE_SIZE,
- });
- }
- Ok(())
+ /// Explicit key sets are bounded at the engine boundary.
+ #[error("record selection accepts at most {max} keys, got {count}")]
+ TooManyKeys { count: usize, max: usize },
+ /// An explicit key was not a bounded canonical entity key.
+ #[error("invalid normalized record key")]
+ InvalidKey,
}
fn concrete_type_names(type_name: &str) -> Result<Vec<String>, RecordSelectionError> {
@@ -248,36 +205,5 @@ fn referenced_variable(value: &ArgValue) -> Option<&str> {
}
}
-fn encode_cursor(entity_key: &EntityKey<'_>) -> String {
- let encoded: String = entity_key
- .0
- .as_bytes()
- .iter()
- .map(|byte| format!("{byte:02x}"))
- .collect();
- format!("r1.{encoded}")
-}
-
-fn decode_cursor(value: &str) -> Result<EntityKey<'static>, &'static str> {
- let encoded = value
- .strip_prefix("r1.")
- .ok_or("invalid record-selection cursor")?;
- if encoded.is_empty() || !encoded.len().is_multiple_of(2) {
- return Err("invalid record-selection cursor");
- }
- let bytes = encoded
- .as_bytes()
- .chunks_exact(2)
- .map(|pair| {
- let pair = std::str::from_utf8(pair).map_err(|_| "invalid record-selection cursor")?;
- u8::from_str_radix(pair, 16).map_err(|_| "invalid record-selection cursor")
- })
- .collect::<Result<Vec<_>, _>>()?;
- String::from_utf8(bytes)
- .map(Cow::Owned)
- .map(EntityKey)
- .map_err(|_| "invalid record-selection cursor")
-}
-
#[cfg(test)]
mod test;
diff --git a/crates/client/cache-core/src/record_selection/test.rs b/crates/client/cache-core/src/record_selection/test.rs
index d43cf4c6d9..1dece9bb3c 100644
--- a/crates/client/cache-core/src/record_selection/test.rs
+++ b/crates/client/cache-core/src/record_selection/test.rs
@@ -85,26 +85,3 @@ fn rejects_unknown_fragment_and_type() {
Err(RecordSelectionError::UnknownType(_))
));
}
-
-#[test]
-fn validates_page_limits() {
- assert!(matches!(
- validate_limit(0),
- Err(RecordSelectionError::InvalidLimit { .. })
- ));
- validate_limit(MAX_RECORD_SELECTION_PAGE_SIZE).unwrap();
- assert!(matches!(
- validate_limit(MAX_RECORD_SELECTION_PAGE_SIZE + 1),
- Err(RecordSelectionError::InvalidLimit { .. })
- ));
-}
-
-#[test]
-fn cursor_has_opaque_roundtrip() {
- let cursor = RecordCursor::new(EntityKey("GraphqlSoupDocument:item-1".into()));
- let encoded = serde_json::to_value(&cursor).unwrap();
- assert_eq!(
- serde_json::from_value::<RecordCursor>(encoded).unwrap(),
- cursor
- );
-}
diff --git a/crates/client/cache-core/src/search.rs b/crates/client/cache-core/src/search.rs
new file mode 100644
index 0000000000..71dd72234e
--- /dev/null
+++ b/crates/client/cache-core/src/search.rs
@@ -0,0 +1,389 @@
+//! Compact materialized search projection for normalized cache records.
+//!
+//! Search documents are disposable derivatives of fully merged records. They
+//! deliberately contain no GraphQL payloads, so text search never needs to
+//! decode the normalized-record postcard blobs.
+
+use crate::codec::encode_record;
+use crate::value::{CacheNumber, CacheValue, EntityKey, Record};
+use serde::{Deserialize, Serialize};
+use sha2::{Digest, Sha256};
+use std::cmp::Ordering;
+use std::collections::BTreeSet;
+use thiserror::Error;
+
+/// Current compact projection profile used by Quick Access, Cmd-K and entity
+/// mention pickers. Profile names are persisted and therefore versioned.
+#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+#[serde(rename_all = "kebab-case")]
+pub enum SearchProfile {
+ /// First Quick Access projection profile.
+ QuickAccessV1,
+}
+
+impl SearchProfile {
+ /// Stable value persisted in local cache storage.
+ pub const fn as_str(self) -> &'static str {
+ match self {
+ Self::QuickAccessV1 => "quick-access-v1",
+ }
+ }
+
+ /// Finite bucket set used to fan out indexed empty-query browsing.
+ pub const fn buckets(self) -> &'static [&'static str] {
+ match self {
+ Self::QuickAccessV1 => &[
+ "channel",
+ "dm",
+ "person",
+ "document",
+ "task",
+ "snippet",
+ "skill",
+ "note",
+ "chat",
+ "project",
+ "email",
+ "crm_company",
+ ],
+ }
+ }
+}
+
+/// Exclusive browse cursor ordered by recency and then entity key.
+#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct SearchCursor {
+ /// Timestamp of the last returned document.
+ pub timestamp_ms: i64,
+ /// Entity key of the last returned document.
+ pub record_key: EntityKey<'static>,
+}
+
+/// One compact, transport-neutral search document.
+#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct SearchDocument {
+ /// Projection profile which produced this row.
+ pub profile: SearchProfile,
+ /// Key used to fetch/project the full normalized record only after search.
+ pub record_key: EntityKey<'static>,
+ /// Quick Access bucket (document, note, task, channel, person, ...).
+ pub bucket: String,
+ /// Lower-cased, whitespace-normalized text used by fuzzy matching.
+ pub search_text: String,
+ /// Best available viewed/interacted/updated/created timestamp.
+ pub timestamp_ms: i64,
+ /// Compact hash of the fully merged source record.
+ pub source_hash: String,
+}
+
+/// Bounded search request over cached contents.
+#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct SearchRequest {
+ /// Versioned projection profile.
+ pub profile: SearchProfile,
+ /// Allowed Quick Access buckets. Empty means every bucket in the profile.
+ #[serde(default)]
+ pub buckets: Vec<String>,
+ /// Fuzzy query. Empty queries use the indexed recent browse path.
+ #[serde(default)]
+ pub query: String,
+ /// Exclusive continuation cursor for empty-query browsing.
+ pub cursor: Option<SearchCursor>,
+ /// Maximum result count.
+ pub limit: usize,
+ /// Wall-clock time used for deterministic freshness scoring.
+ pub now_ms: i64,
+}
+
+/// Bounded search result. It describes cache contents, not corpus completeness.
+#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct SearchPage {
+ /// Ranked compact documents.
+ pub documents: Vec<SearchDocument>,
+ /// Empty-query continuation cursor when more cached documents exist.
+ pub next_cursor: Option<SearchCursor>,
+}
+
+/// Search request validation errors.
+#[derive(Clone, Debug, Error, PartialEq, Eq)]
+pub enum SearchError {
+ /// Search result limits are deliberately bounded at the core boundary.
+ #[error("search limit must be between 1 and {MAX_SEARCH_LIMIT}")]
+ InvalidLimit,
+ /// Bucket names cross storage boundaries and must remain compact.
+ #[error("invalid search bucket")]
+ InvalidBucket,
+ /// Query text is bounded before loading/ranking the catalog.
+ #[error("search query is too long")]
+ QueryTooLong,
+}
+
+/// Maximum number of compact documents returned by one RPC.
+pub const MAX_SEARCH_LIMIT: usize = 500;
+/// Maximum accepted query length in bytes.
+pub const MAX_SEARCH_QUERY_BYTES: usize = 512;
+
+/// Validates and canonicalizes a request's buckets.
+pub fn validate_search_request(request: &SearchRequest) -> Result<Vec<String>, SearchError> {
+ if request.limit == 0 || request.limit > MAX_SEARCH_LIMIT {
+ return Err(SearchError::InvalidLimit);
+ }
+ if request.query.len() > MAX_SEARCH_QUERY_BYTES {
+ return Err(SearchError::QueryTooLong);
+ }
+ let mut buckets = BTreeSet::new();
+ for bucket in &request.buckets {
+ if bucket.is_empty()
+ || bucket.len() > 64
+ || !bucket
+ .bytes()
+ .all(|byte| byte.is_ascii_lowercase() || byte == b'_')
+ {
+ return Err(SearchError::InvalidBucket);
+ }
+ buckets.insert(bucket.clone());
+ }
+ Ok(buckets.into_iter().collect())
+}
+
+/// Builds every current search projection for a fully merged record.
+///
+/// A missing result means the record is internal, deleted, hidden, or not part
+/// of a current profile. Storage backends delete any old derived row in that
+/// case, in the same transaction as the base-record upsert.
+pub fn project_search_documents(key: &EntityKey<'static>, record: &Record) -> Vec<SearchDocument> {
+ project_quick_access(key, record).into_iter().collect()
+}
+
+fn project_quick_access(key: &EntityKey<'static>, record: &Record) -> Option<SearchDocument> {
+ if key.is_root() || key.as_ref().starts_with("__meta:") || !is_present(record) {
+ return None;
+ }
+ let typename = record
+ .typename()
+ .or_else(|| key.as_ref().split_once(':').map(|(name, _)| name))?;
+
+ let (bucket, text_fields): (&str, &[&str]) = match typename {
+ "GraphqlSoupDocument" => (document_bucket(record), &["documentName", "name"]),
+ "GraphqlSoupChat" => ("chat", &["chatName", "name"]),
+ "GraphqlSoupProject" => ("project", &["projectName", "name"]),
+ "GraphqlSoupEmailThread" => (
+ "email",
+ &["emailName", "name", "senderName", "senderEmail", "snippet"],
+ ),
+ "GraphqlSoupChannel" => (channel_bucket(record), &["channelName", "name"]),
+ "GraphqlSoupCrmCompany" => ("crm_company", &["crmCompanyName", "name", "domains"]),
+ "GraphqlUser" | "User" => ("person", &["name", "email"]),
+ _ => return None,
+ };
+
+ let search_text = normalize_search_text(
+ text_fields
+ .iter()
+ .filter_map(|field| record.fields.get(*field))
+ .flat_map(search_value_text)
+ .collect::<Vec<_>>()
+ .join(" | ")
+ .as_str(),
+ );
+ if search_text.is_empty()
+ && !text_fields
+ .iter()
+ .any(|field| record.fields.contains_key(*field))
+ {
+ return None;
+ }
+
+ Some(SearchDocument {
+ profile: SearchProfile::QuickAccessV1,
+ record_key: key.clone(),
+ bucket: bucket.to_owned(),
+ search_text,
+ timestamp_ms: best_timestamp(record),
+ source_hash: source_hash(record),
+ })
+}
+
+fn is_present(record: &Record) -> bool {
+ !matches!(record.fields.get("deletedAt"), Some(value) if !matches!(value, CacheValue::Null))
+ && !matches!(record.fields.get("hidden"), Some(CacheValue::Bool(true)))
+}
+
+fn document_bucket(record: &Record) -> &'static str {
+ let subtype = record.fields.get("subType").and_then(value_typename);
+ match subtype {
+ Some(name) if name.contains("Task") => "task",
+ Some(name) if name.contains("Snippet") => "snippet",
+ Some(name) if name.contains("Skill") => "skill",
+ _ if string_field(record, "fileType")
+ .is_some_and(|value| value.eq_ignore_ascii_case("md")) =>
+ {
+ "note"
+ }
+ _ => "document",
+ }
+}
+
+fn channel_bucket(record: &Record) -> &'static str {
+ if string_field(record, "channelType").is_some_and(|value| {
+ value.eq_ignore_ascii_case("direct_message") || value.eq_ignore_ascii_case("directmessage")
+ }) {
+ "dm"
+ } else {
+ "channel"
+ }
+}
+
+fn value_typename(value: &CacheValue) -> Option<&str> {
+ match value {
+ CacheValue::Ref(key) => key.as_ref().split_once(':').map(|(name, _)| name),
+ CacheValue::Object(fields) => match fields.get("__typename") {
+ Some(CacheValue::String(value)) => Some(value),
+ _ => None,
+ },
+ _ => None,
+ }
+}
+
+fn string_field<'a>(record: &'a Record, field: &str) -> Option<&'a str> {
+ match record.fields.get(field) {
+ Some(CacheValue::String(value)) => Some(value),
+ _ => None,
+ }
+}
+
+fn search_value_text(value: &CacheValue) -> Vec<&str> {
+ match value {
+ CacheValue::String(value) => vec![value],
+ CacheValue::List(values) => values.iter().flat_map(search_value_text).collect(),
+ CacheValue::Object(fields) => fields
+ .iter()
+ .filter(|(key, _)| matches!(key.as_str(), "name" | "email" | "domain"))
+ .flat_map(|(_, value)| search_value_text(value))
+ .collect(),
+ _ => Vec::new(),
+ }
+}
+
+fn normalize_search_text(value: &str) -> String {
+ value
+ .split_whitespace()
+ .collect::<Vec<_>>()
+ .join(" ")
+ .to_lowercase()
+}
+
+fn best_timestamp(record: &Record) -> i64 {
+ [
+ "viewedAt",
+ "interactedAt",
+ "sortTs",
+ "lastInteraction",
+ "updatedAt",
+ "createdAt",
+ ]
+ .into_iter()
+ .filter_map(|field| record.fields.get(field).and_then(value_timestamp))
+ .max()
+ .unwrap_or(0)
+}
+
+fn value_timestamp(value: &CacheValue) -> Option<i64> {
+ match value {
+ CacheValue::String(value) => parse_rfc3339_millis(value),
+ CacheValue::Number(CacheNumber::PosInt(value)) => i64::try_from(*value).ok(),
+ CacheValue::Number(CacheNumber::NegInt(value)) => Some(*value),
+ CacheValue::Number(CacheNumber::Float(value)) if value.is_finite() => Some(*value as i64),
+ _ => None,
+ }
+}
+
+fn source_hash(record: &Record) -> String {
+ let digest = Sha256::digest(encode_record(record));
+ digest[..8]
+ .iter()
+ .map(|byte| format!("{byte:02x}"))
+ .collect()
+}
+
+pub(crate) fn compare_record_keys(left: &EntityKey<'_>, right: &EntityKey<'_>) -> Ordering {
+ let left = left.as_ref().split_once(':').unwrap_or((left.as_ref(), ""));
+ let right = right
+ .as_ref()
+ .split_once(':')
+ .unwrap_or((right.as_ref(), ""));
+ left.0.cmp(right.0).then_with(|| left.1.cmp(right.1))
+}
+
+/// Sorts recent browse results deterministically.
+pub fn compare_recent(left: &SearchDocument, right: &SearchDocument) -> Ordering {
+ right
+ .timestamp_ms
+ .cmp(&left.timestamp_ms)
+ .then_with(|| compare_record_keys(&left.record_key, &right.record_key))
+}
+
+/// Returns a fuzzy+freshness score, or `None` when every query token fails to
+/// match as an ordered subsequence. The weighting mirrors the existing Quick
+/// Access preference for fuzzy relevance (70%) plus freshness (30%).
+pub fn fuzzy_freshness_score(document: &SearchDocument, query: &str, now_ms: i64) -> Option<f64> {
+ let normalized = normalize_search_text(query);
+ if normalized.is_empty() {
+ return Some(1.0);
+ }
+ let mut score = 0.0;
+ let mut tokens = 0usize;
+ for token in normalized.split_whitespace() {
+ tokens += 1;
+ score += subsequence_score(&document.search_text, token)?;
+ }
+ let fuzzy = score / tokens as f64;
+ let age = now_ms.saturating_sub(document.timestamp_ms).max(0) as f64;
+ let max_age = 30.0 * 24.0 * 60.0 * 60.0 * 1000.0;
+ let freshness = if document.timestamp_ms <= 0 || age >= max_age {
+ 0.0
+ } else {
+ (-0.5 * age / max_age).exp()
+ };
+ Some(0.7 * fuzzy + 0.3 * freshness)
+}
+
+fn subsequence_score(haystack: &str, needle: &str) -> Option<f64> {
+ if let Some(start) = haystack.find(needle) {
+ let prefix = start == 0
+ || haystack[..start]
+ .chars()
+ .next_back()
+ .is_some_and(|character| !character.is_alphanumeric());
+ return Some(if prefix { 1.0 } else { 0.9 });
+ }
+ let mut chars = needle.chars();
+ let mut wanted = chars.next()?;
+ let mut first = None;
+ for (position, character) in haystack.chars().enumerate() {
+ if character == wanted {
+ first.get_or_insert(position);
+ match chars.next() {
+ Some(next) => wanted = next,
+ None => {
+ let span = position.saturating_sub(first.unwrap_or(position)) + 1;
+ return Some((needle.chars().count() as f64 / span as f64).clamp(0.1, 0.8));
+ }
+ }
+ }
+ }
+ None
+}
+
+fn parse_rfc3339_millis(value: &str) -> Option<i64> {
+ chrono::DateTime::parse_from_rfc3339(value)
+ .ok()
+ .map(|timestamp| timestamp.timestamp_millis())
+}
+
+#[cfg(test)]
+mod test;
diff --git a/crates/client/cache-core/src/search/test.rs b/crates/client/cache-core/src/search/test.rs
new file mode 100644
index 0000000000..381706f463
--- /dev/null
+++ b/crates/client/cache-core/src/search/test.rs
@@ -0,0 +1,83 @@
+use super::*;
+
+fn string_record(fields: &[(&str, &str)]) -> Record {
+ Record {
+ fields: fields
+ .iter()
+ .map(|(key, value)| ((*key).into(), CacheValue::String((*value).into())))
+ .collect(),
+ }
+}
+
+#[test]
+fn projects_quick_access_document_without_decoding_other_records() {
+ let mut record = string_record(&[
+ ("__typename", "GraphqlSoupDocument"),
+ ("documentName", " Quarterly Plan "),
+ ("fileType", "md"),
+ ("updatedAt", "2025-01-02T03:04:05.123Z"),
+ ]);
+ record.fields.insert("subType".into(), CacheValue::Null);
+ let document =
+ project_search_documents(&EntityKey::entity("GraphqlSoupDocument", &["d1"]), &record)
+ .pop()
+ .unwrap();
+ assert_eq!(document.bucket, "note");
+ assert_eq!(document.search_text, "quarterly plan");
+ assert_eq!(document.timestamp_ms, 1_735_787_045_123);
+ assert_eq!(document.source_hash.len(), 16);
+}
+
+#[test]
+fn projection_removes_deleted_and_handles_subtype_refs() {
+ let mut record = string_record(&[
+ ("__typename", "GraphqlSoupDocument"),
+ ("documentName", "Todo"),
+ ]);
+ record.fields.insert(
+ "subType".into(),
+ CacheValue::Ref(EntityKey::entity("GraphqlTaskSubType", &["d1"])),
+ );
+ assert_eq!(
+ project_search_documents(&EntityKey::entity("GraphqlSoupDocument", &["d1"]), &record)[0]
+ .bucket,
+ "task"
+ );
+ record.fields.insert(
+ "deletedAt".into(),
+ CacheValue::String("2025-01-01T00:00:00Z".into()),
+ );
+ assert!(
+ project_search_documents(&EntityKey::entity("GraphqlSoupDocument", &["d1"]), &record)
+ .is_empty()
+ );
+}
+
+#[test]
+fn rfc3339_timestamps_use_validated_dates_offsets_and_fractional_seconds() {
+ assert_eq!(
+ parse_rfc3339_millis("2025-01-02T05:34:05.123456+02:30"),
+ Some(1_735_787_045_123)
+ );
+ assert_eq!(parse_rfc3339_millis("2025-02-30T00:00:00Z"), None);
+ assert_eq!(parse_rfc3339_millis("not-a-timestamp"), None);
+}
+
+#[test]
+fn subsequence_scoring_measures_spans_in_characters() {
+ assert_eq!(subsequence_score("aéxb", "ab"), Some(0.5));
+}
+
+#[test]
+fn fuzzy_matching_rewards_prefix_and_freshness() {
+ let recent = SearchDocument {
+ profile: SearchProfile::QuickAccessV1,
+ record_key: EntityKey::entity("GraphqlSoupDocument", &["1"]),
+ bucket: "document".into(),
+ search_text: "quarterly plan".into(),
+ timestamp_ms: 990,
+ source_hash: "a".into(),
+ };
+ assert!(fuzzy_freshness_score(&recent, "qtr plan", 1_000).is_some());
+ assert!(fuzzy_freshness_score(&recent, "missing", 1_000).is_none());
+}
diff --git a/crates/client/cache-core/src/store.rs b/crates/client/cache-core/src/store.rs
index 546dfc064a..7124e0dac9 100644
--- a/crates/client/cache-core/src/store.rs
+++ b/crates/client/cache-core/src/store.rs
@@ -10,10 +10,13 @@ use crate::queue::{
ClaimedMutation, MutationClaimRequest, MutationClaimToken, MutationId, NewQueuedMutation,
QueuedMutation,
};
+use crate::search::{SearchCursor, SearchDocument, SearchProfile, project_search_documents};
use crate::value::{EntityKey, Record};
use maybe_send::MaybeSend;
use std::collections::{BTreeMap, HashMap};
use std::convert::Infallible;
+use std::sync::Arc;
+use std::sync::atomic::{AtomicUsize, Ordering};
/// Whether a storage implementation can provide queue diagnostics.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
@@ -59,14 +62,25 @@ pub trait Storage: MaybeSend {
keys: &[EntityKey<'static>],
) -> impl Future<Output = Result<(), Self::Error>> + MaybeSend;
- /// Scans normalized records of the requested concrete types in ascending
- /// entity-key order. `after` is exclusive.
- fn scan_records(
+ /// Loads the compact catalog for text search. This must read only the
+ /// derived search table, never normalized record payloads.
+ fn load_search_documents(
&self,
- type_names: &[String],
- after: Option<&EntityKey<'static>>,
- limit: usize,
- ) -> impl Future<Output = Result<Vec<(EntityKey<'static>, Record)>, Self::Error>> + MaybeSend;
+ _profile: SearchProfile,
+ ) -> impl Future<Output = Result<Vec<SearchDocument>, Self::Error>> + MaybeSend {
+ async { Ok(Vec::new()) }
+ }
+
+ /// Reads one bucket in indexed recent order. `after` is exclusive.
+ fn browse_search_documents(
+ &self,
+ _profile: SearchProfile,
+ _bucket: &str,
+ _after: Option<&SearchCursor>,
+ _limit: usize,
+ ) -> impl Future<Output = Result<Vec<SearchDocument>, Self::Error>> + MaybeSend {
+ async { Ok(Vec::new()) }
+ }
/// Atomically appends a mutation and its optimistic layer to the queue.
fn enqueue_mutation(
@@ -134,6 +148,7 @@ pub trait Storage: MaybeSend {
#[derive(Clone, Debug, Default)]
pub struct InMemoryStorage {
records: HashMap<EntityKey<'static>, Record>,
+ search_documents: HashMap<(SearchProfile, EntityKey<'static>), SearchDocument>,
mutations: BTreeMap<
MutationId,
(
@@ -142,6 +157,8 @@ pub struct InMemoryStorage {
),
>,
next_mutation_id: MutationId,
+ record_get_count: Arc<AtomicUsize>,
+ search_catalog_load_count: Arc<AtomicUsize>,
}
impl InMemoryStorage {
@@ -156,12 +173,23 @@ impl InMemoryStorage {
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
+
+ /// Number of normalized-record get calls (test diagnostics).
+ pub fn record_get_count(&self) -> usize {
+ self.record_get_count.load(Ordering::Relaxed)
+ }
+
+ /// Number of compact catalog loads (test diagnostics).
+ pub fn search_catalog_load_count(&self) -> usize {
+ self.search_catalog_load_count.load(Ordering::Relaxed)
+ }
}
impl Storage for InMemoryStorage {
type Error = Infallible;
async fn get_batch(&self, keys: &[EntityKey<'_>]) -> Result<Vec<Option<Record>>, Self::Error> {
+ self.record_get_count.fetch_add(1, Ordering::Relaxed);
Ok(keys.iter().map(|k| self.records.get(k).cloned()).collect())
}
@@ -169,44 +197,68 @@ impl Storage for InMemoryStorage {
&mut self,
entries: Vec<(EntityKey<'static>, Record)>,
) -> Result<(), Self::Error> {
- for (k, v) in entries {
- self.records.insert(k, v);
+ for (key, record) in entries {
+ self.search_documents
+ .retain(|(_, existing_key), _| existing_key != &key);
+ for document in project_search_documents(&key, &record) {
+ self.search_documents
+ .insert((document.profile, key.clone()), document);
+ }
+ self.records.insert(key, record);
}
Ok(())
}
async fn delete_batch(&mut self, keys: &[EntityKey<'static>]) -> Result<(), Self::Error> {
- for k in keys {
- self.records.remove(k);
+ for key in keys {
+ self.records.remove(key);
+ self.search_documents
+ .retain(|(_, existing_key), _| existing_key != key);
}
Ok(())
}
- async fn scan_records(
+ async fn load_search_documents(
&self,
- type_names: &[String],
- after: Option<&EntityKey<'static>>,
- limit: usize,
- ) -> Result<Vec<(EntityKey<'static>, Record)>, Self::Error> {
- if limit == 0 || type_names.is_empty() {
- return Ok(Vec::new());
- }
- let type_names: std::collections::HashSet<_> =
- type_names.iter().map(String::as_str).collect();
- let mut records: Vec<_> = self
- .records
+ profile: SearchProfile,
+ ) -> Result<Vec<SearchDocument>, Self::Error> {
+ self.search_catalog_load_count
+ .fetch_add(1, Ordering::Relaxed);
+ Ok(self
+ .search_documents
.iter()
- .filter(|(key, _)| after.as_ref().is_none_or(|after| *key > after))
- .filter(|(key, _)| {
- key.0
- .split_once(':')
- .is_some_and(|(type_name, _)| type_names.contains(type_name))
+ .filter(|((candidate, _), _)| *candidate == profile)
+ .map(|(_, document)| document.clone())
+ .collect())
+ }
+
+ async fn browse_search_documents(
+ &self,
+ profile: SearchProfile,
+ bucket: &str,
+ after: Option<&SearchCursor>,
+ limit: usize,
+ ) -> Result<Vec<SearchDocument>, Self::Error> {
+ let mut documents: Vec<_> = self
+ .search_documents
+ .values()
+ .filter(|document| document.profile == profile && document.bucket == bucket)
+ .filter(|document| {
+ after.is_none_or(|cursor| {
+ document.timestamp_ms < cursor.timestamp_ms
+ || (document.timestamp_ms == cursor.timestamp_ms
+ && crate::search::compare_record_keys(
+ &document.record_key,
+ &cursor.record_key,
+ )
+ .is_gt())
+ })
})
- .map(|(key, record)| (key.clone(), record.clone()))
+ .cloned()
.collect();
- records.sort_by(|(left, _), (right, _)| left.cmp(right));
- records.truncate(limit);
- Ok(records)
+ documents.sort_by(crate::search::compare_recent);
+ documents.truncate(limit);
+ Ok(documents)
}
async fn enqueue_mutation(
@@ -310,6 +362,12 @@ impl Storage for InMemoryStorage {
return Ok(false);
}
for (key, record) in entries {
+ self.search_documents
+ .retain(|(_, existing_key), _| existing_key != &key);
+ for document in project_search_documents(&key, &record) {
+ self.search_documents
+ .insert((document.profile, key.clone()), document);
+ }
self.records.insert(key, record);
}
self.mutations.remove(&id);
@@ -333,6 +391,7 @@ impl Storage for InMemoryStorage {
async fn clear(&mut self) -> Result<(), Self::Error> {
self.records.clear();
+ self.search_documents.clear();
self.mutations.clear();
Ok(())
}
diff --git a/crates/client/cache-core/tests/optimistic.rs b/crates/client/cache-core/tests/optimistic.rs
index f836816d83..c037cd56da 100644
--- a/crates/client/cache-core/tests/optimistic.rs
+++ b/crates/client/cache-core/tests/optimistic.rs
@@ -88,19 +88,6 @@ impl Storage for ClaimFailingStorage {
Ok(())
}
- async fn scan_records(
- &self,
- type_names: &[String],
- after: Option<&EntityKey<'static>>,
- limit: usize,
- ) -> Result<Vec<(EntityKey<'static>, Record)>, Self::Error> {
- Ok(self
- .inner
- .scan_records(type_names, after, limit)
- .await
- .unwrap())
- }
-
async fn enqueue_mutation(
&mut self,
entry: NewQueuedMutation,
diff --git a/crates/client/cache-core/tests/query_inspection.rs b/crates/client/cache-core/tests/query_inspection.rs
index 9d78b11062..b382392d76 100644
--- a/crates/client/cache-core/tests/query_inspection.rs
+++ b/crates/client/cache-core/tests/query_inspection.rs
@@ -108,15 +108,6 @@ impl Storage for OwnerOnlyStorage {
self.0.delete_batch(keys).await
}
- async fn scan_records(
- &self,
- type_names: &[String],
- after: Option<&EntityKey<'static>>,
- limit: usize,
- ) -> Result<Vec<(EntityKey<'static>, Record)>, Self::Error> {
- self.0.scan_records(type_names, after, limit).await
- }
-
async fn enqueue_mutation(
&mut self,
entry: NewQueuedMutation,
diff --git a/crates/client/cache-core/tests/record_selection.rs b/crates/client/cache-core/tests/record_selection.rs
index 0aa5cd0521..263a4e6fe6 100644
--- a/crates/client/cache-core/tests/record_selection.rs
+++ b/crates/client/cache-core/tests/record_selection.rs
@@ -1,5 +1,5 @@
-use cache_core::engine::{BeginOptimisticWrite, Engine};
-use cache_core::record_selection::RecordSelection;
+use cache_core::engine::{BeginOptimisticWrite, Engine, EngineError};
+use cache_core::record_selection::{RecordSelection, RecordSelectionError};
use cache_core::store::{InMemoryStorage, Storage};
use cache_core::value::{CacheValue, EntityKey, Record};
use pollster::block_on;
@@ -74,7 +74,7 @@ fragment SoupItemFields on GraphqlSoupDocument {
"#;
#[test]
-fn projects_cold_links_skips_incomplete_and_paginates_exclusively() {
+fn projects_cold_links_and_skips_incomplete_explicit_keys() {
block_on(async {
let mut storage = InMemoryStorage::new();
storage
@@ -90,34 +90,85 @@ fn projects_cold_links_skips_incomplete_and_paginates_exclusively() {
let mut engine = Engine::with_capacity(storage, 1);
let selection = RecordSelection::parse(ITEM_FRAGMENT, "SoupItemFields").unwrap();
- let first = engine.read_records(&selection, None, 1).await.unwrap();
+ let selected = engine
+ .read_records_by_keys(
+ &selection,
+ &[
+ key("GraphqlSoupDocument:a"),
+ key("GraphqlSoupDocument:b"),
+ key("GraphqlSoupDocument:c"),
+ ],
+ )
+ .await
+ .unwrap();
+ assert_eq!(selected.len(), 2);
+ assert_eq!(selected[0].record["documentId"], json!("a"));
+ assert_eq!(
+ selected[0].record["properties"][0]["propertyName"],
+ json!("Alpha")
+ );
+ assert_eq!(selected[1].record["documentId"], json!("c"));
assert_eq!(
- first.records,
- vec![json!({
- "documentId": "a",
- "properties": [{
- "id": "a",
- "propertyName": "Alpha"
- }]
- })]
+ selected[1].record["properties"][0]["propertyName"],
+ json!("Charlie")
);
- assert!(first.next_cursor.is_some());
+ });
+}
- let second = engine
- .read_records(&selection, first.next_cursor.as_ref(), 1)
+#[test]
+fn explicit_key_projection_preserves_rank_order_without_scanning() {
+ block_on(async {
+ let mut storage = InMemoryStorage::new();
+ storage
+ .put_batch(vec![document("a", "Alpha"), document("c", "Charlie")])
+ .await
+ .unwrap();
+ let mut engine = Engine::new(storage);
+ let selection =
+ RecordSelection::parse("fragment Item on GraphqlSoupDocument { id name }", "Item")
+ .unwrap();
+
+ let selected = engine
+ .read_records_by_keys(
+ &selection,
+ &[
+ key("GraphqlSoupDocument:c"),
+ key("GraphqlSoupDocument:a"),
+ key("GraphqlSoupDocument:c"),
+ key("GraphqlSoupDocument:missing"),
+ ],
+ )
.await
.unwrap();
- assert_eq!(second.records[0]["documentId"], json!("c"));
assert_eq!(
- second.records[0]["properties"][0]["propertyName"],
- json!("Charlie")
+ selected
+ .iter()
+ .map(|selected| selected.record_key.as_ref())
+ .collect::<Vec<_>>(),
+ ["GraphqlSoupDocument:c", "GraphqlSoupDocument:a"]
);
- assert!(second.next_cursor.is_none());
+ assert_eq!(selected[0].record, json!({"id": "c", "name": "Charlie"}));
+
+ let too_many = vec![key("GraphqlSoupDocument:a"); 501];
+ assert!(matches!(
+ engine.read_records_by_keys(&selection, &too_many).await,
+ Err(EngineError::RecordSelection(
+ RecordSelectionError::TooManyKeys { .. }
+ ))
+ ));
+ assert!(matches!(
+ engine
+ .read_records_by_keys(&selection, &[key("ROOT_QUERY")])
+ .await,
+ Err(EngineError::RecordSelection(
+ RecordSelectionError::InvalidKey
+ ))
+ ));
});
}
#[test]
-fn reads_schema_incomplete_objects_through_fragments_in_entity_key_order() {
+fn reads_schema_incomplete_objects_in_explicit_input_order() {
block_on(async {
let mut storage = InMemoryStorage::new();
// These records intentionally omit other current, non-null schema
@@ -150,15 +201,24 @@ fn reads_schema_incomplete_objects_through_fragments_in_entity_key_order() {
)
.unwrap();
- let page = engine.read_records(&selection, None, 10).await.unwrap();
+ let selected = engine
+ .read_records_by_keys(
+ &selection,
+ &[
+ key("GraphqlSoupChat:c"),
+ key("GraphqlSoupDocument:a"),
+ key("GraphqlSoupDocument:b"),
+ ],
+ )
+ .await
+ .unwrap();
assert_eq!(
- page.records
+ selected
.iter()
- .map(|record| record["id"].as_str().unwrap())
+ .map(|selected| selected.record["id"].as_str().unwrap())
.collect::<Vec<_>>(),
vec!["c", "a", "b"]
);
- assert!(page.next_cursor.is_none());
});
}
@@ -242,10 +302,13 @@ fn merges_optimistic_updates_with_cold_linked_bases() {
.await
.unwrap();
- let page = engine.read_records(&selection, None, 10).await.unwrap();
- assert_eq!(page.records.len(), 1);
+ let selected = engine
+ .read_records_by_keys(&selection, &[key("GraphqlSoupDocument:doc-1")])
+ .await
+ .unwrap();
+ assert_eq!(selected.len(), 1);
assert_eq!(
- page.records[0]["properties"][0],
+ selected[0].record["properties"][0],
json!({
"id": "property-1",
"propertyDefinitionId": "definition-1",
@@ -298,10 +361,13 @@ fn includes_optimistic_only_records() {
.await
.unwrap();
- let page = engine.read_records(&selection, None, 10).await.unwrap();
+ let selected = engine
+ .read_records_by_keys(&selection, &[key("GraphqlProperty:property-1")])
+ .await
+ .unwrap();
assert_eq!(
- page.records,
- vec![json!({"id": "property-1", "displayName": "Status"})]
+ selected[0].record,
+ json!({"id": "property-1", "displayName": "Status"})
);
});
}
diff --git a/crates/client/cache-core/tests/search.rs b/crates/client/cache-core/tests/search.rs
new file mode 100644
index 0000000000..e897c58404
--- /dev/null
+++ b/crates/client/cache-core/tests/search.rs
@@ -0,0 +1,362 @@
+use cache_core::engine::{BeginOptimisticWrite, Engine};
+use cache_core::search::{SearchCursor, SearchProfile, SearchRequest};
+use cache_core::store::{InMemoryStorage, Storage};
+use cache_core::value::{CacheValue, EntityKey, Record};
+use pollster::block_on;
+use serde_json::{Value as Json, json};
+
+const QUERY: &str = r#"
+query Soup($input: SoupInput!) {
+ user {
+ id
+ soup(input: $input) {
+ items {
+ __typename
+ id
+ ... on GraphqlSoupDocument { documentName: name ownerId }
+ }
+ nextCursor
+ }
+ }
+}
+"#;
+
+fn variables() -> serde_json::Map<String, Json> {
+ let Json::Object(variables) = json!({ "input": { "limit": 100 } }) else {
+ unreachable!()
+ };
+ variables
+}
+
+fn page(name: &str) -> Json {
+ json!({
+ "user": {
+ "id": "user-1",
+ "soup": {
+ "items": [{
+ "__typename": "GraphqlSoupDocument",
+ "id": "doc-1",
+ "documentName": name,
+ "ownerId": "user-1"
+ }],
+ "nextCursor": null
+ }
+ }
+ })
+}
+
+const RENAME: &str = r#"
+mutation Rename($inputs: [RenameEntityInput!]!) {
+ renameEntities(inputs: $inputs) {
+ results {
+ ... on GraphqlMutationSuccess {
+ effects {
+ ... on SoupUpdated {
+ item {
+ __typename
+ id
+ ... on GraphqlSoupDocument { documentName: name ownerId }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+"#;
+
+fn request(query: &str, limit: usize) -> SearchRequest {
+ SearchRequest {
+ profile: SearchProfile::QuickAccessV1,
+ buckets: vec!["document".into()],
+ query: query.into(),
+ cursor: None,
+ limit,
+ now_ms: 1_000,
+ }
+}
+
+#[test]
+fn text_search_loads_compact_catalog_once_and_never_scans_records() {
+ block_on(async {
+ let storage = InMemoryStorage::new();
+ let diagnostics = storage.clone();
+ let mut engine = Engine::new(storage);
+ engine
+ .write_query(
+ None,
+ QUERY,
+ Some("Soup"),
+ &variables(),
+ &page("Alpha Plan"),
+ None,
+ )
+ .await
+ .unwrap();
+ let gets_before_search = diagnostics.record_get_count();
+
+ let first = engine.search(&request("alpha", 20)).await.unwrap();
+ let second = engine.search(&request("plan", 20)).await.unwrap();
+ assert_eq!(
+ first.documents[0].record_key.as_ref(),
+ "GraphqlSoupDocument:doc-1"
+ );
+ assert_eq!(second.documents.len(), 1);
+ assert_eq!(diagnostics.search_catalog_load_count(), 1);
+ assert_eq!(diagnostics.record_get_count(), gets_before_search);
+
+ // A write-through update patches the loaded catalog incrementally.
+ engine
+ .write_query(
+ None,
+ QUERY,
+ Some("Soup"),
+ &variables(),
+ &page("Beta Plan"),
+ None,
+ )
+ .await
+ .unwrap();
+ assert!(
+ engine
+ .search(&request("alpha", 20))
+ .await
+ .unwrap()
+ .documents
+ .is_empty()
+ );
+ assert_eq!(
+ engine
+ .search(&request("beta", 20))
+ .await
+ .unwrap()
+ .documents
+ .len(),
+ 1
+ );
+ assert_eq!(diagnostics.search_catalog_load_count(), 1);
+
+ engine
+ .delete_keys(&[EntityKey::entity("GraphqlSoupDocument", &["doc-1"])])
+ .await
+ .unwrap();
+ assert!(
+ engine
+ .search(&request("beta", 20))
+ .await
+ .unwrap()
+ .documents
+ .is_empty()
+ );
+ });
+}
+
+#[test]
+fn unnamed_notes_are_browsable_without_matching_ui_fallback_text() {
+ block_on(async {
+ let mut storage = InMemoryStorage::new();
+ let entries = ["note-1", "note-2"].map(|id| {
+ let mut record = Record::default();
+ record.fields.insert(
+ "__typename".into(),
+ CacheValue::String("GraphqlSoupDocument".into()),
+ );
+ record
+ .fields
+ .insert("name".into(), CacheValue::String(String::new()));
+ record
+ .fields
+ .insert("fileType".into(), CacheValue::String("md".into()));
+ (EntityKey::entity("GraphqlSoupDocument", &[id]), record)
+ });
+ storage.put_batch(entries.into()).await.unwrap();
+ let mut engine = Engine::new(storage);
+ let mut browse = request("", 20);
+ browse.buckets = vec!["note".into()];
+
+ let page = engine.search(&browse).await.unwrap();
+ assert_eq!(
+ page.documents
+ .iter()
+ .map(|document| (document.record_key.as_ref(), document.search_text.as_str()))
+ .collect::<Vec<_>>(),
+ [
+ ("GraphqlSoupDocument:note-1", ""),
+ ("GraphqlSoupDocument:note-2", "")
+ ]
+ );
+
+ let mut text_search = request("new note", 20);
+ text_search.buckets = vec!["note".into()];
+ assert!(
+ engine
+ .search(&text_search)
+ .await
+ .unwrap()
+ .documents
+ .is_empty()
+ );
+ });
+}
+
+#[test]
+fn optimistic_records_explicitly_overlay_the_durable_search_catalog() {
+ block_on(async {
+ let mut engine = Engine::new(InMemoryStorage::new());
+ engine
+ .write_query(
+ None,
+ QUERY,
+ Some("Soup"),
+ &variables(),
+ &page("Alpha Plan"),
+ None,
+ )
+ .await
+ .unwrap();
+ assert_eq!(
+ engine
+ .search(&request("alpha", 20))
+ .await
+ .unwrap()
+ .documents
+ .len(),
+ 1
+ );
+
+ let Json::Object(rename_variables) = json!({
+ "inputs": [{
+ "entity": { "type": "DOCUMENT", "id": "doc-1" },
+ "displayName": "Beta Plan"
+ }]
+ }) else {
+ unreachable!()
+ };
+ let optimistic = json!({
+ "renameEntities": {
+ "results": [{
+ "__typename": "GraphqlMutationSuccess",
+ "effects": [{
+ "__typename": "SoupUpdated",
+ "item": {
+ "__typename": "GraphqlSoupDocument",
+ "id": "doc-1",
+ "documentName": "Beta Plan",
+ "ownerId": "user-1"
+ }
+ }]
+ }]
+ }
+ });
+ engine
+ .begin_optimistic_write(
+ None,
+ BeginOptimisticWrite {
+ query: RENAME,
+ operation_name: Some("Rename"),
+ variables: &rename_variables,
+ data: &optimistic,
+ link_patches: &[],
+ revalidations: &[],
+ created_at_ms: 1,
+ },
+ )
+ .await
+ .unwrap();
+
+ assert!(
+ engine
+ .search(&request("alpha", 20))
+ .await
+ .unwrap()
+ .documents
+ .is_empty()
+ );
+ assert_eq!(
+ engine
+ .search(&request("beta", 20))
+ .await
+ .unwrap()
+ .documents
+ .len(),
+ 1
+ );
+ });
+}
+
+#[test]
+fn in_memory_recent_browse_uses_component_wise_record_key_order() {
+ block_on(async {
+ let mut storage = InMemoryStorage::new();
+ let entries = ["Type:9", "Type0:1"].map(|key| {
+ let mut record = Record::default();
+ record.fields.insert(
+ "__typename".into(),
+ CacheValue::String("GraphqlSoupDocument".into()),
+ );
+ record
+ .fields
+ .insert("name".into(), CacheValue::String(key.into()));
+ record.fields.insert(
+ "updatedAt".into(),
+ CacheValue::Number(cache_core::value::CacheNumber::PosInt(1)),
+ );
+ (EntityKey(key.into()), record)
+ });
+ storage.put_batch(entries.into()).await.unwrap();
+
+ let first = storage
+ .browse_search_documents(SearchProfile::QuickAccessV1, "document", None, 1)
+ .await
+ .unwrap();
+ assert_eq!(first[0].record_key.as_ref(), "Type:9");
+
+ let cursor = SearchCursor {
+ timestamp_ms: first[0].timestamp_ms,
+ record_key: first[0].record_key.clone(),
+ };
+ let second = storage
+ .browse_search_documents(SearchProfile::QuickAccessV1, "document", Some(&cursor), 1)
+ .await
+ .unwrap();
+ assert_eq!(second[0].record_key.as_ref(), "Type0:1");
+ });
+}
+
+#[test]
+fn empty_query_is_bounded_and_uses_recent_projection_path() {
+ block_on(async {
+ let mut storage = InMemoryStorage::new();
+ let entries = (0..1_000)
+ .map(|index| {
+ let mut record = Record::default();
+ record.fields.insert(
+ "__typename".into(),
+ CacheValue::String("GraphqlSoupDocument".into()),
+ );
+ record.fields.insert(
+ "name".into(),
+ CacheValue::String(format!("Document {index}")),
+ );
+ record.fields.insert(
+ "updatedAt".into(),
+ CacheValue::Number(cache_core::value::CacheNumber::PosInt(index)),
+ );
+ (
+ EntityKey::entity("GraphqlSoupDocument", &[&index.to_string()]),
+ record,
+ )
+ })
+ .collect();
+ storage.put_batch(entries).await.unwrap();
+ let diagnostics = storage.clone();
+ let mut engine = Engine::new(storage);
+
+ let page = engine.search(&request("", 25)).await.unwrap();
+ assert_eq!(page.documents.len(), 25);
+ assert_eq!(page.documents[0].timestamp_ms, 999);
+ assert!(page.next_cursor.is_some());
+ assert_eq!(diagnostics.search_catalog_load_count(), 0);
+ assert_eq!(diagnostics.record_get_count(), 0);
+ });
+}
diff --git a/crates/client/cache-sqlite/src/lib.rs b/crates/client/cache-sqlite/src/lib.rs
index bfc49d5e90..dfc26befcb 100644
--- a/crates/client/cache-sqlite/src/lib.rs
+++ b/crates/client/cache-sqlite/src/lib.rs
@@ -20,13 +20,17 @@ use cache_core::queue::{
ClaimedMutation, MutationClaimRequest, MutationClaimToken, MutationId, MutationRequest,
NewQueuedMutation, PersistedOptimisticLayer, QueuedMutation, StoredMutation,
};
+use cache_core::search::{SearchCursor, SearchDocument, SearchProfile, project_search_documents};
use cache_core::store::{QueueDiagnostics, QueueDiagnosticsAvailability, Storage};
use cache_core::value::{EntityKey, Record};
-use rusqlite::{Connection, OptionalExtension, Transaction, params, params_from_iter};
+use rusqlite::{Connection, OptionalExtension, Transaction, params};
use std::path::Path;
use std::sync::{Mutex, MutexGuard};
use thiserror::Error;
+/// Version of the disposable native search projection schema.
+const NATIVE_SEARCH_SCHEMA_VERSION: u32 = 4;
+
/// Errors produced by the SQLite storage backend.
#[derive(Debug, Error)]
pub enum SqliteStorageError {
@@ -39,6 +43,9 @@ pub enum SqliteStorageError {
/// Durable queue metadata violated an invariant.
#[error("invalid mutation queue state: {0}")]
QueueInvariant(String),
+ /// A search cursor did not contain a canonical entity key.
+ #[error("invalid search cursor")]
+ InvalidSearchCursor,
}
/// [`Storage`] backend over a SQLite database (Tauri native host).
@@ -75,6 +82,20 @@ impl SqliteStorage {
key TEXT PRIMARY KEY,
value BLOB NOT NULL
);
+ CREATE TABLE IF NOT EXISTS search_documents (
+ profile TEXT NOT NULL,
+ __typename TEXT NOT NULL,
+ id TEXT NOT NULL,
+ bucket TEXT NOT NULL,
+ search_text TEXT NOT NULL,
+ timestamp_ms INTEGER NOT NULL,
+ source_hash TEXT NOT NULL,
+ PRIMARY KEY(profile, __typename, id)
+ );
+ CREATE INDEX IF NOT EXISTS search_documents_browse_idx
+ ON search_documents(
+ profile, bucket, timestamp_ms DESC, __typename ASC, id ASC
+ );
CREATE TABLE IF NOT EXISTS mutation_queue (
id INTEGER PRIMARY KEY AUTOINCREMENT,
query TEXT NOT NULL,
@@ -108,20 +129,59 @@ impl SqliteStorage {
row.get(0)
})
.optional()?;
+ let stored_search_version: Option<String> = conn
+ .query_row(
+ "SELECT v FROM meta WHERE k = 'search_schema_version'",
+ [],
+ |row| row.get(0),
+ )
+ .optional()?;
+ let expected_search_version = NATIVE_SEARCH_SCHEMA_VERSION.to_string();
+ let search_schema_changed =
+ stored_search_version.as_deref() != Some(expected_search_version.as_str());
let tx = conn.transaction()?;
+ // Existing projection schemas must be physically replaced before the
+ // version marker advances. The cache is disposable and intentionally
+ // does not backfill by scanning record blobs.
+ if stored_search_version.is_some() && search_schema_changed {
+ tx.execute_batch(
+ "DROP TABLE search_documents;
+ CREATE TABLE search_documents (
+ profile TEXT NOT NULL,
+ __typename TEXT NOT NULL,
+ id TEXT NOT NULL,
+ bucket TEXT NOT NULL,
+ search_text TEXT NOT NULL,
+ timestamp_ms INTEGER NOT NULL,
+ source_hash TEXT NOT NULL,
+ PRIMARY KEY(profile, __typename, id)
+ );
+ CREATE INDEX search_documents_browse_idx
+ ON search_documents(
+ profile, bucket, timestamp_ms DESC, __typename ASC, id ASC
+ );",
+ )?;
+ }
if stored_scope.as_deref() != Some(scope) {
// Scope changes are identity changes: queued user intent must not
// cross the boundary. `None` is the one-time upgrade from the
// pre-queue schema, where no durable mutations existed.
tx.execute("DELETE FROM optimistic_layers", [])?;
tx.execute("DELETE FROM mutation_queue", [])?;
+ tx.execute("DELETE FROM search_documents", [])?;
tx.execute("DELETE FROM records", [])?;
} else if stored_namespace.as_deref() != Some(expected_namespace.as_str()) {
// Incompatible schema/cache-format changes only invalidate
// disposable records. The queue retains source GraphQL +
// optimistic JSON so the engine can re-normalize it against the
// current schema.
+ tx.execute("DELETE FROM search_documents", [])?;
+ tx.execute("DELETE FROM records", [])?;
+ } else if search_schema_changed {
+ // The projection is derived from complete records, so a profile
+ // change discards both rather than backfilling by blob scan.
+ tx.execute("DELETE FROM search_documents", [])?;
tx.execute("DELETE FROM records", [])?;
}
tx.execute(
@@ -134,6 +194,11 @@ impl SqliteStorage {
ON CONFLICT(k) DO UPDATE SET v = excluded.v",
params![expected_namespace],
)?;
+ tx.execute(
+ "INSERT INTO meta (k, v) VALUES ('search_schema_version', ?1)
+ ON CONFLICT(k) DO UPDATE SET v = excluded.v",
+ params![expected_search_version],
+ )?;
tx.commit()?;
Ok(SqliteStorage {
@@ -154,6 +219,15 @@ impl SqliteStorage {
.query_row("SELECT COUNT(*) FROM records", [], |row| row.get(0))?)
}
+ /// Number of compact search documents.
+ pub fn search_document_count(&self) -> Result<u64, SqliteStorageError> {
+ Ok(self
+ .conn()
+ .query_row("SELECT COUNT(*) FROM search_documents", [], |row| {
+ row.get(0)
+ })?)
+ }
+
/// Number of mutations waiting for settlement.
pub fn mutation_count(&self) -> Result<u64, SqliteStorageError> {
Ok(self
@@ -205,6 +279,64 @@ fn row_stored_mutation(row: &rusqlite::Row<'_>, offset: usize) -> rusqlite::Resu
})
}
+fn entity_key_parts<'a>(key: &'a EntityKey<'_>) -> Option<(&'a str, &'a str)> {
+ key.as_ref()
+ .split_once(':')
+ .filter(|(typename, _)| !typename.is_empty())
+}
+
+fn write_search_documents(
+ tx: &Transaction<'_>,
+ entries: &[(EntityKey<'static>, Record)],
+) -> Result<(), rusqlite::Error> {
+ let mut delete =
+ tx.prepare_cached("DELETE FROM search_documents WHERE __typename = ?1 AND id = ?2")?;
+ let mut upsert = tx.prepare_cached(
+ "INSERT INTO search_documents (
+ profile, __typename, id, bucket, search_text, timestamp_ms, source_hash
+ ) VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7)
+ ON CONFLICT(profile, __typename, id) DO UPDATE SET
+ bucket = excluded.bucket,
+ search_text = excluded.search_text,
+ timestamp_ms = excluded.timestamp_ms,
+ source_hash = excluded.source_hash",
+ )?;
+ for (key, record) in entries {
+ let Some((typename, id)) = entity_key_parts(key) else {
+ continue;
+ };
+ delete.execute(params![typename, id])?;
+ for document in project_search_documents(key, record) {
+ upsert.execute(params![
+ document.profile.as_str(),
+ typename,
+ id,
+ document.bucket,
+ document.search_text,
+ document.timestamp_ms,
+ document.source_hash,
+ ])?;
+ }
+ }
+ Ok(())
+}
+
+fn row_search_document(
+ row: &rusqlite::Row<'_>,
+ profile: SearchProfile,
+) -> rusqlite::Result<SearchDocument> {
+ let typename: String = row.get(0)?;
+ let id: String = row.get(1)?;
+ Ok(SearchDocument {
+ profile,
+ record_key: EntityKey::entity(&typename, &[&id]),
+ bucket: row.get(2)?,
+ search_text: row.get(3)?,
+ timestamp_ms: row.get(4)?,
+ source_hash: row.get(5)?,
+ })
+}
+
fn claim_is_current(
tx: &Transaction<'_>,
id: i64,
@@ -257,6 +389,7 @@ impl Storage for SqliteStorage {
stmt.execute(params![key.0.as_ref(), encode_record(record)])?;
}
}
+ write_search_documents(&tx, &entries)?;
tx.commit()?;
Ok(())
}
@@ -265,54 +398,89 @@ impl Storage for SqliteStorage {
let mut conn = self.conn();
let tx = conn.transaction()?;
{
- let mut stmt = tx.prepare_cached("DELETE FROM records WHERE key = ?1")?;
+ let mut record_stmt = tx.prepare_cached("DELETE FROM records WHERE key = ?1")?;
+ let mut search_stmt = tx
+ .prepare_cached("DELETE FROM search_documents WHERE __typename = ?1 AND id = ?2")?;
for key in keys {
- stmt.execute(params![key.0.as_ref()])?;
+ record_stmt.execute(params![key.0.as_ref()])?;
+ if let Some((typename, id)) = entity_key_parts(key) {
+ search_stmt.execute(params![typename, id])?;
+ }
}
}
tx.commit()?;
Ok(())
}
- async fn scan_records(
+ async fn load_search_documents(
&self,
- type_names: &[String],
- after: Option<&EntityKey<'static>>,
- limit: usize,
- ) -> Result<Vec<(EntityKey<'static>, Record)>, Self::Error> {
- if type_names.is_empty() || limit == 0 {
- return Ok(Vec::new());
- }
-
- let mut sql = String::from("SELECT key, value FROM records WHERE ");
- let mut values = Vec::<rusqlite::types::Value>::new();
- if let Some(after) = after {
- sql.push_str("key > ? AND ");
- values.push(after.0.to_string().into());
- }
- sql.push('(');
- for (index, type_name) in type_names.iter().enumerate() {
- if index > 0 {
- sql.push_str(" OR ");
- }
- sql.push_str("(key >= ? AND key < ?)");
- values.push(format!("{type_name}:").into());
- values.push(format!("{type_name};").into());
- }
- sql.push_str(") ORDER BY key ASC LIMIT ?");
- values.push(i64::try_from(limit).unwrap_or(i64::MAX).into());
-
+ profile: SearchProfile,
+ ) -> Result<Vec<SearchDocument>, Self::Error> {
let conn = self.conn();
- let mut statement = conn.prepare(&sql)?;
- let rows = statement.query_map(params_from_iter(values.iter()), |row| {
- Ok((row.get::<_, String>(0)?, row.get::<_, Vec<u8>>(1)?))
+ let mut statement = conn.prepare_cached(
+ "SELECT __typename, id, bucket, search_text, timestamp_ms, source_hash
+ FROM search_documents WHERE profile = ?1",
+ )?;
+ let rows = statement.query_map(params![profile.as_str()], |row| {
+ row_search_document(row, profile)
})?;
- let mut records = Vec::new();
- for row in rows {
- let (key, value) = row?;
- records.push((EntityKey(key.into()), decode_record(&value)?));
+ rows.collect::<Result<Vec<_>, _>>().map_err(Into::into)
+ }
+
+ async fn browse_search_documents(
+ &self,
+ profile: SearchProfile,
+ bucket: &str,
+ after: Option<&SearchCursor>,
+ limit: usize,
+ ) -> Result<Vec<SearchDocument>, Self::Error> {
+ let conn = self.conn();
+ let limit = i64::try_from(limit).unwrap_or(i64::MAX);
+ let mut documents = Vec::new();
+ if let Some(cursor) = after {
+ let (cursor_typename, cursor_id) = entity_key_parts(&cursor.record_key)
+ .ok_or(SqliteStorageError::InvalidSearchCursor)?;
+ let mut statement = conn.prepare_cached(
+ "SELECT __typename, id, bucket, search_text, timestamp_ms, source_hash
+ FROM search_documents
+ WHERE profile = ?1 AND bucket = ?2
+ AND (
+ timestamp_ms < ?3
+ OR (timestamp_ms = ?3 AND (
+ __typename > ?4 OR (__typename = ?4 AND id > ?5)
+ ))
+ )
+ ORDER BY timestamp_ms DESC, __typename ASC, id ASC LIMIT ?6",
+ )?;
+ let rows = statement.query_map(
+ params![
+ profile.as_str(),
+ bucket,
+ cursor.timestamp_ms,
+ cursor_typename,
+ cursor_id,
+ limit
+ ],
+ |row| row_search_document(row, profile),
+ )?;
+ for row in rows {
+ documents.push(row?);
+ }
+ } else {
+ let mut statement = conn.prepare_cached(
+ "SELECT __typename, id, bucket, search_text, timestamp_ms, source_hash
+ FROM search_documents
+ WHERE profile = ?1 AND bucket = ?2
+ ORDER BY timestamp_ms DESC, __typename ASC, id ASC LIMIT ?3",
+ )?;
+ let rows = statement.query_map(params![profile.as_str(), bucket, limit], |row| {
+ row_search_document(row, profile)
+ })?;
+ for row in rows {
+ documents.push(row?);
+ }
}
- Ok(records)
+ Ok(documents)
}
async fn enqueue_mutation(
@@ -542,6 +710,7 @@ impl Storage for SqliteStorage {
stmt.execute(params![key.0.as_ref(), encode_record(record)])?;
}
}
+ write_search_documents(&tx, &entries)?;
tx.execute("DELETE FROM mutation_queue WHERE id = ?1", params![sql_id])?;
tx.commit()?;
Ok(true)
@@ -569,6 +738,7 @@ impl Storage for SqliteStorage {
let tx = conn.transaction()?;
tx.execute("DELETE FROM optimistic_layers", [])?;
tx.execute("DELETE FROM mutation_queue", [])?;
+ tx.execute("DELETE FROM search_documents", [])?;
tx.execute("DELETE FROM records", [])?;
tx.commit()?;
Ok(())
@@ -621,6 +791,161 @@ mod tests {
});
}
+ #[test]
+ fn search_projection_is_write_through_and_browse_uses_covering_order_index() {
+ block_on(async {
+ let mut storage = SqliteStorage::open_in_memory("search").unwrap();
+ let mut document = Record::default();
+ document.fields.insert(
+ "__typename".into(),
+ CacheValue::String("GraphqlSoupDocument".into()),
+ );
+ document
+ .fields
+ .insert("name".into(), CacheValue::String("Quarterly Plan".into()));
+ document.fields.insert(
+ "updatedAt".into(),
+ CacheValue::Number(cache_core::value::CacheNumber::PosInt(123)),
+ );
+ storage
+ .put_batch(vec![
+ (key("GraphqlSoupDocument:d1"), document.clone()),
+ (key("GraphqlSoupDocument:d2"), document),
+ ])
+ .await
+ .unwrap();
+
+ let columns = {
+ let conn = storage.conn();
+ let mut statement = conn
+ .prepare("PRAGMA table_info('search_documents')")
+ .unwrap();
+ statement
+ .query_map([], |row| row.get::<_, String>(1))
+ .unwrap()
+ .collect::<Result<Vec<_>, _>>()
+ .unwrap()
+ };
+ assert_eq!(
+ columns,
+ [
+ "profile",
+ "__typename",
+ "id",
+ "bucket",
+ "search_text",
+ "timestamp_ms",
+ "source_hash",
+ ]
+ );
+
+ let loaded = storage
+ .load_search_documents(SearchProfile::QuickAccessV1)
+ .await
+ .unwrap();
+ assert_eq!(loaded.len(), 2);
+ assert!(
+ loaded
+ .iter()
+ .all(|document| document.search_text == "quarterly plan")
+ );
+ let first = storage
+ .browse_search_documents(SearchProfile::QuickAccessV1, "document", None, 1)
+ .await
+ .unwrap();
+ assert_eq!(first[0].record_key.as_ref(), "GraphqlSoupDocument:d1");
+ let cursor = SearchCursor {
+ timestamp_ms: first[0].timestamp_ms,
+ record_key: first[0].record_key.clone(),
+ };
+ let second = storage
+ .browse_search_documents(SearchProfile::QuickAccessV1, "document", Some(&cursor), 1)
+ .await
+ .unwrap();
+ assert_eq!(second[0].record_key.as_ref(), "GraphqlSoupDocument:d2");
+
+ let details = {
+ let conn = storage.conn();
+ let mut plan = conn
+ .prepare(
+ "EXPLAIN QUERY PLAN SELECT __typename, id, bucket, search_text, timestamp_ms, source_hash FROM search_documents WHERE profile = 'quick-access-v1' AND bucket = 'document' ORDER BY timestamp_ms DESC, __typename ASC, id ASC LIMIT 25",
+ )
+ .unwrap();
+ plan.query_map([], |row| row.get::<_, String>(3))
+ .unwrap()
+ .collect::<Result<Vec<_>, _>>()
+ .unwrap()
+ .join(" ")
+ };
+ assert!(
+ details.contains("search_documents_browse_idx"),
+ "browse query did not use projection index: {details}"
+ );
+ assert!(!details.contains("records"));
+
+ storage
+ .delete_batch(&[key("GraphqlSoupDocument:d2")])
+ .await
+ .unwrap();
+ // Replacing the same base key with an unsearchable record deletes
+ // the stale derived row in the same transaction.
+ storage
+ .put_batch(vec![(key("GraphqlSoupDocument:d1"), Record::default())])
+ .await
+ .unwrap();
+ assert_eq!(storage.search_document_count().unwrap(), 0);
+ });
+ }
+
+ #[test]
+ fn previous_search_schema_is_replaced_without_blob_backfill() {
+ let file = tempfile::NamedTempFile::new().unwrap();
+ let path = file.path();
+ {
+ let storage = SqliteStorage::open(path, "search-upgrade").unwrap();
+ let conn = storage.conn();
+ conn.execute_batch(
+ "DROP TABLE search_documents;
+ CREATE TABLE search_documents (
+ profile TEXT NOT NULL,
+ __typename TEXT NOT NULL,
+ id TEXT NOT NULL,
+ entity_type TEXT NOT NULL,
+ bucket TEXT NOT NULL,
+ search_text TEXT NOT NULL,
+ timestamp_ms INTEGER NOT NULL,
+ source_hash TEXT NOT NULL,
+ PRIMARY KEY(profile, __typename, id)
+ );
+ CREATE INDEX search_documents_browse_idx
+ ON search_documents(
+ profile, bucket, timestamp_ms DESC, __typename ASC, id ASC
+ );
+ UPDATE meta SET v = '2' WHERE k = 'search_schema_version';
+ INSERT INTO records(key, value) VALUES ('Thing:stale', X'00');",
+ )
+ .unwrap();
+ }
+
+ let storage = SqliteStorage::open(path, "search-upgrade").unwrap();
+ assert_eq!(storage.record_count().unwrap(), 0);
+ let columns = {
+ let conn = storage.conn();
+ let mut statement = conn
+ .prepare("PRAGMA table_info('search_documents')")
+ .unwrap();
+ statement
+ .query_map([], |row| row.get::<_, String>(1))
+ .unwrap()
+ .collect::<Result<Vec<_>, _>>()
+ .unwrap()
+ };
+ assert!(columns.iter().all(|column| column != "record_key"));
+ assert!(columns.iter().all(|column| column != "entity_type"));
+ assert!(columns.iter().any(|column| column == "__typename"));
+ assert!(columns.iter().any(|column| column == "id"));
+ }
+
#[test]
fn queue_diagnostics_return_only_depth_and_oldest_timestamp() {
block_on(async {
@@ -690,45 +1015,6 @@ mod tests {
});
}
- #[test]
- fn scans_selected_record_types_in_key_order() {
- block_on(async {
- let mut storage = SqliteStorage::open_in_memory("user-1").unwrap();
- storage
- .put_batch(vec![
- (key("TypeB:2"), record("b2")),
- (key("Other:1"), record("other")),
- (key("TypeA:2"), record("a2")),
- (key("TypeA:1"), record("a1")),
- ])
- .await
- .unwrap();
-
- let first = storage
- .scan_records(&["TypeB".into(), "TypeA".into()], None, 2)
- .await
- .unwrap();
- assert_eq!(
- first
- .iter()
- .map(|(key, _)| key.0.as_ref())
- .collect::<Vec<_>>(),
- vec!["TypeA:1", "TypeA:2"]
- );
- let second = storage
- .scan_records(&["TypeA".into(), "TypeB".into()], Some(&first[1].0), 2)
- .await
- .unwrap();
- assert_eq!(
- second
- .iter()
- .map(|(key, _)| key.0.as_ref())
- .collect::<Vec<_>>(),
- vec!["TypeB:2"]
- );
- });
- }
-
#[test]
fn persists_across_reopen_same_namespace() {
block_on(async {
diff --git a/crates/client/cache-turso/src/storage.rs b/crates/client/cache-turso/src/storage.rs
index b0a1091e29..c25688457b 100644
--- a/crates/client/cache-turso/src/storage.rs
+++ b/crates/client/cache-turso/src/storage.rs
@@ -8,6 +8,7 @@ use cache_core::queue::{
ClaimedMutation, MutationClaimRequest, MutationClaimToken, MutationId, MutationRequest,
NewQueuedMutation, PersistedOptimisticLayer, QueuedMutation, StoredMutation,
};
+use cache_core::search::{SearchCursor, SearchDocument, SearchProfile, project_search_documents};
use cache_core::store::{QueueDiagnostics, QueueDiagnosticsAvailability, Storage};
use cache_core::value::{EntityKey, Record};
use std::sync::Arc;
@@ -27,7 +28,7 @@ use turso_opfs::{
};
/// Frozen browser-storage schema version, independent of cache postcard versions.
-pub const BROWSER_STORAGE_SCHEMA_VERSION: u32 = 2;
+pub const BROWSER_STORAGE_SCHEMA_VERSION: u32 = 6;
/// Coarse outcome of validating an OPFS Turso session.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
@@ -38,9 +39,11 @@ pub enum TursoStorageOpenOutcome {
OpenedNew,
}
-const CREATE_SCHEMA: [&str; 5] = [
+const CREATE_SCHEMA: [&str; 7] = [
"CREATE TABLE meta (key TEXT PRIMARY KEY, value TEXT NOT NULL)",
"CREATE TABLE records (__typename TEXT NOT NULL, id TEXT NOT NULL, value BLOB NOT NULL, PRIMARY KEY (__typename, id))",
+ "CREATE TABLE search_documents (profile TEXT NOT NULL, __typename TEXT NOT NULL, id TEXT NOT NULL, bucket TEXT NOT NULL, search_text TEXT NOT NULL, timestamp_ms INTEGER NOT NULL, source_hash TEXT NOT NULL, PRIMARY KEY (profile, __typename, id))",
+ "CREATE INDEX search_documents_browse_idx ON search_documents(profile, bucket, timestamp_ms DESC, __typename, id)",
"CREATE TABLE mutation_queue (id INTEGER PRIMARY KEY AUTOINCREMENT, query TEXT NOT NULL, operation_name TEXT, variables_json TEXT NOT NULL, identity TEXT, attempt_count INTEGER NOT NULL DEFAULT 0, next_attempt_at_ms INTEGER, lease_owner TEXT, lease_generation INTEGER NOT NULL DEFAULT 0, lease_expires_at_ms INTEGER, last_error TEXT, created_at_ms INTEGER NOT NULL)",
"CREATE INDEX mutation_queue_created_at_ms_idx ON mutation_queue(created_at_ms)",
"CREATE TABLE optimistic_layers (mutation_id INTEGER PRIMARY KEY, optimistic_data_json TEXT NOT NULL, normalized_updates BLOB NOT NULL, FOREIGN KEY (mutation_id) REFERENCES mutation_queue(id) ON DELETE CASCADE)",
@@ -48,6 +51,11 @@ const CREATE_SCHEMA: [&str; 5] = [
const RECORD_GET: &str = "SELECT value FROM records WHERE __typename = ?1 AND id = ?2";
const RECORD_UPSERT: &str = "INSERT INTO records (__typename, id, value) VALUES (?1, ?2, ?3) ON CONFLICT (__typename, id) DO UPDATE SET value = excluded.value";
const RECORD_DELETE: &str = "DELETE FROM records WHERE __typename = ?1 AND id = ?2";
+const SEARCH_DELETE: &str = "DELETE FROM search_documents WHERE __typename = ?1 AND id = ?2";
+const SEARCH_UPSERT: &str = "INSERT INTO search_documents (profile, __typename, id, bucket, search_text, timestamp_ms, source_hash) VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7) ON CONFLICT (profile, __typename, id) DO UPDATE SET bucket = excluded.bucket, search_text = excluded.search_text, timestamp_ms = excluded.timestamp_ms, source_hash = excluded.source_hash";
+const SEARCH_LOAD: &str = "SELECT __typename, id, bucket, search_text, timestamp_ms, source_hash FROM search_documents WHERE profile = ?1";
+const SEARCH_BROWSE: &str = "SELECT __typename, id, bucket, search_text, timestamp_ms, source_hash FROM search_documents INDEXED BY search_documents_browse_idx WHERE profile = ?1 AND bucket = ?2 ORDER BY timestamp_ms DESC, __typename ASC, id ASC LIMIT ?3";
+const SEARCH_BROWSE_AFTER: &str = "SELECT __typename, id, bucket, search_text, timestamp_ms, source_hash FROM search_documents INDEXED BY search_documents_browse_idx WHERE profile = ?1 AND bucket = ?2 AND (timestamp_ms < ?3 OR (timestamp_ms = ?3 AND (__typename > ?4 OR (__typename = ?4 AND id > ?5)))) ORDER BY timestamp_ms DESC, __typename ASC, id ASC LIMIT ?6";
const QUEUE_INSERT: &str = "INSERT INTO mutation_queue (query, operation_name, variables_json, identity, attempt_count, next_attempt_at_ms, lease_owner, lease_generation, lease_expires_at_ms, last_error, created_at_ms) VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11)";
const LAYER_INSERT: &str = "INSERT INTO optimistic_layers (mutation_id, optimistic_data_json, normalized_updates) VALUES (?1, ?2, ?3)";
const QUEUE_SELECT: &str = "SELECT m.id, m.query, m.operation_name, m.variables_json, m.identity, m.attempt_count, m.next_attempt_at_ms, m.lease_owner, m.lease_generation, m.lease_expires_at_ms, m.last_error, m.created_at_ms, o.optimistic_data_json, o.normalized_updates FROM mutation_queue AS m LEFT JOIN optimistic_layers AS o ON o.mutation_id = m.id ORDER BY m.id ASC";
@@ -645,7 +653,7 @@ impl Storage for TursoStorage {
require_changed(changed, 1)?;
self.fault_after(TestFaultSite::Put, index)?;
}
- Ok(())
+ write_search_documents(&connection, &entries)
})
})();
self.latch_result(result)
@@ -663,15 +671,23 @@ impl Storage for TursoStorage {
}
let connection = self.connection();
driver::write_transaction(&connection, || {
- let mut statement = driver::prepare(&connection, RECORD_DELETE)?;
+ let mut record_statement = driver::prepare(&connection, RECORD_DELETE)?;
+ let mut search_statement = driver::prepare(&connection, SEARCH_DELETE)?;
for (index, key) in keys.iter().enumerate() {
let changed = driver::execute_prepared(
- &mut statement,
+ &mut record_statement,
vec![text(&key.typename), text(&key.id)],
)?;
if !(0..=1).contains(&changed) {
return Err(invariant());
}
+ let search_changed = driver::execute_prepared(
+ &mut search_statement,
+ vec![text(&key.typename), text(&key.id)],
+ )?;
+ if search_changed < 0 {
+ return Err(invariant());
+ }
self.fault_after(TestFaultSite::Delete, index)?;
}
Ok(())
@@ -680,63 +696,60 @@ impl Storage for TursoStorage {
self.latch_result(result)
}
- async fn scan_records(
+ async fn load_search_documents(
&self,
- type_names: &[String],
- after: Option<&EntityKey<'static>>,
+ profile: SearchProfile,
+ ) -> Result<Vec<SearchDocument>, Self::Error> {
+ self.require_healthy()?;
+ let result = {
+ let connection = self.connection();
+ driver::query(&connection, SEARCH_LOAD, vec![text(profile.as_str())]).and_then(|rows| {
+ rows.into_iter()
+ .map(|row| parse_search_document(&row, profile))
+ .collect()
+ })
+ };
+ self.latch_result(result)
+ }
+
+ async fn browse_search_documents(
+ &self,
+ profile: SearchProfile,
+ bucket: &str,
+ after: Option<&SearchCursor>,
limit: usize,
- ) -> Result<Vec<(EntityKey<'static>, Record)>, Self::Error> {
+ ) -> Result<Vec<SearchDocument>, Self::Error> {
self.require_healthy()?;
let result = (|| {
- if type_names.is_empty() || limit == 0 {
+ if limit == 0 {
return Ok(Vec::new());
}
- let mut type_names = type_names.to_vec();
- type_names.sort();
- type_names.dedup();
- let after = after
- .map(|key| RecordKey::from_entity(key).map(|_| key.as_ref().to_owned()))
- .transpose()?;
let limit = i64::try_from(limit).map_err(|_| TursoStorageError::InvalidInput)?;
-
- let mut sql =
- String::from("SELECT __typename, id, value FROM records WHERE __typename IN (");
- for index in 0..type_names.len() {
- if index != 0 {
- sql.push_str(", ");
- }
- sql.push('?');
- sql.push_str(&(index + 1).to_string());
- }
- sql.push_str(") AND NOT (__typename = 'ROOT_QUERY' AND id = '')");
- let mut values = type_names
- .iter()
- .map(|value| text(value))
- .collect::<Vec<_>>();
- if let Some(after) = after {
- let cursor_index = values.len() + 1;
- sql.push_str(" AND ((__typename || ':' || id) COLLATE BINARY) > ?");
- sql.push_str(&cursor_index.to_string());
- values.push(text(&after));
- }
- let limit_index = values.len() + 1;
- sql.push_str(" ORDER BY (__typename || ':' || id) COLLATE BINARY ASC LIMIT ?");
- sql.push_str(&limit_index.to_string());
- values.push(Value::from_i64(limit));
-
let connection = self.connection();
- let rows = driver::query(&connection, &sql, values)?;
+ let rows = match after {
+ Some(cursor) => {
+ let cursor_key = RecordKey::from_entity(&cursor.record_key)?;
+ driver::query(
+ &connection,
+ SEARCH_BROWSE_AFTER,
+ vec![
+ text(profile.as_str()),
+ text(bucket),
+ Value::from_i64(cursor.timestamp_ms),
+ text(&cursor_key.typename),
+ text(&cursor_key.id),
+ Value::from_i64(limit),
+ ],
+ )?
+ }
+ None => driver::query(
+ &connection,
+ SEARCH_BROWSE,
+ vec![text(profile.as_str()), text(bucket), Value::from_i64(limit)],
+ )?,
+ };
rows.into_iter()
- .map(|row| {
- let key = RecordKey {
- typename: required_text(&row, 0)?,
- id: required_text(&row, 1)?,
- }
- .into_entity()?;
- let record = decode_record(&required_blob(&row, 2)?)
- .map_err(|_| TursoStorageError::reset(PhysicalResetReason::Codec))?;
- Ok((key, record))
- })
+ .map(|row| parse_search_document(&row, profile))
.collect()
})();
self.latch_result(result)
@@ -957,6 +970,7 @@ impl Storage for TursoStorage {
self.fault_after(TestFaultSite::Complete, index)?;
}
}
+ write_search_documents(&connection, &entries)?;
require_changed(
driver::execute(
&connection,
@@ -1010,6 +1024,7 @@ impl Storage for TursoStorage {
self.fault_after(TestFaultSite::Clear, 0)?;
driver::execute(&connection, "DELETE FROM mutation_queue", Vec::new())?;
self.fault_after(TestFaultSite::Clear, 1)?;
+ driver::execute(&connection, "DELETE FROM search_documents", Vec::new())?;
driver::execute(&connection, "DELETE FROM records", Vec::new())?;
self.fault_after(TestFaultSite::Clear, 2)?;
Ok(())
@@ -1085,6 +1100,11 @@ fn initialize(
RECORD_GET,
RECORD_UPSERT,
RECORD_DELETE,
+ SEARCH_DELETE,
+ SEARCH_UPSERT,
+ SEARCH_LOAD,
+ SEARCH_BROWSE,
+ SEARCH_BROWSE_AFTER,
QUEUE_INSERT,
LAYER_INSERT,
QUEUE_SELECT,
@@ -1159,6 +1179,58 @@ const RECORD_COLUMNS: &[ColumnSpec] = &[
},
];
+const SEARCH_COLUMNS: &[ColumnSpec] = &[
+ ColumnSpec {
+ name: "profile",
+ declared_type: "TEXT",
+ not_null: true,
+ default_zero: false,
+ primary_key_position: 1,
+ },
+ ColumnSpec {
+ name: "__typename",
+ declared_type: "TEXT",
+ not_null: true,
+ default_zero: false,
+ primary_key_position: 2,
+ },
+ ColumnSpec {
+ name: "id",
+ declared_type: "TEXT",
+ not_null: true,
+ default_zero: false,
+ primary_key_position: 3,
+ },
+ ColumnSpec {
+ name: "bucket",
+ declared_type: "TEXT",
+ not_null: true,
+ default_zero: false,
+ primary_key_position: 0,
+ },
+ ColumnSpec {
+ name: "search_text",
+ declared_type: "TEXT",
+ not_null: true,
+ default_zero: false,
+ primary_key_position: 0,
+ },
+ ColumnSpec {
+ name: "timestamp_ms",
+ declared_type: "INTEGER",
+ not_null: true,
+ default_zero: false,
+ primary_key_position: 0,
+ },
+ ColumnSpec {
+ name: "source_hash",
+ declared_type: "TEXT",
+ not_null: true,
+ default_zero: false,
+ primary_key_position: 0,
+ },
+];
+
const MUTATION_COLUMNS: &[ColumnSpec] = &[
ColumnSpec {
name: "id",
@@ -1274,18 +1346,22 @@ fn validate_frozen_schema(connection: &Arc<Connection>) -> Result<(), TursoStora
validate_allowed_schema_objects(connection)?;
validate_table_columns(connection, "meta", META_COLUMNS)?;
validate_table_columns(connection, "records", RECORD_COLUMNS)?;
+ validate_table_columns(connection, "search_documents", SEARCH_COLUMNS)?;
validate_table_columns(connection, "mutation_queue", MUTATION_COLUMNS)?;
validate_table_columns(connection, "optimistic_layers", OPTIMISTIC_COLUMNS)?;
validate_table_indexes(connection, "meta", &[(0, "key")])?;
validate_table_indexes(connection, "records", &[(0, "__typename"), (1, "id")])?;
+ validate_search_indexes(connection)?;
validate_mutation_queue_indexes(connection)?;
validate_table_indexes(connection, "optimistic_layers", &[])?;
validate_table_constraints(connection, "meta", false)?;
validate_table_constraints(connection, "records", false)?;
+ validate_table_constraints(connection, "search_documents", false)?;
validate_table_constraints(connection, "mutation_queue", true)?;
validate_table_constraints(connection, "optimistic_layers", false)?;
validate_no_foreign_keys(connection, "meta")?;
validate_no_foreign_keys(connection, "records")?;
+ validate_no_foreign_keys(connection, "search_documents")?;
validate_no_foreign_keys(connection, "mutation_queue")?;
validate_optimistic_foreign_key(connection)
}
@@ -1301,10 +1377,17 @@ fn validate_allowed_schema_objects(connection: &Arc<Connection>) -> Result<(), T
Vec::new(),
)
.map_err(TursoStorageError::initialization)?;
- let expected = ["meta", "mutation_queue", "optimistic_layers", "records"];
+ let expected = [
+ "meta",
+ "mutation_queue",
+ "optimistic_layers",
+ "records",
+ "search_documents",
+ ];
let support = [SQLITE_SEQUENCE_TABLE, TURSO_AUTOINCREMENT_TABLE];
- let mut seen = [false; 4];
+ let mut seen = [false; 5];
let mut diagnostics_index_seen = false;
+ let mut search_index_seen = false;
let mut support_seen = [false; 2];
for row in rows {
if row.len() != 3 {
@@ -1325,6 +1408,16 @@ fn validate_allowed_schema_objects(connection: &Arc<Connection>) -> Result<(), T
if object_type == "index" && matches!(row.get(2), Some(Value::Null)) {
continue;
}
+ if name == "search_documents_browse_idx" {
+ if object_type != "index"
+ || !matches!(row.get(2), Some(Value::Text(_)))
+ || search_index_seen
+ {
+ return Err(compatibility());
+ }
+ search_index_seen = true;
+ continue;
+ }
if name == "mutation_queue_created_at_ms_idx" {
if object_type != "index"
|| required_text(&row, 2).ok().as_deref()
@@ -1353,6 +1446,7 @@ fn validate_allowed_schema_objects(connection: &Arc<Connection>) -> Result<(), T
}
if seen.into_iter().all(|present| present)
&& diagnostics_index_seen
+ && search_index_seen
&& support_seen.into_iter().all(|present| present)
{
Ok(())
@@ -1471,6 +1565,81 @@ fn default_matches(value: Option<&Value>, expected_zero: bool) -> bool {
}
}
+fn validate_search_indexes(connection: &Arc<Connection>) -> Result<(), TursoStorageError> {
+ let rows = driver::query(
+ connection,
+ "PRAGMA index_list('search_documents')",
+ Vec::new(),
+ )
+ .map_err(TursoStorageError::initialization)?;
+ if rows.len() != 2 {
+ return Err(compatibility());
+ }
+ let browse = rows
+ .iter()
+ .find(|row| required_text(row, 1).ok().as_deref() == Some("search_documents_browse_idx"))
+ .ok_or_else(compatibility)?;
+ if browse.len() != 5
+ || required_i64(browse, 2).ok() != Some(0)
+ || required_text(browse, 3).ok().as_deref() != Some("c")
+ || required_i64(browse, 4).ok() != Some(0)
+ {
+ return Err(compatibility());
+ }
+ let primary = rows
+ .iter()
+ .find(|row| required_text(row, 3).ok().as_deref() == Some("pk"))
+ .ok_or_else(compatibility)?;
+ if primary.len() != 5
+ || required_i64(primary, 2).ok() != Some(1)
+ || required_i64(primary, 4).ok() != Some(0)
+ {
+ return Err(compatibility());
+ }
+
+ let index_rows = driver::query(
+ connection,
+ "PRAGMA index_xinfo('search_documents_browse_idx')",
+ Vec::new(),
+ )
+ .map_err(TursoStorageError::initialization)?;
+ let expected = [
+ (0, "profile", 0, 1),
+ (3, "bucket", 0, 1),
+ (5, "timestamp_ms", 1, 1),
+ (1, "__typename", 0, 1),
+ (2, "id", 0, 1),
+ ];
+ if index_rows.len() != expected.len() + 1 {
+ return Err(compatibility());
+ }
+ for (sequence, (row, (column, name, descending, key))) in
+ index_rows.iter().zip(expected).enumerate()
+ {
+ if row.len() != 6
+ || required_i64(row, 0).ok() != i64::try_from(sequence).ok()
+ || required_i64(row, 1).ok() != Some(column)
+ || required_text(row, 2).ok().as_deref() != Some(name)
+ || required_i64(row, 3).ok() != Some(descending)
+ || required_text(row, 4).ok().as_deref() != Some("BINARY")
+ || required_i64(row, 5).ok() != Some(key)
+ {
+ return Err(compatibility());
+ }
+ }
+ let rowid = index_rows.last().ok_or_else(compatibility)?;
+ if rowid.len() != 6
+ || required_i64(rowid, 0).ok() != Some(expected.len() as i64)
+ || required_i64(rowid, 1).ok() != Some(-1)
+ || required_i64(rowid, 3).ok() != Some(0)
+ || required_text(rowid, 4).ok().as_deref() != Some("BINARY")
+ || required_i64(rowid, 5).ok() != Some(0)
+ {
+ return Err(compatibility());
+ }
+ Ok(())
+}
+
fn validate_mutation_queue_indexes(connection: &Arc<Connection>) -> Result<(), TursoStorageError> {
let rows = driver::query(
connection,
@@ -1839,6 +2008,7 @@ fn validate_queue_consistency(connection: &Arc<Connection>) -> Result<(), TursoS
struct EncodedRecord {
key: RecordKey,
value: Vec<u8>,
+ search_documents: Vec<SearchDocument>,
}
fn prepare_records(
@@ -1850,11 +2020,69 @@ fn prepare_records(
Ok(EncodedRecord {
key: RecordKey::from_entity(&key)?,
value: encode_record(&record),
+ search_documents: project_search_documents(&key, &record),
})
})
.collect()
}
+fn write_search_documents(
+ connection: &Arc<Connection>,
+ entries: &[EncodedRecord],
+) -> Result<(), TursoStorageError> {
+ let mut delete = driver::prepare(connection, SEARCH_DELETE)?;
+ let mut upsert = driver::prepare(connection, SEARCH_UPSERT)?;
+ for entry in entries {
+ let changed = driver::execute_prepared(
+ &mut delete,
+ vec![text(&entry.key.typename), text(&entry.key.id)],
+ )?;
+ if changed < 0 {
+ return Err(invariant());
+ }
+ for document in &entry.search_documents {
+ require_changed(
+ driver::execute_prepared(
+ &mut upsert,
+ vec![
+ text(document.profile.as_str()),
+ text(&entry.key.typename),
+ text(&entry.key.id),
+ text(&document.bucket),
+ text(&document.search_text),
+ Value::from_i64(document.timestamp_ms),
+ text(&document.source_hash),
+ ],
+ )?,
+ 1,
+ )?;
+ }
+ }
+ Ok(())
+}
+
+fn parse_search_document(
+ row: &[Value],
+ profile: SearchProfile,
+) -> Result<SearchDocument, TursoStorageError> {
+ if row.len() != 6 {
+ return Err(invariant());
+ }
+ let key = RecordKey {
+ typename: required_text(row, 0)?,
+ id: required_text(row, 1)?,
+ }
+ .into_entity()?;
+ Ok(SearchDocument {
+ profile,
+ record_key: key,
+ bucket: required_text(row, 2)?,
+ search_text: required_text(row, 3)?,
+ timestamp_ms: required_i64(row, 4)?,
+ source_hash: required_text(row, 5)?,
+ })
+}
+
fn mutation_values(mutation: &StoredMutation) -> Result<Vec<Value>, TursoStorageError> {
Ok(vec![
text(&mutation.request.query),
diff --git a/crates/client/cache-turso/src/storage/test.rs b/crates/client/cache-turso/src/storage/test.rs
index bfa2449309..ac0b20d8d2 100644
--- a/crates/client/cache-turso/src/storage/test.rs
+++ b/crates/client/cache-turso/src/storage/test.rs
@@ -74,10 +74,6 @@ async fn expect_every_storage_method_latched(
expected,
);
expect_reset_reason(storage.delete_batch(&[key("Thing:1")]).await, expected);
- expect_reset_reason(
- storage.scan_records(&["Thing".into()], None, 1).await,
- expected,
- );
expect_reset_reason(storage.enqueue_mutation(queued("Blocked")).await, expected);
expect_reset_reason(storage.load_mutation_queue().await, expected);
expect_reset_reason(storage.queue_diagnostics().await, expected);
@@ -110,6 +106,117 @@ async fn expect_every_storage_method_latched(
expect_reset_reason(storage.clear().await, expected);
}
+#[test]
+fn search_projection_is_write_through_and_recent_query_uses_projection_index() {
+ block_on(async {
+ let mut storage = TursoStorage::open_in_memory("search-projection").unwrap();
+ let mut document = Record::default();
+ document.fields.insert(
+ "__typename".into(),
+ cache_core::value::CacheValue::String("GraphqlSoupDocument".into()),
+ );
+ document.fields.insert(
+ "name".into(),
+ cache_core::value::CacheValue::String("Quarterly Plan".into()),
+ );
+ document.fields.insert(
+ "updatedAt".into(),
+ cache_core::value::CacheValue::Number(cache_core::value::CacheNumber::PosInt(123)),
+ );
+ storage
+ .put_batch(vec![
+ (key("GraphqlSoupDocument:d1"), document.clone()),
+ (key("GraphqlSoupDocument:d2"), document),
+ ])
+ .await
+ .unwrap();
+
+ let columns = driver::query(
+ &storage.connection(),
+ "PRAGMA table_info('search_documents')",
+ Vec::new(),
+ )
+ .unwrap()
+ .into_iter()
+ .map(|row| required_text(&row, 1).unwrap())
+ .collect::<Vec<_>>();
+ assert_eq!(
+ columns,
+ [
+ "profile",
+ "__typename",
+ "id",
+ "bucket",
+ "search_text",
+ "timestamp_ms",
+ "source_hash",
+ ]
+ );
+
+ let loaded = storage
+ .load_search_documents(SearchProfile::QuickAccessV1)
+ .await
+ .unwrap();
+ assert_eq!(loaded.len(), 2);
+ assert!(
+ loaded
+ .iter()
+ .all(|document| document.search_text == "quarterly plan")
+ );
+ let first = storage
+ .browse_search_documents(SearchProfile::QuickAccessV1, "document", None, 1)
+ .await
+ .unwrap();
+ assert_eq!(first[0].record_key.as_ref(), "GraphqlSoupDocument:d1");
+ let cursor = SearchCursor {
+ timestamp_ms: first[0].timestamp_ms,
+ record_key: first[0].record_key.clone(),
+ };
+ let second = storage
+ .browse_search_documents(SearchProfile::QuickAccessV1, "document", Some(&cursor), 1)
+ .await
+ .unwrap();
+ assert_eq!(second[0].record_key.as_ref(), "GraphqlSoupDocument:d2");
+
+ let plan = driver::query(
+ &storage.connection(),
+ &format!("EXPLAIN QUERY PLAN {SEARCH_BROWSE}"),
+ vec![
+ text("quick-access-v1"),
+ text("document"),
+ Value::from_i64(25),
+ ],
+ )
+ .unwrap();
+ let details = plan
+ .iter()
+ .filter_map(|row| required_text(row, 3).ok())
+ .collect::<Vec<_>>()
+ .join(" ");
+ assert!(
+ details.contains("search_documents_browse_idx"),
+ "browse query did not use projection index: {details}"
+ );
+ assert!(!details.contains("records"));
+
+ storage
+ .delete_batch(&[key("GraphqlSoupDocument:d2")])
+ .await
+ .unwrap();
+ storage
+ .put_batch(vec![(key("GraphqlSoupDocument:d1"), record("internal"))])
+ .await
+ .unwrap();
+ assert!(
+ storage
+ .load_search_documents(SearchProfile::QuickAccessV1)
+ .await
+ .unwrap()
+ .is_empty()
+ );
+ });
+}
+
#[test]
fn queue_diagnostics_use_one_payload_free_aggregate_query() {
block_on(async {
@@ -298,6 +405,8 @@ fn every_metadata_mismatch_and_missing_schema_requests_physical_reset() {
"queue-diagnostics-index",
"DROP INDEX mutation_queue_created_at_ms_idx",
),
+ ("search-table", "DROP TABLE search_documents"),
+ ("search-index", "DROP INDEX search_documents_browse_idx"),
] {
let database = TursoMemoryDatabase::new(format!("mismatch-{name}.db"));
let storage = database.open("scope").unwrap();
@@ -496,13 +605,28 @@ fn every_malformed_frozen_schema_constraint_requests_reset_on_reopen() {
"CREATE TABLE records (__typename TEXT NOT NULL, id TEXT COLLATE NOCASE NOT NULL, value BLOB NOT NULL, PRIMARY KEY (__typename, id))",
],
),
+ (
+ "search-extra-column",
+ vec![
+ "DROP TABLE search_documents",
+ "CREATE TABLE search_documents (profile TEXT NOT NULL, __typename TEXT NOT NULL, id TEXT NOT NULL, bucket TEXT NOT NULL, search_text TEXT NOT NULL, timestamp_ms INTEGER NOT NULL, source_hash TEXT NOT NULL, extra TEXT, PRIMARY KEY (profile, __typename, id))",
+ CREATE_SCHEMA[3],
+ ],
+ ),
+ (
+ "search-index-order",
+ vec![
+ "DROP INDEX search_documents_browse_idx",
+ "CREATE INDEX search_documents_browse_idx ON search_documents(profile, timestamp_ms DESC, bucket, __typename, id)",
+ ],
+ ),
(
"queue-autoincrement",
vec![
"DROP TABLE optimistic_layers",
"DROP TABLE mutation_queue",
"CREATE TABLE mutation_queue (id INTEGER PRIMARY KEY, query TEXT NOT NULL, operation_name TEXT, variables_json TEXT NOT NULL, identity TEXT, attempt_count INTEGER NOT NULL DEFAULT 0, next_attempt_at_ms INTEGER, lease_owner TEXT, lease_generation INTEGER NOT NULL DEFAULT 0, lease_expires_at_ms INTEGER, last_error TEXT, created_at_ms INTEGER NOT NULL)",
- CREATE_SCHEMA[3],
+ CREATE_SCHEMA[5],
],
),
(
@@ -511,7 +635,7 @@ fn every_malformed_frozen_schema_constraint_requests_reset_on_reopen() {
"DROP TABLE optimistic_layers",
"DROP TABLE mutation_queue",
"CREATE TABLE mutation_queue (id INTEGER PRIMARY KEY AUTOINCREMENT, query TEXT NOT NULL, operation_name TEXT, variables_json TEXT NOT NULL, identity TEXT, attempt_count INTEGER NOT NULL DEFAULT 0, next_attempt_at_ms INTEGER, lease_owner TEXT, lease_generation INTEGER NOT NULL DEFAULT 0, lease_expires_at_ms INTEGER, last_error TEXT, created_at_ms INTEGER NOT NULL, FOREIGN KEY (identity) REFERENCES meta(key))",
- CREATE_SCHEMA[3],
+ CREATE_SCHEMA[5],
],
),
(
@@ -520,7 +644,7 @@ fn every_malformed_frozen_schema_constraint_requests_reset_on_reopen() {
"DROP TABLE optimistic_layers",
"DROP TABLE mutation_queue",
"CREATE TABLE mutation_queue (id INTEGER PRIMARY KEY AUTOINCREMENT, query TEXT, operation_name TEXT, variables_json TEXT NOT NULL, identity TEXT, attempt_count INTEGER NOT NULL DEFAULT 0, next_attempt_at_ms INTEGER, lease_owner TEXT, lease_generation INTEGER NOT NULL DEFAULT 0, lease_expires_at_ms INTEGER, last_error TEXT, created_at_ms INTEGER NOT NULL)",
- CREATE_SCHEMA[3],
+ CREATE_SCHEMA[5],
],
),
(
@@ -529,7 +653,7 @@ fn every_malformed_frozen_schema_constraint_requests_reset_on_reopen() {
"DROP TABLE optimistic_layers",
"DROP TABLE mutation_queue",
"CREATE TABLE mutation_queue (id INTEGER PRIMARY KEY AUTOINCREMENT, query TEXT NOT NULL, operation_name TEXT, variables_json TEXT NOT NULL, identity TEXT, attempt_count INTEGER NOT NULL DEFAULT 1, next_attempt_at_ms INTEGER, lease_owner TEXT, lease_generation INTEGER NOT NULL DEFAULT 0, lease_expires_at_ms INTEGER, last_error TEXT, created_at_ms INTEGER NOT NULL)",
- CREATE_SCHEMA[3],
+ CREATE_SCHEMA[5],
],
),
(
@@ -637,25 +761,6 @@ fn corrupt_keys_blobs_queue_relationships_and_numerics_request_reset() {
Some(PhysicalResetReason::Codec)
);
- let storage = TursoStorage::open_in_memory("corrupt-key").unwrap();
- raw_execute(
- &storage,
- RECORD_UPSERT,
- vec![
- text(""),
- text("id"),
- Value::from_blob(encode_record(&record("valid"))),
- ],
- );
- let error = storage
- .scan_records(&[String::new()], None, 10)
- .await
- .unwrap_err();
- assert_eq!(
- error.physical_reset_reason(),
- Some(PhysicalResetReason::Corruption)
- );
-
let storage = TursoStorage::open_in_memory("missing-layer").unwrap();
raw_execute(
&storage,
diff --git a/crates/client/cache-turso/tests/engine_turso.rs b/crates/client/cache-turso/tests/engine_turso.rs
index 1147712a1d..fe5fb1ea2e 100644
--- a/crates/client/cache-turso/tests/engine_turso.rs
+++ b/crates/client/cache-turso/tests/engine_turso.rs
@@ -144,10 +144,16 @@ fn query_identity_cold_tier_selection_and_clear_run_over_turso() {
"Property",
)
.unwrap();
- let selected = engine.read_records(&selection, None, 10).await.unwrap();
+ let selected = engine
+ .read_records_by_keys(
+ &selection,
+ &[EntityKey("GraphqlProperty:property-1".into())],
+ )
+ .await
+ .unwrap();
assert_eq!(
- selected.records,
- vec![json!({"id": "property-1", "displayName": "Status"})]
+ selected[0].record,
+ json!({"id": "property-1", "displayName": "Status"})
);
let reset = engine
diff --git a/crates/client/cache-turso/tests/shared_conformance.rs b/crates/client/cache-turso/tests/shared_conformance.rs
index c3eb8c233e..8b64d094e0 100644
--- a/crates/client/cache-turso/tests/shared_conformance.rs
+++ b/crates/client/cache-turso/tests/shared_conformance.rs
@@ -5,6 +5,7 @@ use cache_core::queue::{
MutationClaimRequest, MutationClaimToken, MutationRequest, NewQueuedMutation,
PersistedOptimisticLayer, StoredMutation,
};
+use cache_core::search::{SearchProfile, project_search_documents};
use cache_core::store::{InMemoryStorage, Storage};
use cache_core::value::{CacheValue, EntityKey, Record};
use cache_sqlite::SqliteStorage;
@@ -168,21 +169,6 @@ fn claim_request(owner: &str, now_ms: i64, lease_expires_at_ms: i64) -> Mutation
}
}
-async fn scan_keys<S: Storage>(
- storage: &S,
- type_names: &[String],
- after: Option<&EntityKey<'static>>,
- limit: usize,
-) -> Vec<String> {
- storage
- .scan_records(type_names, after, limit)
- .await
- .unwrap()
- .into_iter()
- .map(|(key, _)| key.as_ref().to_owned())
- .collect()
-}
-
async fn record_contract<S: Storage>(storage: &mut S) {
storage
.put_batch(vec![
@@ -231,125 +217,68 @@ async fn record_contract<S: Storage>(storage: &mut S) {
]
);
- let names = ["Type".to_owned(), "Type0".to_owned(), "Type".to_owned()];
- let mut rust_sorted = [
- key("Type:9"),
- key("Type0:1"),
- key("Type:0"),
- key("Type0:0"),
- key("Type:a"),
- key("Type:a:colon"),
- key("Type:a:colon:again"),
- ];
- rust_sorted.sort();
- let expected = rust_sorted
- .iter()
- .map(|key| key.as_ref().to_owned())
- .collect::<Vec<_>>();
- assert!(scan_keys(storage, &[], None, 10).await.is_empty());
- assert!(scan_keys(storage, &names, None, 0).await.is_empty());
- assert_eq!(scan_keys(storage, &names, None, 10).await, expected);
- assert_eq!(
- scan_keys(storage, &names, Some(&key("A:0")), 10).await,
- expected
- );
- assert_eq!(
- scan_keys(storage, &names, Some(&key("Type0:0")), 10).await,
- [
- "Type0:1",
- "Type:0",
- "Type:9",
- "Type:a",
- "Type:a:colon",
- "Type:a:colon:again",
- ]
- );
- assert_eq!(
- scan_keys(storage, &names, Some(&key("Type0:0z")), 10).await,
- [
- "Type0:1",
- "Type:0",
- "Type:9",
- "Type:a",
- "Type:a:colon",
- "Type:a:colon:again",
- ]
- );
- assert_eq!(
- scan_keys(storage, &names, Some(&key("Type0:1")), 10).await,
- [
- "Type:0",
- "Type:9",
- "Type:a",
- "Type:a:colon",
- "Type:a:colon:again",
- ]
- );
- assert_eq!(
- scan_keys(storage, &names, Some(&key("Type0:zz")), 10).await,
- [
- "Type:0",
- "Type:9",
- "Type:a",
- "Type:a:colon",
- "Type:a:colon:again",
- ]
- );
- assert_eq!(
- scan_keys(storage, &names, Some(&key("Type:0")), 1).await,
- ["Type:9"]
- );
- assert_eq!(
- scan_keys(storage, &names, Some(&key("Type:9")), 10).await,
- ["Type:a", "Type:a:colon", "Type:a:colon:again"]
+ storage
+ .delete_batch(&[key("Missing:delete"), key("Type:a"), key("Type:a")])
+ .await
+ .unwrap();
+ assert_eq!(storage.get_batch(&[key("Type:a")]).await.unwrap(), [None]);
+ storage.delete_batch(&[]).await.unwrap();
+ storage
+ .put_batch(vec![(key("Type:a"), record("restored"))])
+ .await
+ .unwrap();
+}
+
+async fn search_projection_contract<S: Storage>(storage: &mut S) {
+ let searchable_key = key("GraphqlSoupDocument:search-1");
+ let mut searchable = Record::default();
+ searchable.fields.insert(
+ "__typename".into(),
+ CacheValue::String("GraphqlSoupDocument".into()),
);
- assert_eq!(
- scan_keys(storage, &names, Some(&key("Type:a")), 10).await,
- ["Type:a:colon", "Type:a:colon:again"]
+ searchable
+ .fields
+ .insert("name".into(), CacheValue::String("Quarterly Plan".into()));
+ searchable.fields.insert(
+ "updatedAt".into(),
+ CacheValue::Number(cache_core::value::CacheNumber::PosInt(123)),
);
assert_eq!(
- scan_keys(storage, &names, Some(&key("Type:a:colon")), 10).await,
- ["Type:a:colon:again"]
+ project_search_documents(&searchable_key, &searchable).len(),
+ 1
);
+ storage
+ .put_batch(vec![(searchable_key.clone(), searchable)])
+ .await
+ .unwrap();
+ let loaded = storage
+ .load_search_documents(SearchProfile::QuickAccessV1)
+ .await
+ .unwrap();
assert!(
- scan_keys(storage, &names, Some(&key("Type:a:colon:again")), 10,)
- .await
- .is_empty()
+ loaded
+ .iter()
+ .any(|document| document.record_key == searchable_key)
);
- assert!(
- scan_keys(storage, &names, Some(&key("Z:9")), 10)
- .await
- .is_empty()
- );
-
- for limit in [1, 2] {
- let mut cursor = None;
- let mut paged = Vec::new();
- loop {
- let page = storage
- .scan_records(&names, cursor.as_ref(), limit)
- .await
- .unwrap();
- assert!(page.len() <= limit);
- let Some((last, _)) = page.last() else {
- break;
- };
- cursor = Some(last.clone());
- paged.extend(page.into_iter().map(|(key, _)| key.as_ref().to_owned()));
- }
- assert_eq!(paged, expected);
- }
-
- storage
- .delete_batch(&[key("Missing:delete"), key("Type:a"), key("Type:a")])
+ let browsed = storage
+ .browse_search_documents(SearchProfile::QuickAccessV1, "document", None, 1)
.await
.unwrap();
- assert_eq!(storage.get_batch(&[key("Type:a")]).await.unwrap(), [None]);
- storage.delete_batch(&[]).await.unwrap();
+ assert_eq!(browsed.len(), 1);
+ assert_eq!(browsed[0].record_key, searchable_key);
+
storage
- .put_batch(vec![(key("Type:a"), record("restored"))])
+ .delete_batch(std::slice::from_ref(&searchable_key))
.await
.unwrap();
+ assert!(
+ storage
+ .load_search_documents(SearchProfile::QuickAccessV1)
+ .await
+ .unwrap()
+ .iter()
+ .all(|document| document.record_key != searchable_key)
+ );
}
async fn reopen_contract<F: BackendFactory>(
@@ -669,6 +598,7 @@ async fn common_contract<F: BackendFactory>(
mut storage: F::Backend,
) -> F::Backend {
record_contract(&mut storage).await;
+ search_projection_contract(&mut storage).await;
let mut storage = reopen_contract(factory, storage).await;
queue_contract(&mut storage).await;
clear_contract(&mut storage).await;
diff --git a/crates/client/cache-turso/tests/storage_conformance.rs b/crates/client/cache-turso/tests/storage_conformance.rs
index 8d0fc73afe..4325c69ef8 100644
--- a/crates/client/cache-turso/tests/storage_conformance.rs
+++ b/crates/client/cache-turso/tests/storage_conformance.rs
@@ -1,6 +1,5 @@
#![cfg(not(target_arch = "wasm32"))]
-use cache_core::meta::TYPES;
use cache_core::normalize::RecordUpdates;
use cache_core::queue::{
MutationClaimRequest, MutationClaimToken, MutationRequest, NewQueuedMutation,
@@ -132,88 +131,6 @@ fn compound_keys_batches_duplicates_and_checked_inputs_conform() {
});
}
-#[test]
-fn canonical_binary_scan_has_global_exclusive_cursor_and_dynamic_in() {
- block_on(async {
- let mut storage = TursoStorage::open_in_memory("scope-scan").unwrap();
- let values = [
- "ROOT_QUERY",
- "Type:9",
- "Type0:1",
- "Type:a:colon",
- "Type:tenant:item",
- "Other:1",
- "__meta:identity",
- ];
- storage
- .put_batch(
- values
- .iter()
- .map(|value| (key(value), record(value)))
- .collect(),
- )
- .await
- .unwrap();
-
- assert!(
- storage
- .scan_records(&[], None, 10)
- .await
- .unwrap()
- .is_empty()
- );
- assert!(
- storage
- .scan_records(&["Type".into()], None, 0)
- .await
- .unwrap()
- .is_empty()
- );
- let names = ["Type0".into(), "Type".into(), "Type".into()];
- let expected = ["Type0:1", "Type:9", "Type:a:colon", "Type:tenant:item"];
- let all = storage.scan_records(&names, None, 20).await.unwrap();
- assert_eq!(
- all.iter().map(|(key, _)| key.as_ref()).collect::<Vec<_>>(),
- expected
- );
-
- let mut cursor = None;
- let mut paged = Vec::new();
- loop {
- let page = storage
- .scan_records(&names, cursor.as_ref(), 1)
- .await
- .unwrap();
- let Some((last, _)) = page.last() else {
- break;
- };
- cursor = Some(last.clone());
- paged.extend(page.into_iter().map(|(key, _)| key));
- }
- assert_eq!(
- paged.iter().map(EntityKey::as_ref).collect::<Vec<_>>(),
- expected
- );
- assert!(
- storage
- .scan_records(&names, Some(&key("Unselected:zz")), 2)
- .await
- .unwrap()
- .is_empty()
- );
-
- let maximum_types = TYPES
- .iter()
- .map(|metadata| metadata.name.to_owned())
- .collect::<Vec<_>>();
- storage
- .scan_records(&maximum_types, None, usize::MAX.min(i64::MAX as usize))
- .await
- .unwrap();
- storage.try_close().unwrap();
- });
-}
-
#[test]
fn queue_preserves_every_field_order_and_reopen_state() {
block_on(async {
diff --git a/crates/client/cache-turso/tests/web.rs b/crates/client/cache-turso/tests/web.rs
index fa825a500f..341cc6556f 100644
--- a/crates/client/cache-turso/tests/web.rs
+++ b/crates/client/cache-turso/tests/web.rs
@@ -174,13 +174,10 @@ async fn incompatible_opfs_initialization_exposes_reset_only_and_cannot_preserve
TursoStorage::from_opfs_session(session.connect().unwrap(), "browser-scope").unwrap();
assert_eq!(
storage
- .scan_records(&["Type".into(), "Type0".into()], None, 10)
+ .get_batch(&[key("Type0:1"), key("Type:9")])
.await
- .unwrap()
- .into_iter()
- .map(|(key, _)| key.as_ref().to_owned())
- .collect::<Vec<_>>(),
- vec!["Type0:1", "Type:9"]
+ .unwrap(),
+ [Some(record("prefix")), Some(record("ordinary"))]
);
assert_eq!(
storage.load_mutation_queue().await.unwrap()[0].id,
diff --git a/crates/client/cache-wasm/Cargo.toml b/crates/client/cache-wasm/Cargo.toml
index 799c1722d9..1086397d2b 100644
--- a/crates/client/cache-wasm/Cargo.toml
+++ b/crates/client/cache-wasm/Cargo.toml
@@ -2,7 +2,7 @@
edition = "2024"
name = "cache-wasm"
publish = false
-version = "0.4.0"
+version = "0.4.1"
[features]
default = []
diff --git a/crates/client/cache-wasm/src/shell.rs b/crates/client/cache-wasm/src/shell.rs
index eb7bcfc3b6..5b293f5703 100644
--- a/crates/client/cache-wasm/src/shell.rs
+++ b/crates/client/cache-wasm/src/shell.rs
@@ -8,7 +8,8 @@ use cache_core::entity_resolver::EntityResolver;
use cache_core::link_patch::{OptimisticLinkPatch, QueryRevalidation};
use cache_core::query_inspection::QueryInspection;
use cache_core::queue::{ClaimedMutation, MutationClaimRequest, MutationClaimToken};
-use cache_core::record_selection::{RecordCursor, RecordSelection};
+use cache_core::record_selection::RecordSelection;
+use cache_core::search::SearchRequest;
use cache_core::store::QueueDiagnosticsAvailability;
use cache_core::value::EntityKey;
use cache_turso::{
@@ -602,16 +603,6 @@ fn parse_variables(
serde_wasm_bindgen::from_value(variables).map_err(err_js)
}
-fn parse_record_cursor(cursor: JsValue) -> Result<Option<RecordCursor>, JsValue> {
- if cursor.is_undefined() || cursor.is_null() {
- Ok(None)
- } else {
- serde_wasm_bindgen::from_value(cursor)
- .map(Some)
- .map_err(err_js)
- }
-}
-
fn parse_vec<T: serde::de::DeserializeOwned>(value: JsValue) -> Result<Vec<T>, JsValue> {
if value.is_undefined() || value.is_null() {
return Ok(Vec::new());
@@ -748,25 +739,41 @@ impl CacheEngine {
})
}
- /// Projects normalized records through a named GraphQL fragment.
- #[wasm_bindgen(js_name = readRecords)]
- pub fn read_records(
+ /// Projects explicit normalized entity keys through a named GraphQL
+ /// fragment without scanning storage.
+ #[wasm_bindgen(js_name = readRecordsByKeys)]
+ pub fn read_records_by_keys(
&self,
document: String,
fragment_name: String,
- cursor: JsValue,
- limit: u32,
+ keys: JsValue,
) -> js_sys::Promise {
let state = self.state.clone();
future_to_promise(async move {
let mut state = state.lock().await;
state.ensure_callable()?;
let selection = RecordSelection::parse(&document, &fragment_name).map_err(err_js)?;
- let cursor = parse_record_cursor(cursor)?;
+ let keys: Vec<String> = parse_vec(keys)?;
+ let keys: Vec<_> = keys.into_iter().map(|key| EntityKey(key.into())).collect();
let result = state
.engine_mut()?
- .read_records(&selection, cursor.as_ref(), limit as usize)
+ .read_records_by_keys(&selection, &keys)
.await;
+ let records = state.engine_result(result)?;
+ to_js(&records)
+ })
+ }
+
+ /// Searches the compact materialized projection. Empty queries use the
+ /// indexed recent path; text queries rank the compact catalog without
+ /// scanning normalized record blobs.
+ pub fn search(&self, request: JsValue) -> js_sys::Promise {
+ let state = self.state.clone();
+ future_to_promise(async move {
+ let mut state = state.lock().await;
+ state.ensure_callable()?;
+ let request: SearchRequest = serde_wasm_bindgen::from_value(request).map_err(err_js)?;
+ let result = state.engine_mut()?.search(&request).await;
let page = state.engine_result(result)?;
to_js(&page)
})
diff --git a/crates/client/cache-wasm/src/shell/test.rs b/crates/client/cache-wasm/src/shell/test.rs
index c190b0c1ac..d137e1ad2b 100644
--- a/crates/client/cache-wasm/src/shell/test.rs
+++ b/crates/client/cache-wasm/src/shell/test.rs
@@ -168,6 +168,17 @@ async fn operations_preserve_js_boundary_interner_and_ordering() {
let identity: Option<String> = from_js(resolved(engine.bound_identity()).await);
assert_eq!(identity.as_deref(), Some("user-1"));
+ let selected: serde_json::Value = from_js(
+ resolved(engine.read_records_by_keys(
+ RECORD_FRAGMENT.into(),
+ "CachedDocument".into(),
+ js(serde_json::json!(["GraphqlSoupDocument:doc-1"])),
+ ))
+ .await,
+ );
+ assert_eq!(selected[0]["recordKey"], "GraphqlSoupDocument:doc-1");
+ assert_eq!(selected[0]["record"]["id"], "doc-1");
+
let variants: serde_json::Value = from_js(
resolved(engine.inspect_query_variants(
QUERY.into(),
@@ -886,11 +897,10 @@ async fn every_method_rejects_after_consuming_close() {
JsValue::UNDEFINED,
))
.await;
- assert_closed(engine.read_records(
+ assert_closed(engine.read_records_by_keys(
RECORD_FRAGMENT.into(),
"CachedDocument".into(),
- JsValue::UNDEFINED,
- 1,
+ js(serde_json::json!(["GraphqlSoupDocument:doc-1"])),
))
.await;
assert_closed(engine.write_query(
diff --git a/crates/client/cache-wasm/src/shell/test_storage.rs b/crates/client/cache-wasm/src/shell/test_storage.rs
index dc4428b7a9..e587b3cb83 100644
--- a/crates/client/cache-wasm/src/shell/test_storage.rs
+++ b/crates/client/cache-wasm/src/shell/test_storage.rs
@@ -2,6 +2,7 @@ use cache_core::queue::{
ClaimedMutation, MutationClaimRequest, MutationClaimToken, MutationId, NewQueuedMutation,
QueuedMutation,
};
+use cache_core::search::{SearchCursor, SearchDocument, SearchProfile};
use cache_core::store::{QueueDiagnostics, Storage};
use cache_core::value::{EntityKey, Record};
use cache_turso::{PhysicalResetReason, TursoStorage, TursoStorageError};
@@ -68,13 +69,23 @@ impl Storage for BrowserStorage {
self.inner.delete_batch(keys).await
}
- async fn scan_records(
+ async fn load_search_documents(
&self,
- type_names: &[String],
- after: Option<&EntityKey<'static>>,
+ profile: SearchProfile,
+ ) -> Result<Vec<SearchDocument>, Self::Error> {
+ self.inner.load_search_documents(profile).await
+ }
+
+ async fn browse_search_documents(
+ &self,
+ profile: SearchProfile,
+ bucket: &str,
+ after: Option<&SearchCursor>,
limit: usize,
- ) -> Result<Vec<(EntityKey<'static>, Record)>, Self::Error> {
- self.inner.scan_records(type_names, after, limit).await
+ ) -> Result<Vec<SearchDocument>, Self::Error> {
+ self.inner
+ .browse_search_documents(profile, bucket, after, limit)
+ .await
}
async fn enqueue_mutation(