nuxt-modules / nuxt-modules/strapi
Problem - Populate with field selection
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 717
- Forks
- 89
- Avg merge
- 7h 3m
- Merged PRs (30d)
- 6
Description
Populate with field selection
@nuxtjs/strapi: 1.3.2
nuxt: 3.0.0-rc.4
but typescript strapi-module is: populate?: string | Array
export interface Strapi4RequestParams {
fields?: Array<string>
populate?: string | Array<string>
sort?: string | Array<string>
pagination?: PaginationByOffset | PaginationByPage
filters?: Record<string, unknown>
publicationState?: 'live' | 'preview'
locale?: StrapiLocale
}
populate: {namePopulate: {fields: [''populateFiled']}} -> it's working but typescript shouts at me.
- please fix it but or how to do it differently(better) ?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Strapi4RequestParams interface shown in the issue and compare its populate type with Strapi's documented nested population syntax. Update the typing so the demonstrated field-selection shape is accepted, then verify the example with TypeScript type-checking; done means valid nested populate options no longer produce an error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxt, typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100
