Get data client-side or serverside
Unanswered
Norwegian Forest Cat posted this in #help-forum
Norwegian Forest CatOP
Hey, I'm a beginner with Next.js. I'm building a website using Next.js (v15.3.0) with CraftCMS as the backend/admin system.
I have a feature (see screenshot): when a user clicks on "zij worden gezien", some logos should appear. These logos come from CraftCMS, and I'm able to fetch them using GraphQL:
I could use some advice: should I run this query on the client side or server side? Or are there other recommended approaches for this?
I have a feature (see screenshot): when a user clicks on "zij worden gezien", some logos should appear. These logos come from CraftCMS, and I'm able to fetch them using GraphQL:
export const GLOBAL_LOGOS_QUERY = `
query GetGlobalSettings {
globalSet(handle: "navigationSettings") {
... on navigationSettings_GlobalSet {
logos {
... on logo_Entry {
text
image {
title
url
}
}
}
}
}
}
`
I could use some advice: should I run this query on the client side or server side? Or are there other recommended approaches for this?