graphile-test 2.11.3 → 2.11.5
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 +20 -20
- package/package.json +7 -7
- package/types.d.ts +1 -1
package/README.md
CHANGED
|
@@ -16,18 +16,18 @@
|
|
|
16
16
|
</a>
|
|
17
17
|
</p>
|
|
18
18
|
|
|
19
|
-
`graphile-test` builds on top of [`pgsql-test`](https://github.com/constructive-io/constructive/tree/main/
|
|
19
|
+
`graphile-test` builds on top of [`pgsql-test`](https://github.com/constructive-io/constructive/tree/main/postgres/pgsql-test) to provide robust GraphQL testing utilities for PostGraphile-based projects.
|
|
20
20
|
|
|
21
21
|
It provides a seamless setup for isolated, seeded, role-aware Postgres databases and injects GraphQL helpers for snapshot testing, role context, and mutation/query assertions.
|
|
22
22
|
|
|
23
|
-
**Note:** This is a bare-bones package with no defaults or settings applied. For a batteries-included version with all
|
|
23
|
+
**Note:** This is a bare-bones package with no defaults or settings applied. For a batteries-included version with all Constructive plugins pre-configured, use [`@constructive-io/graphql-test`](https://github.com/constructive-io/constructive/tree/main/graphql/test) instead.
|
|
24
24
|
|
|
25
25
|
## 🚀 Features
|
|
26
26
|
|
|
27
27
|
* 🔁 **Per-test rollback** via savepoints for isolation
|
|
28
28
|
* 🔐 **RLS-aware context injection** (`setContext`)
|
|
29
29
|
* 🧪 **GraphQL integration testing** with `query()` and snapshot support
|
|
30
|
-
* 📦 **Seed support** for `.sql`, JSON, CSV,
|
|
30
|
+
* 📦 **Seed support** for `.sql`, JSON, CSV, Constructive, or Sqitch
|
|
31
31
|
* 📊 **Introspection query snapshotting**
|
|
32
32
|
* 🔧 **Raw SQL fallback** via `pg.client.query`
|
|
33
33
|
|
|
@@ -243,10 +243,10 @@ Common issues and solutions for pgpm, PostgreSQL, and testing.
|
|
|
243
243
|
|
|
244
244
|
### 🧪 Testing
|
|
245
245
|
|
|
246
|
-
* [pgsql-test](https://github.com/constructive-io/constructive/tree/main/
|
|
247
|
-
* [supabase-test](https://github.com/constructive-io/constructive/tree/main/
|
|
248
|
-
* [graphile-test](https://github.com/constructive-io/constructive/tree/main/
|
|
249
|
-
* [pg-query-context](https://github.com/constructive-io/constructive/tree/main/
|
|
246
|
+
* [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.
|
|
247
|
+
* [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.
|
|
248
|
+
* [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.
|
|
249
|
+
* [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.
|
|
250
250
|
|
|
251
251
|
### 🧠 Parsing & AST
|
|
252
252
|
|
|
@@ -260,25 +260,25 @@ Common issues and solutions for pgpm, PostgreSQL, and testing.
|
|
|
260
260
|
|
|
261
261
|
### 🚀 API & Dev Tools
|
|
262
262
|
|
|
263
|
-
* [
|
|
264
|
-
* [
|
|
263
|
+
* [@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.
|
|
264
|
+
* [@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.
|
|
265
265
|
|
|
266
266
|
### 🔁 Streaming & Uploads
|
|
267
267
|
|
|
268
|
-
* [etag-hash](https://github.com/constructive-io/constructive/tree/main/
|
|
269
|
-
* [etag-stream](https://github.com/constructive-io/constructive/tree/main/
|
|
270
|
-
* [uuid-hash](https://github.com/constructive-io/constructive/tree/main/
|
|
271
|
-
* [uuid-stream](https://github.com/constructive-io/constructive/tree/main/
|
|
272
|
-
* [
|
|
273
|
-
* [
|
|
268
|
+
* [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.
|
|
269
|
+
* [etag-stream](https://github.com/constructive-io/constructive/tree/main/streaming/etag-stream): **🔄 ETag computation** via Node stream transformer during upload or transfer.
|
|
270
|
+
* [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.
|
|
271
|
+
* [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.
|
|
272
|
+
* [@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.
|
|
273
|
+
* [@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.
|
|
274
274
|
|
|
275
275
|
### 🧰 CLI & Codegen
|
|
276
276
|
|
|
277
|
-
* [pgpm](https://github.com/constructive-io/constructive/tree/main/
|
|
278
|
-
* [@
|
|
279
|
-
* [
|
|
280
|
-
* [@
|
|
281
|
-
* [@
|
|
277
|
+
* [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.
|
|
278
|
+
* [@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.
|
|
279
|
+
* [@constructive-io/graphql-codegen](https://github.com/constructive-io/constructive/tree/main/graphql/codegen): **✨ GraphQL code generation** (types, operations, SDK) from schema/endpoint introspection.
|
|
280
|
+
* [@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.
|
|
281
|
+
* [@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.
|
|
282
282
|
|
|
283
283
|
## Credits
|
|
284
284
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphile-test",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.5",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "PostGraphile Testing",
|
|
6
6
|
"main": "index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"build": "makage build",
|
|
26
26
|
"build:dev": "makage build --dev",
|
|
27
27
|
"lint": "eslint . --fix",
|
|
28
|
-
"test": "jest",
|
|
28
|
+
"test": "jest --passWithNoTests",
|
|
29
29
|
"test:watch": "jest --watch"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"makage": "^0.1.8"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@
|
|
38
|
-
"@
|
|
39
|
-
"@pgpmjs/types": "^2.12.
|
|
37
|
+
"@constructive-io/graphql-env": "^2.8.4",
|
|
38
|
+
"@constructive-io/graphql-types": "^2.12.4",
|
|
39
|
+
"@pgpmjs/types": "^2.12.4",
|
|
40
40
|
"graphql": "15.10.1",
|
|
41
41
|
"mock-req": "^0.2.0",
|
|
42
42
|
"pg": "^8.16.3",
|
|
43
|
-
"pgsql-test": "^2.17.
|
|
43
|
+
"pgsql-test": "^2.17.2",
|
|
44
44
|
"postgraphile": "^4.14.1"
|
|
45
45
|
},
|
|
46
46
|
"keywords": [
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"pgpm",
|
|
52
52
|
"test"
|
|
53
53
|
],
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "22cfe32e994e26a6490e04e28bab26d1e7e6345c"
|
|
55
55
|
}
|
package/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GraphileOptions } from '@
|
|
1
|
+
import type { GraphileOptions } from '@constructive-io/graphql-types';
|
|
2
2
|
import { DocumentNode, GraphQLError } from 'graphql';
|
|
3
3
|
export interface GraphQLQueryOptions<TVariables = Record<string, any>> {
|
|
4
4
|
query: string | DocumentNode;
|