@constructive-io/graphql-codegen 4.15.4 → 4.16.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.
@@ -137,6 +137,19 @@ function isSearchComputedField(f) {
137
137
  return true;
138
138
  return false;
139
139
  }
140
+ /**
141
+ * Check whether the schema's VectorNearbyInput type includes an
142
+ * `includeChunks` field. When present, tables with embedding columns
143
+ * support transparent chunk-aware vector search.
144
+ */
145
+ function hasIncludeChunksCapability(registry) {
146
+ if (!registry)
147
+ return false;
148
+ const vectorInput = registry.get('VectorNearbyInput');
149
+ if (!vectorInput || vectorInput.kind !== 'INPUT_OBJECT')
150
+ return false;
151
+ return !!vectorInput.inputFields?.some((f) => f.name === 'includeChunks');
152
+ }
140
153
  /**
141
154
  * Categorize "special" fields on a table into PostGIS, pgvector, and
142
155
  * Unified Search groups. Returns only non-empty groups.
@@ -176,10 +189,16 @@ function categorizeSpecialFields(table, typeRegistry) {
176
189
  });
177
190
  }
178
191
  if (embedding.length > 0) {
192
+ const chunkAware = hasIncludeChunksCapability(typeRegistry);
193
+ const baseDesc = 'High-dimensional vector columns for semantic similarity search. Query via the Unified Search API pgvector adapter using cosine, L2, or inner-product distance.';
194
+ const chunkDesc = chunkAware
195
+ ? baseDesc +
196
+ ' Supports chunk-aware search: set `includeChunks: true` in VectorNearbyInput to transparently query across parent and chunk embeddings, returning the minimum distance.'
197
+ : baseDesc;
179
198
  groups.push({
180
199
  category: 'embedding',
181
200
  label: 'pgvector embedding fields',
182
- description: 'High-dimensional vector columns for semantic similarity search. Query via the Unified Search API pgvector adapter using cosine, L2, or inner-product distance.',
201
+ description: chunkDesc,
183
202
  fields: embedding,
184
203
  });
185
204
  }
@@ -119,6 +119,19 @@ function isSearchComputedField(f) {
119
119
  return true;
120
120
  return false;
121
121
  }
122
+ /**
123
+ * Check whether the schema's VectorNearbyInput type includes an
124
+ * `includeChunks` field. When present, tables with embedding columns
125
+ * support transparent chunk-aware vector search.
126
+ */
127
+ function hasIncludeChunksCapability(registry) {
128
+ if (!registry)
129
+ return false;
130
+ const vectorInput = registry.get('VectorNearbyInput');
131
+ if (!vectorInput || vectorInput.kind !== 'INPUT_OBJECT')
132
+ return false;
133
+ return !!vectorInput.inputFields?.some((f) => f.name === 'includeChunks');
134
+ }
122
135
  /**
123
136
  * Categorize "special" fields on a table into PostGIS, pgvector, and
124
137
  * Unified Search groups. Returns only non-empty groups.
@@ -158,10 +171,16 @@ export function categorizeSpecialFields(table, typeRegistry) {
158
171
  });
159
172
  }
160
173
  if (embedding.length > 0) {
174
+ const chunkAware = hasIncludeChunksCapability(typeRegistry);
175
+ const baseDesc = 'High-dimensional vector columns for semantic similarity search. Query via the Unified Search API pgvector adapter using cosine, L2, or inner-product distance.';
176
+ const chunkDesc = chunkAware
177
+ ? baseDesc +
178
+ ' Supports chunk-aware search: set `includeChunks: true` in VectorNearbyInput to transparently query across parent and chunk embeddings, returning the minimum distance.'
179
+ : baseDesc;
161
180
  groups.push({
162
181
  category: 'embedding',
163
182
  label: 'pgvector embedding fields',
164
- description: 'High-dimensional vector columns for semantic similarity search. Query via the Unified Search API pgvector adapter using cosine, L2, or inner-product distance.',
183
+ description: chunkDesc,
165
184
  fields: embedding,
166
185
  });
167
186
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructive-io/graphql-codegen",
3
- "version": "4.15.4",
3
+ "version": "4.16.1",
4
4
  "description": "GraphQL SDK generator for Constructive databases with React Query hooks",
5
5
  "keywords": [
6
6
  "graphql",
@@ -56,15 +56,15 @@
56
56
  "@0no-co/graphql.web": "^1.1.2",
57
57
  "@babel/generator": "^7.29.1",
58
58
  "@babel/types": "^7.29.0",
59
- "@constructive-io/graphql-query": "^3.6.5",
59
+ "@constructive-io/graphql-query": "^3.6.7",
60
60
  "@constructive-io/graphql-types": "^3.3.4",
61
61
  "@inquirerer/utils": "^3.3.4",
62
- "@pgpmjs/core": "^6.7.1",
62
+ "@pgpmjs/core": "^6.8.0",
63
63
  "ajv": "^8.18.0",
64
64
  "deepmerge": "^4.3.1",
65
65
  "find-and-require-package-json": "^0.9.1",
66
66
  "gql-ast": "^3.3.3",
67
- "graphile-schema": "^1.6.5",
67
+ "graphile-schema": "^1.6.7",
68
68
  "graphql": "16.13.0",
69
69
  "inflekt": "^0.3.3",
70
70
  "inquirerer": "^4.7.0",
@@ -73,8 +73,8 @@
73
73
  "oxfmt": "^0.40.0",
74
74
  "pg-cache": "^3.3.4",
75
75
  "pg-env": "^1.7.3",
76
- "pgsql-client": "^3.5.7",
77
- "pgsql-seed": "^2.5.7",
76
+ "pgsql-client": "^3.5.8",
77
+ "pgsql-seed": "^2.5.8",
78
78
  "undici": "^7.24.3"
79
79
  },
80
80
  "peerDependencies": {
@@ -101,5 +101,5 @@
101
101
  "tsx": "^4.21.0",
102
102
  "typescript": "^5.9.3"
103
103
  },
104
- "gitHead": "8edfd4913d37603659afa968489dc84d6bab769d"
104
+ "gitHead": "3b3735292589a49601f40645ea7880f584a23b77"
105
105
  }