624b56eacf
* fix(fe2): more preview related mismatch fixes * moar * a bunch of preloads * more preloads * batchlink * undo cache only * lint fix * more query opt * rate limiter adjustments to account for batched reqs
30 lines
727 B
TypeScript
30 lines
727 B
TypeScript
import type { FetchPolicy } from '@apollo/client/core'
|
|
import { activeUserWorkspaceExistenceCheckQuery } from '~/lib/auth/graphql/queries'
|
|
import { workspaceAccessCheckQuery } from '~/lib/workspaces/graphql/queries'
|
|
|
|
export const buildActiveUserWorkspaceExistenceCheckQuery = () => {
|
|
return <const>{
|
|
query: activeUserWorkspaceExistenceCheckQuery,
|
|
variables: {
|
|
filter: {
|
|
personalOnly: true
|
|
},
|
|
limit: 0
|
|
}
|
|
}
|
|
}
|
|
|
|
export const buildWorkspaceAccessCheckQuery = (
|
|
workspaceSlug: string,
|
|
fetchPolicy: FetchPolicy
|
|
) => {
|
|
return <const>{
|
|
query: workspaceAccessCheckQuery,
|
|
variables: { slug: workspaceSlug },
|
|
context: {
|
|
skipLoggingErrors: true
|
|
},
|
|
fetchPolicy
|
|
}
|
|
}
|