score:0

why don't you call your data straight in the front end? without 'getstaticprops' or 'getserversideprops' as you said, it's a menu, so the data doesn't matter for seo.

function menucomp() {
const [data, setdata] = react.usestate()
  
react.useeffect(async ()=>{
  const client = new apolloclient(
        {uri: 'http://portfolio.local/graphql', cache: new inmemorycache()}
    );

    const {data} = await client.query({

    query:gqlquery
        myquery{
            menuitems {
                edges {
                    node {
                        id 
                        label
                    }
                }
            }
        }

    });
   setdata(data)
},[])

return (...your component)
}


Related Query

More Query from same tag