@constructive-io/graphql-codegen 4.6.0 → 4.7.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.
Files changed (75) hide show
  1. package/client/error.d.ts +2 -93
  2. package/client/error.js +9 -273
  3. package/client/execute.d.ts +2 -55
  4. package/client/execute.js +5 -120
  5. package/client/typed-document.d.ts +2 -29
  6. package/client/typed-document.js +3 -39
  7. package/core/ast.d.ts +8 -10
  8. package/core/ast.js +17 -592
  9. package/core/custom-ast.d.ts +5 -33
  10. package/core/custom-ast.js +16 -203
  11. package/core/introspect/infer-tables.d.ts +2 -40
  12. package/core/introspect/infer-tables.js +4 -653
  13. package/core/introspect/schema-query.d.ts +3 -18
  14. package/core/introspect/schema-query.js +3 -118
  15. package/core/introspect/transform-schema.d.ts +2 -84
  16. package/core/introspect/transform-schema.js +14 -279
  17. package/core/introspect/transform.d.ts +2 -18
  18. package/core/introspect/transform.js +6 -39
  19. package/core/meta-object/convert.d.ts +2 -63
  20. package/core/meta-object/convert.js +4 -59
  21. package/core/meta-object/validate.d.ts +2 -7
  22. package/core/meta-object/validate.js +4 -30
  23. package/core/query-builder.d.ts +7 -46
  24. package/core/query-builder.js +8 -408
  25. package/core/types.d.ts +9 -139
  26. package/core/types.js +12 -26
  27. package/esm/client/error.d.ts +2 -93
  28. package/esm/client/error.js +2 -269
  29. package/esm/client/execute.d.ts +2 -55
  30. package/esm/client/execute.js +2 -118
  31. package/esm/client/typed-document.d.ts +2 -29
  32. package/esm/client/typed-document.js +2 -38
  33. package/esm/core/ast.d.ts +8 -10
  34. package/esm/core/ast.js +8 -550
  35. package/esm/core/custom-ast.d.ts +5 -33
  36. package/esm/core/custom-ast.js +5 -160
  37. package/esm/core/introspect/infer-tables.d.ts +2 -40
  38. package/esm/core/introspect/infer-tables.js +2 -652
  39. package/esm/core/introspect/schema-query.d.ts +3 -18
  40. package/esm/core/introspect/schema-query.js +2 -118
  41. package/esm/core/introspect/transform-schema.d.ts +2 -84
  42. package/esm/core/introspect/transform-schema.js +2 -269
  43. package/esm/core/introspect/transform.d.ts +2 -18
  44. package/esm/core/introspect/transform.js +2 -36
  45. package/esm/core/meta-object/convert.d.ts +2 -63
  46. package/esm/core/meta-object/convert.js +2 -58
  47. package/esm/core/meta-object/validate.d.ts +2 -7
  48. package/esm/core/meta-object/validate.js +2 -26
  49. package/esm/core/query-builder.d.ts +7 -46
  50. package/esm/core/query-builder.js +5 -373
  51. package/esm/core/types.d.ts +9 -139
  52. package/esm/core/types.js +9 -24
  53. package/esm/generators/field-selector.d.ts +5 -28
  54. package/esm/generators/field-selector.js +5 -354
  55. package/esm/generators/mutations.d.ts +5 -29
  56. package/esm/generators/mutations.js +5 -195
  57. package/esm/generators/naming-helpers.d.ts +6 -0
  58. package/esm/generators/naming-helpers.js +6 -0
  59. package/esm/generators/select.d.ts +6 -48
  60. package/esm/generators/select.js +6 -634
  61. package/esm/types/query.d.ts +9 -0
  62. package/esm/types/schema.d.ts +4 -0
  63. package/generators/field-selector.d.ts +5 -28
  64. package/generators/field-selector.js +12 -360
  65. package/generators/mutations.d.ts +5 -29
  66. package/generators/mutations.js +9 -231
  67. package/generators/naming-helpers.d.ts +6 -0
  68. package/generators/naming-helpers.js +20 -0
  69. package/generators/select.d.ts +6 -48
  70. package/generators/select.js +17 -677
  71. package/package.json +7 -6
  72. package/types/query.d.ts +9 -0
  73. package/types/schema.d.ts +4 -0
  74. package/core/meta-object/format.json +0 -93
  75. package/esm/core/meta-object/format.json +0 -93
package/esm/core/ast.js CHANGED
@@ -1,550 +1,8 @@
1
- import * as t from 'gql-ast';
2
- import { OperationTypeNode } from 'graphql';
3
- import { camelize, singularize } from 'inflekt';
4
- import { getCustomAst } from './custom-ast';
5
- const NON_MUTABLE_PROPS = ['createdAt', 'createdBy', 'updatedAt', 'updatedBy'];
6
- const objectToArray = (obj) => Object.keys(obj).map((k) => ({
7
- key: k,
8
- name: obj[k].name || k,
9
- type: obj[k].type,
10
- isNotNull: obj[k].isNotNull,
11
- isArray: obj[k].isArray,
12
- isArrayNotNull: obj[k].isArrayNotNull,
13
- properties: obj[k].properties,
14
- }));
15
- const createGqlMutation = ({ operationName, mutationName, selectArgs, selections, variableDefinitions, modelName, useModel = true, }) => {
16
- const opSel = !modelName
17
- ? [
18
- t.field({
19
- name: operationName,
20
- args: selectArgs,
21
- selectionSet: t.selectionSet({ selections }),
22
- }),
23
- ]
24
- : [
25
- t.field({
26
- name: operationName,
27
- args: selectArgs,
28
- selectionSet: t.selectionSet({
29
- selections: useModel
30
- ? [
31
- t.field({
32
- name: modelName,
33
- selectionSet: t.selectionSet({ selections }),
34
- }),
35
- ]
36
- : selections,
37
- }),
38
- }),
39
- ];
40
- return t.document({
41
- definitions: [
42
- t.operationDefinition({
43
- operation: OperationTypeNode.MUTATION,
44
- name: mutationName,
45
- variableDefinitions,
46
- selectionSet: t.selectionSet({ selections: opSel }),
47
- }),
48
- ],
49
- });
50
- };
51
- export const getAll = ({ queryName, operationName, selection, }) => {
52
- const selections = getSelections(selection);
53
- const opSel = [
54
- t.field({
55
- name: operationName,
56
- selectionSet: t.selectionSet({
57
- selections: [
58
- t.field({
59
- name: 'totalCount',
60
- }),
61
- t.field({
62
- name: 'nodes',
63
- selectionSet: t.selectionSet({ selections }),
64
- }),
65
- ],
66
- }),
67
- }),
68
- ];
69
- const ast = t.document({
70
- definitions: [
71
- t.operationDefinition({
72
- operation: OperationTypeNode.QUERY,
73
- name: queryName,
74
- selectionSet: t.selectionSet({ selections: opSel }),
75
- }),
76
- ],
77
- });
78
- return ast;
79
- };
80
- export const getCount = ({ queryName, operationName, query, }) => {
81
- const Singular = query.model;
82
- const Filter = `${Singular}Filter`;
83
- const Condition = `${Singular}Condition`;
84
- const variableDefinitions = [
85
- t.variableDefinition({
86
- variable: t.variable({ name: 'condition' }),
87
- type: t.namedType({ type: Condition }),
88
- }),
89
- t.variableDefinition({
90
- variable: t.variable({ name: 'filter' }),
91
- type: t.namedType({ type: Filter }),
92
- }),
93
- ];
94
- const args = [
95
- t.argument({ name: 'condition', value: t.variable({ name: 'condition' }) }),
96
- t.argument({ name: 'filter', value: t.variable({ name: 'filter' }) }),
97
- ];
98
- // PostGraphile supports totalCount through connections
99
- const opSel = [
100
- t.field({
101
- name: operationName,
102
- args,
103
- selectionSet: t.selectionSet({
104
- selections: [
105
- t.field({
106
- name: 'totalCount',
107
- }),
108
- ],
109
- }),
110
- }),
111
- ];
112
- const ast = t.document({
113
- definitions: [
114
- t.operationDefinition({
115
- operation: OperationTypeNode.QUERY,
116
- name: queryName,
117
- variableDefinitions,
118
- selectionSet: t.selectionSet({ selections: opSel }),
119
- }),
120
- ],
121
- });
122
- return ast;
123
- };
124
- export const getMany = ({ builder, queryName, operationName, query, selection, }) => {
125
- const Singular = query.model;
126
- const Plural = operationName.charAt(0).toUpperCase() + operationName.slice(1);
127
- const Condition = `${Singular}Condition`;
128
- const Filter = `${Singular}Filter`;
129
- const OrderBy = `${Plural}OrderBy`;
130
- const selections = getSelections(selection);
131
- const variableDefinitions = [
132
- t.variableDefinition({
133
- variable: t.variable({ name: 'first' }),
134
- type: t.namedType({ type: 'Int' }),
135
- }),
136
- t.variableDefinition({
137
- variable: t.variable({ name: 'last' }),
138
- type: t.namedType({ type: 'Int' }),
139
- }),
140
- t.variableDefinition({
141
- variable: t.variable({ name: 'after' }),
142
- type: t.namedType({ type: 'Cursor' }),
143
- }),
144
- t.variableDefinition({
145
- variable: t.variable({ name: 'before' }),
146
- type: t.namedType({ type: 'Cursor' }),
147
- }),
148
- t.variableDefinition({
149
- variable: t.variable({ name: 'offset' }),
150
- type: t.namedType({ type: 'Int' }),
151
- }),
152
- t.variableDefinition({
153
- variable: t.variable({ name: 'condition' }),
154
- type: t.namedType({ type: Condition }),
155
- }),
156
- t.variableDefinition({
157
- variable: t.variable({ name: 'filter' }),
158
- type: t.namedType({ type: Filter }),
159
- }),
160
- t.variableDefinition({
161
- variable: t.variable({ name: 'orderBy' }),
162
- type: t.listType({
163
- type: t.nonNullType({ type: t.namedType({ type: OrderBy }) }),
164
- }),
165
- }),
166
- ];
167
- const args = [
168
- t.argument({ name: 'first', value: t.variable({ name: 'first' }) }),
169
- t.argument({ name: 'last', value: t.variable({ name: 'last' }) }),
170
- t.argument({ name: 'offset', value: t.variable({ name: 'offset' }) }),
171
- t.argument({ name: 'after', value: t.variable({ name: 'after' }) }),
172
- t.argument({ name: 'before', value: t.variable({ name: 'before' }) }),
173
- t.argument({
174
- name: 'condition',
175
- value: t.variable({ name: 'condition' }),
176
- }),
177
- t.argument({ name: 'filter', value: t.variable({ name: 'filter' }) }),
178
- t.argument({ name: 'orderBy', value: t.variable({ name: 'orderBy' }) }),
179
- ];
180
- const pageInfoFields = [
181
- t.field({ name: 'hasNextPage' }),
182
- t.field({ name: 'hasPreviousPage' }),
183
- t.field({ name: 'endCursor' }),
184
- t.field({ name: 'startCursor' }),
185
- ];
186
- const dataField = builder?._edges
187
- ? t.field({
188
- name: 'edges',
189
- selectionSet: t.selectionSet({
190
- selections: [
191
- t.field({ name: 'cursor' }),
192
- t.field({
193
- name: 'node',
194
- selectionSet: t.selectionSet({ selections }),
195
- }),
196
- ],
197
- }),
198
- })
199
- : t.field({
200
- name: 'nodes',
201
- selectionSet: t.selectionSet({ selections }),
202
- });
203
- const connectionFields = [
204
- t.field({ name: 'totalCount' }),
205
- t.field({
206
- name: 'pageInfo',
207
- selectionSet: t.selectionSet({ selections: pageInfoFields }),
208
- }),
209
- dataField,
210
- ];
211
- const ast = t.document({
212
- definitions: [
213
- t.operationDefinition({
214
- operation: OperationTypeNode.QUERY,
215
- name: queryName,
216
- variableDefinitions,
217
- selectionSet: t.selectionSet({
218
- selections: [
219
- t.field({
220
- name: operationName,
221
- args,
222
- selectionSet: t.selectionSet({ selections: connectionFields }),
223
- }),
224
- ],
225
- }),
226
- }),
227
- ],
228
- });
229
- return ast;
230
- };
231
- export const getOne = ({ queryName, operationName, query, selection, }) => {
232
- const variableDefinitions = Object.keys(query.properties)
233
- .map((key) => ({ key, ...query.properties[key] }))
234
- .filter((field) => field.isNotNull)
235
- .map((field) => {
236
- const { key: fieldName, type: fieldType, isNotNull, isArray, isArrayNotNull, } = field;
237
- let type = t.namedType({ type: fieldType });
238
- if (isNotNull)
239
- type = t.nonNullType({ type });
240
- if (isArray) {
241
- type = t.listType({ type });
242
- if (isArrayNotNull)
243
- type = t.nonNullType({ type });
244
- }
245
- return t.variableDefinition({
246
- variable: t.variable({ name: fieldName }),
247
- type,
248
- });
249
- });
250
- const props = objectToArray(query.properties);
251
- const selectArgs = props
252
- .filter((field) => field.isNotNull)
253
- .map((field) => {
254
- return t.argument({
255
- name: field.name,
256
- value: t.variable({ name: field.name }),
257
- });
258
- });
259
- const selections = getSelections(selection);
260
- const opSel = [
261
- t.field({
262
- name: operationName,
263
- args: selectArgs,
264
- selectionSet: t.selectionSet({ selections }),
265
- }),
266
- ];
267
- const ast = t.document({
268
- definitions: [
269
- t.operationDefinition({
270
- operation: OperationTypeNode.QUERY,
271
- name: queryName,
272
- variableDefinitions,
273
- selectionSet: t.selectionSet({ selections: opSel }),
274
- }),
275
- ],
276
- });
277
- return ast;
278
- };
279
- export const createOne = ({ mutationName, operationName, mutation, selection, }) => {
280
- if (!mutation.properties?.input?.properties) {
281
- throw new Error(`No input field for mutation: ${mutationName}`);
282
- }
283
- const modelName = camelize([singularize(mutation.model)].join('_'), true);
284
- const inputProperties = mutation.properties.input
285
- .properties;
286
- const modelProperties = inputProperties[modelName];
287
- if (!modelProperties.properties) {
288
- throw new Error(`No properties found for model: ${modelName}`);
289
- }
290
- const allAttrs = objectToArray(modelProperties.properties);
291
- const attrs = allAttrs.filter((field) => !NON_MUTABLE_PROPS.includes(field.name));
292
- const variableDefinitions = getCreateVariablesAst(attrs);
293
- const selectArgs = [
294
- t.argument({
295
- name: 'input',
296
- value: t.objectValue({
297
- fields: [
298
- t.objectField({
299
- name: modelName,
300
- value: t.objectValue({
301
- fields: attrs.map((field) => t.objectField({
302
- name: field.name,
303
- value: t.variable({ name: field.name }),
304
- })),
305
- }),
306
- }),
307
- ],
308
- }),
309
- }),
310
- ];
311
- const selections = selection
312
- ? getSelections(selection)
313
- : allAttrs.map((field) => t.field({ name: field.name }));
314
- const ast = createGqlMutation({
315
- operationName,
316
- mutationName,
317
- selectArgs,
318
- selections,
319
- variableDefinitions,
320
- modelName,
321
- });
322
- return ast;
323
- };
324
- export const patchOne = ({ mutationName, operationName, mutation, selection, }) => {
325
- if (!mutation.properties?.input?.properties) {
326
- throw new Error(`No input field for mutation: ${mutationName}`);
327
- }
328
- const modelName = camelize([singularize(mutation.model)].join('_'), true);
329
- const inputProperties = mutation.properties.input
330
- .properties;
331
- const patchProperties = inputProperties['patch'];
332
- const allAttrs = patchProperties?.properties
333
- ? objectToArray(patchProperties.properties)
334
- : [];
335
- const patchAttrs = allAttrs.filter((prop) => !NON_MUTABLE_PROPS.includes(prop.name));
336
- const patchByAttrs = objectToArray(inputProperties).filter((n) => n.name !== 'patch');
337
- const patchers = patchByAttrs.map((p) => p.name);
338
- const variableDefinitions = getUpdateVariablesAst(patchAttrs, patchers);
339
- const selectArgs = [
340
- t.argument({
341
- name: 'input',
342
- value: t.objectValue({
343
- fields: [
344
- ...patchByAttrs.map((field) => t.objectField({
345
- name: field.name,
346
- value: t.variable({ name: field.name }),
347
- })),
348
- t.objectField({
349
- name: 'patch',
350
- value: t.objectValue({
351
- fields: patchAttrs
352
- .filter((field) => !patchers.includes(field.name))
353
- .map((field) => t.objectField({
354
- name: field.name,
355
- value: t.variable({ name: field.name }),
356
- })),
357
- }),
358
- }),
359
- ],
360
- }),
361
- }),
362
- ];
363
- const selections = selection
364
- ? getSelections(selection)
365
- : allAttrs.map((field) => t.field({ name: field.name }));
366
- const ast = createGqlMutation({
367
- operationName,
368
- mutationName,
369
- selectArgs,
370
- selections,
371
- variableDefinitions,
372
- modelName,
373
- });
374
- return ast;
375
- };
376
- export const deleteOne = ({ mutationName, operationName, mutation, }) => {
377
- if (!mutation.properties?.input?.properties) {
378
- throw new Error(`No input field for mutation: ${mutationName}`);
379
- }
380
- const modelName = camelize([singularize(mutation.model)].join('_'), true);
381
- const inputProperties = mutation.properties.input
382
- .properties;
383
- const deleteAttrs = objectToArray(inputProperties);
384
- const variableDefinitions = deleteAttrs.map((field) => {
385
- const { name: fieldName, type: fieldType, isNotNull, isArray } = field;
386
- let type = t.namedType({ type: fieldType });
387
- if (isNotNull)
388
- type = t.nonNullType({ type });
389
- if (isArray) {
390
- type = t.listType({ type });
391
- // no need to check isArrayNotNull since we need this field for deletion
392
- type = t.nonNullType({ type });
393
- }
394
- return t.variableDefinition({
395
- variable: t.variable({ name: fieldName }),
396
- type,
397
- });
398
- });
399
- const selectArgs = [
400
- t.argument({
401
- name: 'input',
402
- value: t.objectValue({
403
- fields: deleteAttrs.map((f) => t.objectField({
404
- name: f.name,
405
- value: t.variable({ name: f.name }),
406
- })),
407
- }),
408
- }),
409
- ];
410
- // so we can support column select grants plugin
411
- const selections = [t.field({ name: 'clientMutationId' })];
412
- const ast = createGqlMutation({
413
- operationName,
414
- mutationName,
415
- selectArgs,
416
- selections,
417
- useModel: false,
418
- variableDefinitions,
419
- modelName,
420
- });
421
- return ast;
422
- };
423
- export function getSelections(selection = []) {
424
- const selectionAst = (field) => {
425
- if (typeof field === 'string') {
426
- return t.field({ name: field });
427
- }
428
- // Check if fieldDefn has MetaField shape (has type.pgType)
429
- const fieldDefn = field.fieldDefn;
430
- if (fieldDefn &&
431
- 'type' in fieldDefn &&
432
- fieldDefn.type &&
433
- typeof fieldDefn.type === 'object' &&
434
- 'pgType' in fieldDefn.type) {
435
- const customAst = getCustomAst(fieldDefn);
436
- if (customAst)
437
- return customAst;
438
- }
439
- return t.field({ name: field.name });
440
- };
441
- return selection
442
- .map((selectionDefn) => {
443
- if (selectionDefn.isObject) {
444
- const { name, selection, variables = {}, isBelongTo } = selectionDefn;
445
- const args = Object.entries(variables).reduce((acc, variable) => {
446
- const [argName, argValue] = variable;
447
- const argAst = t.argument({
448
- name: argName,
449
- value: getComplexValueAst(argValue),
450
- });
451
- return argAst ? [...acc, argAst] : acc;
452
- }, []);
453
- const subSelections = selection?.map((field) => selectionAst(field)) || [];
454
- const selectionSet = isBelongTo
455
- ? t.selectionSet({ selections: subSelections })
456
- : t.selectionSet({
457
- selections: [
458
- t.field({ name: 'totalCount' }),
459
- t.field({
460
- name: 'nodes',
461
- selectionSet: t.selectionSet({ selections: subSelections }),
462
- }),
463
- ],
464
- });
465
- return t.field({
466
- name,
467
- args,
468
- selectionSet,
469
- });
470
- }
471
- else {
472
- return selectionAst(selectionDefn);
473
- }
474
- })
475
- .filter((node) => node !== null);
476
- }
477
- function getComplexValueAst(value) {
478
- // Handle null
479
- if (value === null) {
480
- return t.nullValue();
481
- }
482
- // Handle primitives
483
- if (typeof value === 'boolean') {
484
- return t.booleanValue({ value });
485
- }
486
- if (typeof value === 'number') {
487
- return t.intValue({ value: value.toString() });
488
- }
489
- if (typeof value === 'string') {
490
- return t.stringValue({ value });
491
- }
492
- // Handle arrays
493
- if (Array.isArray(value)) {
494
- return t.listValue({
495
- values: value.map((item) => getComplexValueAst(item)),
496
- });
497
- }
498
- // Handle objects
499
- if (typeof value === 'object' && value !== null) {
500
- const obj = value;
501
- return t.objectValue({
502
- fields: Object.entries(obj).map(([key, val]) => t.objectField({
503
- name: key,
504
- value: getComplexValueAst(val),
505
- })),
506
- });
507
- }
508
- throw new Error(`Unsupported value type: ${typeof value}`);
509
- }
510
- function getCreateVariablesAst(attrs) {
511
- return attrs.map((field) => {
512
- const { name: fieldName, type: fieldType, isNotNull, isArray, isArrayNotNull, } = field;
513
- let type = t.namedType({ type: fieldType });
514
- if (isNotNull)
515
- type = t.nonNullType({ type });
516
- if (isArray) {
517
- type = t.listType({ type });
518
- if (isArrayNotNull)
519
- type = t.nonNullType({ type });
520
- }
521
- return t.variableDefinition({
522
- variable: t.variable({ name: fieldName }),
523
- type,
524
- });
525
- });
526
- }
527
- function getUpdateVariablesAst(attrs, patchers) {
528
- const patchVariables = attrs
529
- .filter((field) => !patchers.includes(field.name))
530
- .map((field) => {
531
- const { name: fieldName, type: fieldType, isArray, isArrayNotNull, } = field;
532
- let type = t.namedType({ type: fieldType });
533
- if (isArray) {
534
- type = t.listType({ type });
535
- if (isArrayNotNull)
536
- type = t.nonNullType({ type });
537
- }
538
- return t.variableDefinition({
539
- variable: t.variable({ name: fieldName }),
540
- type,
541
- });
542
- });
543
- const patcherVariables = patchers.map((patcher) => {
544
- return t.variableDefinition({
545
- variable: t.variable({ name: patcher }),
546
- type: t.nonNullType({ type: t.namedType({ type: 'String' }) }),
547
- });
548
- });
549
- return [...patchVariables, ...patcherVariables];
550
- }
1
+ /**
2
+ * Re-export AST builders from @constructive-io/graphql-query.
3
+ *
4
+ * These are the low-level AST generation functions (getAll, getMany, getOne,
5
+ * createOne, patchOne, deleteOne, getSelections). The canonical implementations
6
+ * now live in graphql-query.
7
+ */
8
+ export { getAll, getCount, getMany, getOne, createOne, patchOne, deleteOne, getSelections, } from '@constructive-io/graphql-query';
@@ -1,35 +1,7 @@
1
- import type { FieldNode } from 'graphql';
2
- import type { CleanField } from '../types/schema';
3
- import type { MetaField } from './types';
4
1
  /**
5
- * Get custom AST for MetaField type - handles PostgreSQL types that need subfield selections
2
+ * Re-export custom AST utilities from @constructive-io/graphql-query.
3
+ *
4
+ * These custom AST builders handle PostgreSQL types that need subfield selections
5
+ * (geometry, interval, etc.). The canonical implementations now live in graphql-query.
6
6
  */
7
- export declare function getCustomAst(fieldDefn?: MetaField): FieldNode | null;
8
- /**
9
- * Generate custom AST for CleanField type - handles GraphQL types that need subfield selections
10
- */
11
- export declare function getCustomAstForCleanField(field: CleanField): FieldNode;
12
- /**
13
- * Check if a CleanField requires subfield selection based on its GraphQL type
14
- */
15
- export declare function requiresSubfieldSelection(field: CleanField): boolean;
16
- /**
17
- * Generate AST for GeometryPoint type
18
- */
19
- export declare function geometryPointAst(name: string): FieldNode;
20
- /**
21
- * Generate AST for GeometryGeometryCollection type
22
- */
23
- export declare function geometryCollectionAst(name: string): FieldNode;
24
- /**
25
- * Generate AST for generic geometry type (returns geojson)
26
- */
27
- export declare function geometryAst(name: string): FieldNode;
28
- /**
29
- * Generate AST for interval type
30
- */
31
- export declare function intervalAst(name: string): FieldNode;
32
- /**
33
- * Check if an object has interval type shape
34
- */
35
- export declare function isIntervalType(obj: unknown): boolean;
7
+ export { getCustomAst, getCustomAstForCleanField, requiresSubfieldSelection, geometryPointAst, geometryCollectionAst, geometryAst, intervalAst, isIntervalType, } from '@constructive-io/graphql-query';