stellate 2.7.2 → 2.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";var f=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var w=Object.prototype.hasOwnProperty;var P=(e,r)=>{for(var t in r)f(e,t,{get:r[t],enumerable:!0})},x=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of N(r))!w.call(e,o)&&o!==t&&f(e,o,{get:()=>r[o],enumerable:!(n=k(r,o))||n.enumerable});return e};var H=e=>x(f({},"__esModule",{value:!0}),e);var O={};P(O,{createBlake3Hash:()=>p,createStellateLoggerPlugin:()=>L});module.exports=H(O);function p(e){let r=0,t=e.length;if(t===0)return r;for(let n=0;n<t;++n){let o=e.charCodeAt(n);r=(r<<5)-r+o,r&=r}return r>>>0}function y({headers:e,operation:r,method:t,start:n,operationName:o,errors:d,response:i,variables:s,sendVariablesAsHash:l,hasSetCookie:c}){let a=e.get("x-forwarded-for"),g=a?a.split(","):[];return{operation:r,operationName:o,variables:l?void 0:s,variableHash:l?p(JSON.stringify(s||{})):void 0,method:t,elapsed:Date.now()-n,ip:g[0]||e.get("true-client-ip")||e.get("x-real-ip")||void 0,hasSetCookie:c,referer:e.get("referer")||void 0,userAgent:e.get("user-agent")||void 0,statusCode:200,errors:d,responseSize:JSON.stringify(i).length,responseHash:p(JSON.stringify(i))}}function m(e){if(typeof e!="function"){console.warn("Stellate logger plugin requires a fetch function to be provided as an option.");return}}var A=process.env.STELLATE_ENDPOINT==="local"||process.env.STELLATE_ENDPOINT==="staging"?"stellate.dev":"stellate.sh";async function b({fetch:e,payload:r,token:t,serviceName:n}){return e(`https://${n}.${A}/log`,{method:"POST",body:JSON.stringify(r),headers:{"Content-Type":"application/json","Stellate-Logging-Token":t}})}var L=e=>{var t;let r=(t=e.sendVariablesAsHash)!=null?t:!0;return{async requestDidStart(n){let o=Date.now(),{request:d}=n,{operationName:i,query:s,variables:l,http:c}=d;if(!c||!s)return;let{headers:a,method:g}=c;if(!a.has("gcdn-request-id"))return{async willSendResponse(h){let{response:u}=h;if(u.body.kind!=="single"){console.warn("Stellate does not currently support logging incremental results.");return}let S=u.body.singleResult,v=y({headers:a,operation:s,method:g,sendVariablesAsHash:r,start:o,operationName:i,errors:h.errors,response:S,variables:l,hasSetCookie:u.http.headers.has("set-cookie")});m(e.fetch),await b({fetch:e.fetch,payload:v,token:e.token,serviceName:e.serviceName})}}}}};0&&(module.exports={createBlake3Hash,createStellateLoggerPlugin});
1
+ "use strict";var f=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var w=Object.prototype.hasOwnProperty;var P=(e,t)=>{for(var r in t)f(e,r,{get:t[r],enumerable:!0})},x=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of N(t))!w.call(e,o)&&o!==r&&f(e,o,{get:()=>t[o],enumerable:!(n=k(t,o))||n.enumerable});return e};var H=e=>x(f({},"__esModule",{value:!0}),e);var O={};P(O,{createBlake3Hash:()=>p,createStellateLoggerPlugin:()=>L});module.exports=H(O);function p(e){let t=0,r=e.length;if(r===0)return t;for(let n=0;n<r;++n){let o=e.charCodeAt(n);t=(t<<5)-t+o,t&=t}return t>>>0}function y({headers:e,operation:t,method:r,start:n,operationName:o,errors:d,response:i,variables:s,sendVariablesAsHash:l,hasSetCookie:c}){let a=e.get("x-forwarded-for"),g=a?a.split(","):[];return{operation:t,operationName:o,variables:l?void 0:s,variableHash:l?p(JSON.stringify(s||{})):void 0,method:r,elapsed:Date.now()-n,ip:g[0]||e.get("true-client-ip")||e.get("x-real-ip")||void 0,hasSetCookie:c,referer:e.get("referer")||void 0,userAgent:e.get("user-agent")||void 0,statusCode:200,errors:d,responseSize:JSON.stringify(i).length,responseHash:p(JSON.stringify(i))}}function m(e){if(typeof e!="function"){console.warn("Stellate logger plugin requires a fetch function to be provided as an option.");return}}var A=process.env.STELLATE_ENDPOINT==="local"||process.env.STELLATE_ENDPOINT==="staging"?"stellate.dev":"stellate.sh";async function b({fetch:e,payload:t,token:r,serviceName:n}){return e(`https://${n}.${A}/log`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json","Stellate-Logging-Token":r}})}var L=e=>{var r;let t=(r=e.sendVariablesAsHash)!=null?r:!0;return{async requestDidStart(n){let o=Date.now(),{request:d}=n,{operationName:i,query:s,variables:l,http:c}=d;if(!c||!s)return;let{headers:a,method:g}=c;if(!a.has("gcdn-request-id"))return{async willSendResponse(h){let{response:u}=h;if(u.body.kind!=="single"){console.warn("Stellate does not currently support logging incremental results.");return}let S=u.body.singleResult,v=y({headers:a,operation:s,method:g,sendVariablesAsHash:t,start:o,operationName:i,errors:h.errors,response:S,variables:l,hasSetCookie:u.http.headers.has("set-cookie")});m(e.fetch);try{await b({fetch:e.fetch,payload:v,token:e.token,serviceName:e.serviceName})}catch{}}}}}};0&&(module.exports={createBlake3Hash,createStellateLoggerPlugin});
@@ -108,12 +108,15 @@ var createStellateLoggerPlugin = (options) => {
108
108
  hasSetCookie: response.http.headers.has("set-cookie")
109
109
  });
110
110
  warnFetch(options.fetch);
111
- await logRequest({
112
- fetch: options.fetch,
113
- payload: stellatePayload,
114
- token: options.token,
115
- serviceName: options.serviceName
116
- });
111
+ try {
112
+ await logRequest({
113
+ fetch: options.fetch,
114
+ payload: stellatePayload,
115
+ token: options.token,
116
+ serviceName: options.serviceName
117
+ });
118
+ } catch (e) {
119
+ }
117
120
  }
118
121
  };
119
122
  }
package/dist/bin.js CHANGED
@@ -1094,7 +1094,7 @@ Try running "stellate pull" first if your service has been created already.`);le
1094
1094
 
1095
1095
  -s, --service Name of the service
1096
1096
  -b, --browser Automatically open the preview UI with the default browser
1097
- `);var ms=_e(gn());var bv=_e(gn());var LD=class{async parse(e){return Ji(e,{"--help":Boolean,"-h":"--help","--version":Boolean,"-v":"--version","--json":Boolean})["--help"]?this.help():"stellate@2.7.2"}help(e){if(e)throw new Vn(`
1097
+ `);var ms=_e(gn());var bv=_e(gn());var LD=class{async parse(e){return Ji(e,{"--help":Boolean,"-h":"--help","--version":Boolean,"-v":"--version","--json":Boolean})["--help"]?this.help():"stellate@2.7.3"}help(e){if(e)throw new Vn(`
1098
1098
  ${bv.default.bold.red("!")} ${e}
1099
1099
  ${LD.help}`);return LD.help}},_1=LD;_1.help=Yi(`
1100
1100
  Print current version of Stellate
@@ -1391,7 +1391,7 @@ Try running "stellate pull" first if your service has been created already.`);le
1391
1391
  value
1392
1392
  }
1393
1393
  }
1394
- `,u=await Zn();a=(await new En(u).query(l,{name:"serve-token-"+Date.now(),appName:e})).createAdminApiToken.value,this.writePurgeToken(e,a)}let o=(0,$J.default)();o.use("/",(0,qJ.createProxyMiddleware)({target:s,changeOrigin:!0,logLevel:"silent",onProxyReq:l=>{l.path.endsWith("/")&&(l.path=l.path.slice(0,-1)),l.setHeader("stellate-cli-serve-port",r),l.setHeader("stellate-token",a)}})),o.listen(r)}setupApiProxy(e,r){let i=`https://${e}.stellate.${process.env.STELLATE_ENDPOINT==="staging"||process.env.STELLATE_ENDPOINT==="local"?"dev":"sh"}`,n=(0,$J.default)();n.use("/",(0,qJ.createProxyMiddleware)({target:i,changeOrigin:!0,headers:{"stellate-cli-serve-port":""+r},logLevel:"silent"})),n.listen(r)}ensureConfig(){qh.default.existsSync(lc)||qh.default.mkdirSync(lc)}getCache(){try{this.ensureConfig();let e=qh.default.readFileSync(RS,"utf-8");return JSON.parse(e)}catch{return{}}}getCacheEntry(e){try{this.ensureConfig();let r=qh.default.readFileSync(RS,"utf-8"),i=JSON.parse(r);if(!e)throw new Error('You need a service-name in your "stellate" config or as the "--service" argument.');return i[e]||{checksum:"",envName:""}}catch{return{checksum:"",envName:""}}}getChecksum(e){return jdr(JSON.stringify(e)+"2.7.2")}writePurgeToken(e,r){let i=this.getCache();i[e]={...i[e],purgeToken:r},qh.default.writeFileSync(RS,JSON.stringify(i))}writeCache(e,r,i){let n=this.getCache();if(!e)throw new Error('You need a service-name in your "stellate" config or as the "--service" argument.');return n[e]={checksum:this.getChecksum(r),envName:i},qh.default.writeFileSync(RS,JSON.stringify(n)),n[e]}},Sw=KJ;Sw.help=Yi(`
1394
+ `,u=await Zn();a=(await new En(u).query(l,{name:"serve-token-"+Date.now(),appName:e})).createAdminApiToken.value,this.writePurgeToken(e,a)}let o=(0,$J.default)();o.use("/",(0,qJ.createProxyMiddleware)({target:s,changeOrigin:!0,logLevel:"silent",onProxyReq:l=>{l.path.endsWith("/")&&(l.path=l.path.slice(0,-1)),l.setHeader("stellate-cli-serve-port",r),l.setHeader("stellate-token",a)}})),o.listen(r)}setupApiProxy(e,r){let i=`https://${e}.stellate.${process.env.STELLATE_ENDPOINT==="staging"||process.env.STELLATE_ENDPOINT==="local"?"dev":"sh"}`,n=(0,$J.default)();n.use("/",(0,qJ.createProxyMiddleware)({target:i,changeOrigin:!0,headers:{"stellate-cli-serve-port":""+r},logLevel:"silent"})),n.listen(r)}ensureConfig(){qh.default.existsSync(lc)||qh.default.mkdirSync(lc)}getCache(){try{this.ensureConfig();let e=qh.default.readFileSync(RS,"utf-8");return JSON.parse(e)}catch{return{}}}getCacheEntry(e){try{this.ensureConfig();let r=qh.default.readFileSync(RS,"utf-8"),i=JSON.parse(r);if(!e)throw new Error('You need a service-name in your "stellate" config or as the "--service" argument.');return i[e]||{checksum:"",envName:""}}catch{return{checksum:"",envName:""}}}getChecksum(e){return jdr(JSON.stringify(e)+"2.7.3")}writePurgeToken(e,r){let i=this.getCache();i[e]={...i[e],purgeToken:r},qh.default.writeFileSync(RS,JSON.stringify(i))}writeCache(e,r,i){let n=this.getCache();if(!e)throw new Error('You need a service-name in your "stellate" config or as the "--service" argument.');return n[e]={checksum:this.getChecksum(r),envName:i},qh.default.writeFileSync(RS,JSON.stringify(n)),n[e]}},Sw=KJ;Sw.help=Yi(`
1395
1395
  (BETA) - Use a local backend with Stellate\u2019s GraphQL Edge Cache.
1396
1396
 
1397
1397
  ${Ov.default.bold("Usage")}
package/dist/envelop.js CHANGED
@@ -1 +1 @@
1
- "use strict";var c=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var S=Object.prototype.hasOwnProperty;var x=(t,e)=>{for(var r in e)c(t,r,{get:e[r],enumerable:!0})},v=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of N(e))!S.call(t,s)&&s!==r&&c(t,s,{get:()=>e[s],enumerable:!(n=k(e,s))||n.enumerable});return t};var L=t=>v(c({},"__esModule",{value:!0}),t);var O={};x(O,{createBlake3Hash:()=>g,createStellateLoggerPlugin:()=>H});module.exports=L(O);var m=require("graphql"),y=require("@envelop/core");function g(t){let e=0,r=t.length;if(r===0)return e;for(let n=0;n<r;++n){let s=t.charCodeAt(n);e=(e<<5)-e+s,e&=e}return e>>>0}function p({headers:t,operation:e,method:r,start:n,operationName:s,errors:a,response:o,variables:i,sendVariablesAsHash:l,hasSetCookie:b}){let d=t.get("x-forwarded-for"),w=d?d.split(","):[];return{operation:e,operationName:s,variables:l?void 0:i,variableHash:l?g(JSON.stringify(i||{})):void 0,method:r,elapsed:Date.now()-n,ip:w[0]||t.get("true-client-ip")||t.get("x-real-ip")||void 0,hasSetCookie:b,referer:t.get("referer")||void 0,userAgent:t.get("user-agent")||void 0,statusCode:200,errors:a,responseSize:JSON.stringify(o).length,responseHash:g(JSON.stringify(o))}}function f(t){if(typeof t!="function"){console.warn("Stellate logger plugin requires a fetch function to be provided as an option.");return}}var P=process.env.STELLATE_ENDPOINT==="local"||process.env.STELLATE_ENDPOINT==="staging"?"stellate.dev":"stellate.sh";async function h({fetch:t,payload:e,token:r,serviceName:n}){return t(`https://${n}.${P}/log`,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json","Stellate-Logging-Token":r}})}var u=class{constructor(e){this.headers=Object.keys(e).reduce((r,n)=>(r[n.trim().toLowerCase()]=e[n],r),{})}get(e){return this.headers[e.trim().toLowerCase()]}has(e){return!!this.headers[e.trim().toLowerCase()]}},H=t=>({onExecute(e){var s;let r=(s=t.sendVariablesAsHash)!=null?s:!0,n=Date.now();return{async onExecuteDone({result:a}){if((0,y.isAsyncIterable)(a)){console.warn("Stellate does not currently support logging incremental results.");return}let{headers:o}=e.args.contextValue.request,{method:i}=e.args.contextValue.request;if(typeof o.get!="function"&&(o=new u(o)),o.has("gcdn-request-id"))return;let l=p({headers:o,operation:(0,m.print)(e.args.document),method:i,sendVariablesAsHash:r,start:n,operationName:e.args.operationName,errors:a.errors,response:a});f(t.fetch),await h({fetch:t.fetch,payload:l,token:t.token,serviceName:t.serviceName})}}}});0&&(module.exports={createBlake3Hash,createStellateLoggerPlugin});
1
+ "use strict";var g=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var S=Object.prototype.hasOwnProperty;var x=(t,e)=>{for(var r in e)g(t,r,{get:e[r],enumerable:!0})},v=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of N(e))!S.call(t,s)&&s!==r&&g(t,s,{get:()=>e[s],enumerable:!(n=k(e,s))||n.enumerable});return t};var L=t=>v(g({},"__esModule",{value:!0}),t);var O={};x(O,{createBlake3Hash:()=>c,createStellateLoggerPlugin:()=>H});module.exports=L(O);var y=require("graphql"),b=require("@envelop/core");function c(t){let e=0,r=t.length;if(r===0)return e;for(let n=0;n<r;++n){let s=t.charCodeAt(n);e=(e<<5)-e+s,e&=e}return e>>>0}function f({headers:t,operation:e,method:r,start:n,operationName:s,errors:a,response:o,variables:i,sendVariablesAsHash:l,hasSetCookie:d}){let p=t.get("x-forwarded-for"),w=p?p.split(","):[];return{operation:e,operationName:s,variables:l?void 0:i,variableHash:l?c(JSON.stringify(i||{})):void 0,method:r,elapsed:Date.now()-n,ip:w[0]||t.get("true-client-ip")||t.get("x-real-ip")||void 0,hasSetCookie:d,referer:t.get("referer")||void 0,userAgent:t.get("user-agent")||void 0,statusCode:200,errors:a,responseSize:JSON.stringify(o).length,responseHash:c(JSON.stringify(o))}}function h(t){if(typeof t!="function"){console.warn("Stellate logger plugin requires a fetch function to be provided as an option.");return}}var P=process.env.STELLATE_ENDPOINT==="local"||process.env.STELLATE_ENDPOINT==="staging"?"stellate.dev":"stellate.sh";async function m({fetch:t,payload:e,token:r,serviceName:n}){return t(`https://${n}.${P}/log`,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json","Stellate-Logging-Token":r}})}var u=class{constructor(e){this.headers=Object.keys(e).reduce((r,n)=>(r[n.trim().toLowerCase()]=e[n],r),{})}get(e){return this.headers[e.trim().toLowerCase()]}has(e){return!!this.headers[e.trim().toLowerCase()]}},H=t=>({onExecute(e){var s;let r=(s=t.sendVariablesAsHash)!=null?s:!0,n=Date.now();return{async onExecuteDone({result:a}){if((0,b.isAsyncIterable)(a)){console.warn("Stellate does not currently support logging incremental results.");return}let{headers:o}=e.args.contextValue.request,{method:i}=e.args.contextValue.request;if(typeof o.get!="function"&&(o=new u(o)),o.has("gcdn-request-id"))return;let l=f({headers:o,operation:(0,y.print)(e.args.document),method:i,sendVariablesAsHash:r,start:n,operationName:e.args.operationName,errors:a.errors,response:a});h(t.fetch);try{await m({fetch:t.fetch,payload:l,token:t.token,serviceName:t.serviceName})}catch{}}}}});0&&(module.exports={createBlake3Hash,createStellateLoggerPlugin});
package/dist/envelop.mjs CHANGED
@@ -123,12 +123,15 @@ var createStellateLoggerPlugin = (options) => ({
123
123
  response: result
124
124
  });
125
125
  warnFetch(options.fetch);
126
- await logRequest({
127
- fetch: options.fetch,
128
- payload: stellatePayload,
129
- token: options.token,
130
- serviceName: options.serviceName
131
- });
126
+ try {
127
+ await logRequest({
128
+ fetch: options.fetch,
129
+ payload: stellatePayload,
130
+ token: options.token,
131
+ serviceName: options.serviceName
132
+ });
133
+ } catch (e) {
134
+ }
132
135
  }
133
136
  };
134
137
  }
@@ -1 +1 @@
1
- "use strict";var g=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var v=(e,t)=>{for(var r in t)g(e,r,{get:t[r],enumerable:!0})},k=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of S(t))!x.call(e,o)&&o!==r&&g(e,o,{get:()=>t[o],enumerable:!(n=N(t,o))||n.enumerable});return e};var P=e=>k(g({},"__esModule",{value:!0}),e);var E={};v(E,{createBlake3Hash:()=>c,createStellateLoggerPlugin:()=>H});module.exports=P(E);var h=require("graphql"),m=require("graphql-yoga");function c(e){let t=0,r=e.length;if(r===0)return t;for(let n=0;n<r;++n){let o=e.charCodeAt(n);t=(t<<5)-t+o,t&=t}return t>>>0}function u({headers:e,operation:t,method:r,start:n,operationName:o,errors:a,response:s,variables:i,sendVariablesAsHash:l,hasSetCookie:y}){let p=e.get("x-forwarded-for"),b=p?p.split(","):[];return{operation:t,operationName:o,variables:l?void 0:i,variableHash:l?c(JSON.stringify(i||{})):void 0,method:r,elapsed:Date.now()-n,ip:b[0]||e.get("true-client-ip")||e.get("x-real-ip")||void 0,hasSetCookie:y,referer:e.get("referer")||void 0,userAgent:e.get("user-agent")||void 0,statusCode:200,errors:a,responseSize:JSON.stringify(s).length,responseHash:c(JSON.stringify(s))}}function d(e){if(typeof e!="function"){console.warn("Stellate logger plugin requires a fetch function to be provided as an option.");return}}var w=process.env.STELLATE_ENDPOINT==="local"||process.env.STELLATE_ENDPOINT==="staging"?"stellate.dev":"stellate.sh";async function f({fetch:e,payload:t,token:r,serviceName:n}){return e(`https://${n}.${w}/log`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json","Stellate-Logging-Token":r}})}var H=e=>({onExecute(t){var o;let r=(o=e.sendVariablesAsHash)!=null?o:!0,n=Date.now();return{async onExecuteDone({result:a}){if((0,m.isAsyncIterable)(a)){console.warn("Stellate does not currently support logging incremental results.");return}let{headers:s,method:i}=t.args.contextValue.request,l=u({headers:s,operation:(0,h.print)(t.args.document),method:i,sendVariablesAsHash:r,start:n,operationName:t.args.operationName,errors:a.errors,response:a});d(e.fetch),await f({fetch:e.fetch,payload:l,token:e.token,serviceName:e.serviceName})}}}});0&&(module.exports={createBlake3Hash,createStellateLoggerPlugin});
1
+ "use strict";var g=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var v=(e,t)=>{for(var r in t)g(e,r,{get:t[r],enumerable:!0})},k=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of S(t))!x.call(e,o)&&o!==r&&g(e,o,{get:()=>t[o],enumerable:!(n=N(t,o))||n.enumerable});return e};var P=e=>k(g({},"__esModule",{value:!0}),e);var E={};v(E,{createBlake3Hash:()=>c,createStellateLoggerPlugin:()=>H});module.exports=P(E);var m=require("graphql"),y=require("graphql-yoga");function c(e){let t=0,r=e.length;if(r===0)return t;for(let n=0;n<r;++n){let o=e.charCodeAt(n);t=(t<<5)-t+o,t&=t}return t>>>0}function d({headers:e,operation:t,method:r,start:n,operationName:o,errors:a,response:s,variables:i,sendVariablesAsHash:l,hasSetCookie:p}){let u=e.get("x-forwarded-for"),b=u?u.split(","):[];return{operation:t,operationName:o,variables:l?void 0:i,variableHash:l?c(JSON.stringify(i||{})):void 0,method:r,elapsed:Date.now()-n,ip:b[0]||e.get("true-client-ip")||e.get("x-real-ip")||void 0,hasSetCookie:p,referer:e.get("referer")||void 0,userAgent:e.get("user-agent")||void 0,statusCode:200,errors:a,responseSize:JSON.stringify(s).length,responseHash:c(JSON.stringify(s))}}function f(e){if(typeof e!="function"){console.warn("Stellate logger plugin requires a fetch function to be provided as an option.");return}}var w=process.env.STELLATE_ENDPOINT==="local"||process.env.STELLATE_ENDPOINT==="staging"?"stellate.dev":"stellate.sh";async function h({fetch:e,payload:t,token:r,serviceName:n}){return e(`https://${n}.${w}/log`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json","Stellate-Logging-Token":r}})}var H=e=>({onExecute(t){var o;let r=(o=e.sendVariablesAsHash)!=null?o:!0,n=Date.now();return{async onExecuteDone({result:a}){if((0,y.isAsyncIterable)(a)){console.warn("Stellate does not currently support logging incremental results.");return}let{headers:s,method:i}=t.args.contextValue.request,l=d({headers:s,operation:(0,m.print)(t.args.document),method:i,sendVariablesAsHash:r,start:n,operationName:t.args.operationName,errors:a.errors,response:a});f(e.fetch);try{await h({fetch:e.fetch,payload:l,token:e.token,serviceName:e.serviceName})}catch{}}}}});0&&(module.exports={createBlake3Hash,createStellateLoggerPlugin});
@@ -101,12 +101,15 @@ var createStellateLoggerPlugin = (options) => ({
101
101
  response: result
102
102
  });
103
103
  warnFetch(options.fetch);
104
- await logRequest({
105
- fetch: options.fetch,
106
- payload: stellatePayload,
107
- token: options.token,
108
- serviceName: options.serviceName
109
- });
104
+ try {
105
+ await logRequest({
106
+ fetch: options.fetch,
107
+ payload: stellatePayload,
108
+ token: options.token,
109
+ serviceName: options.serviceName
110
+ });
111
+ } catch (e) {
112
+ }
110
113
  }
111
114
  };
112
115
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stellate",
3
- "version": "2.7.2",
3
+ "version": "2.7.3",
4
4
  "engines": {
5
5
  "node": ">=16"
6
6
  },