gatsby-source-dropbox-paper icon indicating copy to clipboard operation
gatsby-source-dropbox-paper copied to clipboard

Filter by hashtag?

Open alexmacarthur opened this issue 5 years ago • 6 comments

alexmacarthur avatar Dec 17 '18 17:12 alexmacarthur

I've been looking for a way to get docs by folder and it seems they don't support it (at least in the current version of the API). Is there a way to filter by hashtag? If so, I can help with that.

One of the problems I have right now is the time it takes to load all the documents, hopefully they improve the API soon.

g3ortega avatar May 26 '19 15:05 g3ortega

@g3ortega on the subject of loading time: Gatsby offers caching for created nodes but we would have to change the id passed to the createNodeId function in the DocumentManager to use the metadata id from Paper in order to cache the rest of the document (but this would substantially speed up the API because the metadata call is quite fast). I have tested this locally, caching the last_updated_date and the metadata id in order to preserve the existing Gatsby node unless the current last_updated_date differs from the one in Gatsby’s cache.

If @alexmcarthur is open to it, I’m happy to put the PR with that code up here.

jamessimone avatar May 26 '19 16:05 jamessimone

@jamessimone Please do! Curious about the node caching you're talking about. I'm not to that level of familiarity with Gatsby's API to make that happen.

alexmacarthur avatar May 26 '19 19:05 alexmacarthur

@alexmacarthur just opened https://github.com/alexmacarthur/gatsby-source-dropbox-paper/pull/8 for that!

jamessimone avatar May 26 '19 20:05 jamessimone

@jamessimone, just curious, how is handled the expiration in that case? can we set the expiration time or something like that?

g3ortega avatar May 26 '19 20:05 g3ortega

@g3ortega I am not sure of Gatsby’s internal expiration handling of the .cache folder; if any, but my guess is that all caching between builds that isn’t explicitly set using this paradigm (which in the case of Dropbox paper would be based off of the last modified date for each individual doc) just gets rebuilt into that folder

jamessimone avatar May 26 '19 21:05 jamessimone