Prvni naznak verejne casti, sprava profilu
This commit is contained in:
@@ -10,7 +10,6 @@ const uploadLink = createUploadLink({
|
||||
uri: 'http://localhost:8000/graphql',
|
||||
})
|
||||
|
||||
|
||||
const errorLink = onError(
|
||||
({graphQLErrors, networkError, operation, forward}) => {
|
||||
if (networkError?.statusCode === 401) {
|
||||
|
||||
@@ -26,6 +26,7 @@ fragment flightFullInfo on Flight {
|
||||
landingDatetime
|
||||
landings
|
||||
durationMinCalculated
|
||||
isPublic
|
||||
|
||||
coverPhoto {
|
||||
thumbnailUrl
|
||||
@@ -79,6 +80,7 @@ fragment flightListInfo on Flight {
|
||||
takeoffDatetime
|
||||
landingDatetime
|
||||
durationMinCalculated
|
||||
isPublic
|
||||
|
||||
coverPhoto {
|
||||
thumbnailUrl
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const FRAGMENT_USER_FULL_INFO = gql`
|
||||
fragment userFullInfo on User {
|
||||
id
|
||||
name
|
||||
email
|
||||
avatarImageUrl
|
||||
titleImageUrl
|
||||
publicUsername
|
||||
description
|
||||
createdAt
|
||||
}
|
||||
`
|
||||
@@ -0,0 +1,12 @@
|
||||
import gql from "graphql-tag";
|
||||
import {FRAGMENT_USER_FULL_INFO} from "src/graphql/fragments/user";
|
||||
|
||||
|
||||
export const EDIT_USER = gql`
|
||||
mutation editLoggedUser($input: EditUserInput!) {
|
||||
editLoggedUser(input: $input) {
|
||||
...userFullInfo
|
||||
}
|
||||
}
|
||||
${FRAGMENT_USER_FULL_INFO}
|
||||
`;
|
||||
@@ -0,0 +1,23 @@
|
||||
import gql from "graphql-tag";
|
||||
import {FRAGMENT_USER_FULL_INFO} from "src/graphql/fragments/user";
|
||||
|
||||
export const USER_DETAIL = gql`
|
||||
query userDetail($username: String!) {
|
||||
user(username: $username) {
|
||||
...userFullInfo
|
||||
}
|
||||
}
|
||||
|
||||
${FRAGMENT_USER_FULL_INFO}
|
||||
`;
|
||||
|
||||
|
||||
export const LOGGED_USER_DETAIL = gql`
|
||||
query loggedUserDetail {
|
||||
loggedUser {
|
||||
...userFullInfo
|
||||
}
|
||||
}
|
||||
|
||||
${FRAGMENT_USER_FULL_INFO}
|
||||
`;
|
||||
Reference in New Issue
Block a user