Fix GraphQL cache errors because of missing id on some queries
Also moves some queries to cache-and-network policy and improve typescript a bit Closes #387 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -23,6 +23,7 @@ export const FETCH_PERSON = gql`
|
||||
organizedEvents {
|
||||
total
|
||||
elements {
|
||||
id
|
||||
uuid
|
||||
title
|
||||
beginsOn
|
||||
@@ -120,18 +121,6 @@ export const LIST_PROFILES = gql`
|
||||
}
|
||||
`;
|
||||
|
||||
export const LOGGED_PERSON = gql`
|
||||
query {
|
||||
loggedPerson {
|
||||
id
|
||||
avatar {
|
||||
url
|
||||
}
|
||||
preferredUsername
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_DEFAULT_ACTOR = gql`
|
||||
mutation ChangeDefaultActor($preferredUsername: String!) {
|
||||
changeDefaultActor(preferredUsername: $preferredUsername) {
|
||||
@@ -180,6 +169,7 @@ export const LOGGED_USER_PARTICIPATIONS = gql`
|
||||
$limit: Int
|
||||
) {
|
||||
loggedUser {
|
||||
id
|
||||
participations(
|
||||
afterDatetime: $afterDateTime
|
||||
beforeDatetime: $beforeDateTime
|
||||
@@ -240,6 +230,7 @@ export const LOGGED_USER_PARTICIPATIONS = gql`
|
||||
export const LOGGED_USER_DRAFTS = gql`
|
||||
query LoggedUserDrafts($page: Int, $limit: Int) {
|
||||
loggedUser {
|
||||
id
|
||||
drafts(page: $page, limit: $limit) {
|
||||
id
|
||||
uuid
|
||||
@@ -276,6 +267,7 @@ export const LOGGED_USER_DRAFTS = gql`
|
||||
export const LOGGED_USER_MEMBERSHIPS = gql`
|
||||
query LoggedUserMemberships($page: Int, $limit: Int) {
|
||||
loggedUser {
|
||||
id
|
||||
memberships(page: $page, limit: $limit) {
|
||||
total
|
||||
elements {
|
||||
|
||||
@@ -13,6 +13,7 @@ export const DISCUSSION_BASIC_FIELDS_FRAGMENT = gql`
|
||||
actor {
|
||||
id
|
||||
preferredUsername
|
||||
domain
|
||||
avatar {
|
||||
url
|
||||
}
|
||||
@@ -35,6 +36,7 @@ export const DISCUSSION_FIELDS_FOR_REPLY_FRAGMENT = gql`
|
||||
actor {
|
||||
id
|
||||
preferredUsername
|
||||
domain
|
||||
avatar {
|
||||
url
|
||||
}
|
||||
@@ -43,10 +45,12 @@ export const DISCUSSION_FIELDS_FOR_REPLY_FRAGMENT = gql`
|
||||
actor {
|
||||
id
|
||||
preferredUsername
|
||||
domain
|
||||
}
|
||||
creator {
|
||||
id
|
||||
preferredUsername
|
||||
domain
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -142,6 +142,7 @@ export const FETCH_EVENT = gql`
|
||||
${tagsQuery}
|
||||
},
|
||||
relatedEvents {
|
||||
id
|
||||
uuid,
|
||||
title,
|
||||
beginsOn,
|
||||
@@ -150,9 +151,11 @@ export const FETCH_EVENT = gql`
|
||||
url
|
||||
}
|
||||
physicalAddress {
|
||||
id
|
||||
description
|
||||
},
|
||||
organizerActor {
|
||||
id
|
||||
avatar {
|
||||
url,
|
||||
},
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const LOGGED_PERSON = gql`
|
||||
query {
|
||||
loggedPerson {
|
||||
id
|
||||
avatar {
|
||||
url
|
||||
}
|
||||
preferredUsername
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const CREATE_FEED_TOKEN_ACTOR = gql`
|
||||
mutation createFeedToken($actor_id: ID!) {
|
||||
createFeedToken(actorId: $actor_id) {
|
||||
|
||||
@@ -38,6 +38,7 @@ export const LIST_GROUPS = gql`
|
||||
}
|
||||
organizedEvents {
|
||||
elements {
|
||||
id
|
||||
uuid
|
||||
title
|
||||
beginsOn
|
||||
|
||||
@@ -161,6 +161,7 @@ export const LOGS = gql`
|
||||
actor {
|
||||
id
|
||||
preferredUsername
|
||||
domain
|
||||
avatar {
|
||||
url
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ export const SEARCH_EVENTS = gql`
|
||||
) {
|
||||
total
|
||||
elements {
|
||||
id
|
||||
title
|
||||
uuid
|
||||
beginsOn
|
||||
@@ -44,6 +45,7 @@ export const SEARCH_GROUPS = gql`
|
||||
searchGroups(term: $term, location: $location, radius: $radius, page: $page, limit: $limit) {
|
||||
total
|
||||
elements {
|
||||
id
|
||||
avatar {
|
||||
url
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user