Skip to content

Commit

Permalink
Few fixes and debug log for vercel
Browse files Browse the repository at this point in the history
  • Loading branch information
WRadoslaw committed Jan 17, 2024
1 parent 4ff1fbc commit 1f2f81e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/atlas/src/api/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ const initializePerformanceObserver = () => {
try {
const observer = new PerformanceObserver((list) => {
for (const entry of list.getEntries()) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
if ((entry as any).initiatorType === 'fetch') {
if (['fetch', 'xmlhttprequest'].includes((entry as PerformanceResourceTiming).initiatorType)) {
const queryString = entry.name.split('?')?.[1]
const params = new URLSearchParams(queryString)
const queryType = params.get('queryName')
Expand Down Expand Up @@ -63,6 +62,7 @@ export const createApolloClient = () => {
const queryName = options?.headers
? (options.headers?.['queryname' as keyof typeof options.headers] as string)
: null
console.log('Options', options)

Check warning on line 65 in packages/atlas/src/api/client/index.ts

View workflow job for this annotation

GitHub Actions / Tests and Linting (ubuntu-latest, 18.x)

Unexpected console statement
const queryString = queryName ? `?queryName=${queryName}` : ''
return fetch(`${uri}${queryString}`, options)
},
Expand Down

0 comments on commit 1f2f81e

Please sign in to comment.