@@ -132,7 +132,10 @@ async function fetchSponsorshipsQuery() {
132132 let cursor = null ;
133133
134134 while ( true ) {
135- const data = await graphql ( SPONSORSHIPS_QUERY , { cursor } ) ;
135+ const data = await graphql (
136+ SPONSORSHIPS_QUERY ,
137+ cursor ? { cursor } : undefined
138+ ) ;
136139
137140 if ( data . errors ) {
138141 throw new Error ( JSON . stringify ( data . errors ) ) ;
@@ -145,7 +148,7 @@ async function fetchSponsorshipsQuery() {
145148
146149 const { nodes, pageInfo } = nodeRes ;
147150 const mapped = nodes . map ( n => {
148- const s = n . sponsor || n . sponsorEntity || n . sponsorEntity ; // support different field names
151+ const s = n . sponsor || n . sponsorEntity ; // support different field names
149152 return {
150153 name : s ?. name || s ?. login || null ,
151154 image : s ?. avatarUrl || null ,
@@ -180,7 +183,7 @@ async function fetchDonationsQuery() {
180183
181184 const { nodes } = nodeRes ;
182185 return nodes . map ( n => {
183- const s = n . sponsor || n . sponsorEntity || n . sponsorEntity ; // support different field names
186+ const s = n . sponsor || n . sponsorEntity ; // support different field names
184187 return {
185188 name : s ?. name || s ?. login || null ,
186189 image : s ?. avatarUrl || null ,
@@ -191,7 +194,7 @@ async function fetchDonationsQuery() {
191194}
192195
193196const graphql = async ( query , variables = { } ) => {
194- const res = await fetch ( GITHUB_GRAPHQL_URL , {
197+ const res = await fetchWithRetry ( GITHUB_GRAPHQL_URL , {
195198 method : 'POST' ,
196199 headers : {
197200 'Content-Type' : 'application/json' ,
0 commit comments