@constructive-io/graphql-codegen 4.6.1 → 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 (71) 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 -696
  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 -695
  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 -379
  55. package/esm/generators/mutations.d.ts +5 -28
  56. package/esm/generators/mutations.js +5 -198
  57. package/esm/generators/naming-helpers.d.ts +3 -45
  58. package/esm/generators/naming-helpers.js +3 -151
  59. package/esm/generators/select.d.ts +6 -37
  60. package/esm/generators/select.js +6 -659
  61. package/generators/field-selector.d.ts +5 -28
  62. package/generators/field-selector.js +12 -385
  63. package/generators/mutations.d.ts +5 -28
  64. package/generators/mutations.js +9 -234
  65. package/generators/naming-helpers.d.ts +3 -45
  66. package/generators/naming-helpers.js +15 -164
  67. package/generators/select.d.ts +6 -37
  68. package/generators/select.js +17 -703
  69. package/package.json +7 -6
  70. package/core/meta-object/format.json +0 -93
  71. package/esm/core/meta-object/format.json +0 -93
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructive-io/graphql-codegen",
3
- "version": "4.6.1",
3
+ "version": "4.7.0",
4
4
  "description": "GraphQL SDK generator for Constructive databases with React Query hooks",
5
5
  "keywords": [
6
6
  "graphql",
@@ -56,14 +56,15 @@
56
56
  "@0no-co/graphql.web": "^1.1.2",
57
57
  "@babel/generator": "^7.28.6",
58
58
  "@babel/types": "^7.28.6",
59
+ "@constructive-io/graphql-query": "^3.3.0",
59
60
  "@constructive-io/graphql-types": "^3.1.1",
60
61
  "@inquirerer/utils": "^3.2.3",
61
- "@pgpmjs/core": "^6.3.2",
62
+ "@pgpmjs/core": "^6.4.0",
62
63
  "ajv": "^8.17.1",
63
64
  "deepmerge": "^4.3.1",
64
65
  "find-and-require-package-json": "^0.9.0",
65
66
  "gql-ast": "^3.1.0",
66
- "graphile-schema": "^1.2.5",
67
+ "graphile-schema": "^1.3.0",
67
68
  "graphql": "^16.9.0",
68
69
  "inflekt": "^0.3.1",
69
70
  "inquirerer": "^4.4.0",
@@ -72,8 +73,8 @@
72
73
  "oxfmt": "^0.26.0",
73
74
  "pg-cache": "^3.1.0",
74
75
  "pg-env": "^1.5.0",
75
- "pgsql-client": "^3.2.3",
76
- "pgsql-seed": "^2.2.3",
76
+ "pgsql-client": "^3.3.0",
77
+ "pgsql-seed": "^2.3.0",
77
78
  "undici": "^7.19.0"
78
79
  },
79
80
  "peerDependencies": {
@@ -100,5 +101,5 @@
100
101
  "tsx": "^4.21.0",
101
102
  "typescript": "^5.9.3"
102
103
  },
103
- "gitHead": "c9364ffbc4d4a6b1b3750f0a5e347a7290d8d4ce"
104
+ "gitHead": "1e0c774144be23a4c57a15ffe54ea0ec9fbd7c55"
104
105
  }
@@ -1,93 +0,0 @@
1
- {
2
- "$id": "root",
3
- "$schema": "http://json-schema.org/draft-07/schema#",
4
- "type": "object",
5
- "definitions": {
6
- "field": {
7
- "type": "object",
8
- "required": ["name", "type"],
9
- "additionalProperties": true,
10
- "properties": {
11
- "name": {
12
- "type": "string",
13
- "default": "id",
14
- "examples": ["id"]
15
- },
16
- "type": {
17
- "type": "object",
18
- "required": ["pgType", "gqlType"],
19
- "additionalProperties": true,
20
- "properties": {
21
- "gqlType": {
22
- "type": ["string", "null"]
23
- },
24
- "pgType": {
25
- "type": ["string", "null"]
26
- },
27
- "subtype": {
28
- "type": ["string", "null"]
29
- }
30
- }
31
- }
32
- }
33
- }
34
- },
35
- "properties": {
36
- "tables": {
37
- "type": "array",
38
- "items": {
39
- "type": "object",
40
- "properties": {
41
- "name": {
42
- "type": "string",
43
- "default": "User",
44
- "examples": ["User"]
45
- },
46
- "fields": {
47
- "type": "array",
48
- "items": {
49
- "$ref": "#/definitions/field"
50
- }
51
- },
52
- "primaryConstraints": {
53
- "type": "array",
54
- "items": {
55
- "$ref": "#/definitions/field"
56
- }
57
- },
58
- "uniqueConstraints": {
59
- "type": "array",
60
- "items": {
61
- "$ref": "#/definitions/field"
62
- }
63
- },
64
- "foreignConstraints": {
65
- "type": "array",
66
- "items": {
67
- "type": "object",
68
- "properties": {
69
- "refTable": {
70
- "type": "string",
71
- "default": "User",
72
- "examples": ["User"]
73
- },
74
- "fromKey": {
75
- "$ref": "#/definitions/field"
76
- },
77
- "toKey": {
78
- "$ref": "#/definitions/field"
79
- }
80
- },
81
- "required": ["refTable", "fromKey", "toKey"],
82
- "additionalProperties": false
83
- }
84
- }
85
- },
86
- "required": ["name", "fields"],
87
- "additionalProperties": false
88
- }
89
- }
90
- },
91
- "required": ["tables"],
92
- "additionalProperties": false
93
- }
@@ -1,93 +0,0 @@
1
- {
2
- "$id": "root",
3
- "$schema": "http://json-schema.org/draft-07/schema#",
4
- "type": "object",
5
- "definitions": {
6
- "field": {
7
- "type": "object",
8
- "required": ["name", "type"],
9
- "additionalProperties": true,
10
- "properties": {
11
- "name": {
12
- "type": "string",
13
- "default": "id",
14
- "examples": ["id"]
15
- },
16
- "type": {
17
- "type": "object",
18
- "required": ["pgType", "gqlType"],
19
- "additionalProperties": true,
20
- "properties": {
21
- "gqlType": {
22
- "type": ["string", "null"]
23
- },
24
- "pgType": {
25
- "type": ["string", "null"]
26
- },
27
- "subtype": {
28
- "type": ["string", "null"]
29
- }
30
- }
31
- }
32
- }
33
- }
34
- },
35
- "properties": {
36
- "tables": {
37
- "type": "array",
38
- "items": {
39
- "type": "object",
40
- "properties": {
41
- "name": {
42
- "type": "string",
43
- "default": "User",
44
- "examples": ["User"]
45
- },
46
- "fields": {
47
- "type": "array",
48
- "items": {
49
- "$ref": "#/definitions/field"
50
- }
51
- },
52
- "primaryConstraints": {
53
- "type": "array",
54
- "items": {
55
- "$ref": "#/definitions/field"
56
- }
57
- },
58
- "uniqueConstraints": {
59
- "type": "array",
60
- "items": {
61
- "$ref": "#/definitions/field"
62
- }
63
- },
64
- "foreignConstraints": {
65
- "type": "array",
66
- "items": {
67
- "type": "object",
68
- "properties": {
69
- "refTable": {
70
- "type": "string",
71
- "default": "User",
72
- "examples": ["User"]
73
- },
74
- "fromKey": {
75
- "$ref": "#/definitions/field"
76
- },
77
- "toKey": {
78
- "$ref": "#/definitions/field"
79
- }
80
- },
81
- "required": ["refTable", "fromKey", "toKey"],
82
- "additionalProperties": false
83
- }
84
- }
85
- },
86
- "required": ["name", "fields"],
87
- "additionalProperties": false
88
- }
89
- }
90
- },
91
- "required": ["tables"],
92
- "additionalProperties": false
93
- }