next js 14 how to call graphql query as a ssr
I have created a next js project and setup apolo-client. I have rapped my children with it.
this is my layout.tsx file code –
graphql api fetching issue in next js getting ( Error: React functionality ‘useContext’ is not available in this environment. )
I have created a next js 14.2.3 app & I have graphql api end point(** which I replaced with localhost for stackOverflow )and I am using “@apollo/client”: “^3.10.3”,
“graphql”: “^16.8.1”, for fetching data. I have created a product page path “pages/products”.