Files
twenty_crm/packages/twenty-front/src/modules/users/graphql/queries/getCurrentUser.ts
rostaklein 306ef1df9c feat: schema version header check (#4563)
closes https://github.com/twentyhq/twenty/issues/4479

tried to catch the error inside various places including
https://github.com/twentyhq/twenty/blob/main/packages/twenty-server/src/engine/integrations/exception-handler/exception-handler.service.ts
but it seems like the error never reaches the GraphQL module 😮

any idea where we could intercept such an error `Cannot query field`?

---------

Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
2024-04-04 09:52:45 +02:00

55 lines
1023 B
TypeScript

// This query cannot be put in the graphQL folder because it cannot be generated by the graphQL codegen.
import { gql } from '@apollo/client';
export const GET_CURRENT_USER = gql`
query GetCurrentUser {
currentUser {
id
firstName
lastName
email
canImpersonate
supportUserHash
workspaceMember {
id
name {
firstName
lastName
}
colorScheme
avatarUrl
locale
}
defaultWorkspace {
id
displayName
logo
domainName
inviteHash
allowImpersonation
subscriptionStatus
activationStatus
featureFlags {
id
key
value
workspaceId
}
currentCacheVersion
currentBillingSubscription {
status
interval
}
}
workspaces {
workspace {
id
displayName
logo
domainName
}
}
}
}
`;