I’m querying “give me all entries with content type ZZZ-CONTENT-TYPE linked to Contentful entry with sys.id ZZZ-SYS-ID in the projects
field, and only give me a few fields”
this works just fine:
const queryResponseThatWorks = await client.getEntries({
'content_type': 'ZZZ-CONTENT-TYPE',
'fields.projects.sys.id':'ZZZ-SYS-ID',
'select': ['fields.name', 'fields.platform', 'fields.requestingPartner']
});
I get the response as expected with that subset of fields
but - and i’m doing this because i need to filter out duplicate entires (i’m running three queries and then merging the results, and hoping to use sys.id
as a unique identifier rather than add my own) -
when i try:
const queryResponseThatDoesntWork = await client.getEntries({
'content_type': 'ZZZ-CONTENT-TYPE',
'fields.projects.sys.id':'ZZZ-SYS-ID',
'select': ['sys.id', 'fields.name', 'fields.platform', 'fields.requestingPartner']
});
where ‘sys.id’ is not prepended with fields
as shown in the documentation
it dumps the entire object, with all fields, as well as links objects that are in fields i didn’t ask for
this may be a very specific edge case, but let me know if you have any insight or if you need help reproducing it (happy to give you access to my space). i thought it might have something to do with resolving links, so i tried include: 0
, but that didn’t have any effect except getting rid of some of the nested data in that linked field (which i still hadn’t requested). i even tried just requesting sys.id
, but i still got the full object dump
thanks for any insight!
scotty