toProjection() function
Split a wire projection into its scalar and relation halves.
Signature:
export declare function toProjection(relations: RelationMap, model: string, select: Select | undefined): Projection | undefined;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
relations |
Relations per model, from | |
|
model |
string |
The model the projection is written against. |
|
select |
Select | undefined |
The projection, or undefined for the whole row. |
Returns:
Projection | undefined
The split projection, or undefined when nothing was asked for.
Remarks
Prisma Next separates the two — .select(...) names scalar fields and .include(name, branch) pulls a relation — where the wire shape nests them in one object. Splitting here keeps every caller from walking it again.
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.