@financial-times/cp-content-pipeline-schema 0.7.13 → 0.7.15
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.
- package/CHANGELOG.md +29 -0
- package/README.md +28 -14
- package/lib/datasources/base.d.ts +1 -1
- package/lib/datasources/capi.d.ts +4 -4
- package/lib/datasources/capi.js +4 -4
- package/lib/datasources/capi.js.map +1 -1
- package/lib/datasources/index.d.ts +5 -5
- package/lib/datasources/index.js +8 -8
- package/lib/datasources/index.js.map +1 -1
- package/lib/datasources/instrumented.d.ts +2 -2
- package/lib/datasources/instrumented.js +2 -2
- package/lib/datasources/instrumented.js.map +1 -1
- package/lib/datasources/origami-image.d.ts +2 -2
- package/lib/datasources/origami-image.js +2 -2
- package/lib/datasources/origami-image.js.map +1 -1
- package/lib/datasources/twitter.d.ts +2 -2
- package/lib/datasources/twitter.js +2 -2
- package/lib/datasources/twitter.js.map +1 -1
- package/lib/datasources/url-management.d.ts +2 -2
- package/lib/datasources/url-management.test.js +6 -6
- package/lib/datasources/url-management.test.js.map +1 -1
- package/lib/fixtures/capiObject.d.ts +1 -1
- package/lib/fixtures/capiPerson.d.ts +1 -1
- package/lib/generated/index.d.ts +1743 -0
- package/lib/generated/index.js +3 -0
- package/lib/generated/index.js.map +1 -0
- package/lib/index.d.ts +6 -7
- package/lib/index.js +16 -61
- package/lib/index.js.map +1 -1
- package/lib/model/Byline.d.ts +3 -2
- package/lib/model/Byline.js +1 -0
- package/lib/model/Byline.js.map +1 -1
- package/lib/model/Byline.test.js +8 -8
- package/lib/model/Byline.test.js.map +1 -1
- package/lib/model/CapiResponse.d.ts +22 -13
- package/lib/model/CapiResponse.js +40 -24
- package/lib/model/CapiResponse.js.map +1 -1
- package/lib/model/CapiResponse.test.js +18 -18
- package/lib/model/CapiResponse.test.js.map +1 -1
- package/lib/model/Concept.d.ts +16 -7
- package/lib/model/Concept.js +32 -8
- package/lib/model/Concept.js.map +1 -1
- package/lib/model/Concept.test.js +15 -15
- package/lib/model/Concept.test.js.map +1 -1
- package/lib/model/Image.d.ts +7 -7
- package/lib/model/Image.js +10 -10
- package/lib/model/Image.js.map +1 -1
- package/lib/model/Image.test.js +22 -22
- package/lib/model/Image.test.js.map +1 -1
- package/lib/model/Picture.d.ts +3 -3
- package/lib/model/Picture.js +2 -2
- package/lib/model/Picture.js.map +1 -1
- package/lib/model/Picture.test.js +3 -3
- package/lib/model/Picture.test.js.map +1 -1
- package/lib/model/RichText.d.ts +16 -0
- package/lib/model/RichText.js +45 -0
- package/lib/model/RichText.js.map +1 -0
- package/lib/{typedefs/richText.test.js → model/RichText.test.js} +13 -23
- package/lib/model/RichText.test.js.map +1 -0
- package/lib/model/Topper.d.ts +13 -13
- package/lib/model/Topper.js +29 -21
- package/lib/model/Topper.js.map +1 -1
- package/lib/model/Topper.test.js +61 -61
- package/lib/model/Topper.test.js.map +1 -1
- package/lib/model/schemas/capi/article.d.ts +5 -5
- package/lib/model/schemas/capi/article.js +4 -4
- package/lib/model/schemas/capi/article.js.map +1 -1
- package/lib/model/schemas/capi/audio.js +4 -4
- package/lib/model/schemas/capi/audio.js.map +1 -1
- package/lib/model/schemas/capi/base-schema.d.ts +8 -8
- package/lib/model/schemas/capi/base-schema.js +1 -0
- package/lib/model/schemas/capi/base-schema.js.map +1 -1
- package/lib/model/schemas/capi/content-package.d.ts +5 -5
- package/lib/model/schemas/capi/content-package.js +4 -4
- package/lib/model/schemas/capi/content-package.js.map +1 -1
- package/lib/model/schemas/capi/index.d.ts +2 -2
- package/lib/model/schemas/capi/index.js +11 -11
- package/lib/model/schemas/capi/index.js.map +1 -1
- package/lib/model/schemas/capi/live-blog-package.d.ts +5 -5
- package/lib/model/schemas/capi/live-blog-package.js +4 -4
- package/lib/model/schemas/capi/live-blog-package.js.map +1 -1
- package/lib/model/schemas/capi/video.js +2 -2
- package/lib/model/schemas/capi/video.js.map +1 -1
- package/lib/resolvers/concept.d.ts +5 -0
- package/lib/resolvers/concept.js +16 -0
- package/lib/resolvers/concept.js.map +1 -0
- package/lib/resolvers/content-tree/Workarounds.js.map +1 -0
- package/lib/{content-tree → resolvers/content-tree}/bodyXMLToTree.d.ts +1 -1
- package/lib/resolvers/content-tree/bodyXMLToTree.js.map +1 -0
- package/lib/{content-tree → resolvers/content-tree}/bodyXMLToTree.test.js +13 -13
- package/lib/resolvers/content-tree/bodyXMLToTree.test.js.map +1 -0
- package/lib/{content-tree → resolvers/content-tree}/nodePredicates.d.ts +1 -1
- package/lib/resolvers/content-tree/nodePredicates.js.map +1 -0
- package/lib/resolvers/content-tree/references/Flourish.d.ts +10 -0
- package/lib/resolvers/content-tree/references/Flourish.js +33 -0
- package/lib/resolvers/content-tree/references/Flourish.js.map +1 -0
- package/lib/{content-tree → resolvers/content-tree}/references/Flourish.test.js +6 -7
- package/lib/resolvers/content-tree/references/Flourish.test.js.map +1 -0
- package/lib/resolvers/content-tree/references/ImageSet.d.ts +4 -0
- package/lib/resolvers/content-tree/references/ImageSet.js +14 -0
- package/lib/resolvers/content-tree/references/ImageSet.js.map +1 -0
- package/lib/resolvers/content-tree/references/LayoutImage.d.ts +4 -0
- package/lib/resolvers/content-tree/references/LayoutImage.js +26 -0
- package/lib/resolvers/content-tree/references/LayoutImage.js.map +1 -0
- package/lib/resolvers/content-tree/references/RawImage.d.ts +6 -0
- package/lib/{content-tree → resolvers/content-tree}/references/RawImage.js +8 -18
- package/lib/resolvers/content-tree/references/RawImage.js.map +1 -0
- package/lib/resolvers/content-tree/references/Recommended.d.ts +3 -0
- package/lib/resolvers/content-tree/references/Recommended.js +14 -0
- package/lib/resolvers/content-tree/references/Recommended.js.map +1 -0
- package/lib/resolvers/content-tree/references/Reference.d.ts +4 -0
- package/lib/resolvers/content-tree/references/Reference.js +22 -0
- package/lib/resolvers/content-tree/references/Reference.js.map +1 -0
- package/lib/resolvers/content-tree/references/Reference.test.js +12 -0
- package/lib/resolvers/content-tree/references/Reference.test.js.map +1 -0
- package/lib/resolvers/content-tree/references/Tweet.d.ts +3 -0
- package/lib/resolvers/content-tree/references/Tweet.js +25 -0
- package/lib/resolvers/content-tree/references/Tweet.js.map +1 -0
- package/lib/resolvers/content-tree/references/Video.d.ts +4 -0
- package/lib/resolvers/content-tree/references/Video.js +15 -0
- package/lib/resolvers/content-tree/references/Video.js.map +1 -0
- package/lib/resolvers/content-tree/references/index.d.ts +27 -0
- package/lib/resolvers/content-tree/references/index.js +32 -0
- package/lib/resolvers/content-tree/references/index.js.map +1 -0
- package/lib/resolvers/content-tree/tagMappings.d.ts +7 -0
- package/lib/{content-tree → resolvers/content-tree}/tagMappings.js +49 -38
- package/lib/resolvers/content-tree/tagMappings.js.map +1 -0
- package/lib/resolvers/content-tree/tagMappings.test.d.ts +1 -0
- package/lib/resolvers/content-tree/tagMappings.test.js.map +1 -0
- package/lib/{content-tree → resolvers/content-tree}/updateTreeWithReferenceIds.d.ts +2 -2
- package/lib/{content-tree → resolvers/content-tree}/updateTreeWithReferenceIds.js +3 -2
- package/lib/resolvers/content-tree/updateTreeWithReferenceIds.js.map +1 -0
- package/lib/resolvers/content.d.ts +40 -0
- package/lib/resolvers/content.js +48 -0
- package/lib/resolvers/content.js.map +1 -0
- package/lib/resolvers/core.d.ts +9 -0
- package/lib/resolvers/core.js +23 -0
- package/lib/resolvers/core.js.map +1 -0
- package/lib/resolvers/image.d.ts +16 -0
- package/lib/{typedefs → resolvers}/image.js +7 -63
- package/lib/resolvers/image.js.map +1 -0
- package/lib/resolvers/index.d.ts +136 -0
- package/lib/resolvers/index.js +29 -0
- package/lib/resolvers/index.js.map +1 -0
- package/lib/resolvers/literal-union.js.map +1 -0
- package/lib/resolvers/picture.d.ts +13 -0
- package/lib/{typedefs → resolvers}/picture.js +2 -29
- package/lib/resolvers/picture.js.map +1 -0
- package/lib/resolvers/richText.d.ts +10 -0
- package/lib/resolvers/richText.js +14 -0
- package/lib/resolvers/richText.js.map +1 -0
- package/lib/{typedefs → resolvers}/scalars.d.ts +2 -2
- package/lib/{typedefs → resolvers}/scalars.js +3 -15
- package/lib/resolvers/scalars.js.map +1 -0
- package/lib/resolvers/teaser.d.ts +23 -0
- package/lib/resolvers/teaser.js +31 -0
- package/lib/resolvers/teaser.js.map +1 -0
- package/lib/resolvers/topper.d.ts +31 -0
- package/lib/resolvers/topper.js +36 -0
- package/lib/resolvers/topper.js.map +1 -0
- package/lib/types/cache.d.ts +1 -1
- package/package.json +6 -3
- package/src/datasources/base.ts +1 -1
- package/src/datasources/capi.ts +4 -4
- package/src/datasources/index.ts +5 -5
- package/src/datasources/instrumented.ts +3 -3
- package/src/datasources/origami-image.ts +2 -2
- package/src/datasources/twitter.ts +2 -2
- package/src/datasources/url-management.test.ts +2 -2
- package/src/datasources/url-management.ts +2 -2
- package/src/fixtures/capiObject.ts +1 -1
- package/src/fixtures/capiPerson.ts +1 -1
- package/src/generated/index.ts +1690 -0
- package/src/generated/readme.md +3 -0
- package/src/index.ts +14 -95
- package/src/model/Byline.test.ts +2 -2
- package/src/model/Byline.ts +7 -2
- package/src/model/CapiResponse.test.ts +3 -3
- package/src/model/CapiResponse.ts +61 -26
- package/src/model/Concept.test.ts +3 -3
- package/src/model/Concept.ts +46 -12
- package/src/model/Image.test.ts +3 -3
- package/src/model/Image.ts +10 -10
- package/src/model/Picture.test.ts +3 -3
- package/src/model/Picture.ts +3 -3
- package/src/{typedefs/richText.test.ts → model/RichText.test.ts} +15 -29
- package/src/model/RichText.ts +54 -0
- package/src/model/Topper.test.ts +7 -7
- package/src/model/Topper.ts +34 -25
- package/src/model/__snapshots__/Byline.test.ts.snap +7 -0
- package/src/model/schemas/capi/article.ts +1 -1
- package/src/model/schemas/capi/audio.ts +1 -1
- package/src/model/schemas/capi/base-schema.ts +1 -0
- package/src/model/schemas/capi/content-package.ts +1 -1
- package/src/model/schemas/capi/index.ts +7 -7
- package/src/model/schemas/capi/live-blog-package.ts +1 -1
- package/src/model/schemas/capi/video.ts +1 -1
- package/src/resolvers/concept.ts +19 -0
- package/src/{content-tree → resolvers/content-tree}/bodyXMLToTree.test.ts +2 -2
- package/src/{content-tree → resolvers/content-tree}/bodyXMLToTree.ts +1 -1
- package/src/{content-tree → resolvers/content-tree}/nodePredicates.ts +1 -1
- package/src/{content-tree → resolvers/content-tree}/references/Flourish.test.ts +12 -13
- package/src/{content-tree → resolvers/content-tree}/references/Flourish.ts +6 -30
- package/src/resolvers/content-tree/references/ImageSet.ts +17 -0
- package/src/resolvers/content-tree/references/LayoutImage.ts +27 -0
- package/src/{content-tree → resolvers/content-tree}/references/RawImage.ts +11 -27
- package/src/resolvers/content-tree/references/Recommended.ts +15 -0
- package/src/resolvers/content-tree/references/Reference.test.ts +17 -0
- package/src/resolvers/content-tree/references/Reference.ts +24 -0
- package/src/resolvers/content-tree/references/Tweet.ts +25 -0
- package/src/resolvers/content-tree/references/Video.ts +16 -0
- package/src/resolvers/content-tree/references/index.ts +61 -0
- package/src/{content-tree → resolvers/content-tree}/tagMappings.ts +33 -15
- package/src/{content-tree → resolvers/content-tree}/updateTreeWithReferenceIds.ts +8 -7
- package/src/resolvers/content.ts +60 -0
- package/src/resolvers/core.ts +23 -0
- package/src/resolvers/image.ts +66 -0
- package/src/resolvers/index.ts +26 -0
- package/src/resolvers/picture.ts +38 -0
- package/src/resolvers/richText.ts +15 -0
- package/src/{typedefs → resolvers}/scalars.ts +3 -12
- package/src/resolvers/teaser.ts +33 -0
- package/src/resolvers/topper.ts +58 -0
- package/src/types/cache.ts +1 -1
- package/src/types/internal-content.d.ts +6 -6
- package/src/types/n-display-metadata.d.ts +21 -1
- package/tsconfig.json +3 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/typedefs/concept.graphql +10 -0
- package/typedefs/content.graphql +162 -0
- package/typedefs/core.graphql +7 -0
- package/typedefs/image.graphql +125 -0
- package/typedefs/picture.graphql +39 -0
- package/typedefs/references/flourish.graphql +9 -0
- package/typedefs/references/imageSet.graphql +9 -0
- package/typedefs/references/layoutImage.graphql +4 -0
- package/typedefs/references/rawImage.graphql +4 -0
- package/typedefs/references/recommended.graphql +4 -0
- package/typedefs/references/reference.graphql +3 -0
- package/typedefs/references/tweet.graphql +4 -0
- package/typedefs/references/video.graphql +5 -0
- package/typedefs/richText.graphql +10 -0
- package/typedefs/scalars.graphql +7 -0
- package/typedefs/teaser.graphql +26 -0
- package/typedefs/topper.graphql +135 -0
- package/lib/constants/contentTypes.d.ts +0 -2
- package/lib/constants/contentTypes.js +0 -6
- package/lib/constants/contentTypes.js.map +0 -1
- package/lib/content-tree/Workarounds.js.map +0 -1
- package/lib/content-tree/bodyXMLToTree.js.map +0 -1
- package/lib/content-tree/bodyXMLToTree.test.js.map +0 -1
- package/lib/content-tree/nodePredicates.js.map +0 -1
- package/lib/content-tree/references/Flourish.d.ts +0 -15
- package/lib/content-tree/references/Flourish.js +0 -52
- package/lib/content-tree/references/Flourish.js.map +0 -1
- package/lib/content-tree/references/Flourish.test.js.map +0 -1
- package/lib/content-tree/references/ImageSet.d.ts +0 -3
- package/lib/content-tree/references/ImageSet.js +0 -31
- package/lib/content-tree/references/ImageSet.js.map +0 -1
- package/lib/content-tree/references/LayoutImage.d.ts +0 -3
- package/lib/content-tree/references/LayoutImage.js +0 -39
- package/lib/content-tree/references/LayoutImage.js.map +0 -1
- package/lib/content-tree/references/RawImage.d.ts +0 -4
- package/lib/content-tree/references/RawImage.js.map +0 -1
- package/lib/content-tree/references/Recommended.d.ts +0 -3
- package/lib/content-tree/references/Recommended.js +0 -27
- package/lib/content-tree/references/Recommended.js.map +0 -1
- package/lib/content-tree/references/Reference.d.ts +0 -3
- package/lib/content-tree/references/Reference.js +0 -27
- package/lib/content-tree/references/Reference.js.map +0 -1
- package/lib/content-tree/references/Tweet.d.ts +0 -3
- package/lib/content-tree/references/Tweet.js +0 -38
- package/lib/content-tree/references/Tweet.js.map +0 -1
- package/lib/content-tree/references/Video.d.ts +0 -3
- package/lib/content-tree/references/Video.js +0 -29
- package/lib/content-tree/references/Video.js.map +0 -1
- package/lib/content-tree/references/index.d.ts +0 -27
- package/lib/content-tree/references/index.js +0 -39
- package/lib/content-tree/references/index.js.map +0 -1
- package/lib/content-tree/references/referenceFields.d.ts +0 -1
- package/lib/content-tree/references/referenceFields.js +0 -11
- package/lib/content-tree/references/referenceFields.js.map +0 -1
- package/lib/content-tree/tagMappings.d.ts +0 -4
- package/lib/content-tree/tagMappings.js.map +0 -1
- package/lib/content-tree/tagMappings.test.js.map +0 -1
- package/lib/content-tree/updateTreeWithReferenceIds.js.map +0 -1
- package/lib/typedefs/concept.d.ts +0 -5
- package/lib/typedefs/concept.js +0 -29
- package/lib/typedefs/concept.js.map +0 -1
- package/lib/typedefs/content.d.ts +0 -4
- package/lib/typedefs/content.js +0 -107
- package/lib/typedefs/content.js.map +0 -1
- package/lib/typedefs/image.d.ts +0 -4
- package/lib/typedefs/image.js.map +0 -1
- package/lib/typedefs/literal-union.js.map +0 -1
- package/lib/typedefs/picture.d.ts +0 -14
- package/lib/typedefs/picture.js.map +0 -1
- package/lib/typedefs/richText.d.ts +0 -17
- package/lib/typedefs/richText.js +0 -53
- package/lib/typedefs/richText.js.map +0 -1
- package/lib/typedefs/richText.test.js.map +0 -1
- package/lib/typedefs/scalars.js.map +0 -1
- package/lib/typedefs/teaser.d.ts +0 -4
- package/lib/typedefs/teaser.js +0 -60
- package/lib/typedefs/teaser.js.map +0 -1
- package/lib/typedefs/topper.d.ts +0 -4
- package/lib/typedefs/topper.js +0 -144
- package/lib/typedefs/topper.js.map +0 -1
- package/src/constants/contentTypes.ts +0 -4
- package/src/content-tree/references/ImageSet.ts +0 -41
- package/src/content-tree/references/LayoutImage.ts +0 -48
- package/src/content-tree/references/Recommended.ts +0 -35
- package/src/content-tree/references/Reference.ts +0 -34
- package/src/content-tree/references/Tweet.ts +0 -44
- package/src/content-tree/references/Video.ts +0 -39
- package/src/content-tree/references/index.ts +0 -62
- package/src/content-tree/references/referenceFields.ts +0 -7
- package/src/typedefs/concept.ts +0 -31
- package/src/typedefs/content.ts +0 -113
- package/src/typedefs/image.ts +0 -125
- package/src/typedefs/picture.ts +0 -65
- package/src/typedefs/richText.ts +0 -70
- package/src/typedefs/teaser.ts +0 -65
- package/src/typedefs/topper.ts +0 -159
- /package/lib/{content-tree/bodyXMLToTree.test.d.ts → model/RichText.test.d.ts} +0 -0
- /package/lib/{content-tree → resolvers/content-tree}/Workarounds.d.ts +0 -0
- /package/lib/{content-tree → resolvers/content-tree}/Workarounds.js +0 -0
- /package/lib/{content-tree → resolvers/content-tree}/bodyXMLToTree.js +0 -0
- /package/lib/{content-tree/references/Flourish.test.d.ts → resolvers/content-tree/bodyXMLToTree.test.d.ts} +0 -0
- /package/lib/{content-tree → resolvers/content-tree}/nodePredicates.js +0 -0
- /package/lib/{content-tree/tagMappings.test.d.ts → resolvers/content-tree/references/Flourish.test.d.ts} +0 -0
- /package/lib/{typedefs/richText.test.d.ts → resolvers/content-tree/references/Reference.test.d.ts} +0 -0
- /package/lib/{content-tree → resolvers/content-tree}/tagMappings.test.js +0 -0
- /package/lib/{typedefs → resolvers}/literal-union.d.ts +0 -0
- /package/lib/{typedefs → resolvers}/literal-union.js +0 -0
- /package/src/{typedefs/__snapshots__/richText.test.ts.snap → model/__snapshots__/RichText.test.ts.snap} +0 -0
- /package/src/{content-tree → resolvers/content-tree}/Workarounds.ts +0 -0
- /package/src/{content-tree → resolvers/content-tree}/tagMappings.test.ts +0 -0
- /package/src/{typedefs → resolvers}/literal-union.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.7.15](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-schema-v0.7.14...cp-content-pipeline-schema-v0.7.15) (2023-07-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* throw an explicit operational error for unmappable reference types ([7b1194c](https://github.com/Financial-Times/cp-content-pipeline/commit/7b1194c399ed305014f46b870a249bba9d457919))
|
|
9
|
+
* use mapNodeToReference to get correct GraphQL type for Video reference ([21dc5bf](https://github.com/Financial-Times/cp-content-pipeline/commit/21dc5bf878955d542142f4ce48952ce5eab904d6))
|
|
10
|
+
|
|
11
|
+
## [0.7.14](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-schema-v0.7.13...cp-content-pipeline-schema-v0.7.14) (2023-07-04)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* images render in live blog posts ([3e93ec1](https://github.com/Financial-Times/cp-content-pipeline/commit/3e93ec1c5cb64a6b494558baaff859634a65b1b2))
|
|
17
|
+
* support package intro metadata ([add51b4](https://github.com/Financial-Times/cp-content-pipeline/commit/add51b45333f9e36e75e4f173540f10cbfe43dc2))
|
|
18
|
+
* support podcast metadata ([97e3b57](https://github.com/Financial-Times/cp-content-pipeline/commit/97e3b5780197268cf4457152290ecc743e1f3c56))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* allow Concept.type field to be null ([2ad9bd6](https://github.com/Financial-Times/cp-content-pipeline/commit/2ad9bd63b36549ea987ecc6669fc294f91f8ab8d))
|
|
24
|
+
* avoid runtime error when unreachable code is reached ([f0e1ef2](https://github.com/Financial-Times/cp-content-pipeline/commit/f0e1ef2e4f9167ab3658ca7d98879aa11a89090d))
|
|
25
|
+
* include deep landscape images in LeadImage schema ([dda1433](https://github.com/Financial-Times/cp-content-pipeline/commit/dda1433d6235478b6b56c082cd95894319ca05e4))
|
|
26
|
+
* remove manual args type from Teaser.url ([e5e8fce](https://github.com/Financial-Times/cp-content-pipeline/commit/e5e8fce7c95a08bac025e609edf049616c6d51c0))
|
|
27
|
+
* type n-display-metadata and related resolvers ([f9848c1](https://github.com/Financial-Times/cp-content-pipeline/commit/f9848c11780d81ff8c8656385e13ef01c3704646))
|
|
28
|
+
* use generated resolver types for podcast topper ([6667625](https://github.com/Financial-Times/cp-content-pipeline/commit/6667625ba5226b4b5f040b8c78250d0d8e836e6a))
|
|
29
|
+
* use ImageSet model for MainImage type ([b3ad864](https://github.com/Financial-Times/cp-content-pipeline/commit/b3ad864efc5aa3eca872617492b550044ff085b3))
|
|
30
|
+
* use n-concept-ids to avoid hardcoding package brands ([05fc287](https://github.com/Financial-Times/cp-content-pipeline/commit/05fc2873ca02c282880afb70e482af8bce5a9705))
|
|
31
|
+
|
|
3
32
|
## [0.7.13](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-schema-v0.7.12...cp-content-pipeline-schema-v0.7.13) (2023-06-28)
|
|
4
33
|
|
|
5
34
|
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## What is this?
|
|
4
4
|
|
|
5
|
-
The GraphQL schema, data sources, and business logic for the content pipeline API. It is consumed by the [
|
|
5
|
+
The GraphQL schema, data sources, and business logic for the content pipeline API. It is consumed by the [API package](../api) and not intended for use outside this project.
|
|
6
6
|
|
|
7
7
|
## Usage
|
|
8
8
|
|
|
@@ -21,7 +21,7 @@ const server = new ApolloServer({
|
|
|
21
21
|
})
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
See the [
|
|
24
|
+
See the [API package entry point](../api/src/index.ts) for a more complex example.
|
|
25
25
|
|
|
26
26
|
## How does it work?
|
|
27
27
|
|
|
@@ -37,22 +37,36 @@ import {
|
|
|
37
37
|
} from '@financial-times/cp-content-pipeline-schema'
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
The schema is a collection of type definitions that is exported as `typeDefs`. It defines the 'shape' of queries that are executed against our data.
|
|
40
|
+
The schema is a collection of type definitions that is exported as `typeDefs`. It defines the 'shape' of queries that are executed against our data. These are defined as `.graphql` files in the [`typedefs`](./typedefs/) folder.
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
Resolvers define the technique for fetching the types defined in the schema. The resolvers for each part of the schema are defined in the same file the schema definition is in. They are exported as `resolvers`.
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
are defined in the
|
|
46
|
-
same file the schema definition is in. They are exported as `resolvers`.
|
|
47
|
-
|
|
48
|
-
Data sources are used to fetch data from external sources, such as the content API. These are defined in the
|
|
49
|
-
[data sources directory](src/datasources). Its type is exported as `DataSources`, its factory function is exported as
|
|
44
|
+
Data sources are used to fetch data from external sources, such as the content API. These are defined in the [data sources directory](src/datasources). Its type is exported as `DataSources`, its factory function is exported as
|
|
50
45
|
`dataSources`.
|
|
51
46
|
|
|
52
47
|
The `QueryContext` type defines the context object sent to each resolver function.
|
|
53
48
|
|
|
54
|
-
The
|
|
55
|
-
|
|
49
|
+
The models contain the business logic gluing the data sources and resolvers together. They're defined in the [model](src/model) directory and consumed by the resolvers.
|
|
50
|
+
|
|
51
|
+
## Resolver typechecking
|
|
52
|
+
|
|
53
|
+
To make sure the data we're returning in resolvers is what's expected by the GraphQL schema, we use [GraphQL Code Generator](https://graphql-codegen.com) with the [TypeScript Resolvers](https://the-guild.dev/graphql/codegen/plugins/typescript/typescript-resolvers) plugin to output TypeScript types for the expected function signatures for the resolvers. This prevents runtime GraphQL errors caused by unexpected data being returned.
|
|
54
|
+
|
|
55
|
+
Because we use models in the schema to encapsulate business logic, our resolvers need to be returning the model types and accepting them as their parent object, instead of the plain GraphQL objects.
|
|
56
|
+
|
|
57
|
+
For example, the `Teaser.metaLink` field is specified in the schema as the `Concept` GraphQL type, but we use the [`Concept` _model_](./src/model/Concept.ts) for it internally, so the `Teaser.metaLink` resolver returns an instance of that model, and `Concepts`'s resolvers are passed that instance as their `parent` argument.
|
|
58
|
+
|
|
59
|
+
We need to let GraphQL Code Generator know how to map the GraphQL types to our models, where needed, so the generated resolver types correctly expect models, not GraphQL types. This is done via the [`mappers` option](https://the-guild.dev/graphql/codegen/plugins/typescript/typescript-resolvers#use-your-model-types-mappers) in the [config file](../../codegen.js). This is an object whose keys are names of GraphQL types, and values are specifiers for an import of a model type. For the `Concept` example, this looks like:
|
|
60
|
+
|
|
61
|
+
```js
|
|
62
|
+
{
|
|
63
|
+
Concept: '../model/Concept#Concept as ConceptModel'
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The `as ConceptModel` aliasing is to make sure the name doesn't collide with the `Concept` GraphQL type in the generated code.
|
|
68
|
+
|
|
69
|
+
GraphQL Code Generator is also [used to generate the client library](../client/README.md#how-this-package-is-produced).
|
|
56
70
|
|
|
57
71
|
## Content Tree
|
|
58
72
|
|
|
@@ -70,9 +84,9 @@ As of January 2023, the `content-tree` spec defines everything that can appear i
|
|
|
70
84
|
|
|
71
85
|
As of January 2023, the `bodyTree` property is not yet being published to the Content API, so we must convert the `bodyXML` field to a valid content tree.
|
|
72
86
|
|
|
73
|
-
This is done by the [bodyXMLtoTree](src/content-tree/bodyXMLToTree.ts) function. This function uses [cheerio](https://cheerio.js.org/) to parse the XML, and then traverses through the nodes, converting each one to a `content-tree` node.
|
|
87
|
+
This is done by the [bodyXMLtoTree](src/resolvers/content-tree/bodyXMLToTree.ts) function. This function uses [cheerio](https://cheerio.js.org/) to parse the XML, and then traverses through the nodes, converting each one to a `content-tree` node.
|
|
74
88
|
|
|
75
|
-
In order to know how to convert the XML nodes to a `content-tree` one, we provide this function some [tagMappings](src/content-tree/tagMappings.ts).
|
|
89
|
+
In order to know how to convert the XML nodes to a `content-tree` one, we provide this function some [tagMappings](src/resolvers/content-tree/tagMappings.ts).
|
|
76
90
|
|
|
77
91
|
### What are references?
|
|
78
92
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { WillSendRequestOptions } from '@apollo/datasource-rest';
|
|
2
|
-
import { CapiResponse } from '../model/CapiResponse
|
|
3
|
-
import { InstrumentedRESTDataSource } from './instrumented
|
|
4
|
-
import { CapiPerson } from '../types/internal-content
|
|
5
|
-
import { CacheOptions } from '@apollo/datasource-rest/dist/RESTDataSource
|
|
2
|
+
import { CapiResponse } from '../model/CapiResponse';
|
|
3
|
+
import { InstrumentedRESTDataSource } from './instrumented';
|
|
4
|
+
import { CapiPerson } from '../types/internal-content';
|
|
5
|
+
import { CacheOptions } from '@apollo/datasource-rest/dist/RESTDataSource';
|
|
6
6
|
export declare class CapiDataSource extends InstrumentedRESTDataSource {
|
|
7
7
|
baseURL: string;
|
|
8
8
|
capiKey: string;
|
package/lib/datasources/capi.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CapiDataSource = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const CapiResponse_1 = require("../model/CapiResponse");
|
|
5
|
+
const instrumented_1 = require("./instrumented");
|
|
6
6
|
const errors_1 = require("@dotcom-reliability-kit/errors");
|
|
7
7
|
const log_error_1 = require("@dotcom-reliability-kit/log-error");
|
|
8
8
|
function flattenFormattedZodIssues(issues, object, path = [], flattened = []) {
|
|
@@ -35,7 +35,7 @@ function flattenFormattedZodIssues(issues, object, path = [], flattened = []) {
|
|
|
35
35
|
return flattened;
|
|
36
36
|
}
|
|
37
37
|
const REQUEST_TIMEOUT = 5000; // 5 seconds
|
|
38
|
-
class CapiDataSource extends
|
|
38
|
+
class CapiDataSource extends instrumented_1.InstrumentedRESTDataSource {
|
|
39
39
|
constructor() {
|
|
40
40
|
super(...arguments);
|
|
41
41
|
this.baseURL = process.env.CAPI_URL || 'https://api-t.ft.com/';
|
|
@@ -71,7 +71,7 @@ class CapiDataSource extends instrumented_js_1.InstrumentedRESTDataSource {
|
|
|
71
71
|
clearTimeout(this.timeout);
|
|
72
72
|
this.timeout = undefined;
|
|
73
73
|
}
|
|
74
|
-
const model = new
|
|
74
|
+
const model = new CapiResponse_1.CapiResponse(content, this.context);
|
|
75
75
|
/*
|
|
76
76
|
* Check if the incoming data matches the types defined in our data source schema
|
|
77
77
|
* Our data source schema should handle all possible response from CAPI
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capi.js","sourceRoot":"","sources":["../../src/datasources/capi.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"capi.js","sourceRoot":"","sources":["../../src/datasources/capi.ts"],"names":[],"mappings":";;;AACA,wDAAoD;AACpD,iDAA2D;AAG3D,2DAGuC;AACvC,iEAAuE;AAoBvE,SAAS,yBAAyB,CAChC,MAA0B,EAC1B,MAAqB,EACrB,OAAiB,EAAE,EACnB,YAAsB,EAAE;IAExB,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;QAC7B,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CACpD,KAAK,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAC1C,CAAA;QACD,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CACvC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,uBAAuB,CAAC,CACtD,CAAA;QAED,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE;YAC5B,SAAS,CAAC,IAAI,CACZ,GAAG,IAAI,CAAC,IAAI,CACV,GAAG,CACJ,sCAAsC,MAAM,qBAAqB;gBAChE,aAAa;qBACV,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;oBACjB,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAA;oBAC7C,IAAI,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE;wBACrB,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;qBAClB;oBAED,OAAO,EAAE,CAAA;gBACX,CAAC,CAAC;qBACD,IAAI,EAAE,CACZ,CAAA;SACF;QAED,SAAS,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,KAA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AAI,KAAK,YAAY,KAAK,IAAI,CAAC,CAAC,KAAK,YAAY,yBAAgB,CAAC,EAAE;gBAClE,MAAM,IAAI,yBAAgB,CAAC;oBACzB,KAAK,EAAE,KAAK;oBACZ,IAAI,EAAE,+BAA+B;oBACrC,IAAI;iBACL,CAAC,CAAA;aACH;YAED,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,IAAY;QAC1B,IAAI;YACF,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC,CAAA;SACxC;QAAC,OAAO,KAAK,EAAE;YACd,IAAI,KAAK,YAAY,KAAK,EAAE;gBAC1B,MAAM,IAAI,yBAAgB,CAAC;oBACzB,KAAK,EAAE,KAAK;oBACZ,IAAI,EAAE,8BAA8B;iBACrC,CAAC,CAAA;aACH;YAED,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF;AA9HD,wCA8HC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BaseDataSourceOptions } from './base
|
|
2
|
-
import { CapiDataSource } from './capi
|
|
3
|
-
import { OrigamiImageDataSource } from './origami-image
|
|
4
|
-
import { TwitterDataSource } from './twitter
|
|
5
|
-
import { URLManagementDataSource } from './url-management
|
|
1
|
+
import { BaseDataSourceOptions } from './base';
|
|
2
|
+
import { CapiDataSource } from './capi';
|
|
3
|
+
import { OrigamiImageDataSource } from './origami-image';
|
|
4
|
+
import { TwitterDataSource } from './twitter';
|
|
5
|
+
import { URLManagementDataSource } from './url-management';
|
|
6
6
|
export declare const initDataSources: (options: BaseDataSourceOptions) => {
|
|
7
7
|
capi: CapiDataSource;
|
|
8
8
|
origami: OrigamiImageDataSource;
|
package/lib/datasources/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.initDataSources = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
4
|
+
const capi_1 = require("./capi");
|
|
5
|
+
const origami_image_1 = require("./origami-image");
|
|
6
|
+
const twitter_1 = require("./twitter");
|
|
7
|
+
const url_management_1 = require("./url-management");
|
|
8
8
|
const initDataSources = (options) => ({
|
|
9
|
-
capi: new
|
|
10
|
-
origami: new
|
|
11
|
-
vanityUrls: new
|
|
12
|
-
twitter: new
|
|
9
|
+
capi: new capi_1.CapiDataSource(options),
|
|
10
|
+
origami: new origami_image_1.OrigamiImageDataSource(options),
|
|
11
|
+
vanityUrls: new url_management_1.URLManagementDataSource(options),
|
|
12
|
+
twitter: new twitter_1.TwitterDataSource(options),
|
|
13
13
|
});
|
|
14
14
|
exports.initDataSources = initDataSources;
|
|
15
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/datasources/index.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/datasources/index.ts"],"names":[],"mappings":";;;AACA,iCAAuC;AACvC,mDAAwD;AACxD,uCAA6C;AAC7C,qDAA0D;AAEnD,MAAM,eAAe,GAAG,CAAC,OAA8B,EAAE,EAAE,CAAC,CAAC;IAClE,IAAI,EAAE,IAAI,qBAAc,CAAC,OAAO,CAAC;IACjC,OAAO,EAAE,IAAI,sCAAsB,CAAC,OAAO,CAAC;IAC5C,UAAU,EAAE,IAAI,wCAAuB,CAAC,OAAO,CAAC;IAChD,OAAO,EAAE,IAAI,2BAAiB,CAAC,OAAO,CAAC;CACxC,CAAC,CAAA;AALW,QAAA,eAAe,mBAK1B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { WillSendRequestOptions, RESTDataSource, RequestOptions } from '@apollo/datasource-rest';
|
|
2
2
|
import type { FetcherResponse } from '@apollo/utils.fetcher';
|
|
3
|
-
import { QueryContext } from '
|
|
4
|
-
import { BaseDataSource, BaseDataSourceOptions } from './base
|
|
3
|
+
import { QueryContext } from '..';
|
|
4
|
+
import { BaseDataSource, BaseDataSourceOptions } from './base';
|
|
5
5
|
export declare class InstrumentedRESTDataSource extends RESTDataSource implements BaseDataSource {
|
|
6
6
|
startTime?: bigint;
|
|
7
7
|
includeHeadersInLogs: string[];
|
|
@@ -4,10 +4,10 @@ exports.InstrumentedRESTDataSource = void 0;
|
|
|
4
4
|
const datasource_rest_1 = require("@apollo/datasource-rest");
|
|
5
5
|
const utils_keyvaluecache_1 = require("@apollo/utils.keyvaluecache");
|
|
6
6
|
const errors_1 = require("@dotcom-reliability-kit/errors");
|
|
7
|
-
const
|
|
7
|
+
const cache_1 = require("../types/cache");
|
|
8
8
|
class InstrumentedRESTDataSource extends datasource_rest_1.RESTDataSource {
|
|
9
9
|
constructor({ cache, context }) {
|
|
10
|
-
const wrappedCache = new utils_keyvaluecache_1.PrefixingKeyValueCache((0,
|
|
10
|
+
const wrappedCache = new utils_keyvaluecache_1.PrefixingKeyValueCache((0, cache_1.isContextableCache)(cache) ? cache.withContext(context) : cache, 'placeholder_prefix_if_you_see_this_in_redis_something_is_very_wrong:' // can't use `this` yet to get our prefix
|
|
11
11
|
);
|
|
12
12
|
super({
|
|
13
13
|
cache: wrappedCache,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumented.js","sourceRoot":"","sources":["../../src/datasources/instrumented.ts"],"names":[],"mappings":";;;AAAA,6DAIgC;AAEhC,qEAAoE;AAEpE,2DAAqE;AAGrE,
|
|
1
|
+
{"version":3,"file":"instrumented.js","sourceRoot":"","sources":["../../src/datasources/instrumented.ts"],"names":[],"mappings":";;;AAAA,6DAIgC;AAEhC,qEAAoE;AAEpE,2DAAqE;AAGrE,0CAAmD;AAGnD,MAAa,0BACX,SAAQ,gCAAc;IAQtB,YAAY,EAAE,KAAK,EAAE,OAAO,EAAyB;QACnD,MAAM,YAAY,GAAG,IAAI,4CAAsB,CAC7C,IAAA,0B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gBACzC,GAAG,EAAE,QAAQ,CAAC,GAAG;gBACjB,IAAI;aACL,CAAC,CAAA;SACH;IACH,CAAC;CACF;AA/FD,gEA+FC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WillSendRequestOptions } from '@apollo/datasource-rest';
|
|
2
|
-
import { InstrumentedRESTDataSource } from './instrumented
|
|
3
|
-
import { CacheOptions } from '@apollo/datasource-rest/dist/RESTDataSource
|
|
2
|
+
import { InstrumentedRESTDataSource } from './instrumented';
|
|
3
|
+
import { CacheOptions } from '@apollo/datasource-rest/dist/RESTDataSource';
|
|
4
4
|
export declare class OrigamiImageDataSource extends InstrumentedRESTDataSource {
|
|
5
5
|
baseURL: string;
|
|
6
6
|
backendSystemCodes: string[];
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OrigamiImageDataSource = void 0;
|
|
4
4
|
const errors_1 = require("@dotcom-reliability-kit/errors");
|
|
5
|
-
const
|
|
5
|
+
const instrumented_1 = require("./instrumented");
|
|
6
6
|
const REQUEST_TIMEOUT = 5000; // 5 seconds
|
|
7
|
-
class OrigamiImageDataSource extends
|
|
7
|
+
class OrigamiImageDataSource extends instrumented_1.InstrumentedRESTDataSource {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
10
10
|
this.baseURL = 'https://www.ft.com/__origami/service/image/v2';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"origami-image.js","sourceRoot":"","sources":["../../src/datasources/origami-image.ts"],"names":[],"mappings":";;;AACA,2DAGuC;AACvC,
|
|
1
|
+
{"version":3,"file":"origami-image.js","sourceRoot":"","sources":["../../src/datasources/origami-image.ts"],"names":[],"mappings":";;;AACA,2DAGuC;AACvC,iDAA2D;AAG3D,MAAM,eAAe,GAAG,IAAI,CAAA,CAAC,YAAY;AAEzC,MAAa,sBAAuB,SAAQ,yCAA0B;IAAtE;;QACE,YAAO,GAAG,+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B;oBACnG,UAAU,EAAE,GAAG;oBACf,gBAAgB,EAAE,IAAI,CAAC,kBAAkB;iBAC1C,CAAC,CAAA;aACH;YAED,IAAI,KAAK,YAAY,KAAK,EAAE;gBAC1B,MAAM,IAAI,yBAAgB,CAAC;oBACzB,KAAK,EAAE,KAAK;oBACZ,IAAI,EAAE,yCAAyC;iBAChD,CAAC,CAAA;aACH;YAED,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF;AAzDD,wDAyDC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CacheOptions, WillSendRequestOptions } from '@apollo/datasource-rest/dist/RESTDataSource
|
|
2
|
-
import { InstrumentedRESTDataSource } from './instrumented
|
|
1
|
+
import { CacheOptions, WillSendRequestOptions } from '@apollo/datasource-rest/dist/RESTDataSource';
|
|
2
|
+
import { InstrumentedRESTDataSource } from './instrumented';
|
|
3
3
|
export declare class TwitterDataSource extends InstrumentedRESTDataSource {
|
|
4
4
|
baseURL: string;
|
|
5
5
|
backendSystemCodes: string[];
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TwitterDataSource = void 0;
|
|
4
4
|
const errors_1 = require("@dotcom-reliability-kit/errors");
|
|
5
|
-
const
|
|
5
|
+
const instrumented_1 = require("./instrumented");
|
|
6
6
|
const REQUEST_TIMEOUT = 5000; // 5 seconds
|
|
7
|
-
class TwitterDataSource extends
|
|
7
|
+
class TwitterDataSource extends instrumented_1.InstrumentedRESTDataSource {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
10
10
|
this.baseURL = 'https://publish.twitter.com';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"twitter.js","sourceRoot":"","sources":["../../src/datasources/twitter.ts"],"names":[],"mappings":";;;AAIA,2DAGuC;AACvC,
|
|
1
|
+
{"version":3,"file":"twitter.js","sourceRoot":"","sources":["../../src/datasources/twitter.ts"],"names":[],"m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C;oBACzB,KAAK,EAAE,KAAK;oBACZ,IAAI,EAAE,gCAAgC;iBACvC,CAAC,CAAA;aACH;YAED,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;IAED,eAAe;QACb,iFAAiF;QACjF,oFAAoF;QACpF,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,CAAA;IACtB,CAAC;CACF;AArDD,8CAqDC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { KeyValueCache } from '@apollo/utils.keyvaluecache';
|
|
2
|
-
import { QueryContext } from '
|
|
3
|
-
import { BaseDataSource, BaseDataSourceOptions } from './base
|
|
2
|
+
import { QueryContext } from '..';
|
|
3
|
+
import { BaseDataSource, BaseDataSourceOptions } from './base';
|
|
4
4
|
export declare class URLManagementDataSource implements BaseDataSource {
|
|
5
5
|
memoizedResults: Map<string, Promise<string>>;
|
|
6
6
|
cache: KeyValueCache;
|
|
@@ -7,7 +7,7 @@ globals_1.jest.mock('@financial-times/n-url-management-api-read-client', () => (
|
|
|
7
7
|
get: globals_1.jest.fn(),
|
|
8
8
|
init: globals_1.jest.fn(),
|
|
9
9
|
}));
|
|
10
|
-
const
|
|
10
|
+
const url_management_1 = require("./url-management");
|
|
11
11
|
const n_url_management_api_read_client_1 = __importDefault(require("@financial-times/n-url-management-api-read-client"));
|
|
12
12
|
const utils_keyvaluecache_1 = require("@apollo/utils.keyvaluecache");
|
|
13
13
|
const globals_1 = require("@jest/globals");
|
|
@@ -18,12 +18,12 @@ describe('URL management data source', () => {
|
|
|
18
18
|
globals_1.jest.resetAllMocks();
|
|
19
19
|
});
|
|
20
20
|
it('only initialises the client library once', () => {
|
|
21
|
-
new
|
|
21
|
+
new url_management_1.URLManagementDataSource({
|
|
22
22
|
context,
|
|
23
23
|
cache: new utils_keyvaluecache_1.InMemoryLRUCache(),
|
|
24
24
|
});
|
|
25
25
|
expect(n_url_management_api_read_client_1.default.init).toHaveBeenCalledTimes(1);
|
|
26
|
-
new
|
|
26
|
+
new url_management_1.URLManagementDataSource({
|
|
27
27
|
context,
|
|
28
28
|
cache: new utils_keyvaluecache_1.InMemoryLRUCache(),
|
|
29
29
|
});
|
|
@@ -33,7 +33,7 @@ describe('URL management data source', () => {
|
|
|
33
33
|
getMock.mockResolvedValue({
|
|
34
34
|
toURL: 'vanity.url',
|
|
35
35
|
});
|
|
36
|
-
const dataSource = new
|
|
36
|
+
const dataSource = new url_management_1.URLManagementDataSource({
|
|
37
37
|
context,
|
|
38
38
|
cache: new utils_keyvaluecache_1.InMemoryLRUCache(),
|
|
39
39
|
});
|
|
@@ -44,7 +44,7 @@ describe('URL management data source', () => {
|
|
|
44
44
|
it('gets subsequent requests from the cache', async () => {
|
|
45
45
|
getMock.mockImplementation((fromUrl) => Promise.resolve({ toURL: `${fromUrl}.vanity` }));
|
|
46
46
|
const cache = new utils_keyvaluecache_1.InMemoryLRUCache();
|
|
47
|
-
const dataSource = new
|
|
47
|
+
const dataSource = new url_management_1.URLManagementDataSource({ context, cache });
|
|
48
48
|
const firstRequest = await dataSource.get('original.url');
|
|
49
49
|
expect(firstRequest).toEqual('original.url.vanity');
|
|
50
50
|
expect(cache['cache'].calculatedSize).toEqual(19); // string length of original.url.vanity
|
|
@@ -60,7 +60,7 @@ describe('URL management data source', () => {
|
|
|
60
60
|
it('memoizes requests made in the same query', async () => {
|
|
61
61
|
getMock.mockImplementation((fromUrl) => Promise.resolve({ toURL: `${fromUrl}.vanity` }));
|
|
62
62
|
const cache = new utils_keyvaluecache_1.InMemoryLRUCache();
|
|
63
|
-
const dataSource = new
|
|
63
|
+
const dataSource = new url_management_1.URLManagementDataSource({ context, cache });
|
|
64
64
|
const firstRequest = dataSource.get('original.url');
|
|
65
65
|
const secondRequest = dataSource.get('original.url');
|
|
66
66
|
const differentRequest = dataSource.get('different.url');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url-management.test.js","sourceRoot":"","sources":["../../src/datasources/url-management.test.ts"],"names":[],"mappings":";;;;;AAAA,cAA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,CAAA;QAC7C,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAA;QACjD,MAAM,CAAC,0CAA2B,CAAC,GAAG,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAA;IAClE,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { InternalContent } from '../types/internal-content
|
|
1
|
+
import { InternalContent } from '../types/internal-content';
|
|
2
2
|
export declare const baseCapiObject: InternalContent;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { CapiPerson } from '../types/internal-content
|
|
1
|
+
import type { CapiPerson } from '../types/internal-content';
|
|
2
2
|
export declare const capiPerson: CapiPerson;
|