diff --git a/Queries/Fragments/ArticleParts.gql b/Queries/Fragments/ArticleParts.gql index 4d768d03..bb12dfa4 100644 --- a/Queries/Fragments/ArticleParts.gql +++ b/Queries/Fragments/ArticleParts.gql @@ -11,6 +11,11 @@ fragment ArticleParts on Post { brandSafety canonicalUrl colorScheme + contentType { + node { + name + } + } excerpt featuredImageSize flags { diff --git a/Schemas/ContentSchema.json b/Schemas/ContentSchema.json index 271d23f3..3f43ce71 100644 --- a/Schemas/ContentSchema.json +++ b/Schemas/ContentSchema.json @@ -51942,6 +51942,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "EMBED_API_DESCRIPT_COM_V2_OEMBED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "EMBED_GFYCAT", "description": null, @@ -52482,6 +52488,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "SHORTCODE_DESCRIPT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "SHORTCODE_EMBED", "description": null, diff --git a/Schemas/ContentSchema.operations.json b/Schemas/ContentSchema.operations.json index 8956fc6a..f4605440 100644 --- a/Schemas/ContentSchema.operations.json +++ b/Schemas/ContentSchema.operations.json @@ -1,7 +1,7 @@ { - "5a4ec5b812aa17556611458bbc51daedbea4b1684e2a20add96fc30ebdf22745": { + "b948e63f10c578e778d99440869123726093c94e877dbbfd9dfea290054f486c": { "name": "Article", - "source": "query Article($id: Int!, $previewTime: Int, $previewToken: String) {\n posts(where: {id: $id, preview: {time: $previewTime, token: $previewToken}}) {\n __typename\n nodes {\n __typename\n ...ArticleParts\n }\n }\n}\nfragment ArticleParts on Post {\n __typename\n ...ArticleTeaserParts\n authors: coAuthors {\n __typename\n nodes {\n __typename\n ...AuthorParts\n }\n }\n blocks {\n __typename\n ...BlockParts\n }\n brandSafety\n canonicalUrl\n colorScheme\n excerpt\n featuredImageSize\n flags {\n __typename\n nodes {\n __typename\n name\n slug\n }\n }\n footnotes\n guides {\n __typename\n nodes {\n __typename\n ...GuideParts\n }\n }\n interactiveSource\n interactiveShowHeader\n locations {\n __typename\n nodes {\n __typename\n name\n }\n }\n metered\n modifiedGmt\n obsessions {\n __typename\n nodes {\n __typename\n ...ObsessionParts\n }\n }\n paywalled\n projects {\n __typename\n nodes {\n __typename\n ...ProjectParts\n }\n }\n readNext\n serieses {\n __typename\n nodes {\n __typename\n ...SeriesParts\n }\n }\n shows {\n __typename\n nodes {\n __typename\n ...ShowParts\n }\n }\n slug\n seoTitle\n socialDescription\n socialImage\n socialTitle\n subtype\n suppressAds\n tags(where: {orderby: COUNT}, last: 20) {\n __typename\n nodes {\n __typename\n id\n name\n slug\n }\n }\n topics {\n __typename\n nodes {\n __typename\n id\n name\n slug\n }\n }\n trackingUrls\n}\nfragment ArticleTeaserParts on Post {\n __typename\n bulletin {\n __typename\n campaign {\n __typename\n id\n logo\n name\n slug\n }\n sponsor {\n __typename\n attribution\n id\n slug\n name\n }\n clientTracking {\n __typename\n article\n elsewhere\n logo\n }\n }\n dateGmt\n editions {\n __typename\n nodes {\n __typename\n name\n slug\n }\n }\n featuredImage {\n __typename\n ...MediaParts\n }\n guides {\n __typename\n nodes {\n __typename\n name\n }\n }\n id\n kicker\n link\n postId\n serieses {\n __typename\n nodes {\n __typename\n name\n }\n }\n title\n trailerVideo {\n __typename\n ...VideoParts\n }\n video {\n __typename\n ...VideoParts\n }\n}\nfragment MediaParts on MediaItem {\n __typename\n altText\n caption\n credit\n id\n mediaDetails {\n __typename\n height\n width\n }\n mediaItemUrl\n sourceUrl\n title\n}\nfragment VideoParts on VideoData {\n __typename\n id\n duration\n episode\n playlistId\n season\n type\n}\nfragment AuthorParts on CoAuthor {\n __typename\n avatar\n bio\n emeritus\n email\n facebook\n firstName\n id\n instagram\n lastName\n linkedin\n name\n organization\n pgp\n shortBio\n title\n twitter\n type\n url\n username\n website\n}\nfragment BlockParts on Block {\n __typename\n attributes {\n __typename\n name\n value\n }\n id\n innerHtml\n tagName\n type\n}\nfragment GuideParts on Guide {\n __typename\n id\n guideId\n hasEssentials\n link\n count\n description\n shortDescription\n name\n slug\n featuredImage {\n __typename\n ...MediaParts\n }\n socialImage {\n __typename\n ...MediaParts\n }\n socialTitle\n colors\n headerImages {\n __typename\n layer\n size\n image {\n __typename\n ...MediaParts\n }\n }\n}\nfragment ObsessionParts on Obsession {\n __typename\n id\n description\n hasEssentials\n headerImage {\n __typename\n ...MediaParts\n }\n link\n name\n shortDescription\n slug\n subtitle\n featuredImage {\n __typename\n ...MediaParts\n }\n sponsor {\n __typename\n name\n campaign {\n __typename\n id\n logo\n logoLink\n }\n }\n}\nfragment ProjectParts on Project {\n __typename\n id\n count\n description\n shortDescription\n link\n name\n slug\n}\nfragment SeriesParts on Series {\n __typename\n colors\n count\n description\n emailListId\n ended\n featuredImage {\n __typename\n ...MediaParts\n }\n headerImages {\n __typename\n layer\n size\n image {\n __typename\n ...MediaParts\n }\n }\n headerVideos {\n __typename\n size\n mp4 {\n __typename\n ...MediaParts\n }\n webm {\n __typename\n ...MediaParts\n }\n poster {\n __typename\n ...MediaParts\n }\n }\n id\n link\n name\n postOrder\n shortDescription\n showToc\n slug\n socialImage {\n __typename\n ...MediaParts\n }\n socialTitle\n}\nfragment ShowParts on Show {\n __typename\n colors\n count\n description\n featuredImage {\n __typename\n ...MediaParts\n }\n headerImages {\n __typename\n layer\n size\n image {\n __typename\n ...MediaParts\n }\n }\n headerVideos {\n __typename\n size\n mp4 {\n __typename\n ...MediaParts\n }\n webm {\n __typename\n ...MediaParts\n }\n poster {\n __typename\n ...MediaParts\n }\n }\n id\n link\n name\n postOrder\n shortDescription\n slug\n socialImage {\n __typename\n ...MediaParts\n }\n}" + "source": "query Article($id: Int!, $previewTime: Int, $previewToken: String) {\n posts(where: {id: $id, preview: {time: $previewTime, token: $previewToken}}) {\n __typename\n nodes {\n __typename\n ...ArticleParts\n }\n }\n}\nfragment ArticleParts on Post {\n __typename\n ...ArticleTeaserParts\n authors: coAuthors {\n __typename\n nodes {\n __typename\n ...AuthorParts\n }\n }\n blocks {\n __typename\n ...BlockParts\n }\n brandSafety\n canonicalUrl\n colorScheme\n contentType {\n __typename\n node {\n __typename\n name\n }\n }\n excerpt\n featuredImageSize\n flags {\n __typename\n nodes {\n __typename\n name\n slug\n }\n }\n footnotes\n guides {\n __typename\n nodes {\n __typename\n ...GuideParts\n }\n }\n interactiveSource\n interactiveShowHeader\n locations {\n __typename\n nodes {\n __typename\n name\n }\n }\n metered\n modifiedGmt\n obsessions {\n __typename\n nodes {\n __typename\n ...ObsessionParts\n }\n }\n paywalled\n projects {\n __typename\n nodes {\n __typename\n ...ProjectParts\n }\n }\n readNext\n serieses {\n __typename\n nodes {\n __typename\n ...SeriesParts\n }\n }\n shows {\n __typename\n nodes {\n __typename\n ...ShowParts\n }\n }\n slug\n seoTitle\n socialDescription\n socialImage\n socialTitle\n subtype\n suppressAds\n tags(where: {orderby: COUNT}, last: 20) {\n __typename\n nodes {\n __typename\n id\n name\n slug\n }\n }\n topics {\n __typename\n nodes {\n __typename\n id\n name\n slug\n }\n }\n trackingUrls\n}\nfragment ArticleTeaserParts on Post {\n __typename\n bulletin {\n __typename\n campaign {\n __typename\n id\n logo\n name\n slug\n }\n sponsor {\n __typename\n attribution\n id\n slug\n name\n }\n clientTracking {\n __typename\n article\n elsewhere\n logo\n }\n }\n dateGmt\n editions {\n __typename\n nodes {\n __typename\n name\n slug\n }\n }\n featuredImage {\n __typename\n ...MediaParts\n }\n guides {\n __typename\n nodes {\n __typename\n name\n }\n }\n id\n kicker\n link\n postId\n serieses {\n __typename\n nodes {\n __typename\n name\n }\n }\n title\n trailerVideo {\n __typename\n ...VideoParts\n }\n video {\n __typename\n ...VideoParts\n }\n}\nfragment MediaParts on MediaItem {\n __typename\n altText\n caption\n credit\n id\n mediaDetails {\n __typename\n height\n width\n }\n mediaItemUrl\n sourceUrl\n title\n}\nfragment VideoParts on VideoData {\n __typename\n id\n duration\n episode\n playlistId\n season\n type\n}\nfragment AuthorParts on CoAuthor {\n __typename\n avatar\n bio\n emeritus\n email\n facebook\n firstName\n id\n instagram\n lastName\n linkedin\n name\n organization\n pgp\n shortBio\n title\n twitter\n type\n url\n username\n website\n}\nfragment BlockParts on Block {\n __typename\n attributes {\n __typename\n name\n value\n }\n id\n innerHtml\n tagName\n type\n}\nfragment GuideParts on Guide {\n __typename\n id\n guideId\n hasEssentials\n link\n count\n description\n shortDescription\n name\n slug\n featuredImage {\n __typename\n ...MediaParts\n }\n socialImage {\n __typename\n ...MediaParts\n }\n socialTitle\n colors\n headerImages {\n __typename\n layer\n size\n image {\n __typename\n ...MediaParts\n }\n }\n}\nfragment ObsessionParts on Obsession {\n __typename\n id\n description\n hasEssentials\n headerImage {\n __typename\n ...MediaParts\n }\n link\n name\n shortDescription\n slug\n subtitle\n featuredImage {\n __typename\n ...MediaParts\n }\n sponsor {\n __typename\n name\n campaign {\n __typename\n id\n logo\n logoLink\n }\n }\n}\nfragment ProjectParts on Project {\n __typename\n id\n count\n description\n shortDescription\n link\n name\n slug\n}\nfragment SeriesParts on Series {\n __typename\n colors\n count\n description\n emailListId\n ended\n featuredImage {\n __typename\n ...MediaParts\n }\n headerImages {\n __typename\n layer\n size\n image {\n __typename\n ...MediaParts\n }\n }\n headerVideos {\n __typename\n size\n mp4 {\n __typename\n ...MediaParts\n }\n webm {\n __typename\n ...MediaParts\n }\n poster {\n __typename\n ...MediaParts\n }\n }\n id\n link\n name\n postOrder\n shortDescription\n showToc\n slug\n socialImage {\n __typename\n ...MediaParts\n }\n socialTitle\n}\nfragment ShowParts on Show {\n __typename\n colors\n count\n description\n featuredImage {\n __typename\n ...MediaParts\n }\n headerImages {\n __typename\n layer\n size\n image {\n __typename\n ...MediaParts\n }\n }\n headerVideos {\n __typename\n size\n mp4 {\n __typename\n ...MediaParts\n }\n webm {\n __typename\n ...MediaParts\n }\n poster {\n __typename\n ...MediaParts\n }\n }\n id\n link\n name\n postOrder\n shortDescription\n slug\n socialImage {\n __typename\n ...MediaParts\n }\n}" }, "b327a579ed9f591ab5b351ca7a9b74130f781278e99f8686d04c3bee90c6ee61": { "name": "ArticlesByAuthor", diff --git a/Web/ArticleParts.ts b/Web/ArticleParts.ts index 72f203df..0ec19b8d 100644 --- a/Web/ArticleParts.ts +++ b/Web/ArticleParts.ts @@ -24,7 +24,7 @@ export type ArticlePartsFragment = ( )>>> }>, blocks?: Types.Maybe>>, flags?: Types.Maybe<{ __typename?: 'PostToFlagConnection', nodes?: Types.Maybe, slug?: Types.Maybe }>>> }>, guides?: Types.Maybe<{ __typename?: 'PostToGuideConnection', nodes?: Types.Maybe>>, contentType?: Types.Maybe<{ __typename?: 'ContentNodeToContentTypeConnectionEdge', node?: Types.Maybe<{ __typename?: 'ContentType', name?: Types.Maybe }> }>, flags?: Types.Maybe<{ __typename?: 'PostToFlagConnection', nodes?: Types.Maybe, slug?: Types.Maybe }>>> }>, guides?: Types.Maybe<{ __typename?: 'PostToGuideConnection', nodes?: Types.Maybe>> }>, locations?: Types.Maybe<{ __typename?: 'PostToLocationConnection', nodes?: Types.Maybe }>>> }>, obsessions?: Types.Maybe<{ __typename?: 'PostToObsessionConnection', nodes?: Types.Maybe>>; + contentType?: Types.Maybe<{ + __typename?: 'ContentNodeToContentTypeConnectionEdge'; + node?: Types.Maybe<{ + __typename?: 'ContentType'; + name?: Types.Maybe; + }>; + }>; flags?: Types.Maybe<{ __typename?: 'PostToFlagConnection'; nodes?: Types.Maybe>>; + contentType?: Types.Maybe<{ + __typename?: 'ContentNodeToContentTypeConnectionEdge'; + node?: Types.Maybe<{ + __typename?: 'ContentType'; + name?: Types.Maybe; + }>; + }>; flags?: Types.Maybe<{ __typename?: 'PostToFlagConnection'; nodes?: Types.Maybe ResultMap in value.resultMap }]) + } + + public var __typename: String { + get { + return resultMap["__typename"]! as! String + } + set { + resultMap.updateValue(newValue, forKey: "__typename") + } + } + + /// The nodes of the connection, without the edges + public var node: Node? { + get { + return (resultMap["node"] as? ResultMap).flatMap { Node(unsafeResultMap: $0) } + } + set { + resultMap.updateValue(newValue?.resultMap, forKey: "node") + } + } + + public struct Node: GraphQLSelectionSet { + public static let possibleTypes: [String] = ["ContentType"] + + public static var selections: [GraphQLSelection] { + return [ + GraphQLField("__typename", type: .nonNull(.scalar(String.self))), + GraphQLField("name", type: .scalar(String.self)), + ] + } + + public private(set) var resultMap: ResultMap + + public init(unsafeResultMap: ResultMap) { + self.resultMap = unsafeResultMap + } + + public init(name: String? = nil) { + self.init(unsafeResultMap: ["__typename": "ContentType", "name": name]) + } + + public var __typename: String { + get { + return resultMap["__typename"]! as! String + } + set { + resultMap.updateValue(newValue, forKey: "__typename") + } + } + + /// The internal name of the post type. This should not be used for display purposes. + public var name: String? { + get { + return resultMap["name"] as? String + } + set { + resultMap.updateValue(newValue, forKey: "name") + } + } + } + } + public struct Flag: GraphQLSelectionSet { public static let possibleTypes: [String] = ["PostToFlagConnection"]