Chore: Use Fragments as types (#1670)

* Use Fragments as types

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Use Fragments as types in GraphQL queries and mutations

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

---------

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
This commit is contained in:
gitstart-twenty
2023-09-20 09:58:59 +01:00
committed by GitHub
parent 3f600146b1
commit 103fb701e7
25 changed files with 354 additions and 561 deletions

View File

@ -0,0 +1,19 @@
import { gql } from '@apollo/client';
export const AUTH_TOKEN = gql`
fragment AuthTokenFragment on AuthToken {
token
expiresAt
}
`;
export const AUTH_TOKENS = gql`
fragment AuthTokensFragment on AuthTokenPair {
accessToken {
...AuthTokenFragment
}
refreshToken {
...AuthTokenFragment
}
}
`;