@econneq/gql-auth 1.0.0
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 +22 -0
- package/package.json +21 -0
package/README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# @e-conneq/gql-auth
|
|
2
|
+
version 1.0.0
|
|
3
|
+
|
|
4
|
+
A high-performance, multi-tenant GraphQL abstraction layer designed for **Next.js (App Router)** and **Apollo Client**.
|
|
5
|
+
|
|
6
|
+
This package standardizes how frontend projects interact with a Django GraphQL backend, handling tenant detection, SSR cookie forwarding, and multipart file uploads.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## ✨ Features
|
|
11
|
+
|
|
12
|
+
* 🌍 **Automatic Tenant Injection**: Detects subdomains and injects `X-Tenant-ID`, `X-Process-ID`, and `X-Widget-ID` headers.
|
|
13
|
+
* 🔐 **SSR Ready**: Built-in support for `next/headers` to forward authentication cookies during Server-Side Rendering.
|
|
14
|
+
* 📁 **Smart File Uploads**: Simplifies `multipart/form-data` logic for GraphQL mutations.
|
|
15
|
+
* 🚀 **Lightweight**: Optimized to use peer dependencies, keeping your bundle size minimal.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 📦 Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install @e-conneq/gql-auth
|
package/package.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@econneq/gql-auth",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"module": "dist/index.mjs",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"peerDependencies": {
|
|
11
|
+
"next": "^13.0.0 || ^14.0.0 || ^15.0.0",
|
|
12
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
13
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
14
|
+
"@apollo/client": "^3.0.0",
|
|
15
|
+
"graphql": "^16.0.0",
|
|
16
|
+
"sweetalert2": "^11.26.17"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"js-cookie": "^3.0.0"
|
|
20
|
+
}
|
|
21
|
+
}
|