Parameters documentation
See original GitHub issueThe find(entity, params)
only shows the basics.
How to use all the parameters here? Can you provide more examples?
Issue Analytics
- State:
- Created 3 years ago
- Comments:12
Top Results From Across the Web
Describing Parameters - Swagger
In OpenAPI 3.0, parameters are defined in the parameters section of an operation or path. To describe a parameter, you specify its name...
Read more >Step 3: Parameters (API reference tutorial) | Documenting APIs
Step 3: Parameters (API reference tutorial) · Examples of parameters · Several types of parameters · What to note in parameter documentation.
Read more >Parameters Document - IBM
A Parameters document contains details of each Property element defined in the specification file. The details are returned in the form of configuration ......
Read more >Parameters - Snowflake Documentation
Snowflake provides the SHOW PARAMETERS command, which displays a list of the parameters, along with the current and default values for each parameter....
Read more >Defining Document Parameters
... the parameters that define the kinds of documents to be managed through the application. Managed Documents provides both base and custom parameter...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Actually, it works fine using the
$strapi.find('categories', { _sort: 'created_at:desc })
and the same applies for any other Strapi parameter (_limit, _sort, _start, etc) If you wanna use categories, you should take a look at the Strapi guide, where they use Restaurants and Categories, then when you fetch your articles you could do:$strapi.find('articles', { category.name: yourCategoryName })
. Also, if you are doing$strapi.find('categories', { _sort: 'created_at:desc })
, this will get the articles related to each category with them unless you set them to private in your model json.Edit: If you wanna get all the articles for a given set of categories, you need to use the 1st Method shown here, in which they pass an array
$strapi.find('products', [['categories.name', 'women'], ['categories.name', 'men']])
. Or if you want to get theproducts
that have bothmen
andwomen
as their category, you need to do the 2nd Method shown thereawait $strapi.find('products', { 'categories.name': ['women', 'men'] })
Por si ha alguien le sirve yo utilize qs, pero cometía el error de pasarlo: const academy = await this.$strapi.find(‘collection-example’, { queryCollection }) Cuando la forma correcta era usar el cliente http de Strapi puesto que el módulo de Nuxt no soporta nativamente la versión 4 aunque lo diga. Lo siguiente funcionó para mi: const results = await this.$strapi.$http.$get(‘collection-example’, { searchParams: queryCollection })