graphjin 2.0.4 → 2.0.5

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "graphjin",
3
- "version": "2.0.4",
4
- "description": "GraphJin - Build APIs in 5 minutes with GraphQL. An instant GraphQL to SQL compiler.",
3
+ "version": "2.0.5",
4
+ "description": "GraphJin - Build APIs in 5 minutes with GraphQL",
5
5
  "type": "module",
6
6
  "main": "wasm/js/graphjin.js",
7
7
  "files": [
@@ -0,0 +1,128 @@
1
+ # When production mode is 'true' only queries
2
+ # from the allow list are permitted.
3
+ production: false
4
+
5
+ # Secret key for general encryption operations like
6
+ # encrypting the cursor data
7
+ secret_key: supercalifajalistics
8
+
9
+ # Subscriptions poll the database to query for updates
10
+ # this sets the duration (in seconds) between requests.
11
+ # Defaults to 5 seconds
12
+ subs_poll_every_seconds: 5
13
+
14
+ # Default limit value to be used on queries and as the max
15
+ # limit on all queries where a limit is defined as a query variable.
16
+ # Defaults to 20
17
+ default_limit: 20
18
+
19
+ # Disables all aggregation functions like count, sum, etc
20
+ # disable_agg_functions: false
21
+
22
+ # Disables all functions like count, length, etc
23
+ # disable_functions: false
24
+
25
+ # Enables using camel case terms in GraphQL which are converted
26
+ # to snake case in SQL
27
+ # enable_camelcase: false
28
+
29
+ # Set session variable "user.id" to the user id
30
+ # Enable this if you need the user id in triggers, etc
31
+ # Note: This will not work with subscriptions
32
+ set_user_id: false
33
+
34
+ # DefaultBlock ensures that in anonymous mode (role 'anon') all tables
35
+ # are blocked from queries and mutations. To open access to tables in
36
+ # anonymous mode they have to be added to the 'anon' role config.
37
+ default_block: false
38
+
39
+ # Define additional variables here to be used with filters
40
+ # Variables used require a type suffix eg. $user_id:bigint
41
+ variables:
42
+ #admin_account_id: "5"
43
+ admin_account_id: "sql:select id from users where admin = true limit 1"
44
+
45
+ # Define variables set to values extracted from http headers
46
+ header_variables:
47
+ remote_ip: "X-Forwarded-For"
48
+
49
+ # Field and table names that you wish to block
50
+ blocklist:
51
+ - ar_internal_metadata
52
+ - schema_migrations
53
+ - secret
54
+ - password
55
+ - encrypted
56
+ - token
57
+
58
+ # resolvers:
59
+ # - name: payments
60
+ # type: remote_api
61
+ # table: customers
62
+ # column: stripe_id
63
+ # json_path: data
64
+ # debug: false
65
+ # url: http://payments/payments/$id
66
+ # pass_headers:
67
+ # - cookie
68
+ # set_headers:
69
+ # - name: Host
70
+ # value: 0.0.0.0
71
+ # # - name: Authorization
72
+ # # value: Bearer <stripe_api_key>
73
+
74
+ tables:
75
+ - # You can create new fields that have a
76
+ # real db table backing them
77
+ name: me
78
+ table: users
79
+
80
+ - name: users
81
+ order_by:
82
+ new_users: ["created_at desc", "id asc"]
83
+ id: ["id asc"]
84
+
85
+ # Variables used require a type suffix eg. $user_id:bigint
86
+ #roles_query: "SELECT * FROM users WHERE id = $user_id:bigint"
87
+
88
+ roles:
89
+ # if `auth.type` is set to a valid auth type then
90
+ # all tables are blocked for the anon role unless
91
+ # added to the role like below.
92
+ # - name: anon
93
+ # tables:
94
+ # - name: users
95
+ # query:
96
+ # limit: 10
97
+
98
+ - name: user
99
+ tables:
100
+ - name: me
101
+ query:
102
+ filters: ["{ id: { _eq: $user_id } }"]
103
+
104
+ # - name: products
105
+ # query:
106
+ # limit: 50
107
+ # filters: ["{ user_id: { eq: $user_id } }"]
108
+ # disable_functions: false
109
+
110
+ # insert:
111
+ # filters: ["{ user_id: { eq: $user_id } }"]
112
+ # presets:
113
+ # - user_id: "$user_id"
114
+ # - created_at: "now"
115
+
116
+ # update:
117
+ # filters: ["{ user_id: { eq: $user_id } }"]
118
+ # presets:
119
+ # - updated_at: "now"
120
+
121
+ # delete:
122
+ # block: true
123
+
124
+ # - name: admin
125
+ # match: id = 1000
126
+ # tables:
127
+ # - name: users
128
+ # filters: []
@@ -0,0 +1,21 @@
1
+ # Inherit config from this other config file
2
+ # so I only need to overwrite some values
3
+ inherits: dev
4
+
5
+ # When production mode is 'true' only queries
6
+ # from the allow list are permitted.
7
+ production: true
8
+
9
+ # Secret key for general encryption operations like
10
+ # encrypting the cursor data
11
+ secret_key: supercalifajalistics
12
+
13
+ # Subscriptions poll the database to query for updates
14
+ # this sets the duration (in seconds) between requests.
15
+ # Defaults to 5 seconds
16
+ subs_poll_every_seconds: 5
17
+
18
+ # Default limit value to be used on queries and as the max
19
+ # limit on all queries where a limit is defined as a query variable.
20
+ # Defaults to 20
21
+ default_limit: 20
Binary file