The icon chooser's queries now use variables, instead of interpolating all values
into a single query document string. Thus, any QueryHandler
callback must be updated
to handle the query variables.
Its type signature is now:
export type QueryHandler = (document: string, variables?: object) => Promise<any>;
Suggestion:
async function handleQuery(query, variables) {
const headers = buildHeaders()
const url = getApiUrl()
const body = JSON.stringify({query, variables})
return fetch(url, {
method: "POST",
headers,
body
})
}