Skip to content

Commit be6c443

Browse files
syazwanzpaulpopus
andauthored
docs: fix incorrect select syntax example in querying docs (#14590)
### What? Fix incorrect select example in the querying docs. The docs showed `select: [{ title: true }]` which is not valid. Updated to `select: { title: true }` to match actual API usage and TypeScript types. ### Why? The wrong example causes TypeScript errors and confusion for users. Correcting it makes the docs accurate and consistent. ### How? Updated the example in docs/queries/overview.mdx to use object syntax for select. No code changes, documentation only. Co-authored-by: Paul Popus <paul@payloadcms.com>
1 parent 11adc9d commit be6c443

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/queries/overview.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,9 @@ const posts = await payload.find({
285285
collection: 'posts',
286286
where: { ... },
287287
// highlight-start
288-
select: [{
288+
select: {
289289
title: true,
290-
}],
290+
},
291291
// highlight-end
292292
```
293293

0 commit comments

Comments
 (0)