@tmdb-graphql-api/resolvers 0.1.15 → 0.1.16-unstable.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (331) hide show
  1. package/dist/cjs/index.cjs +1 -1
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/esm/index.mjs +1 -1
  4. package/dist/esm/index.mjs.map +1 -1
  5. package/dist/production.analysis.txt +428 -416
  6. package/dist/types/cjs/constants.d.cts +2 -2
  7. package/dist/types/cjs/constants.d.cts.map +1 -1
  8. package/dist/types/cjs/helpers/buildArgsResolver.d.cts +0 -1
  9. package/dist/types/cjs/helpers/buildArgsResolver.d.cts.map +1 -1
  10. package/dist/types/cjs/helpers/buildNoObjArgsResolver.d.cts +0 -1
  11. package/dist/types/cjs/helpers/buildNoObjArgsResolver.d.cts.map +1 -1
  12. package/dist/types/cjs/helpers/buildObjArgsResolver.d.cts +0 -1
  13. package/dist/types/cjs/helpers/buildObjArgsResolver.d.cts.map +1 -1
  14. package/dist/types/cjs/helpers/buildObjResolver.d.cts +0 -1
  15. package/dist/types/cjs/helpers/buildObjResolver.d.cts.map +1 -1
  16. package/dist/types/cjs/helpers/executeResolver.d.cts +15 -0
  17. package/dist/types/cjs/helpers/executeResolver.d.cts.map +1 -0
  18. package/dist/types/cjs/queries/certifications.d.cts +9 -9
  19. package/dist/types/cjs/queries/certifications.d.cts.map +1 -1
  20. package/dist/types/cjs/queries/collection.d.cts.map +1 -1
  21. package/dist/types/cjs/queries/collectionImages.d.cts.map +1 -1
  22. package/dist/types/cjs/queries/collectionTranslations.d.cts.map +1 -1
  23. package/dist/types/cjs/queries/company.d.cts.map +1 -1
  24. package/dist/types/cjs/queries/companyAlternativeNames.d.cts.map +1 -1
  25. package/dist/types/cjs/queries/companyLogos.d.cts.map +1 -1
  26. package/dist/types/cjs/queries/configuration.d.cts.map +1 -1
  27. package/dist/types/cjs/queries/configurationCountries.d.cts.map +1 -1
  28. package/dist/types/cjs/queries/configurationJobs.d.cts.map +1 -1
  29. package/dist/types/cjs/queries/configurationLanguages.d.cts.map +1 -1
  30. package/dist/types/cjs/queries/configurationPrimaryTranslations.d.cts.map +1 -1
  31. package/dist/types/cjs/queries/configurationTimezones.d.cts.map +1 -1
  32. package/dist/types/cjs/queries/credit.d.cts +2 -2
  33. package/dist/types/cjs/queries/credit.d.cts.map +1 -1
  34. package/dist/types/cjs/queries/discoverMovies.d.cts.map +1 -1
  35. package/dist/types/cjs/queries/discoverTv.d.cts.map +1 -1
  36. package/dist/types/cjs/queries/episode.d.cts.map +1 -1
  37. package/dist/types/cjs/queries/episodeCredits.d.cts.map +1 -1
  38. package/dist/types/cjs/queries/episodeExternalIds.d.cts.map +1 -1
  39. package/dist/types/cjs/queries/episodeStills.d.cts.map +1 -1
  40. package/dist/types/cjs/queries/episodeTranslations.d.cts.map +1 -1
  41. package/dist/types/cjs/queries/episodeVideos.d.cts.map +1 -1
  42. package/dist/types/cjs/queries/find.d.cts.map +1 -1
  43. package/dist/types/cjs/queries/genres.d.cts.map +1 -1
  44. package/dist/types/cjs/queries/keyword.d.cts.map +1 -1
  45. package/dist/types/cjs/queries/movie.d.cts.map +1 -1
  46. package/dist/types/cjs/queries/movieAlternativeTitles.d.cts.map +1 -1
  47. package/dist/types/cjs/queries/movieCredits.d.cts.map +1 -1
  48. package/dist/types/cjs/queries/movieExternalIds.d.cts.map +1 -1
  49. package/dist/types/cjs/queries/movieImages.d.cts.map +1 -1
  50. package/dist/types/cjs/queries/movieKeywords.d.cts.map +1 -1
  51. package/dist/types/cjs/queries/movieRecommendations.d.cts.map +1 -1
  52. package/dist/types/cjs/queries/movieReleaseDates.d.cts.map +1 -1
  53. package/dist/types/cjs/queries/movieReviews.d.cts.map +1 -1
  54. package/dist/types/cjs/queries/movieSimilarMovies.d.cts.map +1 -1
  55. package/dist/types/cjs/queries/movieTranslations.d.cts.map +1 -1
  56. package/dist/types/cjs/queries/movieVideos.d.cts.map +1 -1
  57. package/dist/types/cjs/queries/movieWatchProviders.d.cts.map +1 -1
  58. package/dist/types/cjs/queries/network.d.cts.map +1 -1
  59. package/dist/types/cjs/queries/networkAlternativeNames.d.cts.map +1 -1
  60. package/dist/types/cjs/queries/networkLogos.d.cts.map +1 -1
  61. package/dist/types/cjs/queries/person.d.cts.map +1 -1
  62. package/dist/types/cjs/queries/personCombinedCredits.d.cts.map +1 -1
  63. package/dist/types/cjs/queries/personExternalIds.d.cts.map +1 -1
  64. package/dist/types/cjs/queries/personMovieCredits.d.cts.map +1 -1
  65. package/dist/types/cjs/queries/personProfiles.d.cts.map +1 -1
  66. package/dist/types/cjs/queries/personTranslations.d.cts.map +1 -1
  67. package/dist/types/cjs/queries/personTvCredits.d.cts.map +1 -1
  68. package/dist/types/cjs/queries/rated.d.cts.map +1 -1
  69. package/dist/types/cjs/queries/review.d.cts.map +1 -1
  70. package/dist/types/cjs/queries/search.d.cts.map +1 -1
  71. package/dist/types/cjs/queries/season.d.cts.map +1 -1
  72. package/dist/types/cjs/queries/seasonCredits.d.cts.map +1 -1
  73. package/dist/types/cjs/queries/seasonExternalIds.d.cts.map +1 -1
  74. package/dist/types/cjs/queries/seasonPosters.d.cts.map +1 -1
  75. package/dist/types/cjs/queries/seasonTranslations.d.cts.map +1 -1
  76. package/dist/types/cjs/queries/seasonVideos.d.cts.map +1 -1
  77. package/dist/types/cjs/queries/trending.d.cts.map +1 -1
  78. package/dist/types/cjs/queries/tv.d.cts.map +1 -1
  79. package/dist/types/cjs/queries/tvAlternativeTitles.d.cts.map +1 -1
  80. package/dist/types/cjs/queries/tvContentRatings.d.cts.map +1 -1
  81. package/dist/types/cjs/queries/tvCredits.d.cts.map +1 -1
  82. package/dist/types/cjs/queries/tvEpisodeGroups.d.cts.map +1 -1
  83. package/dist/types/cjs/queries/tvExternalIds.d.cts.map +1 -1
  84. package/dist/types/cjs/queries/tvImages.d.cts.map +1 -1
  85. package/dist/types/cjs/queries/tvKeywords.d.cts.map +1 -1
  86. package/dist/types/cjs/queries/tvRecommendations.d.cts.map +1 -1
  87. package/dist/types/cjs/queries/tvReviews.d.cts.map +1 -1
  88. package/dist/types/cjs/queries/tvSimilarTvShows.d.cts.map +1 -1
  89. package/dist/types/cjs/queries/tvTranslations.d.cts.map +1 -1
  90. package/dist/types/cjs/queries/tvVideos.d.cts.map +1 -1
  91. package/dist/types/cjs/queries/tvWatchProviders.d.cts.map +1 -1
  92. package/dist/types/esm/constants.d.ts +2 -2
  93. package/dist/types/esm/constants.d.ts.map +1 -1
  94. package/dist/types/esm/helpers/buildArgsResolver.d.ts +0 -1
  95. package/dist/types/esm/helpers/buildArgsResolver.d.ts.map +1 -1
  96. package/dist/types/esm/helpers/buildNoObjArgsResolver.d.ts +0 -1
  97. package/dist/types/esm/helpers/buildNoObjArgsResolver.d.ts.map +1 -1
  98. package/dist/types/esm/helpers/buildObjArgsResolver.d.ts +0 -1
  99. package/dist/types/esm/helpers/buildObjArgsResolver.d.ts.map +1 -1
  100. package/dist/types/esm/helpers/buildObjResolver.d.ts +0 -1
  101. package/dist/types/esm/helpers/buildObjResolver.d.ts.map +1 -1
  102. package/dist/types/esm/helpers/executeResolver.d.ts +15 -0
  103. package/dist/types/esm/helpers/executeResolver.d.ts.map +1 -0
  104. package/dist/types/esm/queries/certifications.d.ts +9 -9
  105. package/dist/types/esm/queries/certifications.d.ts.map +1 -1
  106. package/dist/types/esm/queries/collection.d.ts.map +1 -1
  107. package/dist/types/esm/queries/collectionImages.d.ts.map +1 -1
  108. package/dist/types/esm/queries/collectionTranslations.d.ts.map +1 -1
  109. package/dist/types/esm/queries/company.d.ts.map +1 -1
  110. package/dist/types/esm/queries/companyAlternativeNames.d.ts.map +1 -1
  111. package/dist/types/esm/queries/companyLogos.d.ts.map +1 -1
  112. package/dist/types/esm/queries/configuration.d.ts.map +1 -1
  113. package/dist/types/esm/queries/configurationCountries.d.ts.map +1 -1
  114. package/dist/types/esm/queries/configurationJobs.d.ts.map +1 -1
  115. package/dist/types/esm/queries/configurationLanguages.d.ts.map +1 -1
  116. package/dist/types/esm/queries/configurationPrimaryTranslations.d.ts.map +1 -1
  117. package/dist/types/esm/queries/configurationTimezones.d.ts.map +1 -1
  118. package/dist/types/esm/queries/credit.d.ts +2 -2
  119. package/dist/types/esm/queries/credit.d.ts.map +1 -1
  120. package/dist/types/esm/queries/discoverMovies.d.ts.map +1 -1
  121. package/dist/types/esm/queries/discoverTv.d.ts.map +1 -1
  122. package/dist/types/esm/queries/episode.d.ts.map +1 -1
  123. package/dist/types/esm/queries/episodeCredits.d.ts.map +1 -1
  124. package/dist/types/esm/queries/episodeExternalIds.d.ts.map +1 -1
  125. package/dist/types/esm/queries/episodeStills.d.ts.map +1 -1
  126. package/dist/types/esm/queries/episodeTranslations.d.ts.map +1 -1
  127. package/dist/types/esm/queries/episodeVideos.d.ts.map +1 -1
  128. package/dist/types/esm/queries/find.d.ts.map +1 -1
  129. package/dist/types/esm/queries/genres.d.ts.map +1 -1
  130. package/dist/types/esm/queries/keyword.d.ts.map +1 -1
  131. package/dist/types/esm/queries/movie.d.ts.map +1 -1
  132. package/dist/types/esm/queries/movieAlternativeTitles.d.ts.map +1 -1
  133. package/dist/types/esm/queries/movieCredits.d.ts.map +1 -1
  134. package/dist/types/esm/queries/movieExternalIds.d.ts.map +1 -1
  135. package/dist/types/esm/queries/movieImages.d.ts.map +1 -1
  136. package/dist/types/esm/queries/movieKeywords.d.ts.map +1 -1
  137. package/dist/types/esm/queries/movieRecommendations.d.ts.map +1 -1
  138. package/dist/types/esm/queries/movieReleaseDates.d.ts.map +1 -1
  139. package/dist/types/esm/queries/movieReviews.d.ts.map +1 -1
  140. package/dist/types/esm/queries/movieSimilarMovies.d.ts.map +1 -1
  141. package/dist/types/esm/queries/movieTranslations.d.ts.map +1 -1
  142. package/dist/types/esm/queries/movieVideos.d.ts.map +1 -1
  143. package/dist/types/esm/queries/movieWatchProviders.d.ts.map +1 -1
  144. package/dist/types/esm/queries/network.d.ts.map +1 -1
  145. package/dist/types/esm/queries/networkAlternativeNames.d.ts.map +1 -1
  146. package/dist/types/esm/queries/networkLogos.d.ts.map +1 -1
  147. package/dist/types/esm/queries/person.d.ts.map +1 -1
  148. package/dist/types/esm/queries/personCombinedCredits.d.ts.map +1 -1
  149. package/dist/types/esm/queries/personExternalIds.d.ts.map +1 -1
  150. package/dist/types/esm/queries/personMovieCredits.d.ts.map +1 -1
  151. package/dist/types/esm/queries/personProfiles.d.ts.map +1 -1
  152. package/dist/types/esm/queries/personTranslations.d.ts.map +1 -1
  153. package/dist/types/esm/queries/personTvCredits.d.ts.map +1 -1
  154. package/dist/types/esm/queries/rated.d.ts.map +1 -1
  155. package/dist/types/esm/queries/review.d.ts.map +1 -1
  156. package/dist/types/esm/queries/search.d.ts.map +1 -1
  157. package/dist/types/esm/queries/season.d.ts.map +1 -1
  158. package/dist/types/esm/queries/seasonCredits.d.ts.map +1 -1
  159. package/dist/types/esm/queries/seasonExternalIds.d.ts.map +1 -1
  160. package/dist/types/esm/queries/seasonPosters.d.ts.map +1 -1
  161. package/dist/types/esm/queries/seasonTranslations.d.ts.map +1 -1
  162. package/dist/types/esm/queries/seasonVideos.d.ts.map +1 -1
  163. package/dist/types/esm/queries/trending.d.ts.map +1 -1
  164. package/dist/types/esm/queries/tv.d.ts.map +1 -1
  165. package/dist/types/esm/queries/tvAlternativeTitles.d.ts.map +1 -1
  166. package/dist/types/esm/queries/tvContentRatings.d.ts.map +1 -1
  167. package/dist/types/esm/queries/tvCredits.d.ts.map +1 -1
  168. package/dist/types/esm/queries/tvEpisodeGroups.d.ts.map +1 -1
  169. package/dist/types/esm/queries/tvExternalIds.d.ts.map +1 -1
  170. package/dist/types/esm/queries/tvImages.d.ts.map +1 -1
  171. package/dist/types/esm/queries/tvKeywords.d.ts.map +1 -1
  172. package/dist/types/esm/queries/tvRecommendations.d.ts.map +1 -1
  173. package/dist/types/esm/queries/tvReviews.d.ts.map +1 -1
  174. package/dist/types/esm/queries/tvSimilarTvShows.d.ts.map +1 -1
  175. package/dist/types/esm/queries/tvTranslations.d.ts.map +1 -1
  176. package/dist/types/esm/queries/tvVideos.d.ts.map +1 -1
  177. package/dist/types/esm/queries/tvWatchProviders.d.ts.map +1 -1
  178. package/dist/types/tsconfig.build.tsbuildinfo +1 -1
  179. package/package.json +9 -10
  180. package/src/__testUtils__/helpers/createRestClient.ts +1 -2
  181. package/src/constants.ts +2 -2
  182. package/src/helpers/buildArgsResolver.ts +12 -14
  183. package/src/helpers/buildNoObjArgsResolver.ts +13 -18
  184. package/src/helpers/buildObjArgsResolver.ts +14 -20
  185. package/src/helpers/buildObjResolver.ts +11 -13
  186. package/src/helpers/executeResolver.ts +39 -0
  187. package/src/queries/certifications.test.ts +2 -2
  188. package/src/queries/certifications.ts +3 -4
  189. package/src/queries/collection.test.ts +2 -2
  190. package/src/queries/collection.ts +2 -3
  191. package/src/queries/collectionImages.test.ts +2 -2
  192. package/src/queries/collectionImages.ts +2 -3
  193. package/src/queries/collectionTranslations.test.ts +2 -2
  194. package/src/queries/collectionTranslations.ts +2 -3
  195. package/src/queries/company.test.ts +2 -2
  196. package/src/queries/company.ts +2 -3
  197. package/src/queries/companyAlternativeNames.test.ts +2 -2
  198. package/src/queries/companyAlternativeNames.ts +2 -3
  199. package/src/queries/companyLogos.test.ts +2 -2
  200. package/src/queries/companyLogos.ts +2 -3
  201. package/src/queries/configuration.test.ts +2 -2
  202. package/src/queries/configuration.ts +1 -2
  203. package/src/queries/configurationCountries.test.ts +2 -2
  204. package/src/queries/configurationCountries.ts +1 -2
  205. package/src/queries/configurationJobs.test.ts +2 -2
  206. package/src/queries/configurationJobs.ts +1 -2
  207. package/src/queries/configurationLanguages.test.ts +2 -2
  208. package/src/queries/configurationLanguages.ts +1 -2
  209. package/src/queries/configurationPrimaryTranslations.test.ts +2 -2
  210. package/src/queries/configurationPrimaryTranslations.ts +1 -2
  211. package/src/queries/configurationTimezones.test.ts +2 -2
  212. package/src/queries/configurationTimezones.ts +1 -2
  213. package/src/queries/credit.test.ts +2 -2
  214. package/src/queries/credit.ts +1 -2
  215. package/src/queries/discoverMovies.test.ts +3 -3
  216. package/src/queries/discoverMovies.ts +0 -2
  217. package/src/queries/discoverTv.test.ts +3 -3
  218. package/src/queries/discoverTv.ts +0 -2
  219. package/src/queries/episode.test.ts +2 -2
  220. package/src/queries/episode.ts +1 -2
  221. package/src/queries/episodeCredits.test.ts +2 -2
  222. package/src/queries/episodeCredits.ts +2 -3
  223. package/src/queries/episodeExternalIds.test.ts +2 -2
  224. package/src/queries/episodeExternalIds.ts +2 -3
  225. package/src/queries/episodeStills.test.ts +2 -2
  226. package/src/queries/episodeStills.ts +2 -3
  227. package/src/queries/episodeTranslations.test.ts +2 -2
  228. package/src/queries/episodeTranslations.ts +2 -3
  229. package/src/queries/episodeVideos.test.ts +2 -2
  230. package/src/queries/episodeVideos.ts +2 -3
  231. package/src/queries/find.test.ts +2 -2
  232. package/src/queries/find.ts +6 -7
  233. package/src/queries/genres.test.ts +2 -2
  234. package/src/queries/genres.ts +2 -3
  235. package/src/queries/keyword.test.ts +2 -2
  236. package/src/queries/keyword.ts +1 -2
  237. package/src/queries/movie.test.ts +2 -2
  238. package/src/queries/movie.ts +2 -3
  239. package/src/queries/movieAlternativeTitles.test.ts +2 -2
  240. package/src/queries/movieAlternativeTitles.ts +2 -3
  241. package/src/queries/movieCredits.test.ts +2 -2
  242. package/src/queries/movieCredits.ts +2 -3
  243. package/src/queries/movieExternalIds.test.ts +2 -2
  244. package/src/queries/movieExternalIds.ts +2 -3
  245. package/src/queries/movieImages.test.ts +2 -2
  246. package/src/queries/movieImages.ts +2 -3
  247. package/src/queries/movieKeywords.test.ts +2 -2
  248. package/src/queries/movieKeywords.ts +2 -3
  249. package/src/queries/movieRecommendations.test.ts +3 -3
  250. package/src/queries/movieRecommendations.ts +1 -4
  251. package/src/queries/movieReleaseDates.test.ts +2 -2
  252. package/src/queries/movieReleaseDates.ts +2 -3
  253. package/src/queries/movieReviews.test.ts +3 -3
  254. package/src/queries/movieReviews.ts +1 -4
  255. package/src/queries/movieSimilarMovies.test.ts +3 -3
  256. package/src/queries/movieSimilarMovies.ts +1 -4
  257. package/src/queries/movieTranslations.test.ts +2 -2
  258. package/src/queries/movieTranslations.ts +2 -3
  259. package/src/queries/movieVideos.test.ts +2 -2
  260. package/src/queries/movieVideos.ts +2 -3
  261. package/src/queries/movieWatchProviders.test.ts +2 -2
  262. package/src/queries/movieWatchProviders.ts +2 -3
  263. package/src/queries/network.test.ts +2 -2
  264. package/src/queries/network.ts +2 -3
  265. package/src/queries/networkAlternativeNames.test.ts +2 -2
  266. package/src/queries/networkAlternativeNames.ts +2 -3
  267. package/src/queries/networkLogos.test.ts +2 -2
  268. package/src/queries/networkLogos.ts +2 -3
  269. package/src/queries/person.test.ts +2 -2
  270. package/src/queries/person.ts +2 -3
  271. package/src/queries/personCombinedCredits.test.ts +2 -2
  272. package/src/queries/personCombinedCredits.ts +2 -3
  273. package/src/queries/personExternalIds.test.ts +2 -2
  274. package/src/queries/personExternalIds.ts +2 -3
  275. package/src/queries/personMovieCredits.test.ts +2 -2
  276. package/src/queries/personMovieCredits.ts +2 -3
  277. package/src/queries/personProfiles.test.ts +2 -2
  278. package/src/queries/personProfiles.ts +2 -3
  279. package/src/queries/personTranslations.test.ts +2 -2
  280. package/src/queries/personTranslations.ts +2 -3
  281. package/src/queries/personTvCredits.test.ts +2 -2
  282. package/src/queries/personTvCredits.ts +2 -3
  283. package/src/queries/rated.test.ts +4 -4
  284. package/src/queries/rated.ts +1 -11
  285. package/src/queries/review.test.ts +2 -2
  286. package/src/queries/review.ts +2 -3
  287. package/src/queries/search.test.ts +19 -19
  288. package/src/queries/search.ts +1 -11
  289. package/src/queries/season.test.ts +2 -2
  290. package/src/queries/season.ts +2 -3
  291. package/src/queries/seasonCredits.test.ts +2 -2
  292. package/src/queries/seasonCredits.ts +2 -3
  293. package/src/queries/seasonExternalIds.test.ts +2 -2
  294. package/src/queries/seasonExternalIds.ts +2 -3
  295. package/src/queries/seasonPosters.test.ts +2 -2
  296. package/src/queries/seasonPosters.ts +2 -3
  297. package/src/queries/seasonTranslations.test.ts +2 -2
  298. package/src/queries/seasonTranslations.ts +2 -3
  299. package/src/queries/seasonVideos.test.ts +2 -2
  300. package/src/queries/seasonVideos.ts +2 -3
  301. package/src/queries/trending.test.ts +4 -4
  302. package/src/queries/trending.ts +1 -11
  303. package/src/queries/tv.test.ts +2 -2
  304. package/src/queries/tv.ts +2 -3
  305. package/src/queries/tvAlternativeTitles.test.ts +2 -2
  306. package/src/queries/tvAlternativeTitles.ts +2 -3
  307. package/src/queries/tvContentRatings.test.ts +2 -2
  308. package/src/queries/tvContentRatings.ts +2 -3
  309. package/src/queries/tvCredits.test.ts +2 -2
  310. package/src/queries/tvCredits.ts +2 -3
  311. package/src/queries/tvEpisodeGroups.test.ts +2 -2
  312. package/src/queries/tvEpisodeGroups.ts +2 -3
  313. package/src/queries/tvExternalIds.test.ts +2 -2
  314. package/src/queries/tvExternalIds.ts +2 -3
  315. package/src/queries/tvImages.test.ts +2 -2
  316. package/src/queries/tvImages.ts +2 -3
  317. package/src/queries/tvKeywords.test.ts +2 -2
  318. package/src/queries/tvKeywords.ts +2 -3
  319. package/src/queries/tvRecommendations.test.ts +3 -3
  320. package/src/queries/tvRecommendations.ts +1 -4
  321. package/src/queries/tvReviews.test.ts +3 -3
  322. package/src/queries/tvReviews.ts +1 -4
  323. package/src/queries/tvSimilarTvShows.test.ts +3 -3
  324. package/src/queries/tvSimilarTvShows.ts +1 -4
  325. package/src/queries/tvTranslations.test.ts +2 -2
  326. package/src/queries/tvTranslations.ts +2 -3
  327. package/src/queries/tvVideos.test.ts +2 -2
  328. package/src/queries/tvVideos.ts +2 -3
  329. package/src/queries/tvWatchProviders.test.ts +2 -2
  330. package/src/queries/tvWatchProviders.ts +2 -3
  331. package/tsconfig.json +4 -4
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tmdb-graphql-api/resolvers",
3
3
  "description": "The TMDB GraphQL resolvers module.",
4
- "version": "0.1.15",
4
+ "version": "0.1.16-unstable.2",
5
5
  "author": "miami-man",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/badbatch/themoviedb-graphql-api",
@@ -29,19 +29,18 @@
29
29
  "access": "public"
30
30
  },
31
31
  "dependencies": {
32
- "@cachemap/core": "^5.3.0",
33
- "@cachemap/map": "^5.1.0",
34
- "@cachemap/reaper": "^5.2.0",
35
- "@graphql-box/connection-resolver": "5.4.23-unstable-12345.6",
36
- "@graphql-box/core": "5.4.14-unstable-12345.6",
32
+ "@cachemap/core": "^5.3.3-unstable-12345.3",
33
+ "@cachemap/reaper": "^5.2.1-unstable-12345.2",
34
+ "@graphql-box/connection-resolver": "5.4.23-unstable-12345.11",
35
+ "@graphql-box/core": "5.4.14-unstable-12345.8",
37
36
  "cacheability": "^4.0.27",
38
- "getta": "^1.0.21",
37
+ "getta": "1.0.22-unstable-12345.3",
39
38
  "js-base64": "^3.6.0",
40
39
  "query-string": "^8.1.0",
41
40
  "type-fest": "^4.37.0",
42
41
  "winston": "^3.17.0",
43
- "@tmdb-graphql-api/rest-client": "0.0.21",
44
- "@tmdb-graphql-api/schema": "0.1.3"
42
+ "@tmdb-graphql-api/rest-client": "0.0.22-unstable.2",
43
+ "@tmdb-graphql-api/schema": "0.1.4-unstable.0"
45
44
  },
46
45
  "peerDependencies": {
47
46
  "@babel/runtime": "<8",
@@ -51,7 +50,7 @@
51
50
  },
52
51
  "devDependencies": {
53
52
  "@babel/runtime": "^7.23.2",
54
- "@graphql-box/helpers": "5.4.14-unstable-12345.6",
53
+ "@graphql-box/helpers": "5.4.14-unstable-12345.13",
55
54
  "@jest/globals": "^29.7.0",
56
55
  "@types/lodash-es": "^4.14.191",
57
56
  "core-js": "^3.33.1",
@@ -1,9 +1,8 @@
1
1
  import { Core } from '@cachemap/core';
2
- import { init as map } from '@cachemap/map';
3
2
  import { createRestClient as create } from '@tmdb-graphql-api/rest-client';
4
3
 
5
4
  export const createRestClient = () =>
6
5
  create({
7
6
  apiKey: '12345',
8
- cache: new Core({ name: 'cachemap', store: map(), type: 'GRAPHQL' }),
7
+ cache: new Core({ name: 'cachemap', type: 'GRAPHQL' }),
9
8
  });
package/src/constants.ts CHANGED
@@ -75,9 +75,9 @@ export const RAW_WATCH_PROVIDERS = 'watch/providers' as const;
75
75
 
76
76
  export enum ResolverType {
77
77
  Args = 'ARGS',
78
+ NoObjArgs = 'NO_OBJ_ARGS',
78
79
  Obj = 'OBJ',
79
- ObjAndArgs = 'OBJ_AND_ARGS',
80
- OptsObjAndArgs = 'OPTS_OBJ_AND_ARGS',
80
+ ObjArgs = 'OBJ_ARGS',
81
81
  }
82
82
 
83
83
  export enum Source {
@@ -1,7 +1,8 @@
1
- import { GraphQLError, type GraphQLResolveInfo } from 'graphql';
1
+ import { type GraphQLResolveInfo } from 'graphql';
2
2
  import crypto from 'node:crypto';
3
3
  import { ResolverType, type Source } from '../constants.ts';
4
4
  import { type Context } from '../types.ts';
5
+ import { executeResolver } from './executeResolver.ts';
5
6
 
6
7
  export const buildArgsResolver =
7
8
  <Args extends object, Data>(
@@ -10,7 +11,7 @@ export const buildArgsResolver =
10
11
  args: Args,
11
12
  ctx: Context,
12
13
  info: GraphQLResolveInfo
13
- ) => Promise<{ data?: Data; errors?: Error[]; headers: Headers; source?: Source }>
14
+ ) => Promise<{ data?: Data; headers: Headers; source?: Source }>
14
15
  ) =>
15
16
  async (_obj: undefined, args: Args, ctx: Context, info: GraphQLResolveInfo) => {
16
17
  const { logger, setCacheMetadata } = ctx;
@@ -19,6 +20,8 @@ export const buildArgsResolver =
19
20
  const newCtx = {
20
21
  ...ctx,
21
22
  data: {
23
+ // This does not make sense in this instance
24
+ // eslint-disable-next-line unicorn/consistent-destructuring
22
25
  ...ctx.data,
23
26
  args,
24
27
  fieldPath: fieldName,
@@ -30,17 +33,12 @@ export const buildArgsResolver =
30
33
  const childLogger = logger.child(newCtx.data);
31
34
 
32
35
  childLogger.info(`Resolving ${fieldName} ${JSON.stringify(args)}`, { logEntryName: 'RESOLVER_START' });
33
- const { data, errors, headers } = await callback(args, newCtx, info);
34
36
 
35
- if (errors?.length) {
36
- const message = `Failed to resolve ${fieldName}`;
37
- childLogger.error(message, { errors: JSON.stringify(errors), logEntryName: 'RESOLVER_FAILED' });
38
- throw new GraphQLError(message, { nodes: fieldNodes, originalError: errors[0] });
39
- }
40
-
41
- if (headers.has('cache-control')) {
42
- setCacheMetadata(data, info, headers);
43
- }
44
-
45
- return data;
37
+ return executeResolver({
38
+ callback: () => callback(args, newCtx, info),
39
+ fieldNodes,
40
+ fieldPath: fieldName,
41
+ logger: childLogger,
42
+ setCacheMetadata: (data, headers) => setCacheMetadata(data, info, headers),
43
+ });
46
44
  };
@@ -1,15 +1,13 @@
1
- import { GraphQLError, type GraphQLResolveInfo } from 'graphql';
1
+ import { type GraphQLResolveInfo } from 'graphql';
2
2
  import crypto from 'node:crypto';
3
3
  import { ResolverType, type Source } from '../constants.ts';
4
4
  import type { Context } from '../types.ts';
5
+ import { executeResolver } from './executeResolver.ts';
5
6
 
6
7
  export const buildNoObjArgsResolver =
7
8
  <Obj, Data>(
8
9
  parentFieldName: string,
9
- callback: (
10
- ctx: Context,
11
- info: GraphQLResolveInfo
12
- ) => Promise<{ data?: Data; errors?: Error[]; headers: Headers; source?: Source }>
10
+ callback: (ctx: Context, info: GraphQLResolveInfo) => Promise<{ data?: Data; headers: Headers; source?: Source }>
13
11
  ) =>
14
12
  async (obj: Obj | undefined, _args: undefined, ctx: Context, info: GraphQLResolveInfo) => {
15
13
  const { logger, setCacheMetadata } = ctx;
@@ -19,27 +17,24 @@ export const buildNoObjArgsResolver =
19
17
  const newCtx = {
20
18
  ...ctx,
21
19
  data: {
20
+ // This does not make sense in this instance
21
+ // eslint-disable-next-line unicorn/consistent-destructuring
22
22
  ...ctx.data,
23
23
  args: undefined,
24
24
  fieldPath,
25
25
  resolverRequestId: crypto.randomUUID(),
26
- resolverType: ResolverType.OptsObjAndArgs,
26
+ resolverType: ResolverType.NoObjArgs,
27
27
  },
28
28
  };
29
29
 
30
30
  const childLogger = logger.child(newCtx.data);
31
31
  childLogger.info(`Resolving ${fieldPath}`, { logEntryName: 'RESOLVER_START' });
32
- const { data, errors, headers } = await callback(newCtx, info);
33
32
 
34
- if (errors?.length) {
35
- const message = `Failed to resolve ${fieldPath}`;
36
- childLogger.error(message, { errors: JSON.stringify(errors), logEntryName: 'RESOLVER_FAILED' });
37
- throw new GraphQLError(message, { nodes: fieldNodes, originalError: errors[0] });
38
- }
39
-
40
- if (headers.has('cache-control')) {
41
- setCacheMetadata(data, info, headers);
42
- }
43
-
44
- return data;
33
+ return executeResolver({
34
+ callback: () => callback(newCtx, info),
35
+ fieldNodes,
36
+ fieldPath,
37
+ logger: childLogger,
38
+ setCacheMetadata: (data, headers) => setCacheMetadata(data, info, headers),
39
+ });
45
40
  };
@@ -1,8 +1,9 @@
1
- import { GraphQLError, type GraphQLResolveInfo } from 'graphql';
1
+ import { type GraphQLResolveInfo } from 'graphql';
2
2
  import { isUndefined, snakeCase } from 'lodash-es';
3
3
  import crypto from 'node:crypto';
4
4
  import { ResolverType, type Source } from '../constants.ts';
5
5
  import { type Context } from '../types.ts';
6
+ import { executeResolver } from './executeResolver.ts';
6
7
 
7
8
  export const buildObjArgsResolver =
8
9
  <Obj extends object, Args extends object, Data>(
@@ -12,7 +13,7 @@ export const buildObjArgsResolver =
12
13
  args: Args,
13
14
  ctx: Context,
14
15
  info: GraphQLResolveInfo
15
- ) => Promise<{ data?: Data; errors?: Error[]; headers?: Headers; source?: Source }>
16
+ ) => Promise<{ data?: Data; headers?: Headers; source?: Source }>
16
17
  ) =>
17
18
  async (obj: Obj | undefined, args: Args, ctx: Context, info: GraphQLResolveInfo) => {
18
19
  const { logger, setCacheMetadata } = ctx;
@@ -22,11 +23,13 @@ export const buildObjArgsResolver =
22
23
  const newCtx = {
23
24
  ...ctx,
24
25
  data: {
26
+ // This does not make sense in this instance
27
+ // eslint-disable-next-line unicorn/consistent-destructuring
25
28
  ...ctx.data,
26
29
  args: { ...args, id },
27
30
  fieldPath: parentFieldName,
28
31
  resolverRequestId: crypto.randomUUID(),
29
- resolverType: ResolverType.ObjAndArgs,
32
+ resolverType: ResolverType.ObjArgs,
30
33
  },
31
34
  };
32
35
 
@@ -44,21 +47,12 @@ export const buildObjArgsResolver =
44
47
  childLogger.info(enrichLogMessage('Resolving'), { logEntryName: 'RESOLVER_START' });
45
48
  }
46
49
 
47
- const { data, errors, headers } = await callback(obj, args, newCtx, info);
48
-
49
- if (errors?.length) {
50
- const message = enrichLogMessage('Failed to resolve');
51
-
52
- if (loggingEnabled) {
53
- childLogger.error(message, { errors: JSON.stringify(errors), logEntryName: 'RESOLVER_FAILED' });
54
- }
55
-
56
- throw new GraphQLError(message, { nodes: fieldNodes, originalError: errors[0] });
57
- }
58
-
59
- if (headers?.has('cache-control')) {
60
- setCacheMetadata(data, info, headers);
61
- }
62
-
63
- return data;
50
+ return executeResolver({
51
+ callback: () => callback(obj, args, newCtx, info),
52
+ fieldNodes,
53
+ fieldPath: fieldName,
54
+ logger: childLogger,
55
+ setCacheMetadata: (data, headers) => setCacheMetadata(data, info, headers),
56
+ suppressLogging: !loggingEnabled,
57
+ });
64
58
  };
@@ -2,6 +2,7 @@ import { GraphQLError, type GraphQLResolveInfo } from 'graphql';
2
2
  import crypto from 'node:crypto';
3
3
  import { ResolverType, type Source } from '../constants.ts';
4
4
  import { type Context } from '../types.ts';
5
+ import { executeResolver } from './executeResolver.ts';
5
6
 
6
7
  export const buildObjResolver =
7
8
  <Obj extends { id: number | string }, Data>(
@@ -10,7 +11,7 @@ export const buildObjResolver =
10
11
  obj: Obj,
11
12
  ctx: Context,
12
13
  info: GraphQLResolveInfo
13
- ) => Promise<{ data?: Data; errors?: Error[]; headers?: Headers; source?: Source }>
14
+ ) => Promise<{ data?: Data; headers?: Headers; source?: Source }>
14
15
  ) =>
15
16
  async (obj: Obj | undefined, _args: undefined, ctx: Context, info: GraphQLResolveInfo) => {
16
17
  const { logger, setCacheMetadata } = ctx;
@@ -20,6 +21,8 @@ export const buildObjResolver =
20
21
  const newCtx = {
21
22
  ...ctx,
22
23
  data: {
24
+ // This does not make sense in this instance
25
+ // eslint-disable-next-line unicorn/consistent-destructuring
23
26
  ...ctx.data,
24
27
  args: obj?.id ? { id: obj.id } : undefined,
25
28
  fieldPath,
@@ -37,17 +40,12 @@ export const buildObjResolver =
37
40
  }
38
41
 
39
42
  childLogger.info(`Resolving ${fieldPath}`, { logEntryName: 'RESOLVER_START' });
40
- const { data, errors, headers } = await callback(obj, newCtx, info);
41
43
 
42
- if (errors?.length) {
43
- const message = `Failed to resolve ${fieldPath}`;
44
- childLogger.error(message, { errors: JSON.stringify(errors), logEntryName: 'RESOLVER_FAILED' });
45
- throw new GraphQLError(message, { nodes: fieldNodes, originalError: errors[0] });
46
- }
47
-
48
- if (headers?.has('cache-control')) {
49
- setCacheMetadata(data, info, headers);
50
- }
51
-
52
- return data;
44
+ return executeResolver({
45
+ callback: () => callback(obj, newCtx, info),
46
+ fieldNodes,
47
+ fieldPath,
48
+ logger: childLogger,
49
+ setCacheMetadata: (data, headers) => setCacheMetadata(data, info, headers),
50
+ });
53
51
  };
@@ -0,0 +1,39 @@
1
+ import { type FieldNode, GraphQLError } from 'graphql';
2
+ import { type Logger } from 'winston';
3
+
4
+ export type ExecuteResolverArgs<Data> = {
5
+ callback: () => Promise<{ data?: Data; headers?: Headers }>;
6
+ fieldNodes: readonly FieldNode[];
7
+ fieldPath: string;
8
+ logger: Logger;
9
+ setCacheMetadata: (data: unknown, headers: Headers) => void;
10
+ suppressLogging?: boolean;
11
+ };
12
+
13
+ export const executeResolver = async <Data>({
14
+ callback,
15
+ fieldNodes,
16
+ fieldPath,
17
+ logger,
18
+ setCacheMetadata,
19
+ suppressLogging,
20
+ }: ExecuteResolverArgs<Data>) => {
21
+ try {
22
+ const { data, headers } = await callback();
23
+
24
+ if (headers?.has('cache-control')) {
25
+ setCacheMetadata(data, headers);
26
+ }
27
+
28
+ return data;
29
+ } catch (error) {
30
+ const message = `Failed to resolve ${fieldPath}`;
31
+ const originalError = error instanceof Error ? error : new Error(message, { cause: error });
32
+
33
+ if (!suppressLogging) {
34
+ logger.error(message, { error: originalError, logEntryName: 'RESOLVER_FAILED' });
35
+ }
36
+
37
+ throw new GraphQLError(message, { nodes: fieldNodes, originalError });
38
+ }
39
+ };
@@ -26,9 +26,9 @@ describe('resolveCertifications >', () => {
26
26
 
27
27
  const info = {} as GraphQLResolveInfo;
28
28
 
29
- afterEach(async () => {
29
+ afterEach(() => {
30
30
  mockedFetch.mockReset();
31
- await context.restClient.cache?.clear();
31
+ context.restClient.cache?.clear();
32
32
  jest.clearAllMocks();
33
33
  });
34
34
 
@@ -9,7 +9,7 @@ export const resolveCertifications = buildArgsResolver<QueryCertificationsArgs,
9
9
  const { screenType } = args;
10
10
  const { data: ctxData, restClient } = ctx;
11
11
 
12
- const { data, errors } = await restClient.certifications<RawCertifications>(
12
+ const { data } = await restClient.certifications<RawCertifications>(
13
13
  {
14
14
  pathTemplateData: { type: screenType.toLowerCase() },
15
15
  },
@@ -17,9 +17,8 @@ export const resolveCertifications = buildArgsResolver<QueryCertificationsArgs,
17
17
  );
18
18
 
19
19
  return {
20
- data: data?.certifications,
21
- errors,
22
- headers: new Headers({ cacheControl: 'public, max-age=28800' }),
20
+ data: data.certifications,
21
+ headers: new Headers({ 'cache-control': 'public, max-age=28800' }),
23
22
  };
24
23
  }
25
24
  );
@@ -32,9 +32,9 @@ describe('resolveCollection >', () => {
32
32
  });
33
33
  });
34
34
 
35
- afterEach(async () => {
35
+ afterEach(() => {
36
36
  mockedFetch.mockReset();
37
- await context.restClient.cache?.clear();
37
+ context.restClient.cache?.clear();
38
38
  jest.clearAllMocks();
39
39
  });
40
40
 
@@ -21,7 +21,7 @@ export const resolveCollection = buildObjArgsResolver<
21
21
  };
22
22
  }
23
23
 
24
- const { data, errors, headers } = await restClient.collection<RawCollection>(
24
+ const { data, headers } = await restClient.collection<RawCollection>(
25
25
  {
26
26
  pathTemplateData: { id },
27
27
  },
@@ -29,8 +29,7 @@ export const resolveCollection = buildObjArgsResolver<
29
29
  );
30
30
 
31
31
  return {
32
- data: obj ? data?.[typedFieldName] : data,
33
- errors,
32
+ data: obj ? data[typedFieldName] : data,
34
33
  headers,
35
34
  };
36
35
  });
@@ -30,9 +30,9 @@ describe('resolveCollectionImages >', () => {
30
30
  });
31
31
  });
32
32
 
33
- afterEach(async () => {
33
+ afterEach(() => {
34
34
  mockedFetch.mockReset();
35
- await context.restClient.cache?.clear();
35
+ context.restClient.cache?.clear();
36
36
  jest.clearAllMocks();
37
37
  });
38
38
 
@@ -9,7 +9,7 @@ export const resolveCollectionImages = buildObjResolver<
9
9
  const { data: ctxData, restClient } = ctx;
10
10
  const { fieldName } = info;
11
11
 
12
- const { data, errors, headers } = await restClient.collection<RawCollectionImages>(
12
+ const { data, headers } = await restClient.collection<RawCollectionImages>(
13
13
  {
14
14
  pathTemplateData: { id: obj.id, type: IMAGES },
15
15
  },
@@ -19,8 +19,7 @@ export const resolveCollectionImages = buildObjResolver<
19
19
  const typedFieldName = fieldName as 'backdrops' | 'posters';
20
20
 
21
21
  return {
22
- data: data?.[typedFieldName],
23
- errors,
22
+ data: data[typedFieldName],
24
23
  headers,
25
24
  };
26
25
  });
@@ -45,9 +45,9 @@ describe('resolveCollectionTranslations >', () => {
45
45
  });
46
46
  });
47
47
 
48
- afterEach(async () => {
48
+ afterEach(() => {
49
49
  mockedFetch.mockReset();
50
- await context.restClient.cache?.clear();
50
+ context.restClient.cache?.clear();
51
51
  jest.clearAllMocks();
52
52
  });
53
53
 
@@ -7,7 +7,7 @@ export const resolveCollectionTranslations = buildObjResolver<RawCollection, Raw
7
7
  async (obj, ctx) => {
8
8
  const { data: ctxData, restClient } = ctx;
9
9
 
10
- const { data, errors, headers } = await restClient.collection<RawCollectionTranslations>(
10
+ const { data, headers } = await restClient.collection<RawCollectionTranslations>(
11
11
  {
12
12
  pathTemplateData: { id: obj.id, type: TRANSLATIONS },
13
13
  },
@@ -15,8 +15,7 @@ export const resolveCollectionTranslations = buildObjResolver<RawCollection, Raw
15
15
  );
16
16
 
17
17
  return {
18
- data: data?.translations,
19
- errors,
18
+ data: data.translations,
20
19
  headers,
21
20
  };
22
21
  }
@@ -32,9 +32,9 @@ describe('resolveCompany >', () => {
32
32
  });
33
33
  });
34
34
 
35
- afterEach(async () => {
35
+ afterEach(() => {
36
36
  mockedFetch.mockReset();
37
- await context.restClient.cache?.clear();
37
+ context.restClient.cache?.clear();
38
38
  jest.clearAllMocks();
39
39
  });
40
40
 
@@ -21,7 +21,7 @@ export const resolveCompany = buildObjArgsResolver<
21
21
  };
22
22
  }
23
23
 
24
- const { data, errors, headers } = await restClient.company<RawCompany>(
24
+ const { data, headers } = await restClient.company<RawCompany>(
25
25
  {
26
26
  pathTemplateData: { id },
27
27
  },
@@ -29,8 +29,7 @@ export const resolveCompany = buildObjArgsResolver<
29
29
  );
30
30
 
31
31
  return {
32
- data: obj ? data?.[typedFieldName] : data,
33
- errors,
32
+ data: obj ? data[typedFieldName] : data,
34
33
  headers,
35
34
  };
36
35
  });
@@ -48,9 +48,9 @@ describe('resolveCompanyAlternativeNames >', () => {
48
48
  });
49
49
  });
50
50
 
51
- afterEach(async () => {
51
+ afterEach(() => {
52
52
  mockedFetch.mockReset();
53
- await context.restClient.cache?.clear();
53
+ context.restClient.cache?.clear();
54
54
  jest.clearAllMocks();
55
55
  });
56
56
 
@@ -8,7 +8,7 @@ export const resolveCompanyAlternativeNames = buildObjResolver<RawCollection, Ra
8
8
  async (obj, ctx) => {
9
9
  const { data: ctxData, restClient } = ctx;
10
10
 
11
- const { data, errors, headers } = await restClient.company<RawCompanyAlternativeNames>(
11
+ const { data, headers } = await restClient.company<RawCompanyAlternativeNames>(
12
12
  {
13
13
  pathTemplateData: { id: obj.id, type: snakeCase(ALTERNATIVE_NAMES) },
14
14
  },
@@ -16,8 +16,7 @@ export const resolveCompanyAlternativeNames = buildObjResolver<RawCollection, Ra
16
16
  );
17
17
 
18
18
  return {
19
- data: data?.results,
20
- errors,
19
+ data: data.results,
21
20
  headers,
22
21
  };
23
22
  }
@@ -45,9 +45,9 @@ describe('resolveCompanyImages >', () => {
45
45
  });
46
46
  });
47
47
 
48
- afterEach(async () => {
48
+ afterEach(() => {
49
49
  mockedFetch.mockReset();
50
- await context.restClient.cache?.clear();
50
+ context.restClient.cache?.clear();
51
51
  jest.clearAllMocks();
52
52
  });
53
53
 
@@ -5,7 +5,7 @@ import type { RawCompany, RawCompanyLogos } from '../types.ts';
5
5
  export const resolveCompanyLogos = buildObjResolver<RawCompany, RawCompanyLogos['logos']>(COMPANY, async (obj, ctx) => {
6
6
  const { data: ctxData, restClient } = ctx;
7
7
 
8
- const { data, errors, headers } = await restClient.company<RawCompanyLogos>(
8
+ const { data, headers } = await restClient.company<RawCompanyLogos>(
9
9
  {
10
10
  pathTemplateData: { id: obj.id, type: IMAGES },
11
11
  },
@@ -13,8 +13,7 @@ export const resolveCompanyLogos = buildObjResolver<RawCompany, RawCompanyLogos[
13
13
  );
14
14
 
15
15
  return {
16
- data: data?.logos,
17
- errors,
16
+ data: data.logos,
18
17
  headers,
19
18
  };
20
19
  });
@@ -30,9 +30,9 @@ describe('resolveConfiguration >', () => {
30
30
  });
31
31
  });
32
32
 
33
- afterEach(async () => {
33
+ afterEach(() => {
34
34
  mockedFetch.mockReset();
35
- await context.restClient.cache?.clear();
35
+ context.restClient.cache?.clear();
36
36
  jest.clearAllMocks();
37
37
  });
38
38
 
@@ -4,11 +4,10 @@ import { type RawConfiguration } from '../types.ts';
4
4
 
5
5
  export const resolveConfiguration = buildNoObjArgsResolver<undefined, RawConfiguration>(CONFIGURATION, async ctx => {
6
6
  const { data: ctxData, restClient } = ctx;
7
- const { data, errors, headers } = await restClient.configuration<RawConfiguration>(undefined, ctxData);
7
+ const { data, headers } = await restClient.configuration<RawConfiguration>(undefined, ctxData);
8
8
 
9
9
  return {
10
10
  data,
11
- errors,
12
11
  headers,
13
12
  };
14
13
  });
@@ -43,9 +43,9 @@ describe('resolveConfigurationCountries >', () => {
43
43
  });
44
44
  });
45
45
 
46
- afterEach(async () => {
46
+ afterEach(() => {
47
47
  mockedFetch.mockReset();
48
- await context.restClient.cache?.clear();
48
+ context.restClient.cache?.clear();
49
49
  jest.clearAllMocks();
50
50
  });
51
51
 
@@ -7,7 +7,7 @@ export const resolveConfigurationCountries = buildNoObjArgsResolver<RawConfigura
7
7
  async ctx => {
8
8
  const { data: ctxData, restClient } = ctx;
9
9
 
10
- const { data, errors, headers } = await restClient.configuration<RawConfigurationCountries>(
10
+ const { data, headers } = await restClient.configuration<RawConfigurationCountries>(
11
11
  {
12
12
  pathTemplateData: { type: COUNTRIES },
13
13
  },
@@ -16,7 +16,6 @@ export const resolveConfigurationCountries = buildNoObjArgsResolver<RawConfigura
16
16
 
17
17
  return {
18
18
  data,
19
- errors,
20
19
  headers,
21
20
  };
22
21
  }
@@ -43,9 +43,9 @@ describe('resolveConfigurationJobs >', () => {
43
43
  });
44
44
  });
45
45
 
46
- afterEach(async () => {
46
+ afterEach(() => {
47
47
  mockedFetch.mockReset();
48
- await context.restClient.cache?.clear();
48
+ context.restClient.cache?.clear();
49
49
  jest.clearAllMocks();
50
50
  });
51
51
 
@@ -7,7 +7,7 @@ export const resolveConfigurationJobs = buildNoObjArgsResolver<RawConfiguration,
7
7
  async ctx => {
8
8
  const { data: ctxData, restClient } = ctx;
9
9
 
10
- const { data, errors, headers } = await restClient.configuration<RawConfigurationJobs>(
10
+ const { data, headers } = await restClient.configuration<RawConfigurationJobs>(
11
11
  {
12
12
  pathTemplateData: { type: JOBS },
13
13
  },
@@ -16,7 +16,6 @@ export const resolveConfigurationJobs = buildNoObjArgsResolver<RawConfiguration,
16
16
 
17
17
  return {
18
18
  data,
19
- errors,
20
19
  headers,
21
20
  };
22
21
  }