{"version":3,"file":"villus.473b05ac.js","sources":["../../../src/boot/villus.js"],"sourcesContent":["import { boot } from \"quasar/wrappers\";\nimport { createClient, cache, fetch } from \"villus\";\n\nimport { LocalStorage } from \"quasar\";\n\nfunction auth({ opContext }) {\n opContext.headers.Tenant = \"bdry\";\n\n const authToken = LocalStorage.getItem(\"authToken\");\n if (authToken && authToken !== \"undefined\") {\n opContext.headers.Authorization = `Token ${authToken}`;\n }\n}\n\nconst client = createClient({\n url: process.env.DEV ? \"/api/graphql\" : \"https://api.4way.io/v1/api/graphql\",\n cachePolicy: \"cache-and-network\",\n use: [auth, cache(), fetch()],\n});\n\nexport default boot(async ({ app }) => {\n app.use(client);\n});\n"],"names":["auth","opContext","authToken","LocalStorage","client","createClient","cache","fetch","villus","boot","app"],"mappings":";;0GAKA,SAASA,EAAK,CAAE,UAAAC,GAAa,CAC3BA,EAAU,QAAQ,OAAS,OAE3B,MAAMC,EAAYC,EAAa,QAAQ,WAAW,EAC9CD,GAAaA,IAAc,cAC7BD,EAAU,QAAQ,cAAgB,SAASC,IAE/C,CAEA,MAAME,EAASC,EAAa,CAC1B,IAAwC,qCACxC,YAAa,oBACb,IAAK,CAACL,EAAMM,EAAO,EAAEC,EAAK,CAAE,CAC9B,CAAC,EAED,IAAAC,EAAeC,EAAK,MAAO,CAAE,IAAAC,KAAU,CACrCA,EAAI,IAAIN,CAAM,CAChB,CAAC","debug_id":"61bae796-469b-5eef-b30f-db7dc8c4515c"}