Hello! I’m using the Plasmic CMS w/ the CMS Data Fetcher component… and I have some questions
• Is there any way to order the response by updatedAt? I tried passing it to the Order By input but It doesn’t seem to be ordered.
• Can we filter which fields we need on the response? I.e I don’t need all the data from the model for a specific call
• In the model schema is there a way to limit possibles values for a field? (like opc 1. 2 & 3 only)
Thanks!
Hello @nice_termite.
- Is
updatedAt
adate-time
field? It should be possible by specifying it in the Order By prop! - You can filter by some field using both
Filter field
andFilter value
, e.g: if you have avisible
boolean field in the model you can choose it inFilter field
and use eithertrue
orfalse
inFilter value
- There is currently no way of specifying “enums” in the field schema, sorry
- It’s not defined by us in the model, I think it’s being automatically populated when we save each entry, it’s outside the data obj
- In our model we have something like
{ slug: "", title: "", content: "" }
, but we would like in some scenarios to omit the content in the response, is that possible?
1-2 are not possible yet but that’s good feedback for the product team
Besides enums you can also look into using the ref type