New App Builder - Conversion Pains - Backend SQL resource not injected in published R2/code app (works in editor/preview)

Posting in case others have hit this β€” and hoping someone's cracked it.

After converting a classic app to a React/code (R2) app, my backend functions can't see their Postgres resource handle in the published runtime. The exact same functions work fine in editor/preview. In production they throw ReferenceError: <resourceHandle> is not defined before any SQL runs.

What I've confirmed so far:

  • Editor/preview: handle present, DB round-trips succeed.

  • Published: handle absent on the same functions β€” including a freshly authored test function, so it's not a stale migrated file.

  • A DB ping function fails identically, so it isn't auth/credential/SQL logic.

  • package.json β†’ resourceReferencesByFile shows empty arrays for both working and failing functions, so it doesn't seem to reflect actual binding. Hand-editing it made no difference.

Reads like the published runtime isn't injecting backend SQL resource handles for converted R2/code apps.

Has anyone:

  1. Got a backend SQL/Postgres resource working in a published converted R2/code app?

  2. Found the UI step / app-level resource allowlist / env config that makes the handle available after publish?

  3. Heard whether this is a known classic→R2 conversion issue?

Any pointers gratefully received β€” happy to share more detail or a minimal repro. Thanks.

For in-depth findings, see docs in New React Retool App - Findings Log - Google Drive

Welcome to the community, @Markus_Sullivan! Thanks for reaching out. :slightly_smiling_face:

I've not seen this before and am successfully able to publish a converted app that contains SQL queries, but am happy to dig into it with you. Quick point of clarification about your use of the term "backend", though - is your classic app utilizing an app function or isolated resource query? We paused development on the former earlier this year and I wouldn't necessarily expect it to be convertible.

You mention sharing a minimal repro - any additional context would be super helpful! Alternatively, you are welcome to join our scheduled Office Hours.