graphjin 2.0.11 → 2.0.12

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 CHANGED
@@ -1,26 +1,27 @@
1
1
  # GraphJin, Build APIs in 5 minutes not weeks
2
2
 
3
3
  [![Apache 2.0](https://img.shields.io/github/license/dosco/graphjin.svg?style=for-the-badge)](https://github.com/dosco/graphjin/blob/master/LICENSE)
4
+ [![NPM Package](https://img.shields.io/npm/v/graphjin?style=for-the-badge)](https://www.npmjs.com/package/graphjin)
4
5
  [![Docker Pulls](https://img.shields.io/docker/pulls/dosco/graphjin?style=for-the-badge)](https://hub.docker.com/r/dosco/graphjin/builds)
5
6
  [![Discord Chat](https://img.shields.io/discord/628796009539043348.svg?style=for-the-badge&logo=appveyor)](https://discord.gg/6pSWCTZ)
6
- [![GoDoc](https://img.shields.io/badge/godoc-reference-5272B4.svg?style=for-the-badge&logo=appveyor&logo=appveyor)](https://pkg.go.dev/github.com/dosco/graphjin)
7
- [![GoReport](https://goreportcard.com/badge/github.com/gojp/goreportcard?style=for-the-badge)](https://goreportcard.com/report/github.com/dosco/graphjin)
7
+ [![GoDoc](https://img.shields.io/badge/godoc-reference-5272B4.svg?style=for-the-badge&logo=appveyor&logo=appveyor)](https://pkg.go.dev/github.com/dosco/graphjin/v2)
8
+ [![GoReport](https://goreportcard.com/badge/github.com/gojp/goreportcard?style=for-the-badge)](https://goreportcard.com/report/github.com/dosco/graphjin/v2)
8
9
 
9
10
  <!-- [![Run on Google Cloud](./.github/deploy-cloud-run-button.svg)](https://deploy.cloud.run)
10
11
  -->
11
12
 
12
- GraphJin gives you an instant secure and fast GraphQL API without code. Just use a GraphQL query to define your API and GraphJin automagically converts it into a full featured API. Build your backend APIs **100X** faster. Works with **NodeJS** and **GO**. Supports several databases, **Postgres**, **MySQL**, **YugabyteDB**, etc.
13
+ GraphJin gives you an instant secure and fast GraphQL API without code. Just use a GraphQL query to define your API and GraphJin automagically converts it into a full featured API. Build your backend APIs **100X** faster. Works with **NodeJS** and **GO**. Supports several databases, **Postgres**, **MySQL**, **Yugabyte**, **AWS Aurora/RDS** and **Google Cloud SQL**
13
14
 
14
15
  ## Secure out of the box
15
16
 
16
17
  In production all queries are always read from locally saved copies not from what the client sends hence clients cannot modify the query. This makes
17
- GraphJin very secure as its similiar to building APIs by hand. The idea that GraphQL means that clients can change the query as they wish **does not** apply to GraphJin
18
+ GraphJin very secure as its similar to building APIs by hand. The idea that GraphQL means that clients can change the query as they wish **does not** apply to GraphJin
18
19
 
19
20
  ## Great Documentation
20
21
 
21
- Detailed docs on GraphQL syntax, usecases, Javascript and GO code examples and it's actively updated.
22
+ Detailed docs on GraphQL syntax, usecases, JS and GO code examples and it's actively updated.
22
23
 
23
- # [https://graphjin.com](https://graphjin.com)
24
+ ## [![Docs](https://img.shields.io/badge/Docs-graphjin.com-red?style=for-the-badge)](https://graphjin.com)
24
25
 
25
26
  ## Use with NodeJS
26
27
 
@@ -81,79 +82,11 @@ server.listen(3000);
81
82
  console.log("Express server started on port %s", server.address().port);
82
83
  ```
83
84
 
84
- ---
85
+ ## Use with GO
85
86
 
86
- ## Use with GO / Standalone service
87
+ You can use GraphJin as a library within your own code. The [serv](https://pkg.go.dev/github.com/dosco/graphjin/v2/serv) package exposes the entirely GraphJin standlone service as a library while the [core](https://pkg.go.dev/github.com/dosco/graphjin/core/v2) package exposes just the GraphJin compiler. The [Go docs](https://pkg.go.dev/github.com/dosco/graphjin/v2/core#pkg-examples) are filled with examples on how to use GraphJin within your own apps as a sort of alternative to using ORM packages. GraphJin allows you to use GraphQL and the full power of GraphJin to access your data instead of a limiting ORM.
87
88
 
88
- ### Quick install
89
-
90
- ```
91
- # Mac (Homebrew)
92
- brew install dosco/graphjin/graphjin
93
-
94
- # Ubuntu (Snap)
95
- sudo snap install --classic graphjin
96
- ```
97
-
98
- Debian and Redhat ([releases](https://github.com/dosco/graphjin/releases))
99
- Download the .deb or .rpm from the releases page and install with dpkg -i and rpm -i respectively.
100
-
101
- ### Quickly create and deploy new apps
102
-
103
- ```bash
104
- graphjin new <app_name>
105
- ```
106
-
107
- ### Instantly deploy new versions
108
-
109
- ```bash
110
- # Deploy a new config
111
- graphjin deploy --host=https://your-server.com --secret="your-secret-key"
112
-
113
- # Rollback the last deployment
114
- graphjin deploy rollback --host=https://your-server.com --secret="your-secret-key"
115
- ```
116
-
117
- ### Secrets Management
118
-
119
- ```bash
120
- # Secure save secrets like database passwords and JWT secret keys
121
- graphjin secrets
122
- ```
123
-
124
- ### Database Management
125
-
126
- ```bash
127
- # Create, Migrate and Seed your database
128
- graphjin db
129
- ```
130
-
131
- ### Use as a library
132
-
133
- You can use GraphJin as a library within your own code. The [serv](https://pkg.go.dev/github.com/dosco/graphjin/serv) package exposes the entirely GraphJin standlone service as a library while the [core](https://pkg.go.dev/github.com/dosco/graphjin/core) package exposes just the GraphJin compiler. The [Go docs](https://pkg.go.dev/github.com/dosco/graphjin/core#pkg-examples) are filled with examples on how to use GraphJin within your own apps as a sort of alternative to using ORM packages. GraphJin allows you to use GraphQL and the full power of GraphJin to access your data instead of a limiting ORM.
134
-
135
- ### Use the standalone service as a GO library
136
-
137
- ```golang
138
- import (
139
- "github.com/dosco/graphjin/serv/v2"
140
- )
141
-
142
- gj, err := serv.NewGraphJinService(conf, opt...)
143
- if err != nil {
144
- return err
145
- }
146
-
147
- if err := gj.Start(); err != nil {
148
- return err
149
- }
150
-
151
- // if err := gj.Attach(chiRouter); err != nil {
152
- // return err
153
- // }
154
- ```
155
-
156
- ### Use just the core GraphQL compiler in your own GO app
89
+ ### Use GraphJin Core
157
90
 
158
91
  ```console
159
92
  go get github.com/dosco/graphjin/v2
@@ -178,7 +111,7 @@ func main() {
178
111
  log.Fatal(err)
179
112
  }
180
113
 
181
- sg, err := core.NewGraphJin(nil, db)
114
+ gj, err := core.NewGraphJin(nil, db)
182
115
  if err != nil {
183
116
  log.Fatal(err)
184
117
  }
@@ -194,7 +127,7 @@ func main() {
194
127
  ctx := context.Background()
195
128
  ctx = context.WithValue(ctx, core.UserIDKey, 1)
196
129
 
197
- res, err := sg.GraphQL(ctx, query, nil, nil)
130
+ res, err := gj.GraphQL(ctx, query, nil, nil)
198
131
  if err != nil {
199
132
  log.Fatal(err)
200
133
  }
@@ -203,7 +136,71 @@ func main() {
203
136
  }
204
137
  ```
205
138
 
206
- ---
139
+ ### Use GraphJin Service
140
+
141
+ ```golang
142
+ import (
143
+ "github.com/dosco/graphjin/serv/v2"
144
+ )
145
+
146
+ gj, err := serv.NewGraphJinService(conf, opt...)
147
+ if err != nil {
148
+ return err
149
+ }
150
+
151
+ if err := gj.Start(); err != nil {
152
+ return err
153
+ }
154
+
155
+ // if err := gj.Attach(chiRouter); err != nil {
156
+ // return err
157
+ // }
158
+ ```
159
+
160
+ ## Standalone Service
161
+
162
+ ### Quick install
163
+
164
+ ```
165
+ # Mac (Homebrew)
166
+ brew install dosco/graphjin/graphjin
167
+
168
+ # Ubuntu (Snap)
169
+ sudo snap install --classic graphjin
170
+ ```
171
+
172
+ Debian and Redhat ([releases](https://github.com/dosco/graphjin/releases))
173
+ Download the .deb or .rpm from the releases page and install with dpkg -i and rpm -i respectively.
174
+
175
+ ### Quickly create and deploy new apps
176
+
177
+ ```bash
178
+ graphjin new <app_name>
179
+ ```
180
+
181
+ ### Instantly deploy new versions
182
+
183
+ ```bash
184
+ # Deploy a new config
185
+ graphjin deploy --host=https://your-server.com --secret="your-secret-key"
186
+
187
+ # Rollback the last deployment
188
+ graphjin deploy rollback --host=https://your-server.com --secret="your-secret-key"
189
+ ```
190
+
191
+ ### Secrets Management
192
+
193
+ ```bash
194
+ # Secure save secrets like database passwords and JWT secret keys
195
+ graphjin secrets
196
+ ```
197
+
198
+ ### Database Management
199
+
200
+ ```bash
201
+ # Create, Migrate and Seed your database
202
+ graphjin db
203
+ ```
207
204
 
208
205
  ## Built in Web-UI to help craft GraphQL queries
209
206
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphjin",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "description": "GraphJin - Build APIs in 5 minutes with GraphQL",
5
5
  "type": "module",
6
6
  "main": "./wasm/js/graphjin.js",
@@ -28,7 +28,7 @@
28
28
  "bugs": {
29
29
  "url": "https://github.com/dosco/graphjin/issues"
30
30
  },
31
- "homepage": "https://github.com/dosco/graphjin#readme",
31
+ "homepage": "https://graphjin.com",
32
32
  "devDependencies": {
33
33
  "fs-extra": "^11.1.0"
34
34
  }
Binary file