Refactor GraphQL queries and event cards

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-10-29 10:54:35 +02:00
parent 807b1084b0
commit ea4116c207
27 changed files with 376 additions and 686 deletions

View File

@@ -1,4 +1,5 @@
import gql from "graphql-tag";
import { ACTOR_FRAGMENT } from "./actor";
export const RESOURCE_METADATA_BASIC_FIELDS_FRAGMENT = gql`
fragment ResourceMetadataBasicFields on ResourceMetadata {
@@ -38,10 +39,7 @@ export const GET_RESOURCE = gql`
type
}
actor {
id
preferredUsername
name
domain
...ActorFragment
}
children(page: $page, limit: $limit) {
total
@@ -68,6 +66,7 @@ export const GET_RESOURCE = gql`
}
}
}
${ACTOR_FRAGMENT}
${RESOURCE_METADATA_BASIC_FIELDS_FRAGMENT}
`;