@constructive-io/graphql-server 2.12.0 → 2.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -33,13 +33,13 @@ import { GraphQLServer } from '@constructive-io/graphql-server';
33
33
  GraphQLServer(
34
34
  getEnvOptions({
35
35
  pg: { database: 'constructive_db' },
36
- server: { host: '0.0.0.0', port: 3000 }
36
+ server: { host: '0.0.0.0', port: 3000 },
37
37
  })
38
38
  );
39
39
  ```
40
40
 
41
41
  > **Tip:** Set `PGHOST`, `PGPORT`, `PGUSER`, `PGPASSWORD`, `PGDATABASE` to control DB connectivity.
42
- See [Configuration](#configuration) for the full list of supported env vars and defaults.
42
+ > See [Configuration](#configuration) for the full list of supported env vars and defaults.
43
43
 
44
44
  ### Local Development (this repo)
45
45
 
@@ -50,9 +50,9 @@ pnpm dev
50
50
  ```
51
51
 
52
52
  This starts the server with env defaults from `@constructive-io/graphql-env`.
53
- > **Tip:** Set `PGHOST`, `PGPORT`, `PGUSER`, `PGPASSWORD`, `PGDATABASE` to control DB connectivity.
54
- See [Configuration](#configuration) for the full list of supported env vars and defaults.
55
53
 
54
+ > **Tip:** Set `PGHOST`, `PGPORT`, `PGUSER`, `PGPASSWORD`, `PGDATABASE` to control DB connectivity.
55
+ > See [Configuration](#configuration) for the full list of supported env vars and defaults.
56
56
 
57
57
  ## What it does
58
58
 
@@ -79,7 +79,7 @@ Runs an Express server that wires CORS, uploads, domain parsing, auth, and PostG
79
79
 
80
80
  When `API_ENABLE_META=true` (default):
81
81
 
82
- - The server resolves APIs from `meta_public.domains` using the request host.
82
+ - The server resolves APIs from `services_public.domains` using the request host.
83
83
  - Only APIs where `api.is_public` matches `API_IS_PUBLIC` are served.
84
84
  - In private mode (`API_IS_PUBLIC=false`), you can override with headers:
85
85
  - `X-Api-Name` + `X-Database-Id`
@@ -95,24 +95,24 @@ When `API_ENABLE_META=false`:
95
95
 
96
96
  Configuration is merged from defaults, config files, and env vars via `@constructive-io/graphql-env`. See `graphql/env/README.md` for the full list and examples.
97
97
 
98
- | Env var | Purpose | Default |
99
- | --- | --- | --- |
100
- | `PGHOST` | Postgres host | `localhost` |
101
- | `PGPORT` | Postgres port | `5432` |
102
- | `PGUSER` | Postgres user | `postgres` |
103
- | `PGPASSWORD` | Postgres password | `password` |
104
- | `PGDATABASE` | Postgres database | `postgres` |
105
- | `GRAPHILE_SCHEMA` | Comma-separated schemas to expose | empty |
106
- | `FEATURES_SIMPLE_INFLECTION` | Enable simple inflection | `true` |
107
- | `FEATURES_OPPOSITE_BASE_NAMES` | Enable opposite base names | `true` |
108
- | `FEATURES_POSTGIS` | Enable PostGIS support | `true` |
109
- | `API_ENABLE_META` | Enable meta API routing | `true` |
110
- | `API_IS_PUBLIC` | Serve public APIs only | `true` |
111
- | `API_EXPOSED_SCHEMAS` | Schemas when meta routing is disabled | empty |
112
- | `API_META_SCHEMAS` | Meta schemas to query | `collections_public,meta_public` |
113
- | `API_ANON_ROLE` | Anonymous role name | `administrator` |
114
- | `API_ROLE_NAME` | Authenticated role name | `administrator` |
115
- | `API_DEFAULT_DATABASE_ID` | Default database ID | `hard-coded` |
98
+ | Env var | Purpose | Default |
99
+ | ------------------------------ | ------------------------------------- | ------------------------------------------------------------- |
100
+ | `PGHOST` | Postgres host | `localhost` |
101
+ | `PGPORT` | Postgres port | `5432` |
102
+ | `PGUSER` | Postgres user | `postgres` |
103
+ | `PGPASSWORD` | Postgres password | `password` |
104
+ | `PGDATABASE` | Postgres database | `postgres` |
105
+ | `GRAPHILE_SCHEMA` | Comma-separated schemas to expose | empty |
106
+ | `FEATURES_SIMPLE_INFLECTION` | Enable simple inflection | `true` |
107
+ | `FEATURES_OPPOSITE_BASE_NAMES` | Enable opposite base names | `true` |
108
+ | `FEATURES_POSTGIS` | Enable PostGIS support | `true` |
109
+ | `API_ENABLE_META` | Enable meta API routing | `true` |
110
+ | `API_IS_PUBLIC` | Serve public APIs only | `true` |
111
+ | `API_EXPOSED_SCHEMAS` | Schemas when meta routing is disabled | empty |
112
+ | `API_META_SCHEMAS` | Meta schemas to query | `services_public,metaschema_public,metaschema_modules_public` |
113
+ | `API_ANON_ROLE` | Anonymous role name | `administrator` |
114
+ | `API_ROLE_NAME` | Authenticated role name | `administrator` |
115
+ | `API_DEFAULT_DATABASE_ID` | Default database ID | `hard-coded` |
116
116
 
117
117
  ## Testing
118
118
 
@@ -29,7 +29,7 @@ export const flushService = async (opts, databaseId) => {
29
29
  });
30
30
  }
31
31
  const svc = await pgPool.query(`SELECT *
32
- FROM meta_public.domains
32
+ FROM services_public.domains
33
33
  WHERE database_id = $1`, [databaseId]);
34
34
  if (svc.rowCount === 0)
35
35
  return;
@@ -33,7 +33,7 @@ const flushService = async (opts, databaseId) => {
33
33
  });
34
34
  }
35
35
  const svc = await pgPool.query(`SELECT *
36
- FROM meta_public.domains
36
+ FROM services_public.domains
37
37
  WHERE database_id = $1`, [databaseId]);
38
38
  if (svc.rowCount === 0)
39
39
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructive-io/graphql-server",
3
- "version": "2.12.0",
3
+ "version": "2.13.0",
4
4
  "author": "Constructive <developers@constructive.io>",
5
5
  "description": "Constructive GraphQL Server",
6
6
  "main": "index.js",
@@ -52,15 +52,15 @@
52
52
  "express": "^5.2.1",
53
53
  "graphile-build": "^4.14.1",
54
54
  "graphile-cache": "^1.6.14",
55
- "graphile-i18n": "^0.2.47",
56
- "graphile-meta-schema": "^0.3.47",
57
- "graphile-plugin-connection-filter": "^2.4.47",
58
- "graphile-plugin-connection-filter-postgis": "^1.1.48",
59
- "graphile-plugin-fulltext-filter": "^2.1.47",
55
+ "graphile-i18n": "^0.3.0",
56
+ "graphile-meta-schema": "^0.4.0",
57
+ "graphile-plugin-connection-filter": "^2.5.0",
58
+ "graphile-plugin-connection-filter-postgis": "^1.2.0",
59
+ "graphile-plugin-fulltext-filter": "^2.2.0",
60
60
  "graphile-query": "^2.4.7",
61
- "graphile-search-plugin": "^0.2.47",
62
- "graphile-settings": "^2.10.6",
63
- "graphile-simple-inflector": "^0.2.47",
61
+ "graphile-search-plugin": "^0.3.0",
62
+ "graphile-settings": "^2.11.0",
63
+ "graphile-simple-inflector": "^0.3.0",
64
64
  "graphile-utils": "^4.14.1",
65
65
  "graphql": "15.10.1",
66
66
  "graphql-tag": "2.12.6",
@@ -83,5 +83,5 @@
83
83
  "nodemon": "^3.1.10",
84
84
  "ts-node": "^10.9.2"
85
85
  },
86
- "gitHead": "127c05d5673647cf04111771701a1e4bc7b47ba8"
86
+ "gitHead": "97528ad4eb2f60c16785ffb84af7b61c52cb5ad8"
87
87
  }