import {useSubscription, gql, useQuery} from '@apollo/client'; import React, { useState } from "react"; export default function AnnotationsHistory() { const { loading, error, data } = useSubscription( gql`subscription { pres_annotation_history_curr_stream(batch_size: 10, cursor: {initial_value: {sequence: 0}}) { annotationId annotationInfo pageId presentationId sequence userId } } ` ); return !loading && !error && ( {data.pres_annotation_history_curr_stream.map((curr) => { console.log('pres_annotation_history_curr_stream', curr); return ( {/**/} ); })}
Annotations (Stream only DIFF)
annotationId annotationInfo sequence
{user.userId}{curr.annotationId} {curr.annotationInfo} {curr.sequence}
); }