How to fetch preview data for repeatable types using variables in NextJs

How to fetch the preview data for repeatable types.what is variable in fetch api

async function fetchAPI(query, { previewData, variables } = {}) {
const prismicAPI = await PrismicClient.getApi()
const res = await fetch(
${GRAPHQL_API_URL}?query=${query}&variables=${JSON.stringify(variables)},
{
headers: {
'Prismic-Ref': previewData?.ref || prismicAPI.masterRef.ref,
'Content-Type': 'application/json',
'Accept-Language': API_LOCALE,
Authorization: Token ${API_TOKEN},
},
}
)