Refactor backend folder structure (#4505)
* Refactor backend folder structure Co-authored-by: Charles Bochet <charles@twenty.com> * fix tests * fix * move yoga hooks --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -0,0 +1,8 @@
|
||||
import { IPageInfo } from './page-info.interface';
|
||||
import { IEdge } from './edge.interface';
|
||||
|
||||
export interface IConnection<T, CustomEdge extends IEdge<T> = IEdge<T>> {
|
||||
edges: Array<CustomEdge>;
|
||||
pageInfo: IPageInfo;
|
||||
totalCount: number;
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
export interface IEdge<T> {
|
||||
cursor: string;
|
||||
node: T;
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
export interface IPageInfo {
|
||||
hasNextPage: boolean;
|
||||
hasPreviousPage: boolean;
|
||||
startCursor?: string;
|
||||
endCursor?: string;
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
import { Record as IRecord } from 'src/engine/api/graphql/workspace-query-builder/interfaces/record.interface';
|
||||
|
||||
export interface PGGraphQLResponse<Data = any> {
|
||||
resolve: {
|
||||
data: Data;
|
||||
errors: any[];
|
||||
};
|
||||
}
|
||||
|
||||
export type PGGraphQLResult<Data = any> = [PGGraphQLResponse<Data>];
|
||||
|
||||
export interface PGGraphQLMutation<Record = IRecord> {
|
||||
affectedRows: number;
|
||||
records: Record[];
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
import { GraphQLResolveInfo } from 'graphql';
|
||||
|
||||
import { FieldMetadataInterface } from 'src/engine-metadata/field-metadata/interfaces/field-metadata.interface';
|
||||
import { ObjectMetadataInterface } from 'src/engine-metadata/field-metadata/interfaces/object-metadata.interface';
|
||||
|
||||
export interface WorkspaceQueryRunnerOptions {
|
||||
workspaceId: string;
|
||||
userId: string | undefined;
|
||||
info: GraphQLResolveInfo;
|
||||
objectMetadataItem: ObjectMetadataInterface;
|
||||
fieldMetadataCollection: FieldMetadataInterface[];
|
||||
objectMetadataCollection: ObjectMetadataInterface[];
|
||||
}
|
||||
Reference in New Issue
Block a user