Skip to content

Commit d889d7b

Browse files
GQL-109: Revert stub used before switching to returning at the resolver instead of the data-source
1 parent bed738a commit d889d7b

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

src/datasources/graphDbAssociatedCitations.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -104,21 +104,13 @@ export default async (
104104
// console.log('GraphDB Citations Response result: ', JSON.stringify(result, null, 2))
105105

106106
const { data: resultData } = result
107-
const { '@value': dataValues = [] } = resultData
107+
const { '@value': dataValues } = resultData
108108
const [responseMap] = dataValues
109-
110-
if (!responseMap) {
111-
return {
112-
count: 0,
113-
items: []
114-
}
115-
}
116-
117109
const { '@value': responseMapValue } = responseMap
118110
const responseData = fromPairs(chunk(responseMapValue, 2))
119111
const { citations: citationsResult, totalCount: totalCountResult } = responseData
120-
const { '@value': totalCitationsCount = 0 } = totalCountResult
121-
const { '@value': citationsArray = [] } = citationsResult
112+
const { '@value': totalCitationsCount } = totalCountResult
113+
const { '@value': citationsArray } = citationsResult
122114

123115
const processedCitations = []
124116

0 commit comments

Comments
 (0)