Skip to content

Commit

Permalink
Fixed missing properties from GraphQL for CorpusQuery.
Browse files Browse the repository at this point in the history
  • Loading branch information
JSv4 committed Jul 19, 2024
1 parent cca53b6 commit 6f53378
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
8 changes: 0 additions & 8 deletions frontend/src/components/annotator/DocumentAnnotator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -460,14 +460,6 @@ export const DocumentAnnotator = ({
})
);
console.log("display_annotations", display_annotations);
console.log(
"Edges",
display_annotations[0].sourceNodeInRelationships.edges
);
console.log(
"Edges",
display_annotations[0].targetNodeInRelationships.edges
);

// Build relationship_annotations
const uniqueRelationships = [
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/queries/QueryResultsViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ const QueryResultsViewer: React.FC<QueryResultsViewerProps> = ({
displayAnnotationOnAnnotatorLoad(viewSourceAnnotation);
selectedAnnotation(viewSourceAnnotation);
openedDocument(viewSourceAnnotation.document);
setViewSourceAnnotation(null);
onlyDisplayTheseAnnotations([viewSourceAnnotation]);
setViewSourceAnnotation(null);
}
}, [viewSourceAnnotation]);

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/graphql/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export const showDeleteDocumentsModal = makeVar<boolean>(false);
export const showNewLabelsetModal = makeVar<boolean>(false);
export const showExportModal = makeVar<boolean>(false);
// if this is true, only render the currently selected annotation.
export const showSelectedAnnotationOnly = makeVar<boolean>(false);
export const showSelectedAnnotationOnly = makeVar<boolean>(true);
// if this is false, don't render <SelectionBoundary> elements so you only see tokens. Cleaner for complex annotations.
export const showAnnotationBoundingBoxes = makeVar<boolean>(false);
// Show Labels toggle (if false, don't show labels)
Expand Down
14 changes: 14 additions & 0 deletions frontend/src/graphql/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,13 @@ export const GET_CORPUS_QUERY_DETAILS = gql`
}
}
}
targetNodeInRelationships {
edges {
node {
id
}
}
}
tokensJsons
document {
id
Expand Down Expand Up @@ -892,6 +899,13 @@ export const REQUEST_ANNOTATOR_DATA_FOR_DOCUMENT_IN_CORPUS = gql`
}
}
}
targetNodeInRelationships {
edges {
node {
id
}
}
}
creator {
id
email
Expand Down

0 comments on commit 6f53378

Please sign in to comment.