Files
twenty_crm/packages/twenty-front/src/modules/users/graphql/queries/getCurrentUser.ts
Marie f36555bdc0 Fix infinite loading on field settings (#8938)
We were experiencing infinite loading on field settings pages (creation
of new field), due to the fact that the component was being rendered on
and on and on.
This was due to useGetCurrentUserQuery calls outside of the update
function, causing renders in cascade. We also had an issue with the
component being unmounted too often.

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-12-06 18:46:06 +01:00

14 lines
373 B
TypeScript

// This query cannot be put in the graphQL folder because it cannot be generated by the graphQL codegen.
import { USER_QUERY_FRAGMENT } from '@/users/graphql/fragments/userQueryFragment';
import { gql } from '@apollo/client';
export const GET_CURRENT_USER = gql`
query GetCurrentUser {
currentUser {
...UserQueryFragment
}
}
${USER_QUERY_FRAGMENT}
`;