graphjin 3.0.10 → 3.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
@@ -4,12 +4,58 @@
4
4
  [![NPM Package](https://img.shields.io/npm/v/graphjin?style=for-the-badge)](https://www.npmjs.com/package/graphjin)
5
5
  [![Docker Pulls](https://img.shields.io/docker/pulls/dosco/graphjin?style=for-the-badge)](https://hub.docker.com/r/dosco/graphjin/builds)
6
6
  [![Discord Chat](https://img.shields.io/discord/628796009539043348.svg?style=for-the-badge&logo=appveyor)](https://discord.gg/6pSWCTZ)
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)
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/core/v3)
8
+ [![GoReport](https://goreportcard.com/badge/github.com/gojp/goreportcard?style=for-the-badge)](https://goreportcard.com/report/github.com/dosco/graphjin/core/v3)
9
9
 
10
10
  ## Build APIs in 5 minutes not weeks
11
11
 
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**, **Yugabyte**, **AWS Aurora/RDS** and **Google Cloud SQL**
12
+ Just use a simple GraphQL query to define your API and GraphJin automagically converts it into SQL and fetches the data you need. 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
+ The following GraphQL query fetches a list of products, their owners, and other category information, including a cursor for retrieving more products.
15
+ GraphJin would do auto-discovery of your database schema and relationships and generate the most efficient single SQL query to fetch all this data including a cursor to fetch the next 20 times. You don't have to do a single thing besides write the GraphQL query.
16
+
17
+ ```graphql
18
+ query getProducts {
19
+ products(
20
+ # returns only 20 items
21
+ limit: 20
22
+
23
+ # orders the response items by highest price
24
+ order_by: { price: desc }
25
+
26
+ # only items with a price >= 20 and < 50 are returned
27
+ where: { price: { and: { greater_or_equals: 20, lt: 50 } } }
28
+ ) {
29
+ id
30
+ name
31
+ price
32
+
33
+ # also fetch the owner of the product
34
+ owner {
35
+ full_name
36
+ picture: avatar
37
+ email
38
+
39
+ # and the categories the owner has products under
40
+ category_counts(limit: 3) {
41
+ count
42
+ category {
43
+ name
44
+ }
45
+ }
46
+ }
47
+
48
+ # and the categories of the product itself
49
+ category(limit: 3) {
50
+ id
51
+ name
52
+ }
53
+ }
54
+ # also return a cursor that we can use to fetch the next
55
+ # batch of products
56
+ products_cursor
57
+ }
58
+ ```
13
59
 
14
60
  ## Secure out of the box
15
61
 
@@ -83,12 +129,12 @@ console.log("Express server started on port %s", server.address().port);
83
129
 
84
130
  ## Use with GO
85
131
 
86
- 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.
132
+ You can use GraphJin as a library within your own code. The [serv](https://pkg.go.dev/github.com/dosco/graphjin/serv/v3) package exposes the entirely GraphJin standlone service as a library while the [core](https://pkg.go.dev/github.com/dosco/graphjin/core/v3) package exposes just the GraphJin compiler. The [Go docs](https://pkg.go.dev/github.com/dosco/graphjin/tests/v3#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
133
 
88
134
  ### Use GraphJin Core
89
135
 
90
136
  ```console
91
- go get github.com/dosco/graphjin/v2
137
+ go get github.com/dosco/graphjin/core/v3
92
138
  ```
93
139
 
94
140
  ```golang
@@ -100,7 +146,7 @@ import (
100
146
  "fmt"
101
147
  "log"
102
148
 
103
- "github.com/dosco/graphjin/core/v2"
149
+ "github.com/dosco/graphjin/core/v3"
104
150
  _ "github.com/jackc/pgx/v4/stdlib"
105
151
  )
106
152
 
@@ -272,7 +318,7 @@ With GraphJin your web and mobile developers can start building instantly. All t
272
318
 
273
319
  ## Documentation
274
320
 
275
- [Quick Start](https://graphjin.com/posts/1-start)
321
+ [Quick Start](https://graphjin.com/posts/start)
276
322
 
277
323
  [Documentation](https://graphjin.com)
278
324
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphjin",
3
- "version": "3.0.10",
3
+ "version": "3.0.12",
4
4
  "description": "GraphJin - Build APIs in 5 minutes with GraphQL",
5
5
  "type": "module",
6
6
  "main": "./wasm/js/graphjin.js",
Binary file