mirror of
https://github.com/lingble/twenty.git
synced 2025-11-02 05:37:56 +00:00
Remove pgGraphql from setup (#7716)
## Context This PR removes pg_graphql from the setup. It also updates the local setup documentation accordingly. Note: We removed local setup scripts to align with redis installation, the setup should be much simpler since we don't rely on pg_graphql anymore. ## Test tested locally with docker + mac (brew) setup
This commit is contained in:
@@ -19,10 +19,6 @@ rawDataSource
|
||||
'CREATE SCHEMA IF NOT EXISTS "core"',
|
||||
'create schema "core"',
|
||||
);
|
||||
await performQuery(
|
||||
'CREATE EXTENSION IF NOT EXISTS "pg_graphql"',
|
||||
'create extension pg_graphql',
|
||||
);
|
||||
|
||||
await performQuery(
|
||||
'CREATE EXTENSION IF NOT EXISTS "uuid-ossp"',
|
||||
@@ -66,34 +62,6 @@ rawDataSource
|
||||
true,
|
||||
);
|
||||
}
|
||||
|
||||
await performQuery(
|
||||
`COMMENT ON SCHEMA "core" IS '@graphql({"inflect_names": true})';`,
|
||||
'inflect names for graphql',
|
||||
);
|
||||
|
||||
await performQuery(
|
||||
`
|
||||
DROP FUNCTION IF EXISTS graphql;
|
||||
CREATE FUNCTION graphql(
|
||||
"operationName" text default null,
|
||||
query text default null,
|
||||
variables jsonb default null,
|
||||
extensions jsonb default null
|
||||
)
|
||||
returns jsonb
|
||||
language sql
|
||||
as $$
|
||||
select graphql.resolve(
|
||||
query := query,
|
||||
variables := coalesce(variables, '{}'),
|
||||
"operationName" := "operationName",
|
||||
extensions := extensions
|
||||
);
|
||||
$$;
|
||||
`,
|
||||
'create function graphql',
|
||||
);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error('Error during Data Source initialization:', err);
|
||||
|
||||
Reference in New Issue
Block a user