Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plain client 'getMany' and 'getPublished' return unexpected results #2281

Open
athomas-octoberthree opened this issue May 17, 2024 · 1 comment

Comments

@athomas-octoberthree
Copy link

Problem Description

The getPublished function returns more entities than the getMany function, when specifying the same content type in both functions.

Both functions should return the same number of entities.

System Details

contentful-management 11.25.4

Example code demonstrating issue

// ...
const entries1 = await client.entry.getMany({
    spaceId      : mySpaceId,
    environmentId: myEnvironmentId,
    query: {
        content_type: myContentType,
    }
})

const entries2 = await client.entry.getPublished({
    spaceId      : mySpaceId,
    environmentId: myEnvironmentId,
    contentTypeId: myContentType
})

// length of entries1 != entries2, but should be
@Parthipan-Natkunam
Copy link

I get the same number of entities by using the same object shape for the input parameter of both methods:

// ...
const entries1 = await client.entry.getMany({
   spaceId      : mySpaceId,
   environmentId: myEnvironmentId,
   query: {
       content_type: myContentType,
   }
})

const entries2 = await client.entry.getPublished({
   spaceId      : mySpaceId,
   environmentId: myEnvironmentId,
   query: {
       content_type: myContentType,
   }
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants