graphile-upload-plugin 0.2.1 → 0.2.3

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.
Files changed (3) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +54 -41
  3. package/package.json +11 -11
package/LICENSE CHANGED
@@ -1,7 +1,7 @@
1
1
  The MIT License (MIT)
2
2
 
3
3
  Copyright (c) 2025 Dan Lynch <pyramation@gmail.com>
4
- Copyright (c) 2025 Hyperweb <developers@hyperweb.io>
4
+ Copyright (c) 2025 Constructive <developers@constructive.io>
5
5
  Copyright (c) 2020-present, Interweb, Inc.
6
6
 
7
7
  Permission is hereby granted, free of charge, to any person obtaining a copy
package/README.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # graphile-upload-plugin
2
2
 
3
3
  <p align="center" width="100%">
4
- <img height="250" src="https://raw.githubusercontent.com/launchql/launchql/refs/heads/main/assets/outline-logo.svg" />
4
+ <img height="250" src="https://raw.githubusercontent.com/constructive-io/constructive/refs/heads/main/assets/outline-logo.svg" />
5
5
  </p>
6
6
 
7
7
  <p align="center" width="100%">
8
- <a href="https://github.com/launchql/launchql/actions/workflows/run-tests.yaml">
9
- <img height="20" src="https://github.com/launchql/launchql/actions/workflows/run-tests.yaml/badge.svg" />
8
+ <a href="https://github.com/constructive-io/constructive/actions/workflows/run-tests.yaml">
9
+ <img height="20" src="https://github.com/constructive-io/constructive/actions/workflows/run-tests.yaml/badge.svg" />
10
10
  </a>
11
- <a href="https://github.com/launchql/launchql/blob/main/LICENSE">
11
+ <a href="https://github.com/constructive-io/constructive/blob/main/LICENSE">
12
12
  <img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/>
13
13
  </a>
14
14
  <a href="https://www.npmjs.com/package/graphile-upload-plugin">
@@ -16,15 +16,21 @@
16
16
  </a>
17
17
  </p>
18
18
 
19
- PostGraphile plugin for handling file uploads via GraphQL. Adds `Upload` scalar type and upload field support for PostgreSQL columns.
19
+ **`graphile-upload-plugin`** adds an `Upload` scalar and upload field resolvers for PostGraphile, letting you store uploaded metadata in PostgreSQL columns.
20
20
 
21
- ## Install
21
+ ## 🚀 Installation
22
22
 
23
23
  ```bash
24
24
  pnpm add graphile-upload-plugin
25
25
  ```
26
26
 
27
- ## Usage
27
+ ## ✨ Features
28
+
29
+ - Adds the `Upload` scalar to PostGraphile
30
+ - Supports upload resolvers by type or smart comment tag
31
+ - Flexible resolver hook to store files anywhere (S3, local, etc.)
32
+
33
+ ## 📦 Usage
28
34
 
29
35
  ```ts
30
36
  import express from 'express';
@@ -59,7 +65,7 @@ app.use(
59
65
  );
60
66
  ```
61
67
 
62
- ## Configuration
68
+ ## 🔧 Configuration
63
69
 
64
70
  The plugin accepts `uploadFieldDefinitions` in `graphileBuildOptions`:
65
71
 
@@ -68,75 +74,82 @@ The plugin accepts `uploadFieldDefinitions` in `graphileBuildOptions`:
68
74
 
69
75
  Each definition requires a `resolve` function that processes the upload and returns the value to store in the database.
70
76
 
77
+ ## 🧪 Testing
78
+
79
+ ```sh
80
+ # requires a local Postgres available (defaults to postgres/password@localhost:5432)
81
+ pnpm --filter graphile-upload-plugin test
82
+ ```
83
+
71
84
  ---
72
85
 
73
86
  ## Education and Tutorials
74
87
 
75
- 1. 🚀 [Quickstart: Getting Up and Running](https://launchql.com/learn/quickstart)
88
+ 1. 🚀 [Quickstart: Getting Up and Running](https://constructive.io/learn/quickstart)
76
89
  Get started with modular databases in minutes. Install prerequisites and deploy your first module.
77
90
 
78
- 2. 📦 [Modular PostgreSQL Development with Database Packages](https://launchql.com/learn/modular-postgres)
91
+ 2. 📦 [Modular PostgreSQL Development with Database Packages](https://constructive.io/learn/modular-postgres)
79
92
  Learn to organize PostgreSQL projects with pgpm workspaces and reusable database modules.
80
93
 
81
- 3. ✏️ [Authoring Database Changes](https://launchql.com/learn/authoring-database-changes)
94
+ 3. ✏️ [Authoring Database Changes](https://constructive.io/learn/authoring-database-changes)
82
95
  Master the workflow for adding, organizing, and managing database changes with pgpm.
83
96
 
84
- 4. 🧪 [End-to-End PostgreSQL Testing with TypeScript](https://launchql.com/learn/e2e-postgres-testing)
97
+ 4. 🧪 [End-to-End PostgreSQL Testing with TypeScript](https://constructive.io/learn/e2e-postgres-testing)
85
98
  Master end-to-end PostgreSQL testing with ephemeral databases, RLS testing, and CI/CD automation.
86
99
 
87
- 5. ⚡ [Supabase Testing](https://launchql.com/learn/supabase)
100
+ 5. ⚡ [Supabase Testing](https://constructive.io/learn/supabase)
88
101
  Use TypeScript-first tools to test Supabase projects with realistic RLS, policies, and auth contexts.
89
102
 
90
- 6. 💧 [Drizzle ORM Testing](https://launchql.com/learn/drizzle-testing)
103
+ 6. 💧 [Drizzle ORM Testing](https://constructive.io/learn/drizzle-testing)
91
104
  Run full-stack tests with Drizzle ORM, including database setup, teardown, and RLS enforcement.
92
105
 
93
- 7. 🔧 [Troubleshooting](https://launchql.com/learn/troubleshooting)
106
+ 7. 🔧 [Troubleshooting](https://constructive.io/learn/troubleshooting)
94
107
  Common issues and solutions for pgpm, PostgreSQL, and testing.
95
108
 
96
- ## Related LaunchQL Tooling
109
+ ## Related Constructive Tooling
97
110
 
98
111
  ### 🧪 Testing
99
112
 
100
- * [launchql/pgsql-test](https://github.com/launchql/launchql/tree/main/packages/pgsql-test): **📊 Isolated testing environments** with per-test transaction rollbacks—ideal for integration tests, complex migrations, and RLS simulation.
101
- * [launchql/supabase-test](https://github.com/launchql/launchql/tree/main/packages/supabase-test): **🧪 Supabase-native test harness** preconfigured for the local Supabase stack—per-test rollbacks, JWT/role context helpers, and CI/GitHub Actions ready.
102
- * [launchql/graphile-test](https://github.com/launchql/launchql/tree/main/packages/graphile-test): **🔐 Authentication mocking** for Graphile-focused test helpers and emulating row-level security contexts.
103
- * [launchql/pg-query-context](https://github.com/launchql/launchql/tree/main/packages/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.
113
+ * [pgsql-test](https://github.com/constructive-io/constructive/tree/main/packages/pgsql-test): **📊 Isolated testing environments** with per-test transaction rollbacks—ideal for integration tests, complex migrations, and RLS simulation.
114
+ * [supabase-test](https://github.com/constructive-io/constructive/tree/main/packages/supabase-test): **🧪 Supabase-native test harness** preconfigured for the local Supabase stack—per-test rollbacks, JWT/role context helpers, and CI/GitHub Actions ready.
115
+ * [graphile-test](https://github.com/constructive-io/constructive/tree/main/packages/graphile-test): **🔐 Authentication mocking** for Graphile-focused test helpers and emulating row-level security contexts.
116
+ * [pg-query-context](https://github.com/constructive-io/constructive/tree/main/packages/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.
104
117
 
105
118
  ### 🧠 Parsing & AST
106
119
 
107
- * [launchql/pgsql-parser](https://github.com/launchql/pgsql-parser): **🔄 SQL conversion engine** that interprets and converts PostgreSQL syntax.
108
- * [launchql/libpg-query-node](https://github.com/launchql/libpg-query-node): **🌉 Node.js bindings** for `libpg_query`, converting SQL into parse trees.
109
- * [launchql/pg-proto-parser](https://github.com/launchql/pg-proto-parser): **📦 Protobuf parser** for parsing PostgreSQL Protocol Buffers definitions to generate TypeScript interfaces, utility functions, and JSON mappings for enums.
110
- * [@pgsql/enums](https://github.com/launchql/pgsql-parser/tree/main/packages/enums): **🏷️ TypeScript enums** for PostgreSQL AST for safe and ergonomic parsing logic.
111
- * [@pgsql/types](https://github.com/launchql/pgsql-parser/tree/main/packages/types): **📝 Type definitions** for PostgreSQL AST nodes in TypeScript.
112
- * [@pgsql/utils](https://github.com/launchql/pgsql-parser/tree/main/packages/utils): **🛠️ AST utilities** for constructing and transforming PostgreSQL syntax trees.
113
- * [launchql/pg-ast](https://github.com/launchql/launchql/tree/main/packages/pg-ast): **🔍 Low-level AST tools** and transformations for Postgres query structures.
120
+ * [pgsql-parser](https://www.npmjs.com/package/pgsql-parser): **🔄 SQL conversion engine** that interprets and converts PostgreSQL syntax.
121
+ * [libpg-query-node](https://www.npmjs.com/package/libpg-query): **🌉 Node.js bindings** for `libpg_query`, converting SQL into parse trees.
122
+ * [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.
123
+ * [@pgsql/enums](https://www.npmjs.com/package/@pgsql/enums): **🏷️ TypeScript enums** for PostgreSQL AST for safe and ergonomic parsing logic.
124
+ * [@pgsql/types](https://www.npmjs.com/package/@pgsql/types): **📝 Type definitions** for PostgreSQL AST nodes in TypeScript.
125
+ * [@pgsql/utils](https://www.npmjs.com/package/@pgsql/utils): **🛠️ AST utilities** for constructing and transforming PostgreSQL syntax trees.
126
+ * [pg-ast](https://www.npmjs.com/package/pg-ast): **🔍 Low-level AST tools** and transformations for Postgres query structures.
114
127
 
115
128
  ### 🚀 API & Dev Tools
116
129
 
117
- * [launchql/server](https://github.com/launchql/launchql/tree/main/packages/server): **⚡ Express-based API server** powered by PostGraphile to expose a secure, scalable GraphQL API over your Postgres database.
118
- * [launchql/explorer](https://github.com/launchql/launchql/tree/main/packages/explorer): **🔎 Visual API explorer** with GraphiQL for browsing across all databases and schemas—useful for debugging, documentation, and API prototyping.
130
+ * [launchql/server](https://github.com/constructive-io/constructive/tree/main/packages/server): **⚡ Express-based API server** powered by PostGraphile to expose a secure, scalable GraphQL API over your Postgres database.
131
+ * [launchql/explorer](https://github.com/constructive-io/constructive/tree/main/packages/explorer): **🔎 Visual API explorer** with GraphiQL for browsing across all databases and schemas—useful for debugging, documentation, and API prototyping.
119
132
 
120
133
  ### 🔁 Streaming & Uploads
121
134
 
122
- * [launchql/s3-streamer](https://github.com/launchql/launchql/tree/main/packages/s3-streamer): **📤 Direct S3 streaming** for large files with support for metadata injection and content validation.
123
- * [launchql/etag-hash](https://github.com/launchql/launchql/tree/main/packages/etag-hash): **🏷️ S3-compatible ETags** created by streaming and hashing file uploads in chunks.
124
- * [launchql/etag-stream](https://github.com/launchql/launchql/tree/main/packages/etag-stream): **🔄 ETag computation** via Node stream transformer during upload or transfer.
125
- * [launchql/uuid-hash](https://github.com/launchql/launchql/tree/main/packages/uuid-hash): **🆔 Deterministic UUIDs** generated from hashed content, great for deduplication and asset referencing.
126
- * [launchql/uuid-stream](https://github.com/launchql/launchql/tree/main/packages/uuid-stream): **🌊 Streaming UUID generation** based on piped file content—ideal for upload pipelines.
127
- * [launchql/upload-names](https://github.com/launchql/launchql/tree/main/packages/upload-names): **📂 Collision-resistant filenames** utility for structured and unique file names for uploads.
135
+ * [launchql/s3-streamer](https://github.com/constructive-io/constructive/tree/main/packages/s3-streamer): **📤 Direct S3 streaming** for large files with support for metadata injection and content validation.
136
+ * [launchql/etag-hash](https://github.com/constructive-io/constructive/tree/main/packages/etag-hash): **🏷️ S3-compatible ETags** created by streaming and hashing file uploads in chunks.
137
+ * [launchql/etag-stream](https://github.com/constructive-io/constructive/tree/main/packages/etag-stream): **🔄 ETag computation** via Node stream transformer during upload or transfer.
138
+ * [launchql/uuid-hash](https://github.com/constructive-io/constructive/tree/main/packages/uuid-hash): **🆔 Deterministic UUIDs** generated from hashed content, great for deduplication and asset referencing.
139
+ * [launchql/uuid-stream](https://github.com/constructive-io/constructive/tree/main/packages/uuid-stream): **🌊 Streaming UUID generation** based on piped file content—ideal for upload pipelines.
140
+ * [launchql/upload-names](https://github.com/constructive-io/constructive/tree/main/packages/upload-names): **📂 Collision-resistant filenames** utility for structured and unique file names for uploads.
128
141
 
129
142
  ### 🧰 CLI & Codegen
130
143
 
131
- * [pgpm](https://github.com/launchql/launchql/tree/main/packages/pgpm): **🖥️ PostgreSQL Package Manager** for modular Postgres development. Works with database workspaces, scaffolding, migrations, seeding, and installing database packages.
132
- * [@launchql/cli](https://github.com/launchql/launchql/tree/main/packages/cli): **🖥️ Command-line toolkit** for managing LaunchQL projects—supports database scaffolding, migrations, seeding, code generation, and automation.
133
- * [launchql/launchql-gen](https://github.com/launchql/launchql/tree/main/packages/launchql-gen): **✨ Auto-generated GraphQL** mutations and queries dynamically built from introspected schema data.
134
- * [@launchql/query-builder](https://github.com/launchql/launchql/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.
135
- * [@launchql/query](https://github.com/launchql/launchql/tree/main/packages/query): **🧩 Fluent GraphQL builder** for PostGraphile schemas. ⚡ Schema-aware via introspection, 🧩 composable and ergonomic for building deeply nested queries.
144
+ * [pgpm](https://github.com/constructive-io/constructive/tree/main/packages/pgpm): **🖥️ PostgreSQL Package Manager** for modular Postgres development. Works with database workspaces, scaffolding, migrations, seeding, and installing database packages.
145
+ * [@launchql/cli](https://github.com/constructive-io/constructive/tree/main/packages/cli): **🖥️ Command-line toolkit** for managing LaunchQL projects—supports database scaffolding, migrations, seeding, code generation, and automation.
146
+ * [launchql/launchql-gen](https://github.com/constructive-io/constructive/tree/main/packages/launchql-gen): **✨ Auto-generated GraphQL** mutations and queries dynamically built from introspected schema data.
147
+ * [@launchql/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.
148
+ * [@launchql/query](https://github.com/constructive-io/constructive/tree/main/packages/query): **🧩 Fluent GraphQL builder** for PostGraphile schemas. ⚡ Schema-aware via introspection, 🧩 composable and ergonomic for building deeply nested queries.
136
149
 
137
150
  ## Credits
138
151
 
139
- 🛠 Built by LaunchQL — if you like our tools, please checkout and contribute to [our github ⚛️](https://github.com/launchql)
152
+ 🛠 Built by Constructive — if you like our tools, please checkout and contribute to [our github ⚛️](https://github.com/constructive-io)
140
153
 
141
154
 
142
155
  ## Disclaimer
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "graphile-upload-plugin",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Graphile upload plugin for PostGraphile",
5
5
  "author": "Dan Lynch <pyramation@gmail.com>",
6
- "homepage": "https://github.com/launchql/launchql",
6
+ "homepage": "https://github.com/constructive-io/constructive",
7
7
  "license": "MIT",
8
8
  "main": "index.js",
9
9
  "module": "esm/index.js",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "repository": {
25
25
  "type": "git",
26
- "url": "https://github.com/launchql/launchql"
26
+ "url": "https://github.com/constructive-io/constructive"
27
27
  },
28
28
  "keywords": [
29
29
  "postgraphile",
@@ -35,24 +35,24 @@
35
35
  "upload"
36
36
  ],
37
37
  "bugs": {
38
- "url": "https://github.com/launchql/launchql/issues"
38
+ "url": "https://github.com/constructive-io/constructive/issues"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@aws-sdk/client-s3": "^3.0.0",
42
- "@launchql/env": "^2.5.6",
43
- "@launchql/s3-utils": "^2.2.10",
42
+ "@launchql/env": "^2.5.7",
43
+ "@launchql/s3-utils": "^2.2.11",
44
44
  "@types/pg": "^8.15.2",
45
- "graphile-test": "^2.8.10",
45
+ "graphile-test": "^2.8.12",
46
46
  "graphql-tag": "^2.12.6",
47
47
  "makage": "^0.1.6",
48
- "pgsql-test": "^2.14.13",
48
+ "pgsql-test": "^2.14.15",
49
49
  "ts-jest": "^29.1.0"
50
50
  },
51
51
  "dependencies": {
52
- "@launchql/s3-streamer": "^2.6.8",
53
- "@launchql/upload-names": "^2.2.10",
52
+ "@launchql/s3-streamer": "^2.6.9",
53
+ "@launchql/upload-names": "^2.2.11",
54
54
  "graphile-build": "^4.14.1",
55
55
  "graphql": "15.10.1"
56
56
  },
57
- "gitHead": "4e1ff9771c2b07808a9830281abc24d12c689187"
57
+ "gitHead": "5a0d7c7502624bd42a214f983fd7ab957e1fb3e3"
58
58
  }