Skip to content

Commit

Permalink
add clarification for using select and include
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolasburk committed Jan 27, 2020
1 parent 7cef55e commit 51545fe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/prisma-client-js/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ There are two ways how the _default selection set_ can be manipulated to specify
- **Select exclusively** (via `select`): When using `select`, the selection set only contains the fields that are explicitly provided as arguments to `select`.
- **Include additionally** (via `include`): When using `include`, the default selection set gets extended with additional fields that are provided as arguments to `include`.

Note that you can not combine `select` and `include` in the following ways:

- Within a `select` statement, you can't use `include`.
- Within an `include` statement, you can't use `select`.

#### Select exclusively via `select`

In this example, we're using `select` to exclusively select the `name` field of the returned `User` object:
Expand Down

0 comments on commit 51545fe

Please sign in to comment.