Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vercel/turborepo
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b269366b3ceb55813bbe5686444bd185169014a3
Choose a base ref
..
head repository: vercel/turborepo
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1f19e84a191674a3215f9d4e78a54d32d4192240
Choose a head ref
Showing with 3 additions and 3 deletions.
  1. +2 −2 examples/with-prisma/apps/web/pages/api/users.ts
  2. +1 −1 examples/with-prisma/packages/database/src/client.ts
4 changes: 2 additions & 2 deletions examples/with-prisma/apps/web/pages/api/users.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { client } from "database";
import { prisma } from "database";

import type { NextApiRequest, NextApiResponse } from "next";

@@ -17,7 +17,7 @@ export default async function handler(
}

try {
const users = await client.user.findMany();
const users = await prisma.user.findMany();
if (!users)
throw {
message: "Failed to retrieve users",
2 changes: 1 addition & 1 deletion examples/with-prisma/packages/database/src/client.ts
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ declare global {
var prisma: PrismaClient | undefined;
}

export const client = global.prisma || new PrismaClient();
export const prisma = global.prisma || new PrismaClient();

if (process.env.NODE_ENV !== "production") global.prisma = prisma;