-
Notifications
You must be signed in to change notification settings - Fork 3
Add boolean option to merge sanity pages into combined files (one per content type) #32
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
Comments
Here are my thoughts.... First, Contentful source combines ALL data into 1 file. My thinking is each do we default to pagination? or to full files? Why are we worried about pagination to begin with? If we have less records than the pageSize, the convo is useless. Current working process with sanity...
For this to work with other sources, I think the big assumption is we are just saving "records" or items in the |
Definitely agreed on the one content type per file making the most sense and that the default should just be whatever the raw API response is. I think the core idea of launchpad simply caching API responses makes the most sense to me, and then that can be augmented by a feature/boolean flag that merges pagination results. FWIW, launchpad could currently be configured to have one file per content type with Contentful if each content type was treated as its own source, but it's still inconsistent with the other content sources. In terms of consolidating pages: My main argument for this is that certain apps might not have a reliable method to check for the number of local json files. E.g. a locally running web app wouldn't be able to get a directory listing w/o explicit server support and/or incrementing page numbers until a request fails. I feel pretty strongly about having the option to merge for the sake of usability. |
Agreed with all - I was really trying to understand what the "default" should be but I don't think there is one. It really is an either/or type thing. I think the pattern I have been playing with for Sanity is a good pattern combining it all... let me try to get something in here to explain soon. |
Sounds good. IMO the default should be paginated jsons per type, with the option to merge pages. Combining all types into one file is a nice-to-have, imo, but we should probably add it just for backwards compatibility. |
|
@benjaminbojko
Either we should go back to only returning 1 result object per source My gut is saying, lets go back to combining everything into 1 Content Result for each source. Its keeping the rest of the pipeline unchanged. |
Ah yeah, the success flag is pretty important. I agreed: If it's not a huge hassle let's go the path of least resistance and return just one result. There's issue #34 , which might be a good opportunity to revisit this. |
very cool! I kind of reverted what I originally did but made the |
Sounds good. I'd love for that method name to be shorter though, ha. Could we mirror the JS API here more? E.g. Not sure if you can tell, but I get really hung up on naming, haha. Apologies for that. |
Resolved in 2.0 release #179 |
No description provided.
The text was updated successfully, but these errors were encountered: