[POC] add graphql query runner (#6747)
## Context The goal is to replace pg_graphql with our own ORM wrapper (TwentyORM). This PR tries to add some parsing logic to convert graphql requests to send to the ORM to replace pg_graphql implementation. --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -0,0 +1,17 @@
|
||||
import { CustomException } from 'src/utils/custom-exception';
|
||||
|
||||
export class GraphqlQueryRunnerException extends CustomException {
|
||||
code: GraphqlQueryRunnerExceptionCode;
|
||||
constructor(message: string, code: GraphqlQueryRunnerExceptionCode) {
|
||||
super(message, code);
|
||||
}
|
||||
}
|
||||
|
||||
export enum GraphqlQueryRunnerExceptionCode {
|
||||
MAX_DEPTH_REACHED = 'MAX_DEPTH_REACHED',
|
||||
INVALID_CURSOR = 'INVALID_CURSOR',
|
||||
INVALID_DIRECTION = 'INVALID_DIRECTION',
|
||||
UNSUPPORTED_OPERATOR = 'UNSUPPORTED_OPERATOR',
|
||||
ARGS_CONFLICT = 'ARGS_CONFLICT',
|
||||
FIELD_NOT_FOUND = 'FIELD_NOT_FOUND',
|
||||
}
|
||||
Reference in New Issue
Block a user