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:
Weiko
2024-10-15 16:59:44 +02:00
committed by GitHub
parent 1de739176c
commit 7e808cf529
54 changed files with 432 additions and 2160 deletions

View File

@@ -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);