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
628 B
Plaintext
2 lines
628 B
Plaintext
import{getRequestUrl as e}from"../utils/get-request-url.js";import{request as t}from"../utils/request.js";const 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(e(i.url,l).toString(),s,i.globals.fetch)}}};export{r as graphql};
|
|
//# sourceMappingURL=composable.js.map |