[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:
@ -1,9 +1,5 @@
|
||||
export const isPlainObject = <T>(value: T): boolean => {
|
||||
if (Object.prototype.toString.call(value) !== '[object Object]') {
|
||||
return false;
|
||||
}
|
||||
|
||||
const prototype = Object.getPrototypeOf(value);
|
||||
|
||||
return prototype === null || prototype === Object.prototype;
|
||||
export const isPlainObject = (
|
||||
input: unknown,
|
||||
): input is Record<string, unknown> => {
|
||||
return typeof input === 'object' && input !== null && !Array.isArray(input);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user