@@ -11,43 +11,30 @@ import FetchMore from '../../FetchMore';
1111
1212import './style.css' ;
1313
14- const getConfiguration = (
15- cursor ,
16- repositoryOwner ,
17- repositoryName ,
18- number ,
19- ) => ( {
20- variables : {
21- cursor,
22- repositoryOwner,
23- repositoryName,
24- number,
25- } ,
26- updateQuery : ( previousResult , { fetchMoreResult } ) => {
27- if ( ! fetchMoreResult ) {
28- return previousResult ;
29- }
14+ const updateQuery = ( previousResult , { fetchMoreResult } ) => {
15+ if ( ! fetchMoreResult ) {
16+ return previousResult ;
17+ }
3018
31- return {
32- ...previousResult ,
33- repository : {
34- ...previousResult . repository ,
35- issue : {
36- ...previousResult . repository . issue ,
37- ...fetchMoreResult . repository . issue ,
38- comments : {
39- ...previousResult . repository . issue . comments ,
40- ...fetchMoreResult . repository . issue . comments ,
41- edges : [
42- ...previousResult . repository . issue . comments . edges ,
43- ...fetchMoreResult . repository . issue . comments . edges ,
44- ] ,
45- } ,
19+ return {
20+ ...previousResult ,
21+ repository : {
22+ ...previousResult . repository ,
23+ issue : {
24+ ...previousResult . repository . issue ,
25+ ...fetchMoreResult . repository . issue ,
26+ comments : {
27+ ...previousResult . repository . issue . comments ,
28+ ...fetchMoreResult . repository . issue . comments ,
29+ edges : [
30+ ...previousResult . repository . issue . comments . edges ,
31+ ...fetchMoreResult . repository . issue . comments . edges ,
32+ ] ,
4633 } ,
4734 } ,
48- } ;
49- } ,
50- } ) ;
35+ } ,
36+ } ;
37+ } ;
5138
5239const CommentList = ( { repositoryOwner, repositoryName, issue } ) => (
5340 < Query
@@ -81,12 +68,13 @@ const CommentList = ({ repositoryOwner, repositoryName, issue }) => (
8168 hasNextPage = {
8269 repository . issue . comments . pageInfo . hasNextPage
8370 }
84- fetchMoreConfiguration = { getConfiguration (
85- repository . issue . comments . pageInfo . endCursor ,
71+ variables = { {
72+ cursor : repository . issue . comments . pageInfo . endCursor ,
8673 repositoryOwner,
8774 repositoryName,
88- issue . number ,
89- ) }
75+ number : issue . number ,
76+ } }
77+ updateQuery = { updateQuery }
9078 fetchMore = { fetchMore }
9179 >
9280 Comments
0 commit comments