Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
2 lines
618 B
Plaintext
2 lines
618 B
Plaintext
const e=require(`../utils/get-request-url.cjs`),t=require(`../utils/request.cjs`),n={},r=(r={})=>i=>{let a={...n,...r};return{async query(n,r,o=`items`){let s={method:`POST`,body:JSON.stringify({query:n,variables:r})};`credentials`in a&&(s.credentials=a.credentials);let c={};if(`getToken`in this){let e=await this.getToken();e&&(c.Authorization=`Bearer ${e}`)}`Content-Type`in c||(c[`Content-Type`]=`application/json`),s.headers=c;let l=o===`items`?`/graphql`:`/graphql/system`;return await t.request(e.getRequestUrl(i.url,l).toString(),s,i.globals.fetch)}}};exports.graphql=r;
|
|
//# sourceMappingURL=composable.cjs.map |