[explorer] Add DO /query endpoint that introspects DO sqlite#12574
[explorer] Add DO /query endpoint that introspects DO sqlite#12574emily-shen merged 6 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 248b977 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Claude finished @emily-shen's task —— View job Changeset ReviewTodo List:
✅ All changesets look good The changeset
The changeset appropriately explains that user DO classes are wrapped to add introspection capabilities, and mentions the env var users need to set to opt in. Image Review: I checked the attached image but it appears to be just a small orange circle, not a cute animal. No cuteness report needed! 🔍 |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
cdabe25 to
0b3711b
Compare
petebacondarwin
left a comment
There was a problem hiding this comment.
Approved with a bunch of nits that you can do with as you please.
Well done getting this up and running.
penalosa
left a comment
There was a problem hiding this comment.
An overall comment is that I'd love for us to explore moving this to the runtime, and leveraging the existing work there.
Only blocker is removing the inline code string
0b3711b to
b88d69b
Compare
b88d69b to
e72318e
Compare
This PR adds a query endpoint that runs queries against a DO instance's sqlite store.
This required:
__mf_introspectSqlite()method. This is necessary becausectx.storage.sqlis not available on the stub, and only from inside the DO class. We apply this by re-exporting the user entry module.extensionsfield in openapi-filter-config.ts that specifies schemas to merge in. The query endpoint is not in the cloudflare public api schema. I've based the schema off what the dashboard uses though, so it should be totally compatible with the endpoint that the data studio in stratus uses.A picture of a cute animal (not mandatory, but encouraged)