Yes, you can get all of your content from Cosmic at build time for your static site. Here are some resources that may help:
Gatsby source plugin: https://www.npmjs.com/package/gatsby-source-cosmicjs
Gatsby Starter: https://github.com/cosmicjs/gatsby-starter
Gatsby App: https://cosmicjs.com/apps/gatsby-blog
Gridsome App: https://cosmicjs.com/apps/gridsome-blog
For API requests: To get all of your posts, you can use just one API request to the Objects endpoint.
Does this help?