* 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>
20 lines
337 B
TypeScript
20 lines
337 B
TypeScript
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
|
|
}
|
|
}
|
|
`;
|