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

Can't get more than 100 content types with getContentTypes call #2201

Open
ryancooper7 opened this issue Apr 4, 2024 · 0 comments
Open

Can't get more than 100 content types with getContentTypes call #2201

ryancooper7 opened this issue Apr 4, 2024 · 0 comments

Comments

@ryancooper7
Copy link

Expected Behavior

getContentTypes should allow an options object similar to getEntries that allows the response limit and/ or pagination to be used, or documentation should be added to show how to use limit or pagination in the query parameter. This would allow more than 100 content types to be retrieved.

Actual Behavior

There is no ability to pass an options object to the getContentTypes call. It only accepts a single parameter called query and it is unclear how to use this field to retrieve more content types, or if it is possible. I have tried the following options for the query string and had no success with any of them limit=1000, limit: 1000, limit:1000 etc. This makes this call useless in a space with > 100 content types as there is no way to increase the limit or paginate

Possible Solution

Add a parameter to the getContentTypes call that matches the options object on getEntries or provide documentation for what string to pass to the query parameter

Steps to Reproduce

  1. Run the following query on a space with >100 content types:
    const allContentTypes = await client.getContentTypes();

Context

We are using the contentful Javascript SDK in our project but I have not been able to make this call to retrieve all of our content types because of the limiting issue. I can achieve this with an API call to the content delivery API but would prefer to stick to one method of querying content

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

1 participant