graphile-utils 5.0.0-0.9 → 5.0.0-1.1
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/CHANGELOG.md +382 -0
- package/README.md +1 -3
- package/dist/exportable.d.ts +2 -0
- package/dist/exportable.d.ts.map +1 -0
- package/dist/exportable.js +16 -0
- package/dist/exportable.js.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/makeAddPgTableConditionPlugin.d.ts +14 -0
- package/dist/makeAddPgTableConditionPlugin.d.ts.map +1 -0
- package/dist/makeAddPgTableConditionPlugin.js +80 -0
- package/dist/makeAddPgTableConditionPlugin.js.map +1 -0
- package/dist/makeAddPgTableOrderByPlugin.d.ts +24 -0
- package/dist/makeAddPgTableOrderByPlugin.d.ts.map +1 -0
- package/dist/makeAddPgTableOrderByPlugin.js +155 -0
- package/dist/makeAddPgTableOrderByPlugin.js.map +1 -0
- package/dist/makeChangeNullabilityPlugin.d.ts +2 -2
- package/dist/makeChangeNullabilityPlugin.d.ts.map +1 -1
- package/dist/makeChangeNullabilityPlugin.js +10 -17
- package/dist/makeChangeNullabilityPlugin.js.map +1 -1
- package/dist/makeExtendSchemaPlugin.d.ts +3 -4
- package/dist/makeExtendSchemaPlugin.d.ts.map +1 -1
- package/dist/makeExtendSchemaPlugin.js +32 -42
- package/dist/makeExtendSchemaPlugin.js.map +1 -1
- package/dist/makePgSmartTagsPlugin.d.ts +13 -13
- package/dist/makePgSmartTagsPlugin.d.ts.map +1 -1
- package/dist/makePgSmartTagsPlugin.js +24 -16
- package/dist/makePgSmartTagsPlugin.js.map +1 -1
- package/dist/makeProcessSchemaPlugin.d.ts +1 -1
- package/dist/makeProcessSchemaPlugin.d.ts.map +1 -1
- package/dist/makeWrapPlansPlugin.d.ts +7 -7
- package/dist/makeWrapPlansPlugin.d.ts.map +1 -1
- package/dist/makeWrapPlansPlugin.js +4 -3
- package/dist/makeWrapPlansPlugin.js.map +1 -1
- package/package.json +13 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,387 @@
|
|
|
1
1
|
# graphile-utils
|
|
2
2
|
|
|
3
|
+
## 5.0.0-1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#260](https://github.com/benjie/postgraphile-private/pull/260)
|
|
8
|
+
[`d5312e6b9`](https://github.com/benjie/postgraphile-private/commit/d5312e6b968fbeb46d074b82a41b4bdbc166598c)
|
|
9
|
+
Thanks [@benjie](https://github.com/benjie)! - TypeScript v5 is now required
|
|
10
|
+
|
|
11
|
+
- [#271](https://github.com/benjie/postgraphile-private/pull/271)
|
|
12
|
+
[`261eb520b`](https://github.com/benjie/postgraphile-private/commit/261eb520b33fe3673fe3a7712085e50291aed1e5)
|
|
13
|
+
Thanks [@benjie](https://github.com/benjie)! - 🚨 **RENAME ALL THE THINGS**
|
|
14
|
+
|
|
15
|
+
The term 'source' was overloaded, and 'configs' was too vague, and
|
|
16
|
+
'databaseName' was misleading, and 'source' behaviours actually applied to
|
|
17
|
+
resources, and more. So, we've renamed lots of things as part of the API
|
|
18
|
+
stabilization work. You're probably only affected by the first 2 bullet
|
|
19
|
+
points.
|
|
20
|
+
|
|
21
|
+
- `pgConfigs` -> `pgServices` (also applies to related `pgConfig` terms such
|
|
22
|
+
as `makePgConfig` -> `makePgService`, `MakePgConfigOptions` ->
|
|
23
|
+
`MakePgServiceOptions`, etc) - see your `graphile.config.ts` or equivalent
|
|
24
|
+
file
|
|
25
|
+
- All `*:source:*` behaviors are now `*:resource:*` behaviors (use regexp
|
|
26
|
+
`/:source\b|\bsource:[a-z$]/` to find the places that need updating)
|
|
27
|
+
- `PgDatabaseConfiguration` -> `PgServiceConfiguration`
|
|
28
|
+
- `databaseName` -> `serviceName` (because it's not the name of the database,
|
|
29
|
+
it's the name of the `pgServices` (which was `pgConfigs`) entry)
|
|
30
|
+
- `PgResourceConfig::source` -> `PgResourceConfig.from` ('source' is
|
|
31
|
+
overloaded, so use a more direct term)
|
|
32
|
+
- `PgResource::source` -> `PgResource.from`
|
|
33
|
+
- `PgSelectPlanJoin::source` -> `PgSelectPlanJoin.from`
|
|
34
|
+
- `helpers.pgIntrospection.getDatabase` ->
|
|
35
|
+
`helpers.pgIntrospection.getService`
|
|
36
|
+
- `helpers.pgIntrospection.getExecutorForDatabase` ->
|
|
37
|
+
`helpers.pgIntrospection.getExecutorForService`
|
|
38
|
+
|
|
39
|
+
- Updated dependencies
|
|
40
|
+
[[`2df36c5a1`](https://github.com/benjie/postgraphile-private/commit/2df36c5a1b228be50ed325962b334290e7e3e8a7),
|
|
41
|
+
[`c5d89d705`](https://github.com/benjie/postgraphile-private/commit/c5d89d7052dfaaf4c597c8c36858795fa7227b07),
|
|
42
|
+
[`a73f9c709`](https://github.com/benjie/postgraphile-private/commit/a73f9c709959b9d6ddef18d714783f864a3d8e26),
|
|
43
|
+
[`ae304b33c`](https://github.com/benjie/postgraphile-private/commit/ae304b33c7c5a04d36b552177ae24a7b7b522645),
|
|
44
|
+
[`d5312e6b9`](https://github.com/benjie/postgraphile-private/commit/d5312e6b968fbeb46d074b82a41b4bdbc166598c),
|
|
45
|
+
[`22ec50e36`](https://github.com/benjie/postgraphile-private/commit/22ec50e360d90de41c586c5c220438f780c10ee8),
|
|
46
|
+
[`0f4709356`](https://github.com/benjie/postgraphile-private/commit/0f47093560cf4f8b1f215853bc91d7f6531278cc),
|
|
47
|
+
[`c22dcde7b`](https://github.com/benjie/postgraphile-private/commit/c22dcde7b53af323d907b22a0a69924841072aa9),
|
|
48
|
+
[`bd37be707`](https://github.com/benjie/postgraphile-private/commit/bd37be7075804b1299e10dd2dcb4473159bb26f1),
|
|
49
|
+
[`96b0bd14e`](https://github.com/benjie/postgraphile-private/commit/96b0bd14ed9039d60612e75b3aeb63dcaef271d4),
|
|
50
|
+
[`d951897ee`](https://github.com/benjie/postgraphile-private/commit/d951897eea824acabdb17baab4bf900b4b3b842f),
|
|
51
|
+
[`366b166dc`](https://github.com/benjie/postgraphile-private/commit/366b166dc88a340de7f092f92840b0fba1f03d60),
|
|
52
|
+
[`261eb520b`](https://github.com/benjie/postgraphile-private/commit/261eb520b33fe3673fe3a7712085e50291aed1e5),
|
|
53
|
+
[`395b4a2dd`](https://github.com/benjie/postgraphile-private/commit/395b4a2dd24044bad25f5e411a7a7cfa43883eef),
|
|
54
|
+
[`a14cf5f4c`](https://github.com/benjie/postgraphile-private/commit/a14cf5f4c233cd794eb4d3c6f2281e747d234a71)]:
|
|
55
|
+
- graphile-build-pg@5.0.0-1.1
|
|
56
|
+
- graphile-build@5.0.0-1.1
|
|
57
|
+
- grafast@0.0.1-1.1
|
|
58
|
+
- pg-introspection@0.0.1-1.1
|
|
59
|
+
- graphile-config@0.0.1-1.1
|
|
60
|
+
|
|
61
|
+
## 5.0.0-0.35
|
|
62
|
+
|
|
63
|
+
### Patch Changes
|
|
64
|
+
|
|
65
|
+
- Updated dependencies
|
|
66
|
+
[[`89d16c972`](https://github.com/benjie/postgraphile-private/commit/89d16c972f12659de091b0b866768cacfccc8f6b),
|
|
67
|
+
[`8f323bdc8`](https://github.com/benjie/postgraphile-private/commit/8f323bdc88e39924de50775891bd40f1acb9b7cf),
|
|
68
|
+
[`9e7183c02`](https://github.com/benjie/postgraphile-private/commit/9e7183c02cb82d5f5c684c4f73962035e0267c83)]:
|
|
69
|
+
- grafast@0.0.1-0.23
|
|
70
|
+
- graphile-build-pg@5.0.0-0.34
|
|
71
|
+
- graphile-build@5.0.0-0.29
|
|
72
|
+
|
|
73
|
+
## 5.0.0-0.34
|
|
74
|
+
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- [#236](https://github.com/benjie/postgraphile-private/pull/236)
|
|
78
|
+
[`c802cb307`](https://github.com/benjie/postgraphile-private/commit/c802cb307da0ee69fb8bd0eba4cde8984855ddfa)
|
|
79
|
+
Thanks [@benjie](https://github.com/benjie)! - 🚨 makeWrapPlansPlugin callback
|
|
80
|
+
is now passed `build` rather than `options` - use `build.options` to get the
|
|
81
|
+
options object. 🚨 makeWrapPlansPlugin filters now accept only three args
|
|
82
|
+
(`context`, `build`, `field`) since the fourth argument (`options`) was
|
|
83
|
+
redundant - get it from `build.options` instead.
|
|
84
|
+
|
|
85
|
+
## 5.0.0-0.33
|
|
86
|
+
|
|
87
|
+
### Patch Changes
|
|
88
|
+
|
|
89
|
+
- [#233](https://github.com/benjie/postgraphile-private/pull/233)
|
|
90
|
+
[`a50bc5be4`](https://github.com/benjie/postgraphile-private/commit/a50bc5be4b4be344203f4acd0ffd5ad8b90d89b8)
|
|
91
|
+
Thanks [@benjie](https://github.com/benjie)! - Introduce new
|
|
92
|
+
GraphQLObjectType_fields_field_args_arg and
|
|
93
|
+
GraphQLInterfaceType_fields_field_args_arg hooks to resolve some plugin
|
|
94
|
+
ordering issues.
|
|
95
|
+
|
|
96
|
+
- [#233](https://github.com/benjie/postgraphile-private/pull/233)
|
|
97
|
+
[`11e7c12c5`](https://github.com/benjie/postgraphile-private/commit/11e7c12c5a3545ee24b5e39392fbec190aa1cf85)
|
|
98
|
+
Thanks [@benjie](https://github.com/benjie)! - Solve mutation issue in plugin
|
|
99
|
+
ordering code which lead to heisenbugs.
|
|
100
|
+
|
|
101
|
+
- Updated dependencies
|
|
102
|
+
[[`a50bc5be4`](https://github.com/benjie/postgraphile-private/commit/a50bc5be4b4be344203f4acd0ffd5ad8b90d89b8),
|
|
103
|
+
[`6fb7ef449`](https://github.com/benjie/postgraphile-private/commit/6fb7ef4494b4f61b3b1aa36642e51eb9ec99a941),
|
|
104
|
+
[`11e7c12c5`](https://github.com/benjie/postgraphile-private/commit/11e7c12c5a3545ee24b5e39392fbec190aa1cf85),
|
|
105
|
+
[`2f50a633a`](https://github.com/benjie/postgraphile-private/commit/2f50a633acab7c112413ec4576beeec2efef24df),
|
|
106
|
+
[`005e5cea0`](https://github.com/benjie/postgraphile-private/commit/005e5cea01224533282bc4d0f3516368fb8db81a)]:
|
|
107
|
+
- graphile-build@5.0.0-0.28
|
|
108
|
+
- graphile-build-pg@5.0.0-0.33
|
|
109
|
+
- graphile-config@0.0.1-0.6
|
|
110
|
+
- grafast@0.0.1-0.22
|
|
111
|
+
|
|
112
|
+
## 5.0.0-0.32
|
|
113
|
+
|
|
114
|
+
### Patch Changes
|
|
115
|
+
|
|
116
|
+
- Updated dependencies
|
|
117
|
+
[[`f5a04cf66`](https://github.com/benjie/postgraphile-private/commit/f5a04cf66f220c11a6a82db8c1a78b1d91606faa),
|
|
118
|
+
[`13cfc7501`](https://github.com/benjie/postgraphile-private/commit/13cfc75019d42353c1e6be394c28c6ba61ab32d0),
|
|
119
|
+
[`b9a2236d4`](https://github.com/benjie/postgraphile-private/commit/b9a2236d43cc92e06085298e379de71f7fdedcb7),
|
|
120
|
+
[`ac6137bb6`](https://github.com/benjie/postgraphile-private/commit/ac6137bb60a34a3ebf5fad3c6ac153c95acb6158)]:
|
|
121
|
+
- grafast@0.0.1-0.21
|
|
122
|
+
- graphile-build-pg@5.0.0-0.32
|
|
123
|
+
- graphile-build@5.0.0-0.27
|
|
124
|
+
|
|
125
|
+
## 5.0.0-0.31
|
|
126
|
+
|
|
127
|
+
### Patch Changes
|
|
128
|
+
|
|
129
|
+
- Updated dependencies [[`aac8732f9`](undefined)]:
|
|
130
|
+
- grafast@0.0.1-0.20
|
|
131
|
+
- graphile-build@5.0.0-0.26
|
|
132
|
+
- graphile-build-pg@5.0.0-0.31
|
|
133
|
+
|
|
134
|
+
## 5.0.0-0.30
|
|
135
|
+
|
|
136
|
+
### Patch Changes
|
|
137
|
+
|
|
138
|
+
- Updated dependencies
|
|
139
|
+
[[`397e8bb40`](https://github.com/benjie/postgraphile-private/commit/397e8bb40fe3783995172356a39ab7cb33e3bd36)]:
|
|
140
|
+
- grafast@0.0.1-0.19
|
|
141
|
+
- graphile-build@5.0.0-0.25
|
|
142
|
+
- graphile-build-pg@5.0.0-0.30
|
|
143
|
+
|
|
144
|
+
## 5.0.0-0.29
|
|
145
|
+
|
|
146
|
+
### Patch Changes
|
|
147
|
+
|
|
148
|
+
- [#223](https://github.com/benjie/postgraphile-private/pull/223)
|
|
149
|
+
[`df8c06657`](https://github.com/benjie/postgraphile-private/commit/df8c06657e6f5a7d1444d86dc32fd750d1433223)
|
|
150
|
+
Thanks [@benjie](https://github.com/benjie)! - `graphile-utils` now includes
|
|
151
|
+
the `makeAddPgTableConditionPlugin` and `makeAddPgTableOrderByPlugin`
|
|
152
|
+
generators, freshly ported from V4. The signatures of these functions has
|
|
153
|
+
changed slightly, but the functionality is broadly the same.
|
|
154
|
+
- Updated dependencies
|
|
155
|
+
[[`4c2b7d1ca`](https://github.com/benjie/postgraphile-private/commit/4c2b7d1ca1afbda1e47da22c346cc3b03d01b7f0),
|
|
156
|
+
[`2abc58cf6`](https://github.com/benjie/postgraphile-private/commit/2abc58cf61e78e77b2ba44a875f0ef5b3f98b245),
|
|
157
|
+
[`c8a56cdc8`](https://github.com/benjie/postgraphile-private/commit/c8a56cdc83390e5735beb9b90f004e7975cab28c),
|
|
158
|
+
[`df8c06657`](https://github.com/benjie/postgraphile-private/commit/df8c06657e6f5a7d1444d86dc32fd750d1433223)]:
|
|
159
|
+
- grafast@0.0.1-0.18
|
|
160
|
+
- graphile-build@5.0.0-0.24
|
|
161
|
+
- graphile-build-pg@5.0.0-0.29
|
|
162
|
+
|
|
163
|
+
## 5.0.0-0.28
|
|
164
|
+
|
|
165
|
+
### Patch Changes
|
|
166
|
+
|
|
167
|
+
- Updated dependencies
|
|
168
|
+
[[`f2c1423fb`](https://github.com/benjie/postgraphile-private/commit/f2c1423fbd6c354146a70a9a2ebabd97370b9b05),
|
|
169
|
+
[`b58f5dfac`](https://github.com/benjie/postgraphile-private/commit/b58f5dfac6ead1efb8bb56b5cfdfd6a0040a60b5)]:
|
|
170
|
+
- graphile-build-pg@5.0.0-0.28
|
|
171
|
+
- graphile-build@5.0.0-0.23
|
|
172
|
+
|
|
173
|
+
## 5.0.0-0.27
|
|
174
|
+
|
|
175
|
+
### Patch Changes
|
|
176
|
+
|
|
177
|
+
- Updated dependencies [[`f48860d4f`](undefined)]:
|
|
178
|
+
- grafast@0.0.1-0.17
|
|
179
|
+
- graphile-build@5.0.0-0.22
|
|
180
|
+
- graphile-build-pg@5.0.0-0.27
|
|
181
|
+
|
|
182
|
+
## 5.0.0-0.26
|
|
183
|
+
|
|
184
|
+
### Patch Changes
|
|
185
|
+
|
|
186
|
+
- Updated dependencies
|
|
187
|
+
[[`df89aba52`](https://github.com/benjie/postgraphile-private/commit/df89aba524270e52f82987fcc4ab5d78ce180fc5),
|
|
188
|
+
[`3ed7d3349`](https://github.com/benjie/postgraphile-private/commit/3ed7d334939e5e0ab2f63b2fde202884cc2daa74)]:
|
|
189
|
+
- grafast@0.0.1-0.16
|
|
190
|
+
- graphile-build-pg@5.0.0-0.26
|
|
191
|
+
- graphile-build@5.0.0-0.21
|
|
192
|
+
|
|
193
|
+
## 5.0.0-0.25
|
|
194
|
+
|
|
195
|
+
### Patch Changes
|
|
196
|
+
|
|
197
|
+
- Updated dependencies [[`a8d26b30a`](undefined)]:
|
|
198
|
+
- graphile-build-pg@5.0.0-0.25
|
|
199
|
+
|
|
200
|
+
## 5.0.0-0.24
|
|
201
|
+
|
|
202
|
+
### Patch Changes
|
|
203
|
+
|
|
204
|
+
- Updated dependencies [[`5812ad277`](undefined)]:
|
|
205
|
+
- graphile-build-pg@5.0.0-0.24
|
|
206
|
+
|
|
207
|
+
## 5.0.0-0.23
|
|
208
|
+
|
|
209
|
+
### Patch Changes
|
|
210
|
+
|
|
211
|
+
- [#210](https://github.com/benjie/postgraphile-private/pull/210)
|
|
212
|
+
[`b523118fe`](https://github.com/benjie/postgraphile-private/commit/b523118fe6217c027363fea91252a3a1764e17df)
|
|
213
|
+
Thanks [@benjie](https://github.com/benjie)! - Replace BaseGraphQLContext with
|
|
214
|
+
Grafast.Context throughout.
|
|
215
|
+
|
|
216
|
+
- Updated dependencies
|
|
217
|
+
[[`2fb5001b4`](https://github.com/benjie/postgraphile-private/commit/2fb5001b4aaac07942b2e9b0398a996f9aa8b15d),
|
|
218
|
+
[`2bd4b619e`](https://github.com/benjie/postgraphile-private/commit/2bd4b619ee0f6054e14da3ac4885ec55d944cd99),
|
|
219
|
+
[`b523118fe`](https://github.com/benjie/postgraphile-private/commit/b523118fe6217c027363fea91252a3a1764e17df)]:
|
|
220
|
+
- graphile-build@5.0.0-0.20
|
|
221
|
+
- graphile-build-pg@5.0.0-0.23
|
|
222
|
+
- grafast@0.0.1-0.15
|
|
223
|
+
|
|
224
|
+
## 5.0.0-0.22
|
|
225
|
+
|
|
226
|
+
### Patch Changes
|
|
227
|
+
|
|
228
|
+
- [#206](https://github.com/benjie/postgraphile-private/pull/206)
|
|
229
|
+
[`851b78ef2`](https://github.com/benjie/postgraphile-private/commit/851b78ef20d430164507ec9b3f41a5a0b8a18ed7)
|
|
230
|
+
Thanks [@benjie](https://github.com/benjie)! - Grafserv now masks untrusted
|
|
231
|
+
errors by default; trusted errors are constructed via GraphQL's GraphQLError
|
|
232
|
+
or Grafast's SafeError.
|
|
233
|
+
- Updated dependencies
|
|
234
|
+
[[`d76043453`](https://github.com/benjie/postgraphile-private/commit/d7604345362c58bf7eb43ef1ac1795a2ac22ae79),
|
|
235
|
+
[`afa0ea5f6`](https://github.com/benjie/postgraphile-private/commit/afa0ea5f6c508d9a0ba5946ab153b13ddbd274a0),
|
|
236
|
+
[`851b78ef2`](https://github.com/benjie/postgraphile-private/commit/851b78ef20d430164507ec9b3f41a5a0b8a18ed7),
|
|
237
|
+
[`384b3594f`](https://github.com/benjie/postgraphile-private/commit/384b3594f543d113650c1b6b02b276360dd2d15f)]:
|
|
238
|
+
- grafast@0.0.1-0.14
|
|
239
|
+
- graphile-build@5.0.0-0.19
|
|
240
|
+
- graphile-build-pg@5.0.0-0.22
|
|
241
|
+
|
|
242
|
+
## 5.0.0-0.21
|
|
243
|
+
|
|
244
|
+
### Patch Changes
|
|
245
|
+
|
|
246
|
+
- Updated dependencies
|
|
247
|
+
[[`dca706ad9`](https://github.com/benjie/postgraphile-private/commit/dca706ad99b1cd2b98872581b86bd4b22c7fd5f4)]:
|
|
248
|
+
- graphile-build@5.0.0-0.18
|
|
249
|
+
- graphile-build-pg@5.0.0-0.21
|
|
250
|
+
|
|
251
|
+
## 5.0.0-0.20
|
|
252
|
+
|
|
253
|
+
### Patch Changes
|
|
254
|
+
|
|
255
|
+
- Updated dependencies [[`e5b664b6f`](undefined)]:
|
|
256
|
+
- grafast@0.0.1-0.13
|
|
257
|
+
- graphile-build-pg@5.0.0-0.20
|
|
258
|
+
- graphile-build@5.0.0-0.17
|
|
259
|
+
|
|
260
|
+
## 5.0.0-0.19
|
|
261
|
+
|
|
262
|
+
### Patch Changes
|
|
263
|
+
|
|
264
|
+
- [#200](https://github.com/benjie/postgraphile-private/pull/200)
|
|
265
|
+
[`9f85b0308`](https://github.com/benjie/postgraphile-private/commit/9f85b030896d335ee2d0da2b93c3784d0eb841ea)
|
|
266
|
+
Thanks [@benjie](https://github.com/benjie)! - Fix bugs around handling of the
|
|
267
|
+
plans/resolvers objects.
|
|
268
|
+
|
|
269
|
+
- [#198](https://github.com/benjie/postgraphile-private/pull/198)
|
|
270
|
+
[`f9948e4e9`](https://github.com/benjie/postgraphile-private/commit/f9948e4e913299ca4f3858d45105790df2acaa89)
|
|
271
|
+
Thanks [@benjie](https://github.com/benjie)! - Fix bug in
|
|
272
|
+
makePgSmartTagsPlugin that prevented smart tags being loaded early enough from
|
|
273
|
+
files.
|
|
274
|
+
- Updated dependencies
|
|
275
|
+
[[`4f5d5bec7`](https://github.com/benjie/postgraphile-private/commit/4f5d5bec72f949b17b39cd07acc848ce7a8bfa36),
|
|
276
|
+
[`a1158d83e`](https://github.com/benjie/postgraphile-private/commit/a1158d83e2d26f7da0182ec2b651f7f1ec202f14),
|
|
277
|
+
[`25f5a6cbf`](https://github.com/benjie/postgraphile-private/commit/25f5a6cbff6cd5a94ebc4f411f7fa89c209fc383)]:
|
|
278
|
+
- grafast@0.0.1-0.12
|
|
279
|
+
- graphile-build@5.0.0-0.16
|
|
280
|
+
- graphile-build-pg@5.0.0-0.19
|
|
281
|
+
|
|
282
|
+
## 5.0.0-0.18
|
|
283
|
+
|
|
284
|
+
### Patch Changes
|
|
285
|
+
|
|
286
|
+
- [`0ab95d0b1`](undefined) - Update sponsors.
|
|
287
|
+
|
|
288
|
+
- Updated dependencies [[`0ab95d0b1`](undefined),
|
|
289
|
+
[`4783bdd7c`](https://github.com/benjie/postgraphile-private/commit/4783bdd7cc28ac8b497fdd4d6f1024d80cb432ef),
|
|
290
|
+
[`652cf1073`](https://github.com/benjie/postgraphile-private/commit/652cf107316ea5832f69c6a55574632187f5c876),
|
|
291
|
+
[`80091a8e0`](https://github.com/benjie/postgraphile-private/commit/80091a8e0343a162bf2b60cf619267a874a67e60)]:
|
|
292
|
+
- grafast@0.0.1-0.11
|
|
293
|
+
- graphile-build@5.0.0-0.15
|
|
294
|
+
- graphile-build-pg@5.0.0-0.18
|
|
295
|
+
- graphile-config@0.0.1-0.5
|
|
296
|
+
- pg-introspection@0.0.1-0.3
|
|
297
|
+
|
|
298
|
+
## 5.0.0-0.17
|
|
299
|
+
|
|
300
|
+
### Patch Changes
|
|
301
|
+
|
|
302
|
+
- Updated dependencies [[`72bf5f535`](undefined)]:
|
|
303
|
+
- graphile-build@5.0.0-0.14
|
|
304
|
+
- graphile-build-pg@5.0.0-0.17
|
|
305
|
+
|
|
306
|
+
## 5.0.0-0.16
|
|
307
|
+
|
|
308
|
+
### Patch Changes
|
|
309
|
+
|
|
310
|
+
- Updated dependencies
|
|
311
|
+
[[`842f6ccbb`](https://github.com/benjie/postgraphile-private/commit/842f6ccbb3c9bd0c101c4f4df31c5ed1aea9b2ab)]:
|
|
312
|
+
- graphile-config@0.0.1-0.4
|
|
313
|
+
- grafast@0.0.1-0.10
|
|
314
|
+
- graphile-build@5.0.0-0.13
|
|
315
|
+
- graphile-build-pg@5.0.0-0.16
|
|
316
|
+
|
|
317
|
+
## 5.0.0-0.15
|
|
318
|
+
|
|
319
|
+
### Patch Changes
|
|
320
|
+
|
|
321
|
+
- Updated dependencies
|
|
322
|
+
[[`ebb24895c`](https://github.com/benjie/postgraphile-private/commit/ebb24895c3ee05c670ffb6c9b4fa4bd1328d9005),
|
|
323
|
+
[`d3cba220c`](https://github.com/benjie/postgraphile-private/commit/d3cba220c5acb52bb45f1f82f599dd13e0340e65),
|
|
324
|
+
[`3eb9da95e`](https://github.com/benjie/postgraphile-private/commit/3eb9da95e6834d687972b112ee0c12b01c7d11c2)]:
|
|
325
|
+
- graphile-build-pg@5.0.0-0.15
|
|
326
|
+
- graphile-build@5.0.0-0.12
|
|
327
|
+
|
|
328
|
+
## 5.0.0-0.14
|
|
329
|
+
|
|
330
|
+
### Patch Changes
|
|
331
|
+
|
|
332
|
+
- Updated dependencies
|
|
333
|
+
[[`1b040b3ba`](https://github.com/benjie/postgraphile-private/commit/1b040b3bad10ea42b01134e6bddaefaf604936c0),
|
|
334
|
+
[`19e2961de`](https://github.com/benjie/postgraphile-private/commit/19e2961de67dc0b9601799bba256e4c4a23cc0cb),
|
|
335
|
+
[`6be68a53e`](https://github.com/benjie/postgraphile-private/commit/6be68a53e21940406a9fd629ee15cb1673497a6e),
|
|
336
|
+
[`11d6be65e`](https://github.com/benjie/postgraphile-private/commit/11d6be65e0da489f8ab3e3a8b8db145f8b2147ad)]:
|
|
337
|
+
- graphile-build-pg@5.0.0-0.14
|
|
338
|
+
- graphile-config@0.0.1-0.3
|
|
339
|
+
- grafast@0.0.1-0.9
|
|
340
|
+
- graphile-build@5.0.0-0.11
|
|
341
|
+
|
|
342
|
+
## 5.0.0-0.13
|
|
343
|
+
|
|
344
|
+
### Patch Changes
|
|
345
|
+
|
|
346
|
+
- [#173](https://github.com/benjie/postgraphile-private/pull/173)
|
|
347
|
+
[`208166269`](https://github.com/benjie/postgraphile-private/commit/208166269177d6e278b056e1c77d26a2d8f59f49)
|
|
348
|
+
Thanks [@benjie](https://github.com/benjie)! - Fix bug in grafast causing
|
|
349
|
+
loadOne to error. Add missing JSON5 dependency.
|
|
350
|
+
|
|
351
|
+
- Updated dependencies
|
|
352
|
+
[[`208166269`](https://github.com/benjie/postgraphile-private/commit/208166269177d6e278b056e1c77d26a2d8f59f49)]:
|
|
353
|
+
- grafast@0.0.1-0.8
|
|
354
|
+
- graphile-build@5.0.0-0.10
|
|
355
|
+
- graphile-build-pg@5.0.0-0.13
|
|
356
|
+
|
|
357
|
+
## 5.0.0-0.12
|
|
358
|
+
|
|
359
|
+
### Patch Changes
|
|
360
|
+
|
|
361
|
+
- Updated dependencies
|
|
362
|
+
[[`af9f11f28`](https://github.com/benjie/postgraphile-private/commit/af9f11f289b0029442c6cf4ededf86ee823a26c3),
|
|
363
|
+
[`6ebe3a13e`](https://github.com/benjie/postgraphile-private/commit/6ebe3a13e563f2bd665b24a5c84bbfc5eba1cc0a),
|
|
364
|
+
[`0e440a862`](https://github.com/benjie/postgraphile-private/commit/0e440a862d29e8db40fd72413223a10de885ef46)]:
|
|
365
|
+
- graphile-build-pg@5.0.0-0.12
|
|
366
|
+
- graphile-build@5.0.0-0.9
|
|
367
|
+
|
|
368
|
+
## 5.0.0-0.11
|
|
369
|
+
|
|
370
|
+
### Patch Changes
|
|
371
|
+
|
|
372
|
+
- Updated dependencies [[`677c8f5fc`](undefined)]:
|
|
373
|
+
- graphile-build@5.0.0-0.8
|
|
374
|
+
- graphile-build-pg@5.0.0-0.11
|
|
375
|
+
- pg-introspection@0.0.1-0.2
|
|
376
|
+
- grafast@0.0.1-0.7
|
|
377
|
+
|
|
378
|
+
## 5.0.0-0.10
|
|
379
|
+
|
|
380
|
+
### Patch Changes
|
|
381
|
+
|
|
382
|
+
- Updated dependencies []:
|
|
383
|
+
- graphile-build-pg@5.0.0-0.10
|
|
384
|
+
|
|
3
385
|
## 5.0.0-0.9
|
|
4
386
|
|
|
5
387
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -32,14 +32,12 @@ And please give some love to our featured sponsors 🤩:
|
|
|
32
32
|
<table><tr>
|
|
33
33
|
<td align="center"><a href="https://surge.io/"><img src="https://graphile.org/images/sponsors/surge.png" width="90" height="90" alt="Surge" /><br />Surge</a> *</td>
|
|
34
34
|
<td align="center"><a href="https://www.netflix.com/"><img src="https://graphile.org/images/sponsors/Netflix.png" width="90" height="90" alt="Netflix" /><br />Netflix</a> *</td>
|
|
35
|
-
<td align="center"><a href="https://qwick.com/"><img src="https://graphile.org/images/sponsors/qwick.png" width="90" height="90" alt="Qwick" /><br />Qwick</a> *</td>
|
|
36
35
|
<td align="center"><a href="https://www.the-guild.dev/"><img src="https://graphile.org/images/sponsors/theguild.png" width="90" height="90" alt="The Guild" /><br />The Guild</a> *</td>
|
|
36
|
+
<td align="center"><a href="https://qwick.com/"><img src="https://graphile.org/images/sponsors/qwick.png" width="90" height="90" alt="Qwick" /><br />Qwick</a> *</td>
|
|
37
37
|
</tr><tr>
|
|
38
38
|
<td align="center"><a href="http://chads.website"><img src="https://graphile.org/images/sponsors/chadf.png" width="90" height="90" alt="Chad Furman" /><br />Chad Furman</a> *</td>
|
|
39
|
-
<td align="center"><a href="https://www.fanatics.com/"><img src="https://graphile.org/images/sponsors/fanatics.png" width="90" height="90" alt="Fanatics" /><br />Fanatics</a> *</td>
|
|
40
39
|
<td align="center"><a href="https://dovetailapp.com/"><img src="https://graphile.org/images/sponsors/dovetail.png" width="90" height="90" alt="Dovetail" /><br />Dovetail</a> *</td>
|
|
41
40
|
<td align="center"><a href="https://www.enzuzo.com/"><img src="https://graphile.org/images/sponsors/enzuzo.png" width="90" height="90" alt="Enzuzo" /><br />Enzuzo</a> *</td>
|
|
42
|
-
</tr><tr>
|
|
43
41
|
<td align="center"><a href="https://stellate.co/"><img src="https://graphile.org/images/sponsors/Stellate.png" width="90" height="90" alt="Stellate" /><br />Stellate</a> *</td>
|
|
44
42
|
</tr></table>
|
|
45
43
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exportable.d.ts","sourceRoot":"","sources":["../src/exportable.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,SAAS,GAAG,EAAE,EAChD,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,MAAM,KAAK,CAAC,EAC/B,IAAI,EAAE,CAAC,GAAG,MAAM,CAAC,GAChB,CAAC,CAYH"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EXPORTABLE = void 0;
|
|
4
|
+
function EXPORTABLE(factory, args) {
|
|
5
|
+
const fn = factory(...args);
|
|
6
|
+
if ((typeof fn === "function" || (typeof fn === "object" && fn !== null)) &&
|
|
7
|
+
!("$exporter$factory" in fn)) {
|
|
8
|
+
Object.defineProperties(fn, {
|
|
9
|
+
$exporter$args: { value: args },
|
|
10
|
+
$exporter$factory: { value: factory },
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
return fn;
|
|
14
|
+
}
|
|
15
|
+
exports.EXPORTABLE = EXPORTABLE;
|
|
16
|
+
//# sourceMappingURL=exportable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exportable.js","sourceRoot":"","sources":["../src/exportable.ts"],"names":[],"mappings":";;;AAAA,SAAgB,UAAU,CACxB,OAA+B,EAC/B,IAAiB;IAEjB,MAAM,EAAE,GAAM,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;IAC/B,IACE,CAAC,OAAO,EAAE,KAAK,UAAU,IAAI,CAAC,OAAO,EAAE,KAAK,QAAQ,IAAI,EAAE,KAAK,IAAI,CAAC,CAAC;QACrE,CAAC,CAAC,mBAAmB,IAAI,EAAE,CAAC,EAC5B;QACA,MAAM,CAAC,gBAAgB,CAAC,EAAE,EAAE;YAC1B,cAAc,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;YAC/B,iBAAiB,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;SACtC,CAAC,CAAC;KACJ;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AAfD,gCAeC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
export { EXPORTABLE } from "./exportable.js";
|
|
1
2
|
export { gql } from "./gql.js";
|
|
2
3
|
export { makeAddInflectorsPlugin } from "./makeAddInflectorsPlugin.js";
|
|
4
|
+
export { makeAddPgTableConditionPlugin } from "./makeAddPgTableConditionPlugin.js";
|
|
5
|
+
export { makeAddPgTableOrderByPlugin, MakeAddPgTableOrderByPluginOrders, NullsSortMethod, orderByAscDesc, OrderByAscDescOptions, } from "./makeAddPgTableOrderByPlugin.js";
|
|
3
6
|
export { ChangeNullabilityRules, ChangeNullabilityTypeRules, makeChangeNullabilityPlugin, NullabilitySpec, NullabilitySpecString, } from "./makeChangeNullabilityPlugin.js";
|
|
4
|
-
export { makeExtendSchemaPlugin } from "./makeExtendSchemaPlugin.js";
|
|
7
|
+
export { EnumResolver, ExtensionDefinition, makeExtendSchemaPlugin, ObjectFieldConfig, ObjectPlan, ObjectResolver, Plans, Resolvers, } from "./makeExtendSchemaPlugin.js";
|
|
5
8
|
export { makeJSONPgSmartTagsPlugin, makePgSmartTagsFromFilePlugin, makePgSmartTagsPlugin, TagsFilePlugin, } from "./makePgSmartTagsPlugin.js";
|
|
6
9
|
export { makeProcessSchemaPlugin } from "./makeProcessSchemaPlugin.js";
|
|
7
10
|
export { makeWrapPlansPlugin, PlanWrapperFilter, PlanWrapperFilterRule, PlanWrapperFn, PlanWrapperRule, PlanWrapperRules, PlanWrapperRulesGenerator, } from "./makeWrapPlansPlugin.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,eAAe,EACf,qBAAqB,GACtB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EACL,2BAA2B,EAC3B,iCAAiC,EACjC,eAAe,EACf,cAAc,EACd,qBAAqB,GACtB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,eAAe,EACf,qBAAqB,GACtB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,KAAK,EACL,SAAS,GACV,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,yBAAyB,EACzB,6BAA6B,EAC7B,qBAAqB,EACrB,cAAc,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,yBAAyB,GAC1B,MAAM,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeWrapPlansPlugin = exports.makeProcessSchemaPlugin = exports.TagsFilePlugin = exports.makePgSmartTagsPlugin = exports.makePgSmartTagsFromFilePlugin = exports.makeJSONPgSmartTagsPlugin = exports.makeExtendSchemaPlugin = exports.makeChangeNullabilityPlugin = exports.makeAddInflectorsPlugin = exports.gql = void 0;
|
|
3
|
+
exports.makeWrapPlansPlugin = exports.makeProcessSchemaPlugin = exports.TagsFilePlugin = exports.makePgSmartTagsPlugin = exports.makePgSmartTagsFromFilePlugin = exports.makeJSONPgSmartTagsPlugin = exports.makeExtendSchemaPlugin = exports.makeChangeNullabilityPlugin = exports.orderByAscDesc = exports.makeAddPgTableOrderByPlugin = exports.makeAddPgTableConditionPlugin = exports.makeAddInflectorsPlugin = exports.gql = exports.EXPORTABLE = void 0;
|
|
4
|
+
var exportable_js_1 = require("./exportable.js");
|
|
5
|
+
Object.defineProperty(exports, "EXPORTABLE", { enumerable: true, get: function () { return exportable_js_1.EXPORTABLE; } });
|
|
4
6
|
var gql_js_1 = require("./gql.js");
|
|
5
7
|
Object.defineProperty(exports, "gql", { enumerable: true, get: function () { return gql_js_1.gql; } });
|
|
6
8
|
var makeAddInflectorsPlugin_js_1 = require("./makeAddInflectorsPlugin.js");
|
|
7
9
|
Object.defineProperty(exports, "makeAddInflectorsPlugin", { enumerable: true, get: function () { return makeAddInflectorsPlugin_js_1.makeAddInflectorsPlugin; } });
|
|
10
|
+
var makeAddPgTableConditionPlugin_js_1 = require("./makeAddPgTableConditionPlugin.js");
|
|
11
|
+
Object.defineProperty(exports, "makeAddPgTableConditionPlugin", { enumerable: true, get: function () { return makeAddPgTableConditionPlugin_js_1.makeAddPgTableConditionPlugin; } });
|
|
12
|
+
var makeAddPgTableOrderByPlugin_js_1 = require("./makeAddPgTableOrderByPlugin.js");
|
|
13
|
+
Object.defineProperty(exports, "makeAddPgTableOrderByPlugin", { enumerable: true, get: function () { return makeAddPgTableOrderByPlugin_js_1.makeAddPgTableOrderByPlugin; } });
|
|
14
|
+
Object.defineProperty(exports, "orderByAscDesc", { enumerable: true, get: function () { return makeAddPgTableOrderByPlugin_js_1.orderByAscDesc; } });
|
|
8
15
|
var makeChangeNullabilityPlugin_js_1 = require("./makeChangeNullabilityPlugin.js");
|
|
9
16
|
Object.defineProperty(exports, "makeChangeNullabilityPlugin", { enumerable: true, get: function () { return makeChangeNullabilityPlugin_js_1.makeChangeNullabilityPlugin; } });
|
|
10
17
|
var makeExtendSchemaPlugin_js_1 = require("./makeExtendSchemaPlugin.js");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mCAA+B;AAAtB,6FAAA,GAAG,OAAA;AACZ,2EAAuE;AAA9D,qIAAA,uBAAuB,OAAA;AAChC,mFAM0C;AAHxC,6IAAA,2BAA2B,OAAA;AAI7B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAApC,2GAAA,UAAU,OAAA;AACnB,mCAA+B;AAAtB,6FAAA,GAAG,OAAA;AACZ,2EAAuE;AAA9D,qIAAA,uBAAuB,OAAA;AAChC,uFAAmF;AAA1E,iJAAA,6BAA6B,OAAA;AACtC,mFAM0C;AALxC,6IAAA,2BAA2B,OAAA;AAG3B,gIAAA,cAAc,OAAA;AAGhB,mFAM0C;AAHxC,6IAAA,2BAA2B,OAAA;AAI7B,yEASqC;AANnC,mIAAA,sBAAsB,OAAA;AAOxB,uEAKoC;AAJlC,qIAAA,yBAAyB,OAAA;AACzB,yIAAA,6BAA6B,OAAA;AAC7B,iIAAA,qBAAqB,OAAA;AACrB,0HAAA,cAAc,OAAA;AAEhB,2EAAuE;AAA9D,qIAAA,uBAAuB,OAAA;AAChC,mEAQkC;AAPhC,6HAAA,mBAAmB,OAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PgConditionStep, PgSelectStep } from "@dataplan/pg";
|
|
2
|
+
import type { FieldArgs, GrafastInputFieldConfig } from "grafast";
|
|
3
|
+
import type { SQL, sql } from "pg-sql2";
|
|
4
|
+
export declare function makeAddPgTableConditionPlugin(match: {
|
|
5
|
+
serviceName?: string;
|
|
6
|
+
schemaName: string;
|
|
7
|
+
tableName: string;
|
|
8
|
+
}, conditionFieldName: string, conditionFieldSpecGenerator: (build: GraphileBuild.Build) => GrafastInputFieldConfig<any, any, any, any, any>, conditionGenerator?: (value: FieldArgs, helpers: {
|
|
9
|
+
$condition: PgConditionStep<PgSelectStep>;
|
|
10
|
+
sql: typeof sql;
|
|
11
|
+
sqlTableAlias: SQL;
|
|
12
|
+
build: GraphileBuild.Build;
|
|
13
|
+
}) => SQL | null | undefined): GraphileConfig.Plugin;
|
|
14
|
+
//# sourceMappingURL=makeAddPgTableConditionPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"makeAddPgTableConditionPlugin.d.ts","sourceRoot":"","sources":["../src/makeAddPgTableConditionPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAIxC,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,EACtE,kBAAkB,EAAE,MAAM,EAC1B,2BAA2B,EAAE,CAC3B,KAAK,EAAE,aAAa,CAAC,KAAK,KACvB,uBAAuB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EACrD,kBAAkB,CAAC,EAAE,CACnB,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE;IACP,UAAU,EAAE,eAAe,CAAC,YAAY,CAAC,CAAC;IAC1C,GAAG,EAAE,OAAO,GAAG,CAAC;IAChB,aAAa,EAAE,GAAG,CAAC;IACnB,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC;CAC5B,KACE,GAAG,GAAG,IAAI,GAAG,SAAS,GAC1B,cAAc,CAAC,MAAM,CAqGvB"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeAddPgTableConditionPlugin = void 0;
|
|
4
|
+
const exportable_js_1 = require("./exportable.js");
|
|
5
|
+
function makeAddPgTableConditionPlugin(match, conditionFieldName, conditionFieldSpecGenerator, conditionGenerator) {
|
|
6
|
+
const { serviceName = "main", schemaName, tableName } = match;
|
|
7
|
+
const displayName = `makeAddPgTableConditionPlugin__${schemaName}__${tableName}__${conditionFieldName}`;
|
|
8
|
+
const plugin = {
|
|
9
|
+
name: displayName,
|
|
10
|
+
version: "0.0.0",
|
|
11
|
+
// Make sure we're loaded before PgConnectionArgOrderBy, otherwise
|
|
12
|
+
// ordering added by conditions will be overridden by the default
|
|
13
|
+
// ordering.
|
|
14
|
+
before: ["PgConnectionArgOrderByPlugin"],
|
|
15
|
+
schema: {
|
|
16
|
+
hooks: {
|
|
17
|
+
build(build) {
|
|
18
|
+
const meta = (build._pluginMeta[displayName] = Object.create(null));
|
|
19
|
+
meta.seen = false;
|
|
20
|
+
return build;
|
|
21
|
+
},
|
|
22
|
+
finalize(schema, build) {
|
|
23
|
+
const meta = build._pluginMeta[displayName];
|
|
24
|
+
if (!meta.seen) {
|
|
25
|
+
// eslint-disable-next-line no-console
|
|
26
|
+
console.error(`WARNING: failed to add condition '${conditionFieldName}' to table "${schemaName}"."${tableName}"; did you get the schema/table name right?`);
|
|
27
|
+
}
|
|
28
|
+
return schema;
|
|
29
|
+
},
|
|
30
|
+
GraphQLInputObjectType_fields(fields, build, context) {
|
|
31
|
+
const { sql } = build;
|
|
32
|
+
const { scope: { isPgCondition, pgCodec: table }, fieldWithHooks, } = context;
|
|
33
|
+
if (!isPgCondition ||
|
|
34
|
+
!table ||
|
|
35
|
+
!table.attributes ||
|
|
36
|
+
table.extensions?.pg?.serviceName !== serviceName ||
|
|
37
|
+
table.extensions?.pg?.schemaName !== schemaName ||
|
|
38
|
+
table.extensions?.pg?.name !== tableName) {
|
|
39
|
+
return fields;
|
|
40
|
+
}
|
|
41
|
+
const conditionFieldSpec = conditionFieldSpecGenerator(build);
|
|
42
|
+
if (conditionFieldSpec.applyPlan ||
|
|
43
|
+
conditionFieldSpec.extensions?.grafast?.applyPlan) {
|
|
44
|
+
if (conditionGenerator) {
|
|
45
|
+
throw new Error(`${displayName}: You supplied 'applyPlan' for your field spec, so you cannot also supply a 'conditionGenerator'`);
|
|
46
|
+
}
|
|
47
|
+
// Done.
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
if (!conditionGenerator) {
|
|
51
|
+
throw new Error(`${displayName}: You have not supplied 'applyPlan' for your field spec, nor a 'conditionGenerator', so we don't know what to do with this condition`);
|
|
52
|
+
}
|
|
53
|
+
// build applyPlan
|
|
54
|
+
conditionFieldSpec.applyPlan = (0, exportable_js_1.EXPORTABLE)((build, conditionGenerator, sql) => function applyPlan($condition, val) {
|
|
55
|
+
const expression = conditionGenerator(val, {
|
|
56
|
+
$condition,
|
|
57
|
+
sql,
|
|
58
|
+
sqlTableAlias: $condition.alias,
|
|
59
|
+
build,
|
|
60
|
+
});
|
|
61
|
+
if (expression) {
|
|
62
|
+
$condition.where(expression);
|
|
63
|
+
}
|
|
64
|
+
}, [build, conditionGenerator, sql]);
|
|
65
|
+
}
|
|
66
|
+
const meta = build._pluginMeta[displayName];
|
|
67
|
+
meta.seen = true;
|
|
68
|
+
return build.extend(fields, {
|
|
69
|
+
[conditionFieldName]: fieldWithHooks({
|
|
70
|
+
fieldName: conditionFieldName,
|
|
71
|
+
}, conditionFieldSpec),
|
|
72
|
+
}, `Adding condition from ${displayName}`);
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
return plugin;
|
|
78
|
+
}
|
|
79
|
+
exports.makeAddPgTableConditionPlugin = makeAddPgTableConditionPlugin;
|
|
80
|
+
//# sourceMappingURL=makeAddPgTableConditionPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"makeAddPgTableConditionPlugin.js","sourceRoot":"","sources":["../src/makeAddPgTableConditionPlugin.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { PgOrderSpec, PgSelectStep } from "@dataplan/pg";
|
|
2
|
+
type OrderBySpecIdentity = string | Omit<PgOrderSpec, "direction"> | (($select: PgSelectStep) => Omit<PgOrderSpec, "direction">);
|
|
3
|
+
export interface MakeAddPgTableOrderByPluginOrders {
|
|
4
|
+
[orderByEnumValue: string]: {
|
|
5
|
+
extensions: {
|
|
6
|
+
grafast: {
|
|
7
|
+
applyPlan($select: PgSelectStep): void;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export declare function makeAddPgTableOrderByPlugin(match: {
|
|
13
|
+
serviceName?: string;
|
|
14
|
+
schemaName: string;
|
|
15
|
+
tableName: string;
|
|
16
|
+
}, ordersGenerator: (build: GraphileBuild.Build) => MakeAddPgTableOrderByPluginOrders, hint?: string): GraphileConfig.Plugin;
|
|
17
|
+
export type NullsSortMethod = "first" | "last" | "first-iff-ascending" | "last-iff-ascending" | undefined;
|
|
18
|
+
export interface OrderByAscDescOptions {
|
|
19
|
+
unique?: boolean;
|
|
20
|
+
nulls?: NullsSortMethod;
|
|
21
|
+
}
|
|
22
|
+
export declare function orderByAscDesc(baseName: string, attributeOrSqlFragment: OrderBySpecIdentity, uniqueOrOptions?: boolean | OrderByAscDescOptions): MakeAddPgTableOrderByPluginOrders;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=makeAddPgTableOrderByPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"makeAddPgTableOrderByPlugin.d.ts","sourceRoot":"","sources":["../src/makeAddPgTableOrderByPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAI9D,KAAK,mBAAmB,GACpB,MAAM,GACN,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,GAC9B,CAAC,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;AAEhE,MAAM,WAAW,iCAAiC;IAChD,CAAC,gBAAgB,EAAE,MAAM,GAAG;QAC1B,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,SAAS,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAAC;aACxC,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAID,wBAAgB,2BAA2B,CACzC,KAAK,EAAE;IACL,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,EACD,eAAe,EAAE,CACf,KAAK,EAAE,aAAa,CAAC,KAAK,KACvB,iCAAiC,EACtC,IAAI,SAAiG,GACpG,cAAc,CAAC,MAAM,CAyCvB;AAED,MAAM,MAAM,eAAe,GACvB,OAAO,GACP,MAAM,GACN,qBAAqB,GACrB,oBAAoB,GACpB,SAAS,CAAC;AAEd,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,eAAe,CAAC;CACzB;AAED,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,sBAAsB,EAAE,mBAAmB,EAC3C,eAAe,GAAE,OAAO,GAAG,qBAA6B,GACvD,iCAAiC,CAyJnC"}
|