cedricdelpoux / gatsby-source-google-docs

Gatsby plugin to use Google Docs as a data source
https://cedricdelpoux.github.io/gatsby-source-google-docs/
MIT License
211 stars 55 forks source link

Allow Google Doc comments to be pullable in GraphQL #253

Open garrettvercoe opened 8 months ago

garrettvercoe commented 8 months ago

Hey there, follow up from my previous comment here.

My main reason for needing to keep this forked as of now is to additionally pull in comments from my Google Docs files, as I use these comments for footnotes/margin notes.

With the code provided, comments can be pulled in a GraphQL query like so:

page: googleDocs(slug: { eq: $path }) {
      comments {
          content
          }
      }

I understand this may not be desired behavior so feel free to not add it to the codebase. However, if you think it's a good idea, maybe this contribution could be helpful. Thanks!

cedricdelpoux commented 8 months ago

Hello, thank you for your PR! I did not know about comments. Where can we add it on a Google Doc?

Is there only content under comments query ? If it's the case, it's better to remove the abstraction

page: googleDocs(slug: { eq: $path }) {
      comments 
}

What do you think?