[SSE] Add backend for SSE subscriptions (#17022)
- moved a few gql types to twenty shared to re-use in server - added a new endpoint, onEventSubscription that expect a streamId to create a connection - two new endpoints to store queries in Redis - updated the existing batch channel to directly use object record type
This commit is contained in:
-1
@@ -1 +0,0 @@
|
||||
export type RecordGqlFieldsDeprecated = Record<string, any>;
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
import { type RecordGqlFieldsDeprecated } from '@/object-record/graphql/types/RecordGqlFieldsDeprecated';
|
||||
|
||||
export type RecordGqlOperationGqlRecordFields = RecordGqlFieldsDeprecated;
|
||||
+4
-2
@@ -1,5 +1,7 @@
|
||||
import { type RecordGqlOperationOrderBy } from '@/object-record/graphql/types/RecordGqlOperationOrderBy';
|
||||
import { type RecordGqlOperationFilter } from 'twenty-shared/types';
|
||||
import {
|
||||
type RecordGqlOperationFilter,
|
||||
type RecordGqlOperationOrderBy,
|
||||
} from 'twenty-shared/types';
|
||||
|
||||
export type RecordGqlOperationGroupByVariables = {
|
||||
groupBy: Record<string, any>[] | Record<string, any>;
|
||||
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
import { type OrderBy } from '@/types/OrderBy';
|
||||
|
||||
// Recursive type for nested orderBy values
|
||||
// Supports: OrderBy | { field: OrderBy } | { field: { subField: OrderBy } } | ...
|
||||
type OrderByValue = OrderBy | { [fieldName: string]: OrderByValue };
|
||||
|
||||
// Supports nested ordering for:
|
||||
// - Scalar fields: { field: OrderBy }
|
||||
// - Composite fields: { field: { subField: OrderBy } }
|
||||
// - Relation + composite: { relation: { compositeLabel: { subField: OrderBy } } }
|
||||
export type RecordGqlOperationOrderBy = Array<{
|
||||
[fieldName: string]: OrderByValue;
|
||||
}>;
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
import { type RecordGqlOperationGqlRecordFields } from '@/object-record/graphql/types/RecordGqlOperationGqlRecordFields';
|
||||
import { type RecordGqlOperationVariables } from '@/object-record/graphql/types/RecordGqlOperationVariables';
|
||||
|
||||
export type RecordGqlOperationSignature = {
|
||||
objectNameSingular: string;
|
||||
variables: RecordGqlOperationVariables;
|
||||
fields?: RecordGqlOperationGqlRecordFields;
|
||||
};
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { type RecordGqlOperationSignature } from '@/object-record/graphql/types/RecordGqlOperationSignature';
|
||||
import { type RecordGqlOperationSignature } from 'twenty-shared/types';
|
||||
|
||||
export type RecordGqlOperationSignatureFactory<FactoryParams extends object> = (
|
||||
factoryParams: FactoryParams,
|
||||
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
import { type RecordGqlOperationOrderBy } from '@/object-record/graphql/types/RecordGqlOperationOrderBy';
|
||||
import { type QueryCursorDirection } from '@/object-record/utils/generateFindManyRecordsQuery';
|
||||
import { type RecordGqlOperationFilter } from 'twenty-shared/types';
|
||||
|
||||
export type RecordGqlOperationVariables = {
|
||||
filter?: RecordGqlOperationFilter;
|
||||
orderBy?: RecordGqlOperationOrderBy;
|
||||
limit?: number;
|
||||
cursorFilter?: {
|
||||
cursor: string;
|
||||
cursorDirection: QueryCursorDirection;
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user