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

Multiple calls are done to fetch all entries of a certain content type #301

Open
renannprado opened this issue Mar 22, 2024 · 0 comments
Open

Comments

@renannprado
Copy link

I'm currently debugging a production issue, which may or may not be related to Contentful, but what I found interesting is that the client, in order to fetch all entries of a certain content type, does 3 calls under the hood.

This is the code:

            contentfulClient
                .fetch(CDAEntry::class.java)
                .withContentType("<content type>")
                .all()

This is the log:

2024-03-22 17:15:56.014 INFO  [http-nio-8080-exec-1] INFO  d.d.a.c.c.configuration.OkHttpLogger     R: 5cfe86ba-8639-4d72-ab59-6d2078cb0239 U:   : --> GET https://preview.contentful.com/spaces/<space>/environments/master/locales

2024-03-22 17:15:56.398 INFO  [http-nio-8080-exec-1] INFO  d.d.a.c.c.configuration.OkHttpLogger     R: 5cfe86ba-8639-4d72-ab59-6d2078cb0239 U:   : --> GET https://preview.contentful.com/spaces/<space>/environments/master/content_types

2024-03-22 17:15:56.610 INFO  [http-nio-8080-exec-1] INFO  d.d.a.c.c.configuration.OkHttpLogger     R: 5cfe86ba-8639-4d72-ab59-6d2078cb0239 U:   : --> GET https://preview.contentful.com/spaces/<space>/environments/master/entries?content_type=<content type>

Subsequent calls seem to call only the /entries endpoint, but still I have the question:

Is it possible to configure the client to always just do the last call? Is there any downsides to that?

If I didn't misunderstand anything, it should be possible according to the API documentation.

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