graphjin 3.18.30 → 3.18.32

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 -7
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -668,16 +668,26 @@ Also works with AWS Aurora/RDS, Google Cloud SQL, and YugabyteDB. Snowflake supp
668
668
 
669
669
  **Query allow-lists** - In production, only saved queries can run. AI models call `execute_saved_query` with pre-approved queries. No arbitrary SQL injection possible.
670
670
 
671
- **Role-based access** - Different roles see different data:
671
+ **Source-mode access** - New multi-user deployments should use `sources:` with request-wide `identity` and source-level access defaults. GraphJin compiles those defaults into the existing qcode/SQL enforcement path, so account filters and trusted mutation presets are enforced by the generated database query.
672
+
672
673
  ```yaml
673
- roles:
674
- user:
675
- tables:
676
- - name: orders
677
- query:
678
- filters: ["{ user_id: { eq: $user_id } }"]
674
+ identity:
675
+ user_id_claim: sub
676
+ role_claims: [role, roles]
677
+ namespace_claim: account_id
678
+
679
+ sources:
680
+ - name: app
681
+ kind: database
682
+ access:
683
+ read: account
684
+ write: blocked
685
+ delete: blocked
686
+ namespace_column: account_id
679
687
  ```
680
688
 
689
+ See [SECURITY.md](SECURITY.md) for the security model and [Source Mode Migration](docs/SOURCE-MODE-MIGRATION.md) for legacy `roles[].tables` migration steps. In source mode, user-written `roles[].tables` rules are rejected intentionally.
690
+
681
691
  **JWT authentication** - Supports Auth0, Firebase, JWKS endpoints.
682
692
 
683
693
  **Response caching** - Redis with in-memory fallback. Automatic cache invalidation on mutations. **Stale-while-revalidate** support: serve cached responses immediately while a background worker refreshes the entry — concurrent refreshes for the same key are deduplicated via singleflight, and the worker pool is bounded so a thundering herd can't spawn unbounded goroutines.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphjin",
3
- "version": "3.18.30",
3
+ "version": "3.18.32",
4
4
  "description": "GraphJin CLI - Build APIs in 5 minutes with GraphQL",
5
5
  "bin": {
6
6
  "graphjin": "bin/graphjin.js"