Adapt query generator for global metafields configuration