graphile-upload-plugin 0.2.1 โ†’ 0.2.2

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 (2) hide show
  1. package/README.md +17 -4
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -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,6 +74,13 @@ 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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphile-upload-plugin",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Graphile upload plugin for PostGraphile",
5
5
  "author": "Dan Lynch <pyramation@gmail.com>",
6
6
  "homepage": "https://github.com/launchql/launchql",
@@ -42,10 +42,10 @@
42
42
  "@launchql/env": "^2.5.6",
43
43
  "@launchql/s3-utils": "^2.2.10",
44
44
  "@types/pg": "^8.15.2",
45
- "graphile-test": "^2.8.10",
45
+ "graphile-test": "^2.8.11",
46
46
  "graphql-tag": "^2.12.6",
47
47
  "makage": "^0.1.6",
48
- "pgsql-test": "^2.14.13",
48
+ "pgsql-test": "^2.14.14",
49
49
  "ts-jest": "^29.1.0"
50
50
  },
51
51
  "dependencies": {
@@ -54,5 +54,5 @@
54
54
  "graphile-build": "^4.14.1",
55
55
  "graphql": "15.10.1"
56
56
  },
57
- "gitHead": "4e1ff9771c2b07808a9830281abc24d12c689187"
57
+ "gitHead": "00c90828cab8d3e306ebb2bc6053aab4aa9ae807"
58
58
  }