As far as i know Gatsby and Next.js are two separate frameworks, and they are not designed to be used together in a single project. Each of these frameworks serves different purposes and has its own specific use cases. So the answer is you cannot use it together in single project.
Both are web front-end frameworks with overlapping features. It is entirely possible to have some part of your application handled by Gatsby (SSG content) and some part with Next.js (SSR/CSR content). The recent versions of Next.js natively support SSG (Static Site Generation).
2
Answers
As far as i know Gatsby and Next.js are two separate frameworks, and they are not designed to be used together in a single project. Each of these frameworks serves different purposes and has its own specific use cases. So the answer is you cannot use it together in single project.
Both are web front-end frameworks with overlapping features. It is entirely possible to have some part of your application handled by Gatsby (SSG content) and some part with Next.js (SSR/CSR content). The recent versions of Next.js natively support SSG (Static Site Generation).
It is entirely your choice to use either one of these frameworks or a combination of both. Here is an excellent article comparing both frameworks: https://www.solutelabs.com/blog/gatsby-js-vs-next-js-which-one-to-choose-when