Repository navigation
feat(graphile): presigned uploads only; drop graphile-llm metering - #1954
pyramation wants to merge 5 commits into
Conversation
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
Review complete. No blocking issues — approved ✅; 1 nitpick below. 🧹 Nitpicks (1) — 🟢 1 low
The change deletes the graphql-upload/multipart middleware path and the server-side managed upload module, replaces the removed
Reviewed commit: 8bb05fd |
3bcce2c to
055e670
Compare
This comment has been minimized.
This comment has been minimized.
Uploads go through the presigned path only: the Upload scalar, the *Upload mutation inputs, the graphql-upload middleware and the streaming resolver are gone, and image/upload/attachment columns are plain columns on the mutation inputs. graphile-llm no longer carries a metering plugin; the embedder has one result shape.
8228536 to
33bed39
Compare
Summary
Uploads have one path. A file reaches a column through the presigned mutation (files row → PUT → ordinary update with the projection document). The streaming transport on the mutation itself is removed:
graphile-upload-plugin(theUploadscalar and the{column}Uploadinputs) andgraphile-settings/src/upload-resolver.tsare deleted;createConstructivePresetlosesenableDirectUploads.graphql/serverno longer mountsgraphql-uploador the content-type bridge, so amultipart/form-dataPOST to/graphqlis refused (415). The request-size exemption for multipart goes with it.graphile-presigned-url-pluginkeepsbuildFileProjection(nowfile-projection.ts); the staged-object helpers and thefile-ref-registrylookup that only the streaming resolver used are gone.express-contextstops readingenable_direct_uploads.Why: under Grafast a field's
resolve()runs after its plan has executed, so the resolver wrapper swapped the upload in after the UPDATE had already run. A multipartupdateX { xPatch: { photoUpload } }answeredAttempted to update a record, but no new values were specified.and wrote nothing, while the schema kept advertising the input. A table with anupload-domain column also could not build at all: the domain's codec typeUploadcollided with the scalar.graphile-llmdrops its metering plugin (metering-plugin.ts,metering.ts,config-cache.ts, themeteringpreset option). It had the sameresolve()problem, conflicted withLlmModulePluginonbuild.llmEmbedderat schema build, and nothing enabled it.build.llmEmbeddernow has one result shape,{ embedding }; embedder failure messages no longer mention quotas or plans.Tests
graphql/server-test/__tests__/upload-columns.integration.test.ts: real routed server (HTTP through grafserv, so documents are validated) over a table withimage,uploadandattachmentcolumns — schema builds, inputs carry only the columns, noUploadscalar, a files row created throughuploadAppFileis written to the column as its projection through the ordinary update, multipart is refused. Onmainthe same fixture fails at schema build (Uploadtype conflict) and, without theuploadcolumn, advertisesphotoUploadand writes nothing.graphile/graphile-llm/src/__tests__/preset-schema.test.ts:GraphileLlmPresetbuilt into a real schema; themeteringoption is a type error.Link to Devin session: https://app.devin.ai/sessions/edcf5248d26442ecab8f798ac6561247
Open in Devin Desktop: https://app.devin.ai/desktop/session/edcf5248d26442ecab8f798ac6561247?variant=devin
Requested by: @pyramation