Need help: Confused about "include" not returning every field of content type...?

Hey there,

I’m building my new portfolio website from scratch using Contentful.

I have a content type for my homepage that contains data for “project blocks”, on which you can click in order to view a project. I have a reference inside the project block, that leads to “project” data types. I would like to take some data from the project and display it on the project block itself.

As far as I understand, by default, Contentful resolves one layer of depth for references. And it appears it does that for me too, however for some weird reason, it does not seem to send some of the fields that I put inside the project data type & instances. Look at this.

How I’m calling the API:

let apiRes = await api.getEntries({ 'sys.id': id });
console.dir(apiRes);

It’s calling in all “Project Blocks”, which contain references to “Projects”, which have a bunch of fields like color, title, and body text.

Here’s what the api responds:

See how the resolved projects don’t include the “color” field, for example, for some reason…? I don’t understand. And yes, of course the field is activated in the response, and the field also has values for both of these projects. What am I doing wrong?

Thank you!

Jason

Hi Jason,

Could you tell us exactly which version of the SDK you’re using? Also, could you confirm that this field is populated with content for the given fetched entries? You could do that by requesting it directly through our Delivery API and comparing it with the response for the SDK.