Is possible make API-rest requests on the front end? (vtex-io)

Is possible to make API-rest requests on the front-end?
when I try to make a fetch, i’m getting this error: Server side data fetching must be done through GraphQL queries.

Yup, You can.
Why don’t you try wrapping your component inside NoSSR?

Follow the link, this might help you. Render Runtime

Also if you are using Graphql make sure you use react-apollo not @apollo-client I’ve noticed this dependency causes error sometimes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.