Complete the code to import the Prisma client from '@prisma/client'.
import { [1] } from '@prisma/client';
The PrismaClient is imported from '@prisma/client' to interact with the database schema.
Complete the code to define a Next.js API route handler using the new App Router.
export async function [1](request) { return new Response('Hello from API'); }
In Next.js App Router, API routes export HTTP method functions like GET to handle requests.
Fix the error in the Prisma schema model definition by completing the field type.
model User {
id Int @id @default(autoincrement())
name [1]
}Prisma schema uses String (capital S) for string fields, not lowercase or other types.
Fill both blanks to create a Prisma schema model with an optional email field.
model Profile {
id Int @id @default(autoincrement())
email [1] @unique [2]
}String without question mark for optional field.@optional which is not a Prisma attribute.The field type String? marks the field optional, and @default(null) sets its default to null.
Fill all three blanks to define a Next.js API route that returns JSON with a status code.
export async function [1](request) { return new Response(JSON.stringify({ message: 'Success' }), { status: [2], headers: { 'Content-Type': [3] } }); }
The API route exports a GET function, returns status 200, and sets content type to 'application/json'.