list-collections.mjs
import { gql } from './lib.mjs';
const Q=`query($c:String){ collections(first:250, after:$c){ pageInfo{hasNextPage endCursor}
nodes{ id title handle productsCount{count} } } }`;
let cur=null, all=[];
do{ const d=await gql(Q,{c:cur}); all.push(...d.collections.nodes);
cur=d.collections.pageInfo.hasNextPage?d.collections.pageInfo.endCursor:null; }while(cur);
console.log('total collections:', all.length);
// heuristic: designer lines often end in "Collection" or "Wallcovering Collection"
const cand=all.filter(c=>/collection/i.test(c.title) && c.productsCount.count>0)
.sort((a,b)=>a.title.localeCompare(b.title));
console.log('\ncandidate designer/named collections:');
cand.forEach(c=>console.log(` ${String(c.productsCount.count).padStart(4)} ${c.title} [${c.handle}]`));