-
Notifications
You must be signed in to change notification settings - Fork 95
feat: add Prisma provider #416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
AmanVarshney01
wants to merge
123
commits into
alchemy-run:main
Choose a base branch
from
AmanVarshney01:aman/prisma-alchemy-provider
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 103 commits
Commits
Show all changes
123 commits
Select commit
Hold shift + click to select a range
484d554
Add Prisma provider and compute examples
AmanVarshney01 0952b7a
fix(prisma): finalize provider cleanup
AmanVarshney01 72fc72c
feat(prisma): add effect-native compute platform
AmanVarshney01 ada0c1f
fix(prisma): track managed compute env keys
AmanVarshney01 7f366f0
fix(prisma): namespace connection binding env keys
AmanVarshney01 f0f5483
fix(prisma): mark compute bundles as runtime phase
AmanVarshney01 e153873
test(prisma): cover connection binding runtime client
AmanVarshney01 e4853dc
fix(prisma): reject invalid effect-native compute inputs
AmanVarshney01 c1425db
fix(prisma): resolve connection bindings at runtime
AmanVarshney01 f1ae927
fix(prisma): preserve optional connection binding values
AmanVarshney01 d84c1ae
fix(prisma): escape connection binding sentinels
AmanVarshney01 d885485
fix(prisma): fall back to global compute version routes
AmanVarshney01 3fbaf96
fix(prisma): preserve compute version fallback errors
AmanVarshney01 c3b4613
fix(prisma): tolerate missing session on default skips
AmanVarshney01 70086b4
fix(prisma): add connection env helpers
AmanVarshney01 bdc04f5
fix(prisma): harden compute destroy env cleanup
AmanVarshney01 5878fa8
fix(prisma): type connection env keys
AmanVarshney01 a4146ea
test(prisma): block stale compute app export
AmanVarshney01 a77805d
fix(prisma): adopt latest compute version on read
AmanVarshney01 3e7f9e3
fix(prisma): derive compute promotion from live state
AmanVarshney01 a54b444
test(prisma): cover native compute bindings
AmanVarshney01 3dce432
fix(prisma): clean up failed compute uploads
AmanVarshney01 5e7f17f
fix(prisma): resolve compute artifacts before remote writes
AmanVarshney01 6f7b193
fix(prisma): ignore branch env overrides
AmanVarshney01 e14e197
fix(prisma): keep compute cleanup idempotent
AmanVarshney01 932176c
fix(prisma): select default project database
AmanVarshney01 62ad56d
fix(prisma): skip absent compute env markers
AmanVarshney01 937ae2d
fix(prisma): find unnamed default database
AmanVarshney01 3458fda
fix(prisma): remember compute env class
AmanVarshney01 6d1d5c5
docs(prisma): show compute runtime bindings
AmanVarshney01 b04ab28
fix(prisma): reconcile project settings removal
AmanVarshney01 a58fa06
fix(prisma): retry transient transport errors
AmanVarshney01 b2496a7
fix(prisma): ignore null connection secrets
AmanVarshney01 75d84b3
fix(prisma): validate compute dev props
AmanVarshney01 1af0216
fix(prisma): validate environment variables locally
AmanVarshney01 f65df52
fix(prisma): keep env validation internal
AmanVarshney01 d517bc2
fix(prisma): skip dev project deletes
AmanVarshney01 45ce426
chore(prisma): remove compute service cast
AmanVarshney01 cca14ff
chore(prisma): keep generated contract stable
AmanVarshney01 655f7c2
fix(prisma): avoid retrying unsafe posts
AmanVarshney01 73fd3e7
fix(prisma): avoid retrying transfers
AmanVarshney01 ebaada0
fix(prisma): reobserve compute cleanup conflicts
AmanVarshney01 d5d5e3b
test(prisma): cover compute platform factory types
AmanVarshney01 46e5b37
fix(prisma): expose compute process services
AmanVarshney01 de3ef8c
test(prisma): cover named compute handlers
AmanVarshney01 521aac6
fix(prisma): validate compute handler names
AmanVarshney01 d4673ac
test(prisma): cover compute connection binding in dev
AmanVarshney01 2b5ede5
fix(prisma): avoid mutating system env vars
AmanVarshney01 5e78796
test(prisma): pin compute binding env precedence
AmanVarshney01 649ec2d
test(prisma): cover compute destroy system envs
AmanVarshney01 ff96509
fix(prisma): detect compute version artifact changes
AmanVarshney01 f418832
fix(prisma): diff stable fields with unresolved refs
AmanVarshney01 ce90b65
fix(prisma): canonicalize database source diffs
AmanVarshney01 d5d5518
fix(prisma): canonicalize project and version diffs
AmanVarshney01 1a198c3
feat(prisma): allow connection binding on lambda
AmanVarshney01 ea271fe
docs(prisma): show connection binding on platforms
AmanVarshney01 df8110a
test(prisma): cover connection binding on lambda types
AmanVarshney01 768c7a3
fix(prisma): preserve replacements with unresolved branch refs
AmanVarshney01 37ed8b3
fix(prisma): preserve version replacements with unresolved update refs
AmanVarshney01 129d89b
fix(prisma): preserve replacements with unresolved update inputs
AmanVarshney01 9e89e24
fix(prisma): preserve compute replacement with unresolved region
AmanVarshney01 136a2e8
test(prisma): pin compute artifact reconciliation
AmanVarshney01 df5ff11
test(prisma): cover runtime connection binding policy
AmanVarshney01 c249a04
test(prisma): pin generated docs surface
AmanVarshney01 d478a94
feat(prisma): support worker connection bindings
AmanVarshney01 ee820bb
fix(prisma): fall back when compute version read misses
AmanVarshney01 afc5ff3
fix(prisma): share compute version observation
AmanVarshney01 46759c4
fix(prisma): keep compute version helper internal
AmanVarshney01 721d247
test(prisma): block internal deep imports
AmanVarshney01 57dcd82
refactor(prisma): centralize compute version observation
AmanVarshney01 3423734
fix(prisma): observe default resources before delete
AmanVarshney01 50e0103
fix(prisma): read compute versions from saved service id
AmanVarshney01 e2db7b7
fix(prisma): avoid listing on saved compute version reads
AmanVarshney01 c01b58c
fix(prisma): always observe default resources before delete
AmanVarshney01 504e3ec
fix(prisma): observe env vars before delete
AmanVarshney01 b3dd958
fix(prisma): skip redundant compute promotion
AmanVarshney01 d4b8527
fix(prisma): skip redundant compute version promotion
AmanVarshney01 8f45ca5
fix(prisma): prefer service-scoped compute version start
AmanVarshney01 c16e6f1
fix(prisma): fallback when stopping compute versions
AmanVarshney01 f2a449c
fix(prisma): start compute versions before promotion
AmanVarshney01 9d046ad
fix(prisma): reject unstarted compute promotion
AmanVarshney01 0c709cb
fix(prisma): verify compute version delete fallback
AmanVarshney01 2519b05
fix(prisma): prefer preview url for unpromoted compute
AmanVarshney01 69f4dfa
test(prisma): harden provider invariants
AmanVarshney01 97af09e
test(prisma): require resource field docs
AmanVarshney01 cff84c1
test(prisma): ban raw async escape hatches
AmanVarshney01 ab52d34
test(prisma): assert runtime binding context
AmanVarshney01 cfad62b
test(prisma): verify binding policy provider
AmanVarshney01 f6d3d15
fix(prisma): preserve dev provider stable ids
AmanVarshney01 85ac95c
fix(prisma): clean up failed compute versions
AmanVarshney01 c572070
fix(prisma): sync database branch after create
AmanVarshney01 5c64ff5
fix(prisma): align api response types
AmanVarshney01 537a88f
fix(prisma): tighten database source input
AmanVarshney01 0ba7b6f
fix(prisma): model project create database shape
AmanVarshney01 56eac06
fix(prisma): retry blocked project cleanup
AmanVarshney01 568725b
fix(prisma): fingerprint compute branch deployments
AmanVarshney01 9811910
fix(prisma): validate compute version preconditions
AmanVarshney01 e13b51d
fix(prisma): reject unassigned compute branch ids
AmanVarshney01 a2c2f5f
fix(prisma): keep tanstack example route generation stable
AmanVarshney01 5a97b31
fix(prisma): honor persisted compute env keys
AmanVarshney01 1e24dbf
fix(prisma): find project env vars past branch overrides
AmanVarshney01 abb2ea0
fix(prisma): use explicit postgres binding in tanstack example
AmanVarshney01 7b5cf0f
Add Effect-native Prisma Compute example
AmanVarshney01 c1a9d94
feat(prisma): add custom domains and finalize examples
AmanVarshney01 e64b9a0
Merge remote-tracking branch 'origin/main' into aman/prisma-alchemy-p…
AmanVarshney01 c1effac
fix(prisma): clean up compute service create failures
AmanVarshney01 00e0113
fix(prisma): stabilize effect compute runtime bindings
AmanVarshney01 80bc98b
Merge branch 'main' into aman/prisma-alchemy-provider
AmanVarshney01 c4e251c
chore(prisma): use effect config in examples
AmanVarshney01 0ea1864
Merge remote-tracking branch 'origin/main' into aman/prisma-alchemy-p…
AmanVarshney01 20d93d4
fix(prisma): scope compute env vars by branch role
AmanVarshney01 58412ad
Merge remote-tracking branch 'origin/main' into aman/prisma-alchemy-p…
AmanVarshney01 ab174e1
fix(prisma): expose management client from providers()
AmanVarshney01 995dfd4
Merge remote-tracking branch 'origin/main' into aman/prisma-alchemy-p…
AmanVarshney01 54b9301
feat(prisma): align provider with current alchemy
AmanVarshney01 9c0efda
Merge branch 'main' into aman/prisma-alchemy-provider
sam-goodwin af6e178
feat(prisma): migrate to current alchemy APIs and latest management A…
AmanVarshney01 74ff764
feat(prisma): harden management api provider
AmanVarshney01 b369ec6
chore: merge main into prisma provider
AmanVarshney01 4bbc6ed
chore(prisma): minimize dependency churn
AmanVarshney01 eb579ae
fix(prisma): harden production deploys
AmanVarshney01 059c314
Merge remote-tracking branch 'origin/main' into aman/prisma-alchemy-p…
AmanVarshney01 7004791
fix(prisma): close production reconciliation gaps
AmanVarshney01 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # Prisma Compute Effect | ||
|
|
||
| Minimal Effect-native Prisma Compute service managed by Alchemy. | ||
|
|
||
| This example is intentionally not a framework app. It shows the provider-native | ||
| runtime path: | ||
|
|
||
| - `Prisma.Project` | ||
| - `Prisma.Branch` | ||
| - `Prisma.Postgres` | ||
| - `Prisma.Connection` | ||
| - `Prisma.Compute(..., Effect.gen(...))` | ||
| - `Prisma.Connection.bind(Connection)` inside the deployed runtime | ||
|
|
||
| The deployed service responds on `/` and `/api/health` with JSON showing the | ||
| bound database and connection IDs. | ||
|
|
||
| ## Deploy | ||
|
|
||
| ```sh | ||
| export PRISMA_SERVICE_TOKEN="..." | ||
| bun run deploy | ||
| ``` | ||
|
|
||
| `PRISMA_API_TOKEN` also works. | ||
|
|
||
| ## Check It | ||
|
|
||
| ```sh | ||
| curl "$URL/" | ||
| curl "$URL/api/health" | ||
| ``` | ||
|
|
||
| The response should include: | ||
|
|
||
| ```json | ||
| { | ||
| "ok": true, | ||
| "mode": "effect-native", | ||
| "hasDatabaseUrl": true | ||
| } | ||
| ``` | ||
|
|
||
| ## Destroy | ||
|
|
||
| ```sh | ||
| export PRISMA_SERVICE_TOKEN="..." | ||
| bun run destroy | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,142 @@ | ||
| import * as Alchemy from "alchemy"; | ||
| import * as Prisma from "alchemy/Prisma"; | ||
| import * as Effect from "effect/Effect"; | ||
| import { HttpServerRequest } from "effect/unstable/http/HttpServerRequest"; | ||
| import * as HttpServerResponse from "effect/unstable/http/HttpServerResponse"; | ||
|
|
||
| const region = "eu-west-3"; | ||
| const port = 3000; | ||
|
|
||
| const serviceName = | ||
| process.env.PRISMA_EFFECT_SERVICE ?? "alchemy-prisma-compute-effect"; | ||
| const projectName = process.env.PRISMA_PROJECT ?? `${serviceName}-project`; | ||
| const message = | ||
| process.env.PRISMA_EFFECT_MESSAGE ?? | ||
| "hello from Effect-native Prisma Compute"; | ||
|
|
||
| const runtimeEnv = (key: string, fallback: string) => | ||
| Effect.sync(() => process.env[key] ?? fallback); | ||
|
|
||
| export const Project = Prisma.Project("Project", { | ||
| name: projectName, | ||
| createDatabase: false, | ||
| region, | ||
| }); | ||
|
|
||
| export const MainBranch = Prisma.Branch( | ||
| "MainBranch", | ||
| Effect.gen(function* () { | ||
| const project = yield* Project; | ||
| return { | ||
| project, | ||
| gitName: "main", | ||
| isDefault: true, | ||
| }; | ||
| }), | ||
| ); | ||
|
|
||
| export const Postgres = Prisma.Postgres( | ||
| "Postgres", | ||
| Effect.gen(function* () { | ||
| const project = yield* Project; | ||
| const branch = yield* MainBranch; | ||
| return { | ||
| project, | ||
| name: "main", | ||
| region, | ||
| branchId: branch.branchId, | ||
| isDefault: true, | ||
| }; | ||
| }), | ||
| ); | ||
|
|
||
| export const Connection = Prisma.Connection( | ||
| "Connection", | ||
| Effect.gen(function* () { | ||
| const postgres = yield* Postgres; | ||
| return { | ||
| database: postgres, | ||
| name: "api", | ||
| }; | ||
| }), | ||
| ); | ||
|
|
||
| export const Api = Prisma.Compute( | ||
|
AmanVarshney01 marked this conversation as resolved.
Outdated
|
||
| "Api", | ||
| Effect.gen(function* () { | ||
| const project = yield* Project; | ||
|
AmanVarshney01 marked this conversation as resolved.
Outdated
|
||
| const branch = yield* MainBranch; | ||
| return { | ||
| project, | ||
| serviceName, | ||
| regionId: region, | ||
| branchId: branch.branchId, | ||
| main: import.meta.filename, | ||
| handler: "Api" as const, | ||
| port, | ||
| env: { | ||
| PRISMA_EFFECT_MESSAGE: message, | ||
| PRISMA_PROJECT_ID: project.projectId, | ||
| PRISMA_BRANCH_ID: branch.branchId, | ||
| }, | ||
| destroyOldVersion: true, | ||
| }; | ||
| }), | ||
| Effect.gen(function* () { | ||
| const db = yield* Prisma.Connection.bind(Connection); | ||
|
|
||
| return { | ||
| fetch: Effect.gen(function* () { | ||
| const request = yield* HttpServerRequest; | ||
| const url = new URL(request.url, "http://localhost"); | ||
|
|
||
| if (url.pathname !== "/" && url.pathname !== "/api/health") { | ||
| return HttpServerResponse.text("Not found", { status: 404 }); | ||
| } | ||
|
|
||
| if (request.method !== "GET") { | ||
| return HttpServerResponse.text("Method not allowed", { status: 405 }); | ||
| } | ||
|
|
||
| const databaseUrl = yield* db.databaseUrl; | ||
| const response = { | ||
| ok: true, | ||
| mode: "effect-native", | ||
| message: yield* runtimeEnv("PRISMA_EFFECT_MESSAGE", message), | ||
| projectId: yield* runtimeEnv("PRISMA_PROJECT_ID", ""), | ||
| branchId: yield* runtimeEnv("PRISMA_BRANCH_ID", ""), | ||
| databaseId: yield* db.databaseId, | ||
| connectionId: yield* db.connectionId, | ||
| hasDatabaseUrl: databaseUrl !== undefined, | ||
| }; | ||
|
|
||
| return yield* HttpServerResponse.json(response); | ||
| }), | ||
| }; | ||
| }).pipe(Effect.provide(Prisma.ConnectionBindingLive)), | ||
| ); | ||
|
|
||
| export default Alchemy.Stack( | ||
| "PrismaComputeEffect", | ||
| { | ||
| providers: Prisma.providers(), | ||
| state: Alchemy.localState(), | ||
| }, | ||
| Effect.gen(function* () { | ||
| const project = yield* Project; | ||
| const branch = yield* MainBranch; | ||
| const postgres = yield* Postgres; | ||
| const connection = yield* Connection; | ||
| const api = yield* Api; | ||
|
|
||
| return { | ||
| projectId: project.projectId, | ||
| branchId: branch.branchId, | ||
| databaseId: postgres.databaseId, | ||
| connectionId: connection.connectionId, | ||
| computeServiceId: api.computeServiceId, | ||
| computeVersionId: api.computeVersionId, | ||
| url: api.url, | ||
| }; | ||
| }), | ||
| ); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| { | ||
| "name": "prisma-compute-effect", | ||
| "version": "0.0.0", | ||
| "private": true, | ||
| "license": "Apache-2.0", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/alchemy-run/alchemy-effect.git", | ||
| "directory": "examples/prisma-compute-effect" | ||
| }, | ||
| "type": "module", | ||
| "scripts": { | ||
| "build": "tsc -b", | ||
| "deploy": "alchemy deploy", | ||
| "destroy": "alchemy destroy", | ||
| "tail": "alchemy tail" | ||
| }, | ||
| "dependencies": { | ||
| "@effect/platform-bun": "catalog:", | ||
| "alchemy": "workspace:*", | ||
| "effect": "catalog:" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/node": "catalog:", | ||
| "typescript": "catalog:" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "extends": "../../tsconfig.base.json", | ||
| "include": ["alchemy.run.ts"], | ||
| "compilerOptions": { | ||
| "noEmit": true, | ||
| "rootDir": ".", | ||
| "module": "Preserve", | ||
| "moduleResolution": "Bundler", | ||
| "target": "ESNext", | ||
| "types": ["node"] | ||
| }, | ||
| "references": [ | ||
| { | ||
| "path": "../../packages/alchemy/tsconfig.json" | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| .alchemy | ||
| .output | ||
| dist | ||
| node_modules | ||
| tsconfig.tsbuildinfo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| # Prisma TanStack Start | ||
|
|
||
| Minimal TanStack Start app with Prisma Next queries, Prisma Postgres, and | ||
| Prisma Compute managed by Alchemy. | ||
|
|
||
| ## What It Creates | ||
|
|
||
| - A Prisma project. | ||
| - A `main` Prisma branch. | ||
| - A Prisma Postgres database via `Prisma.Postgres(...)`. | ||
| - A database connection with redacted connection strings. | ||
| - A standalone Prisma environment variable for shared project config. | ||
| - A Prisma Compute service. | ||
| - A single Compute version built from TanStack Start's `.output` artifact. | ||
| - Runtime env vars for database URLs, Prisma resource IDs, and app config. | ||
| - A Prisma Next contract in `src/prisma/contract.prisma`. | ||
| - Generated Prisma Next artifacts in `src/prisma/contract.json` and | ||
| `src/prisma/contract.d.ts`. | ||
| - A seed script that inserts demo users/posts and server routes that query them | ||
| through `@prisma-next/postgres/runtime`. | ||
|
|
||
| The app uses an explicit Compute build command: | ||
|
|
||
| ```sh | ||
| bun run db:setup && bun run build | ||
| ``` | ||
|
|
||
| `db:setup` emits the Prisma Next contract, initializes the database shape, and | ||
| seeds demo data before `vite build` writes the TanStack Start `.output` artifact. | ||
| The Compute version starts `server/index.mjs` on port `3000`. | ||
|
|
||
| ## Local Dev | ||
|
|
||
| ```sh | ||
| bun install | ||
| bun run dev | ||
| ``` | ||
|
|
||
| `alchemy dev` starts a local Prisma Postgres with `@prisma/dev`, passes the same | ||
| `DATABASE_URL`/`DIRECT_URL` env names used by deploy, runs `bun run db:setup`, | ||
| and then starts Vite with `bun run dev:start`. | ||
|
|
||
| Open `http://localhost:3000`. | ||
|
|
||
| If port 3000 is busy: | ||
|
|
||
| ```sh | ||
| PRISMA_TANSTACK_DEV_PORT=3011 bun run dev | ||
| ``` | ||
|
|
||
| ## Prisma Next Workflow | ||
|
|
||
| ```sh | ||
| bun run emit # regenerate contract.json + contract.d.ts | ||
| bun run db:init # apply the contract to DATABASE_URL | ||
| bun run seed # refresh the demo rows | ||
| bun run db:setup # all of the above, in order | ||
| ``` | ||
|
|
||
| The Vite dev server also auto-emits the contract on edits. The explicit scripts | ||
| remain the source of truth for deploys and CI so builds are reproducible. | ||
|
|
||
| The runtime uses `pg`, so the example uses `Prisma.connectionEnv(connection)` to | ||
| pass a direct `postgres://` connection string as `DATABASE_URL`/`DIRECT_URL`. | ||
| The pooled `prisma+postgres://` URL is exported separately as | ||
| `POOLED_DATABASE_URL` but is intentionally not used by | ||
| `@prisma-next/postgres/runtime`. | ||
|
|
||
| ## Deploy | ||
|
|
||
| ```sh | ||
| export PRISMA_SERVICE_TOKEN="..." | ||
| bun run deploy | ||
| ``` | ||
|
|
||
| `PRISMA_API_TOKEN` also works. The deploy output prints the Compute URL. | ||
|
|
||
| ## Check It | ||
|
|
||
| ```sh | ||
| curl "$URL/" | ||
| curl "$URL/api/health" | ||
| ``` | ||
|
|
||
| The health response should include: | ||
|
|
||
| ```json | ||
| { | ||
| "ok": true, | ||
| "counts": { | ||
| "users": 2, | ||
| "posts": 3 | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ## Destroy | ||
|
|
||
| ```sh | ||
| export PRISMA_SERVICE_TOKEN="..." | ||
| bun run destroy | ||
| ``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.