fix: add apiResponse.text() to logging
This commit is contained in:
committed by
Michael Zetterberg
parent
7cd6367c15
commit
9497e8eef3
@@ -46,10 +46,10 @@ export async function request<T>(
|
||||
}
|
||||
}
|
||||
|
||||
const print = (await import("graphql/language/printer")).print
|
||||
const nr = Math.random()
|
||||
console.log(`START REQUEST ${nr}`)
|
||||
console.time(`OUTGOING REQUEST ${nr}`)
|
||||
// const print = (await import("graphql/language/printer")).print
|
||||
// const nr = Math.random()
|
||||
// console.log(`START REQUEST ${nr}`)
|
||||
// console.time(`OUTGOING REQUEST ${nr}`)
|
||||
// console.log(`Sending reqeust to ${env.CMS_URL}`)
|
||||
// console.log(`Query:`, print(query as DocumentNode))
|
||||
// console.log(`Variables:`, variables)
|
||||
@@ -63,7 +63,7 @@ export async function request<T>(
|
||||
variables,
|
||||
})
|
||||
|
||||
console.timeEnd(`OUTGOING REQUEST ${nr}`)
|
||||
// console.timeEnd(`OUTGOING REQUEST ${nr}`)
|
||||
// console.log({ response })
|
||||
|
||||
return { data: response }
|
||||
|
||||
Reference in New Issue
Block a user