@constructive-io/graphql-types 2.12.4
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/LICENSE +23 -0
- package/README.md +137 -0
- package/constructive.d.ts +49 -0
- package/constructive.js +25 -0
- package/esm/constructive.js +19 -0
- package/esm/graphile.js +29 -0
- package/esm/index.js +6 -0
- package/graphile.d.ts +57 -0
- package/graphile.js +32 -0
- package/index.d.ts +3 -0
- package/index.js +28 -0
- package/package.json +50 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Dan Lynch <pyramation@gmail.com>
|
|
4
|
+
Copyright (c) 2025 Constructive <developers@constructive.io>
|
|
5
|
+
Copyright (c) 2020-present, Interweb, Inc.
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# @constructive-io/graphql-types
|
|
2
|
+
|
|
3
|
+
GraphQL/Graphile types for the Constructive framework.
|
|
4
|
+
|
|
5
|
+
This package contains TypeScript type definitions for PostGraphile/Graphile configuration used by Constructive server, explorer, and related packages.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @constructive-io/graphql-types
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import {
|
|
17
|
+
ConstructiveOptions,
|
|
18
|
+
GraphileOptions,
|
|
19
|
+
ApiOptions,
|
|
20
|
+
GraphileFeatureOptions,
|
|
21
|
+
constructiveDefaults
|
|
22
|
+
} from '@constructive-io/graphql-types';
|
|
23
|
+
|
|
24
|
+
// ConstructiveOptions extends PgpmOptions with GraphQL configuration
|
|
25
|
+
const config: ConstructiveOptions = {
|
|
26
|
+
graphile: {
|
|
27
|
+
schema: ['public', 'app_public'],
|
|
28
|
+
appendPlugins: [],
|
|
29
|
+
},
|
|
30
|
+
api: {
|
|
31
|
+
enableMetaApi: true,
|
|
32
|
+
exposedSchemas: ['public'],
|
|
33
|
+
},
|
|
34
|
+
features: {
|
|
35
|
+
simpleInflection: true,
|
|
36
|
+
postgis: true,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Types
|
|
42
|
+
|
|
43
|
+
### ConstructiveOptions
|
|
44
|
+
|
|
45
|
+
Full configuration options for Constructive framework, extending `PgpmOptions` with GraphQL/Graphile configuration.
|
|
46
|
+
|
|
47
|
+
### GraphileOptions
|
|
48
|
+
|
|
49
|
+
PostGraphile/Graphile configuration including schema, plugins, and build options.
|
|
50
|
+
|
|
51
|
+
### ApiOptions
|
|
52
|
+
|
|
53
|
+
Configuration for the Constructive API including meta API settings, exposed schemas, and role configuration.
|
|
54
|
+
|
|
55
|
+
### GraphileFeatureOptions
|
|
56
|
+
|
|
57
|
+
Feature flags for GraphQL/Graphile including inflection settings and PostGIS support.
|
|
58
|
+
|
|
59
|
+
## Re-exports
|
|
60
|
+
|
|
61
|
+
This package re-exports all types from `@pgpmjs/types` for convenience, so you can import both core PGPM types and GraphQL types from a single package.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Education and Tutorials
|
|
66
|
+
|
|
67
|
+
1. 🚀 [Quickstart: Getting Up and Running](https://constructive.io/learn/quickstart)
|
|
68
|
+
Get started with modular databases in minutes. Install prerequisites and deploy your first module.
|
|
69
|
+
|
|
70
|
+
2. 📦 [Modular PostgreSQL Development with Database Packages](https://constructive.io/learn/modular-postgres)
|
|
71
|
+
Learn to organize PostgreSQL projects with pgpm workspaces and reusable database modules.
|
|
72
|
+
|
|
73
|
+
3. ✏️ [Authoring Database Changes](https://constructive.io/learn/authoring-database-changes)
|
|
74
|
+
Master the workflow for adding, organizing, and managing database changes with pgpm.
|
|
75
|
+
|
|
76
|
+
4. 🧪 [End-to-End PostgreSQL Testing with TypeScript](https://constructive.io/learn/e2e-postgres-testing)
|
|
77
|
+
Master end-to-end PostgreSQL testing with ephemeral databases, RLS testing, and CI/CD automation.
|
|
78
|
+
|
|
79
|
+
5. ⚡ [Supabase Testing](https://constructive.io/learn/supabase)
|
|
80
|
+
Use TypeScript-first tools to test Supabase projects with realistic RLS, policies, and auth contexts.
|
|
81
|
+
|
|
82
|
+
6. 💧 [Drizzle ORM Testing](https://constructive.io/learn/drizzle-testing)
|
|
83
|
+
Run full-stack tests with Drizzle ORM, including database setup, teardown, and RLS enforcement.
|
|
84
|
+
|
|
85
|
+
7. 🔧 [Troubleshooting](https://constructive.io/learn/troubleshooting)
|
|
86
|
+
Common issues and solutions for pgpm, PostgreSQL, and testing.
|
|
87
|
+
|
|
88
|
+
## Related Constructive Tooling
|
|
89
|
+
|
|
90
|
+
### 🧪 Testing
|
|
91
|
+
|
|
92
|
+
* [pgsql-test](https://github.com/constructive-io/constructive/tree/main/postgres/pgsql-test): **📊 Isolated testing environments** with per-test transaction rollbacks—ideal for integration tests, complex migrations, and RLS simulation.
|
|
93
|
+
* [supabase-test](https://github.com/constructive-io/constructive/tree/main/postgres/supabase-test): **🧪 Supabase-native test harness** preconfigured for the local Supabase stack—per-test rollbacks, JWT/role context helpers, and CI/GitHub Actions ready.
|
|
94
|
+
* [graphile-test](https://github.com/constructive-io/constructive/tree/main/graphile/graphile-test): **🔐 Authentication mocking** for Graphile-focused test helpers and emulating row-level security contexts.
|
|
95
|
+
* [pg-query-context](https://github.com/constructive-io/constructive/tree/main/postgres/pg-query-context): **🔒 Session context injection** to add session-local context (e.g., `SET LOCAL`) into queries—ideal for setting `role`, `jwt.claims`, and other session settings.
|
|
96
|
+
|
|
97
|
+
### 🧠 Parsing & AST
|
|
98
|
+
|
|
99
|
+
* [pgsql-parser](https://www.npmjs.com/package/pgsql-parser): **🔄 SQL conversion engine** that interprets and converts PostgreSQL syntax.
|
|
100
|
+
* [libpg-query-node](https://www.npmjs.com/package/libpg-query): **🌉 Node.js bindings** for `libpg_query`, converting SQL into parse trees.
|
|
101
|
+
* [pg-proto-parser](https://www.npmjs.com/package/pg-proto-parser): **📦 Protobuf parser** for parsing PostgreSQL Protocol Buffers definitions to generate TypeScript interfaces, utility functions, and JSON mappings for enums.
|
|
102
|
+
* [@pgsql/enums](https://www.npmjs.com/package/@pgsql/enums): **🏷️ TypeScript enums** for PostgreSQL AST for safe and ergonomic parsing logic.
|
|
103
|
+
* [@pgsql/types](https://www.npmjs.com/package/@pgsql/types): **📝 Type definitions** for PostgreSQL AST nodes in TypeScript.
|
|
104
|
+
* [@pgsql/utils](https://www.npmjs.com/package/@pgsql/utils): **🛠️ AST utilities** for constructing and transforming PostgreSQL syntax trees.
|
|
105
|
+
* [pg-ast](https://www.npmjs.com/package/pg-ast): **🔍 Low-level AST tools** and transformations for Postgres query structures.
|
|
106
|
+
|
|
107
|
+
### 🚀 API & Dev Tools
|
|
108
|
+
|
|
109
|
+
* [@constructive-io/graphql-server](https://github.com/constructive-io/constructive/tree/main/graphql/server): **⚡ Express-based API server** powered by PostGraphile to expose a secure, scalable GraphQL API over your Postgres database.
|
|
110
|
+
* [@constructive-io/graphql-explorer](https://github.com/constructive-io/constructive/tree/main/graphql/explorer): **🔎 Visual API explorer** with GraphiQL for browsing across all databases and schemas—useful for debugging, documentation, and API prototyping.
|
|
111
|
+
|
|
112
|
+
### 🔁 Streaming & Uploads
|
|
113
|
+
|
|
114
|
+
* [etag-hash](https://github.com/constructive-io/constructive/tree/main/streaming/etag-hash): **🏷️ S3-compatible ETags** created by streaming and hashing file uploads in chunks.
|
|
115
|
+
* [etag-stream](https://github.com/constructive-io/constructive/tree/main/streaming/etag-stream): **🔄 ETag computation** via Node stream transformer during upload or transfer.
|
|
116
|
+
* [uuid-hash](https://github.com/constructive-io/constructive/tree/main/streaming/uuid-hash): **🆔 Deterministic UUIDs** generated from hashed content, great for deduplication and asset referencing.
|
|
117
|
+
* [uuid-stream](https://github.com/constructive-io/constructive/tree/main/streaming/uuid-stream): **🌊 Streaming UUID generation** based on piped file content—ideal for upload pipelines.
|
|
118
|
+
* [@constructive-io/s3-streamer](https://github.com/constructive-io/constructive/tree/main/streaming/s3-streamer): **📤 Direct S3 streaming** for large files with support for metadata injection and content validation.
|
|
119
|
+
* [@constructive-io/upload-names](https://github.com/constructive-io/constructive/tree/main/streaming/upload-names): **📂 Collision-resistant filenames** utility for structured and unique file names for uploads.
|
|
120
|
+
|
|
121
|
+
### 🧰 CLI & Codegen
|
|
122
|
+
|
|
123
|
+
* [pgpm](https://github.com/constructive-io/constructive/tree/main/pgpm/pgpm): **🖥️ PostgreSQL Package Manager** for modular Postgres development. Works with database workspaces, scaffolding, migrations, seeding, and installing database packages.
|
|
124
|
+
* [@constructive-io/cli](https://github.com/constructive-io/constructive/tree/main/packages/cli): **🖥️ Command-line toolkit** for managing Constructive projects—supports database scaffolding, migrations, seeding, code generation, and automation.
|
|
125
|
+
* [@constructive-io/graphql-codegen](https://github.com/constructive-io/constructive/tree/main/graphql/codegen): **✨ GraphQL code generation** (types, operations, SDK) from schema/endpoint introspection.
|
|
126
|
+
* [@constructive-io/query-builder](https://github.com/constructive-io/constructive/tree/main/packages/query-builder): **🏗️ SQL constructor** providing a robust TypeScript-based query builder for dynamic generation of `SELECT`, `INSERT`, `UPDATE`, `DELETE`, and stored procedure calls—supports advanced SQL features like `JOIN`, `GROUP BY`, and schema-qualified queries.
|
|
127
|
+
* [@constructive-io/graphql-query](https://github.com/constructive-io/constructive/tree/main/graphql/query): **🧩 Fluent GraphQL builder** for PostGraphile schemas. ⚡ Schema-aware via introspection, 🧩 composable and ergonomic for building deeply nested queries.
|
|
128
|
+
|
|
129
|
+
## Credits
|
|
130
|
+
|
|
131
|
+
**🛠 Built by the [Constructive](https://constructive.io) team — creators of modular Postgres tooling for secure, composable backends. If you like our work, contribute on [GitHub](https://github.com/constructive-io).**
|
|
132
|
+
|
|
133
|
+
## Disclaimer
|
|
134
|
+
|
|
135
|
+
AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED "AS IS", AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.
|
|
136
|
+
|
|
137
|
+
No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { PgConfig } from 'pg-env';
|
|
2
|
+
import { PgpmOptions, PgTestConnectionOptions, DeploymentOptions, ServerOptions, CDNOptions, MigrationOptions, JobsConfig } from '@pgpmjs/types';
|
|
3
|
+
import { GraphileOptions, GraphileFeatureOptions, ApiOptions } from './graphile';
|
|
4
|
+
/**
|
|
5
|
+
* GraphQL-specific options for Constructive
|
|
6
|
+
*/
|
|
7
|
+
export interface ConstructiveGraphQLOptions {
|
|
8
|
+
/** PostGraphile/Graphile configuration */
|
|
9
|
+
graphile?: GraphileOptions;
|
|
10
|
+
/** Feature flags and toggles for GraphQL */
|
|
11
|
+
features?: GraphileFeatureOptions;
|
|
12
|
+
/** API configuration options */
|
|
13
|
+
api?: ApiOptions;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Full Constructive configuration options
|
|
17
|
+
* Extends PgpmOptions with GraphQL/Graphile configuration
|
|
18
|
+
*/
|
|
19
|
+
export interface ConstructiveOptions extends PgpmOptions, ConstructiveGraphQLOptions {
|
|
20
|
+
/** Test database configuration options */
|
|
21
|
+
db?: Partial<PgTestConnectionOptions>;
|
|
22
|
+
/** PostgreSQL connection configuration */
|
|
23
|
+
pg?: Partial<PgConfig>;
|
|
24
|
+
/** PostGraphile/Graphile configuration */
|
|
25
|
+
graphile?: GraphileOptions;
|
|
26
|
+
/** HTTP server configuration */
|
|
27
|
+
server?: ServerOptions;
|
|
28
|
+
/** Feature flags and toggles for GraphQL */
|
|
29
|
+
features?: GraphileFeatureOptions;
|
|
30
|
+
/** API configuration options */
|
|
31
|
+
api?: ApiOptions;
|
|
32
|
+
/** CDN and file storage configuration */
|
|
33
|
+
cdn?: CDNOptions;
|
|
34
|
+
/** Module deployment configuration */
|
|
35
|
+
deployment?: DeploymentOptions;
|
|
36
|
+
/** Migration and code generation options */
|
|
37
|
+
migrations?: MigrationOptions;
|
|
38
|
+
/** Job system configuration */
|
|
39
|
+
jobs?: JobsConfig;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Default GraphQL-specific configuration values
|
|
43
|
+
*/
|
|
44
|
+
export declare const constructiveGraphqlDefaults: ConstructiveGraphQLOptions;
|
|
45
|
+
/**
|
|
46
|
+
* Full default configuration values for Constructive framework
|
|
47
|
+
* Combines PGPM core defaults with GraphQL/Graphile defaults
|
|
48
|
+
*/
|
|
49
|
+
export declare const constructiveDefaults: ConstructiveOptions;
|
package/constructive.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.constructiveDefaults = exports.constructiveGraphqlDefaults = void 0;
|
|
7
|
+
const deepmerge_1 = __importDefault(require("deepmerge"));
|
|
8
|
+
const types_1 = require("@pgpmjs/types");
|
|
9
|
+
const graphile_1 = require("./graphile");
|
|
10
|
+
/**
|
|
11
|
+
* Default GraphQL-specific configuration values
|
|
12
|
+
*/
|
|
13
|
+
exports.constructiveGraphqlDefaults = {
|
|
14
|
+
graphile: graphile_1.graphileDefaults,
|
|
15
|
+
features: graphile_1.graphileFeatureDefaults,
|
|
16
|
+
api: graphile_1.apiDefaults
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Full default configuration values for Constructive framework
|
|
20
|
+
* Combines PGPM core defaults with GraphQL/Graphile defaults
|
|
21
|
+
*/
|
|
22
|
+
exports.constructiveDefaults = deepmerge_1.default.all([
|
|
23
|
+
types_1.pgpmDefaults,
|
|
24
|
+
exports.constructiveGraphqlDefaults
|
|
25
|
+
]);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import deepmerge from 'deepmerge';
|
|
2
|
+
import { pgpmDefaults } from '@pgpmjs/types';
|
|
3
|
+
import { graphileDefaults, graphileFeatureDefaults, apiDefaults } from './graphile';
|
|
4
|
+
/**
|
|
5
|
+
* Default GraphQL-specific configuration values
|
|
6
|
+
*/
|
|
7
|
+
export const constructiveGraphqlDefaults = {
|
|
8
|
+
graphile: graphileDefaults,
|
|
9
|
+
features: graphileFeatureDefaults,
|
|
10
|
+
api: apiDefaults
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Full default configuration values for Constructive framework
|
|
14
|
+
* Combines PGPM core defaults with GraphQL/Graphile defaults
|
|
15
|
+
*/
|
|
16
|
+
export const constructiveDefaults = deepmerge.all([
|
|
17
|
+
pgpmDefaults,
|
|
18
|
+
constructiveGraphqlDefaults
|
|
19
|
+
]);
|
package/esm/graphile.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default GraphQL/Graphile configuration values
|
|
3
|
+
*/
|
|
4
|
+
export const graphileDefaults = {
|
|
5
|
+
schema: [],
|
|
6
|
+
appendPlugins: [],
|
|
7
|
+
overrideSettings: {},
|
|
8
|
+
graphileBuildOptions: {},
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Default feature options for GraphQL/Graphile
|
|
12
|
+
*/
|
|
13
|
+
export const graphileFeatureDefaults = {
|
|
14
|
+
simpleInflection: true,
|
|
15
|
+
oppositeBaseNames: true,
|
|
16
|
+
postgis: true
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Default API configuration values
|
|
20
|
+
*/
|
|
21
|
+
export const apiDefaults = {
|
|
22
|
+
enableMetaApi: true,
|
|
23
|
+
exposedSchemas: [],
|
|
24
|
+
anonRole: 'administrator',
|
|
25
|
+
roleName: 'administrator',
|
|
26
|
+
defaultDatabaseId: 'hard-coded',
|
|
27
|
+
isPublic: true,
|
|
28
|
+
metaSchemas: ['collections_public', 'meta_public']
|
|
29
|
+
};
|
package/esm/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Re-export all core types from @pgpmjs/types for convenience
|
|
2
|
+
export * from '@pgpmjs/types';
|
|
3
|
+
// Export GraphQL/Graphile specific types
|
|
4
|
+
export { graphileDefaults, graphileFeatureDefaults, apiDefaults } from './graphile';
|
|
5
|
+
// Export Constructive combined types
|
|
6
|
+
export { constructiveGraphqlDefaults, constructiveDefaults } from './constructive';
|
package/graphile.d.ts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { Plugin } from 'graphile-build';
|
|
2
|
+
import { PostGraphileOptions } from 'postgraphile';
|
|
3
|
+
/**
|
|
4
|
+
* PostGraphile/Graphile configuration
|
|
5
|
+
*/
|
|
6
|
+
export interface GraphileOptions {
|
|
7
|
+
/** Database schema(s) to expose through GraphQL */
|
|
8
|
+
schema?: string | string[];
|
|
9
|
+
/** Additional Graphile plugins to load */
|
|
10
|
+
appendPlugins?: Plugin[];
|
|
11
|
+
/** Build options for Graphile */
|
|
12
|
+
graphileBuildOptions?: PostGraphileOptions['graphileBuildOptions'];
|
|
13
|
+
/** Override settings for PostGraphile */
|
|
14
|
+
overrideSettings?: Partial<PostGraphileOptions>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Feature flags and toggles for GraphQL/Graphile
|
|
18
|
+
*/
|
|
19
|
+
export interface GraphileFeatureOptions {
|
|
20
|
+
/** Use simple inflection for GraphQL field names */
|
|
21
|
+
simpleInflection?: boolean;
|
|
22
|
+
/** Use opposite base names for relationships */
|
|
23
|
+
oppositeBaseNames?: boolean;
|
|
24
|
+
/** Enable PostGIS spatial database support */
|
|
25
|
+
postgis?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Configuration options for the Constructive API
|
|
29
|
+
*/
|
|
30
|
+
export interface ApiOptions {
|
|
31
|
+
/** Whether to enable the meta API endpoints */
|
|
32
|
+
enableMetaApi?: boolean;
|
|
33
|
+
/** Database schemas to expose through the API */
|
|
34
|
+
exposedSchemas?: string[];
|
|
35
|
+
/** Anonymous role name for unauthenticated requests */
|
|
36
|
+
anonRole?: string;
|
|
37
|
+
/** Default role name for authenticated requests */
|
|
38
|
+
roleName?: string;
|
|
39
|
+
/** Default database identifier to use */
|
|
40
|
+
defaultDatabaseId?: string;
|
|
41
|
+
/** Whether the API is publicly accessible */
|
|
42
|
+
isPublic?: boolean;
|
|
43
|
+
/** Schemas containing metadata tables */
|
|
44
|
+
metaSchemas?: string[];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Default GraphQL/Graphile configuration values
|
|
48
|
+
*/
|
|
49
|
+
export declare const graphileDefaults: GraphileOptions;
|
|
50
|
+
/**
|
|
51
|
+
* Default feature options for GraphQL/Graphile
|
|
52
|
+
*/
|
|
53
|
+
export declare const graphileFeatureDefaults: GraphileFeatureOptions;
|
|
54
|
+
/**
|
|
55
|
+
* Default API configuration values
|
|
56
|
+
*/
|
|
57
|
+
export declare const apiDefaults: ApiOptions;
|
package/graphile.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.apiDefaults = exports.graphileFeatureDefaults = exports.graphileDefaults = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Default GraphQL/Graphile configuration values
|
|
6
|
+
*/
|
|
7
|
+
exports.graphileDefaults = {
|
|
8
|
+
schema: [],
|
|
9
|
+
appendPlugins: [],
|
|
10
|
+
overrideSettings: {},
|
|
11
|
+
graphileBuildOptions: {},
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Default feature options for GraphQL/Graphile
|
|
15
|
+
*/
|
|
16
|
+
exports.graphileFeatureDefaults = {
|
|
17
|
+
simpleInflection: true,
|
|
18
|
+
oppositeBaseNames: true,
|
|
19
|
+
postgis: true
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Default API configuration values
|
|
23
|
+
*/
|
|
24
|
+
exports.apiDefaults = {
|
|
25
|
+
enableMetaApi: true,
|
|
26
|
+
exposedSchemas: [],
|
|
27
|
+
anonRole: 'administrator',
|
|
28
|
+
roleName: 'administrator',
|
|
29
|
+
defaultDatabaseId: 'hard-coded',
|
|
30
|
+
isPublic: true,
|
|
31
|
+
metaSchemas: ['collections_public', 'meta_public']
|
|
32
|
+
};
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export * from '@pgpmjs/types';
|
|
2
|
+
export { GraphileOptions, GraphileFeatureOptions, ApiOptions, graphileDefaults, graphileFeatureDefaults, apiDefaults } from './graphile';
|
|
3
|
+
export { ConstructiveGraphQLOptions, ConstructiveOptions, constructiveGraphqlDefaults, constructiveDefaults } from './constructive';
|
package/index.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.constructiveDefaults = exports.constructiveGraphqlDefaults = exports.apiDefaults = exports.graphileFeatureDefaults = exports.graphileDefaults = void 0;
|
|
18
|
+
// Re-export all core types from @pgpmjs/types for convenience
|
|
19
|
+
__exportStar(require("@pgpmjs/types"), exports);
|
|
20
|
+
// Export GraphQL/Graphile specific types
|
|
21
|
+
var graphile_1 = require("./graphile");
|
|
22
|
+
Object.defineProperty(exports, "graphileDefaults", { enumerable: true, get: function () { return graphile_1.graphileDefaults; } });
|
|
23
|
+
Object.defineProperty(exports, "graphileFeatureDefaults", { enumerable: true, get: function () { return graphile_1.graphileFeatureDefaults; } });
|
|
24
|
+
Object.defineProperty(exports, "apiDefaults", { enumerable: true, get: function () { return graphile_1.apiDefaults; } });
|
|
25
|
+
// Export Constructive combined types
|
|
26
|
+
var constructive_1 = require("./constructive");
|
|
27
|
+
Object.defineProperty(exports, "constructiveGraphqlDefaults", { enumerable: true, get: function () { return constructive_1.constructiveGraphqlDefaults; } });
|
|
28
|
+
Object.defineProperty(exports, "constructiveDefaults", { enumerable: true, get: function () { return constructive_1.constructiveDefaults; } });
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@constructive-io/graphql-types",
|
|
3
|
+
"version": "2.12.4",
|
|
4
|
+
"author": "Constructive <developers@constructive.io>",
|
|
5
|
+
"description": "Constructive GraphQL/Graphile types for PostGraphile integration",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"module": "esm/index.js",
|
|
8
|
+
"types": "index.d.ts",
|
|
9
|
+
"homepage": "https://github.com/constructive-io/constructive",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public",
|
|
13
|
+
"directory": "dist"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/constructive-io/constructive"
|
|
18
|
+
},
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/constructive-io/constructive/issues"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"clean": "makage clean",
|
|
24
|
+
"prepack": "npm run build",
|
|
25
|
+
"build": "makage build",
|
|
26
|
+
"build:dev": "makage build --dev",
|
|
27
|
+
"lint": "eslint . --fix",
|
|
28
|
+
"test": "jest --passWithNoTests",
|
|
29
|
+
"test:watch": "jest --watch"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@pgpmjs/types": "^2.12.4",
|
|
33
|
+
"deepmerge": "^4.3.1",
|
|
34
|
+
"graphile-build": "^4.14.1",
|
|
35
|
+
"pg-env": "^1.2.3",
|
|
36
|
+
"postgraphile": "^4.14.1"
|
|
37
|
+
},
|
|
38
|
+
"keywords": [
|
|
39
|
+
"graphql",
|
|
40
|
+
"types",
|
|
41
|
+
"typescript",
|
|
42
|
+
"constructive",
|
|
43
|
+
"postgraphile",
|
|
44
|
+
"graphile"
|
|
45
|
+
],
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"makage": "^0.1.8"
|
|
48
|
+
},
|
|
49
|
+
"gitHead": "22cfe32e994e26a6490e04e28bab26d1e7e6345c"
|
|
50
|
+
}
|