Nuxt Apollo on a Nuxt3 full static website #629
valeriosillari
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, not sure if this is the right place but I would like to ask.
Lately I'm updating a old side project set in Nuxt2 and fetching data by a RestAPI; I'm trying to update to Nuxt3 and using GraphQL, so I've started to use nuxt-apollo module.
I got a very basic knowledge and experience with GraphQL and Apollo, but I've achieved to use it, querying data and set my web application (a small one, with 10 pages max).
Until here all good, all fine.
But I've noticed I'm struggling on some steps on deployng: I want to have a full static website, with all content pre-rendered and static pages (side project, not so often updates, no so much traffic, so no real reason to have a web application "always running").
And here my doubts are raising:
Data fetched at page change
I got the page generated at page load, no extra data fetched by client. but at page change, I fetch the GraphQL endpoint.
I guess this is not correct.
Is it?
am I doing something wrong on my code, or I did not get the GraphQL and Nuxt basic concepts, or is a module isseu?
Still wondering.
Generate Dynamic Sitemap
I would like to generate a dynamic sitemap using @nuxtjs/sitemap
Its seems possible, I've used already before on another project with Rest API.
but with GraphQL and Apollo is possible?
I've found hard to find documentation or examples around.
So: I start to question if using Nuxt3 to get a full static website, and fetch data by a GraphQL endpoint is still a nice solution or I'm trying something "off the book" / not so smart.
Not sure if there is a correct answer, not even if there is an answer.
But I would like to open the discussion and ask opinions/experience :)
Beta Was this translation helpful? Give feedback.
All reactions