diff --git a/Queries/Articles/ArticlesByAuthor.gql b/Queries/Articles/ArticlesByAuthor.gql new file mode 100644 index 00000000..90efbd75 --- /dev/null +++ b/Queries/Articles/ArticlesByAuthor.gql @@ -0,0 +1,27 @@ +query ArticlesByAuthor( + $after: String = "" + $perPage: Int! + $slug: [String] +) { + authors:coAuthors( + where: { + name: $slug + } + ) { + nodes { + ...AuthorParts + posts( + after: $after + first: $perPage + ) { + nodes { + ...ArticleTeaserParts + } + pageInfo { + endCursor + hasNextPage + } + } + } + } +} diff --git a/Schemas/ContentSchema.operations.json b/Schemas/ContentSchema.operations.json index af60906d..f48a105e 100644 --- a/Schemas/ContentSchema.operations.json +++ b/Schemas/ContentSchema.operations.json @@ -7,6 +7,10 @@ "name": "ArticlePreview", "source": "query ArticlePreview($id: Int!, $time: Int!, $token: String!) {\n posts(where: {id: $id, preview: {time: $time, token: $token}}) {\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 canonicalUrl\n classifications\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 id\n kicker\n link\n postId\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 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}" }, + "d316113996944637a31a167de6fae2c637b6e8a642a4fd06a0c80cd604cc73aa": { + "name": "ArticlesByAuthor", + "source": "query ArticlesByAuthor($after: String = \"\", $perPage: Int!, $slug: [String]) {\n authors: coAuthors(where: {name: $slug}) {\n __typename\n nodes {\n __typename\n ...AuthorParts\n posts(after: $after, first: $perPage) {\n __typename\n nodes {\n __typename\n ...ArticleTeaserParts\n }\n pageInfo {\n __typename\n endCursor\n hasNextPage\n }\n }\n }\n }\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 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 id\n kicker\n link\n postId\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 sourceUrl\n title\n}\nfragment VideoParts on VideoData {\n __typename\n id\n duration\n episode\n playlistId\n season\n type\n}" + }, "c9d211d06e85f5c98272f5a425daccbc085fc6134d7ced5e8696dfe2d6fbe4c2": { "name": "ArticlesByGuide", "source": "query ArticlesByGuide($after: String = \"\", $perPage: Int, $slug: [String]) {\n guides(last: 1, where: {slug: $slug}) {\n __typename\n nodes {\n __typename\n ...GuideParts\n posts(\n after: $after\n first: $perPage\n where: {orderby: {field: DATE, order: ASC}}\n ) {\n __typename\n nodes {\n __typename\n ...ArticleTeaserParts\n }\n pageInfo {\n __typename\n hasNextPage\n endCursor\n }\n }\n }\n }\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 MediaParts on MediaItem {\n __typename\n altText\n caption\n credit\n id\n mediaDetails {\n __typename\n height\n width\n }\n sourceUrl\n title\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 id\n kicker\n link\n postId\n title\n trailerVideo {\n __typename\n ...VideoParts\n }\n video {\n __typename\n ...VideoParts\n }\n}\nfragment VideoParts on VideoData {\n __typename\n id\n duration\n episode\n playlistId\n season\n type\n}" diff --git a/Web/ArticlesByAuthor.ts b/Web/ArticlesByAuthor.ts new file mode 100644 index 00000000..070a582f --- /dev/null +++ b/Web/ArticlesByAuthor.ts @@ -0,0 +1,71 @@ +import type * as Types from './types'; + +import type { AuthorPartsFragment } from './AuthorParts'; +import type { ArticleTeaserPartsFragment } from './ArticleTeaserParts'; +import { gql } from '@apollo/client'; +import { AuthorPartsFragmentDoc } from './AuthorParts'; +import { ArticleTeaserPartsFragmentDoc } from './ArticleTeaserParts'; +import * as Apollo from '@apollo/client'; +export type ArticlesByAuthorQueryVariables = Types.Exact<{ + after?: Types.Maybe; + perPage: Types.Scalars['Int']; + slug?: Types.Maybe>>; +}>; + + +export type ArticlesByAuthorQuery = { __typename?: 'RootQuery', authors?: Types.Maybe<{ __typename?: 'RootQueryToCoAuthorConnection', nodes?: Types.Maybe>>, pageInfo?: Types.Maybe<{ __typename?: 'WPPageInfo', endCursor?: Types.Maybe, hasNextPage: boolean }> }> } + & AuthorPartsFragment + )>>> }> }; + + +export const ArticlesByAuthorDocument = /*#__PURE__*/ gql` + query ArticlesByAuthor($after: String = "", $perPage: Int!, $slug: [String]) { + authors: coAuthors(where: {name: $slug}) { + nodes { + ...AuthorParts + posts(after: $after, first: $perPage) { + nodes { + ...ArticleTeaserParts + } + pageInfo { + endCursor + hasNextPage + } + } + } + } +} + ${AuthorPartsFragmentDoc} +${ArticleTeaserPartsFragmentDoc}`; + +/** + * __useArticlesByAuthorQuery__ + * + * To run a query within a React component, call `useArticlesByAuthorQuery` and pass it any options that fit your needs. + * When your component renders, `useArticlesByAuthorQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useArticlesByAuthorQuery({ + * variables: { + * after: // value for 'after' + * perPage: // value for 'perPage' + * slug: // value for 'slug' + * }, + * }); + */ +export function useArticlesByAuthorQuery(baseOptions: Apollo.QueryHookOptions) { + return Apollo.useQuery(ArticlesByAuthorDocument, baseOptions); + } +export function useArticlesByAuthorLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + return Apollo.useLazyQuery(ArticlesByAuthorDocument, baseOptions); + } +export type ArticlesByAuthorQueryHookResult = ReturnType; +export type ArticlesByAuthorLazyQueryHookResult = ReturnType; +export type ArticlesByAuthorQueryResult = Apollo.QueryResult; \ No newline at end of file diff --git a/Web/dist-cjs/ArticlesByAuthor.d.ts b/Web/dist-cjs/ArticlesByAuthor.d.ts new file mode 100644 index 00000000..0035d092 --- /dev/null +++ b/Web/dist-cjs/ArticlesByAuthor.d.ts @@ -0,0 +1,62 @@ +import type * as Types from './types'; +import type { AuthorPartsFragment } from './AuthorParts'; +import type { ArticleTeaserPartsFragment } from './ArticleTeaserParts'; +import * as Apollo from '@apollo/client'; +export declare type ArticlesByAuthorQueryVariables = Types.Exact<{ + after?: Types.Maybe; + perPage: Types.Scalars['Int']; + slug?: Types.Maybe>>; +}>; +export declare type ArticlesByAuthorQuery = { + __typename?: 'RootQuery'; + authors?: Types.Maybe<{ + __typename?: 'RootQueryToCoAuthorConnection'; + nodes?: Types.Maybe>>; + pageInfo?: Types.Maybe<{ + __typename?: 'WPPageInfo'; + endCursor?: Types.Maybe; + hasNextPage: boolean; + }>; + }>; + } & AuthorPartsFragment)>>>; + }>; +}; +export declare const ArticlesByAuthorDocument: Apollo.DocumentNode; +/** + * __useArticlesByAuthorQuery__ + * + * To run a query within a React component, call `useArticlesByAuthorQuery` and pass it any options that fit your needs. + * When your component renders, `useArticlesByAuthorQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useArticlesByAuthorQuery({ + * variables: { + * after: // value for 'after' + * perPage: // value for 'perPage' + * slug: // value for 'slug' + * }, + * }); + */ +export declare function useArticlesByAuthorQuery(baseOptions: Apollo.QueryHookOptions): Apollo.QueryResult>; +export declare function useArticlesByAuthorLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions): Apollo.QueryTuple>; +export declare type ArticlesByAuthorQueryHookResult = ReturnType; +export declare type ArticlesByAuthorLazyQueryHookResult = ReturnType; +export declare type ArticlesByAuthorQueryResult = Apollo.QueryResult; +//# sourceMappingURL=ArticlesByAuthor.d.ts.map \ No newline at end of file diff --git a/Web/dist-cjs/ArticlesByAuthor.d.ts.map b/Web/dist-cjs/ArticlesByAuthor.d.ts.map new file mode 100644 index 00000000..2486081e --- /dev/null +++ b/Web/dist-cjs/ArticlesByAuthor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ArticlesByAuthor.d.ts","sourceRoot":"","sources":["../ArticlesByAuthor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,SAAS,CAAC;AAEtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAIvE,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,oBAAY,8BAA8B,GAAG,KAAK,CAAC,KAAK,CAAC;IACvD,KAAK,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC7C,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9B,IAAI,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;CACjE,CAAC,CAAC;AAGH,oBAAY,qBAAqB,GAAG;IAAE,UAAU,CAAC,EAAE,WAAW,CAAC;IAAC,OAAO,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC;QAAE,UAAU,CAAC,EAAE,+BAA+B,CAAC;QAAC,KAAK,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC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ByAuthor.js new file mode 100644 index 00000000..9eeb8415 --- /dev/null +++ b/Web/dist-cjs/ArticlesByAuthor.js @@ -0,0 +1,72 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.useArticlesByAuthorLazyQuery = exports.useArticlesByAuthorQuery = exports.ArticlesByAuthorDocument = void 0; +const client_1 = require("@apollo/client"); +const AuthorParts_1 = require("./AuthorParts"); +const ArticleTeaserParts_1 = require("./ArticleTeaserParts"); +const Apollo = __importStar(require("@apollo/client")); +exports.ArticlesByAuthorDocument = client_1.gql ` + query ArticlesByAuthor($after: String = "", $perPage: Int!, $slug: [String]) { + authors: coAuthors(where: {name: $slug}) { + nodes { + ...AuthorParts + posts(after: $after, first: $perPage) { + nodes { + ...ArticleTeaserParts + } + pageInfo { + endCursor + hasNextPage + } + } + } + } +} + ${AuthorParts_1.AuthorPartsFragmentDoc} +${ArticleTeaserParts_1.ArticleTeaserPartsFragmentDoc}`; +/** + * __useArticlesByAuthorQuery__ + * + * To run a query within a React component, call `useArticlesByAuthorQuery` and pass it any options that fit your needs. + * When your component renders, `useArticlesByAuthorQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useArticlesByAuthorQuery({ + * variables: { + * after: // value for 'after' + * perPage: // value for 'perPage' + * slug: // value for 'slug' + * }, + * }); + */ +function useArticlesByAuthorQuery(baseOptions) { + return Apollo.useQuery(exports.ArticlesByAuthorDocument, baseOptions); +} +exports.useArticlesByAuthorQuery = useArticlesByAuthorQuery; +function useArticlesByAuthorLazyQuery(baseOptions) { + return Apollo.useLazyQuery(exports.ArticlesByAuthorDocument, baseOptions); +} +exports.useArticlesByAuthorLazyQuery = useArticlesByAuthorLazyQuery; +//# sourceMappingURL=ArticlesByAuthor.js.map \ No newline at end of file diff --git a/Web/dist-cjs/ArticlesByAuthor.js.map b/Web/dist-cjs/ArticlesByAuthor.js.map new file mode 100644 index 00000000..b1446f23 --- /dev/null +++ b/Web/dist-cjs/ArticlesByAuthor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ArticlesByAuthor.js","sourceRoot":"","sources":["../ArticlesByAuthor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAIA,2CAAqC;AACrC,+CAAuD;AACvD,6DAAqE;AACrE,uDAAyC;AAiB5B,QAAA,wBAAwB,GAAiB,YAAG,CAAA;;;;;;;;;;;;;;;;;MAiBnD,oCAAsB;EAC1B,kDAA6B,EAAE,CAAC;AAElC;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,wBAAwB,CAAC,WAA2F;IAC5H,OAAO,MAAM,CAAC,QAAQ,CAAwD,gCAAwB,EAAE,WAAW,CAAC,CAAC;AACvH,CAAC;AAFP,4DAEO;AACP,SAAgB,4BAA4B,CAAC,WAAgG;IACnI,OAAO,MAAM,CAAC,YAAY,CAAwD,gCAAwB,EAAE,WAAW,CAAC,CAAC;AAC3H,CAAC;AAFT,oEAES"} \ No newline at end of file diff --git a/Web/dist-cjs/index.d.ts b/Web/dist-cjs/index.d.ts index 37496f15..72d9b2e1 100644 --- a/Web/dist-cjs/index.d.ts +++ b/Web/dist-cjs/index.d.ts @@ -3,6 +3,7 @@ export * from './ArticleParts'; export * from './ArticlePreview'; export * from './ArticleTeaser'; export * from './ArticleTeaserParts'; +export * from './ArticlesByAuthor'; export * from './ArticlesByGuide'; export * from './ArticlesByObsession'; export * from './ArticlesByRecommendation'; diff --git a/Web/dist-cjs/index.d.ts.map b/Web/dist-cjs/index.d.ts.map index c7aaf1db..f01a4124 100644 --- a/Web/dist-cjs/index.d.ts.map +++ b/Web/dist-cjs/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAEA,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,YAAY,CAAA;AAC1B,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CA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AgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,OAAO,CAAA;AACrB,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA"} \ No newline at end of file diff --git a/Web/dist-cjs/index.js b/Web/dist-cjs/index.js index ff5ed1e0..a2648e6e 100644 --- a/Web/dist-cjs/index.js +++ b/Web/dist-cjs/index.js @@ -16,6 +16,7 @@ __exportStar(require("./ArticleParts"), exports); __exportStar(require("./ArticlePreview"), exports); __exportStar(require("./ArticleTeaser"), exports); __exportStar(require("./ArticleTeaserParts"), exports); +__exportStar(require("./ArticlesByAuthor"), exports); __exportStar(require("./ArticlesByGuide"), exports); __exportStar(require("./ArticlesByObsession"), exports); __exportStar(require("./ArticlesByRecommendation"), exports); diff --git a/Web/dist-cjs/index.js.map b/Web/dist-cjs/index.js.map index 60617db9..bb4ab117 100644 --- a/Web/dist-cjs/index.js.map +++ b/Web/dist-cjs/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAAA,gDAAgD;;;;;;;;;;;;AAEhD,4CAAyB;AACzB,iDAA8B;AAC9B,mDAAgC;AAChC,kDAA+B;AAC/B,uDAAoC;AACpC,oDAAiC;AACjC,wDAAqC;AACrC,6DAA0C;AAC1C,qDAAkC;AAClC,mDAAgC;AAChC,kDAA+B;AAC/B,oDAAiC;AACjC,gDAA6B;AAC7B,+CAA4B;AAC5B,kDAA+B;AAC/B,sDAAmC;AACnC,+CAA4B;AAC5B,oDAAiC;AACjC,gDAA6B;AAC7B,wDAAqC;AACrC,6CAA0B;AAC1B,wDAAqC;AACrC,sDAAmC;AACnC,0DAAuC;AACvC,+CAA4B;AAC5B,2CAAwB;AACxB,iDAA8B;AAC9B,kDAA+B;AAC/B,mDAAgC;AAChC,0DAAuC;AACvC,mDAAgC;AAChC,+CAA4B;AAC5B,+CAA4B;AAC5B,gDAA6B;AAC7B,wCAAqB;AACrB,6CAA0B;AAC1B,8CAA2B;AAC3B,mDAAgC;AAChC,+CAA4B;AAC5B,iDAA8B;AAC9B,mDAAgC;AAChC,oDAAiC;AACjC,gDAA6B;AAC7B,8CAA2B;AAC3B,6CAA0B;AAC1B,+CAA4B;AAC5B,2CAAwB;AACxB,6CAA0B;AAC1B,+CAA4B;AAC5B,0CAAuB"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAAA,gDAAgD;;;;;;;;;;;;AAEhD,4CAAyB;AACzB,iDAA8B;AAC9B,mDAAgC;AAChC,kDAA+B;AAC/B,uDAAoC;AACpC,qDAAkC;AAClC,oDAAiC;AACjC,wDAAqC;AACrC,6DAA0C;AAC1C,qDAAkC;AAClC,mDAAgC;AAChC,kDAA+B;AAC/B,oDAAiC;AACjC,gDAA6B;AAC7B,+CAA4B;AAC5B,kDAA+B;AAC/B,sDAAmC;AACnC,+CAA4B;AAC5B,oDAAiC;AACjC,gDAA6B;AAC7B,wDAAqC;AACrC,6CAA0B;AAC1B,wDAAqC;AACrC,sDAAmC;AACnC,0DAAuC;AACvC,+CAA4B;AAC5B,2CAAwB;AACxB,iDAA8B;AAC9B,kDAA+B;AAC/B,mDAAgC;AAChC,0DAAuC;AACvC,mDAAgC;AAChC,+CAA4B;AAC5B,+CAA4B;AAC5B,gDAA6B;AAC7B,wCAAqB;AACrB,6CAA0B;AAC1B,8CAA2B;AAC3B,mDAAgC;AAChC,+CAA4B;AAC5B,iDAA8B;AAC9B,mDAAgC;AAChC,oDAAiC;AACjC,gDAA6B;AAC7B,8CAA2B;AAC3B,6CAA0B;AAC1B,+CAA4B;AAC5B,2CAAwB;AACxB,6CAA0B;AAC1B,+CAA4B;AAC5B,0CAAuB"} \ No newline at end of file diff --git a/Web/dist/ArticlesByAuthor.d.ts b/Web/dist/ArticlesByAuthor.d.ts new file mode 100644 index 00000000..0035d092 --- /dev/null +++ b/Web/dist/ArticlesByAuthor.d.ts @@ -0,0 +1,62 @@ +import type * as Types from './types'; +import type { AuthorPartsFragment } from './AuthorParts'; +import type { ArticleTeaserPartsFragment } from './ArticleTeaserParts'; +import * as Apollo from '@apollo/client'; +export declare type ArticlesByAuthorQueryVariables = Types.Exact<{ + after?: Types.Maybe; + perPage: Types.Scalars['Int']; + slug?: Types.Maybe>>; +}>; +export declare type ArticlesByAuthorQuery = { + __typename?: 'RootQuery'; + authors?: Types.Maybe<{ + __typename?: 'RootQueryToCoAuthorConnection'; + nodes?: Types.Maybe>>; + pageInfo?: Types.Maybe<{ + __typename?: 'WPPageInfo'; + endCursor?: Types.Maybe; + hasNextPage: boolean; + }>; + }>; + } & AuthorPartsFragment)>>>; + }>; +}; +export declare const ArticlesByAuthorDocument: Apollo.DocumentNode; +/** + * __useArticlesByAuthorQuery__ + * + * To run a query within a React component, call `useArticlesByAuthorQuery` and pass it any options that fit your needs. + * When your component renders, `useArticlesByAuthorQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useArticlesByAuthorQuery({ + * variables: { + * after: // value for 'after' + * perPage: // value for 'perPage' + * slug: // value for 'slug' + * }, + * }); + */ +export declare function useArticlesByAuthorQuery(baseOptions: Apollo.QueryHookOptions): Apollo.QueryResult>; +export declare function useArticlesByAuthorLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions): Apollo.QueryTuple>; +export declare type ArticlesByAuthorQueryHookResult = ReturnType; +export declare type ArticlesByAuthorLazyQueryHookResult = ReturnType; +export declare type ArticlesByAuthorQueryResult = Apollo.QueryResult; +//# sourceMappingURL=ArticlesByAuthor.d.ts.map \ No newline at end of file diff --git a/Web/dist/ArticlesByAuthor.d.ts.map b/Web/dist/ArticlesByAuthor.d.ts.map new file mode 100644 index 00000000..2486081e --- /dev/null +++ b/Web/dist/ArticlesByAuthor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ArticlesByAuthor.d.ts","sourceRoot":"","sources":["../ArticlesByAuthor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,SAAS,CAAC;AAEtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAIvE,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,oBAAY,8BAA8B,GAAG,KAAK,CAAC,KAAK,CAAC;IACvD,KAAK,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC7C,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9B,IAAI,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;CACjE,CAAC,CAAC;AAGH,oBAAY,qBAAqB,GAAG;IAAE,UAAU,CAAC,EAAE,WAAW,CAAC;IAAC,OAAO,CAAC,EAAE,KAAK,CAAC,KA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B,EAAE,8BAA8B,CAAC,CAAC"} \ No newline at end of file diff --git a/Web/dist/ArticlesByAuthor.js b/Web/dist/ArticlesByAuthor.js new file mode 100644 index 00000000..e000fa11 --- /dev/null +++ b/Web/dist/ArticlesByAuthor.js @@ -0,0 +1,48 @@ +import { gql } from '@apollo/client'; +import { AuthorPartsFragmentDoc } from './AuthorParts'; +import { ArticleTeaserPartsFragmentDoc } from './ArticleTeaserParts'; +import * as Apollo from '@apollo/client'; +export const ArticlesByAuthorDocument = /*#__PURE__*/ gql ` + query ArticlesByAuthor($after: String = "", $perPage: Int!, $slug: [String]) { + authors: coAuthors(where: {name: $slug}) { + nodes { + ...AuthorParts + posts(after: $after, first: $perPage) { + nodes { + ...ArticleTeaserParts + } + pageInfo { + endCursor + hasNextPage + } + } + } + } +} + ${AuthorPartsFragmentDoc} +${ArticleTeaserPartsFragmentDoc}`; +/** + * __useArticlesByAuthorQuery__ + * + * To run a query within a React component, call `useArticlesByAuthorQuery` and pass it any options that fit your needs. + * When your component renders, `useArticlesByAuthorQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useArticlesByAuthorQuery({ + * variables: { + * after: // value for 'after' + * perPage: // value for 'perPage' + * slug: // value for 'slug' + * }, + * }); + */ +export function useArticlesByAuthorQuery(baseOptions) { + return Apollo.useQuery(ArticlesByAuthorDocument, baseOptions); +} +export function useArticlesByAuthorLazyQuery(baseOptions) { + return Apollo.useLazyQuery(ArticlesByAuthorDocument, baseOptions); +} +//# sourceMappingURL=ArticlesByAuthor.js.map \ No newline at end of file diff --git a/Web/dist/ArticlesByAuthor.js.map b/Web/dist/ArticlesByAuthor.js.map new file mode 100644 index 00000000..f5fdf95f --- /dev/null +++ b/Web/dist/ArticlesByAuthor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ArticlesByAuthor.js","sourceRoot":"","sources":["../ArticlesByAuthor.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAiBzC,MAAM,CAAC,MAAM,wBAAwB,GAAG,aAAa,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;MAiBnD,sBAAsB;EAC1B,6BAA6B,EAAE,CAAC;AAElC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,wBAAwB,CAAC,WAA2F;IAC5H,OAAO,MAAM,CAAC,QAAQ,CAAwD,wBAAwB,EAAE,WAAW,CAAC,CAAC;AACvH,CAAC;AACP,MAAM,UAAU,4BAA4B,CAAC,WAAgG;IACnI,OAAO,MAAM,CAAC,YAAY,CAAwD,wBAAwB,EAAE,WAAW,CAAC,CAAC;AAC3H,CAAC"} \ No newline at end of file diff --git a/Web/dist/index.d.ts b/Web/dist/index.d.ts index 37496f15..72d9b2e1 100644 --- a/Web/dist/index.d.ts +++ b/Web/dist/index.d.ts @@ -3,6 +3,7 @@ export * from './ArticleParts'; export * from './ArticlePreview'; export * from './ArticleTeaser'; export * from './ArticleTeaserParts'; +export * from './ArticlesByAuthor'; export * from './ArticlesByGuide'; export * from './ArticlesByObsession'; export * from './ArticlesByRecommendation'; diff --git a/Web/dist/index.d.ts.map b/Web/dist/index.d.ts.map index c7aaf1db..f01a4124 100644 --- a/Web/dist/index.d.ts.map +++ b/Web/dist/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAEA,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AAC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C5B,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA"} \ No newline at end of file diff --git a/Web/dist/index.js b/Web/dist/index.js index 2e6adbc8..2564893f 100644 --- a/Web/dist/index.js +++ b/Web/dist/index.js @@ -4,6 +4,7 @@ export * from './ArticleParts'; export * from './ArticlePreview'; export * from './ArticleTeaser'; export * from './ArticleTeaserParts'; +export * from './ArticlesByAuthor'; export * from './ArticlesByGuide'; export * from './ArticlesByObsession'; export * from './ArticlesByRecommendation'; diff --git a/Web/dist/index.js.map b/Web/dist/index.js.map index 7ea6f2b4..9b0cf16f 100644 --- a/Web/dist/index.js.map +++ b/Web/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAEhD,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,YAAY,CAAA;AAC1B,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,c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,uBAAuB,CAAA;AACrC,cAAc,YAAY,CAAA;AAC1B,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,OAAO,CAAA;AACrB,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA"} \ No newline at end of file diff --git a/Web/index.ts b/Web/index.ts index bc84f622..5d1c8035 100644 --- a/Web/index.ts +++ b/Web/index.ts @@ -5,6 +5,7 @@ export * from './ArticleParts' export * from './ArticlePreview' export * from './ArticleTeaser' export * from './ArticleTeaserParts' +export * from './ArticlesByAuthor' export * from './ArticlesByGuide' export * from './ArticlesByObsession' export * from './ArticlesByRecommendation' diff --git a/iOS/QuartzContent/QuartzContent.swift b/iOS/QuartzContent/QuartzContent.swift index 06affb68..fbe797f3 100644 --- a/iOS/QuartzContent/QuartzContent.swift +++ b/iOS/QuartzContent/QuartzContent.swift @@ -1729,6 +1729,348 @@ public final class ArticlePreviewQuery: GraphQLQuery { } } +public final class ArticlesByAuthorQuery: GraphQLQuery { + /// The raw GraphQL definition of this operation. + public let operationDefinition: String = + """ + query ArticlesByAuthor($after: String = "", $perPage: Int!, $slug: [String]) { + authors: coAuthors(where: {name: $slug}) { + __typename + nodes { + __typename + ...AuthorParts + posts(after: $after, first: $perPage) { + __typename + nodes { + __typename + ...ArticleTeaserParts + } + pageInfo { + __typename + endCursor + hasNextPage + } + } + } + } + } + """ + + public let operationName: String = "ArticlesByAuthor" + + public let operationIdentifier: String? = "d316113996944637a31a167de6fae2c637b6e8a642a4fd06a0c80cd604cc73aa" + + public var queryDocument: String { return operationDefinition.appending("\n" + AuthorParts.fragmentDefinition).appending("\n" + ArticleTeaserParts.fragmentDefinition).appending("\n" + MediaParts.fragmentDefinition).appending("\n" + VideoParts.fragmentDefinition) } + + public var after: String? + public var perPage: Int + public var slug: [String?]? + + public init(after: String? = nil, perPage: Int, slug: [String?]? = nil) { + self.after = after + self.perPage = perPage + self.slug = slug + } + + public var variables: GraphQLMap? { + return ["after": after, "perPage": perPage, "slug": slug] + } + + public struct Data: GraphQLSelectionSet { + public static let possibleTypes: [String] = ["RootQuery"] + + public static var selections: [GraphQLSelection] { + return [ + GraphQLField("coAuthors", alias: "authors", arguments: ["where": ["name": GraphQLVariable("slug")]], type: .object(Author.selections)), + ] + } + + public private(set) var resultMap: ResultMap + + public init(unsafeResultMap: ResultMap) { + self.resultMap = unsafeResultMap + } + + public init(authors: Author? = nil) { + self.init(unsafeResultMap: ["__typename": "RootQuery", "authors": authors.flatMap { (value: Author) -> ResultMap in value.resultMap }]) + } + + /// Connection between the RootQuery type and the RootQuery type + @available(*, deprecated, message: "") + public var authors: Author? { + get { + return (resultMap["authors"] as? ResultMap).flatMap { Author(unsafeResultMap: $0) } + } + set { + resultMap.updateValue(newValue?.resultMap, forKey: "authors") + } + } + + public struct Author: GraphQLSelectionSet { + public static let possibleTypes: [String] = ["RootQueryToCoAuthorConnection"] + + public static var selections: [GraphQLSelection] { + return [ + GraphQLField("__typename", type: .nonNull(.scalar(String.self))), + GraphQLField("nodes", type: .list(.object(Node.selections))), + ] + } + + public private(set) var resultMap: ResultMap + + public init(unsafeResultMap: ResultMap) { + self.resultMap = unsafeResultMap + } + + public init(nodes: [Node?]? = nil) { + self.init(unsafeResultMap: ["__typename": "RootQueryToCoAuthorConnection", "nodes": nodes.flatMap { (value: [Node?]) -> [ResultMap?] in value.map { (value: Node?) -> ResultMap? in value.flatMap { (value: Node) -> 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 + @available(*, deprecated, message: "") + public var nodes: [Node?]? { + get { + return (resultMap["nodes"] as? [ResultMap?]).flatMap { (value: [ResultMap?]) -> [Node?] in value.map { (value: ResultMap?) -> Node? in value.flatMap { (value: ResultMap) -> Node in Node(unsafeResultMap: value) } } } + } + set { + resultMap.updateValue(newValue.flatMap { (value: [Node?]) -> [ResultMap?] in value.map { (value: Node?) -> ResultMap? in value.flatMap { (value: Node) -> ResultMap in value.resultMap } } }, forKey: "nodes") + } + } + + public struct Node: GraphQLSelectionSet { + public static let possibleTypes: [String] = ["CoAuthor"] + + public static var selections: [GraphQLSelection] { + return [ + GraphQLField("__typename", type: .nonNull(.scalar(String.self))), + GraphQLFragmentSpread(AuthorParts.self), + GraphQLField("posts", arguments: ["after": GraphQLVariable("after"), "first": GraphQLVariable("perPage")], type: .object(Post.selections)), + ] + } + + public private(set) var resultMap: ResultMap + + public init(unsafeResultMap: ResultMap) { + self.resultMap = unsafeResultMap + } + + public var __typename: String { + get { + return resultMap["__typename"]! as! String + } + set { + resultMap.updateValue(newValue, forKey: "__typename") + } + } + + /// Connection between the coAuthor type and the coAuthor type + @available(*, deprecated, message: "") + public var posts: Post? { + get { + return (resultMap["posts"] as? ResultMap).flatMap { Post(unsafeResultMap: $0) } + } + set { + resultMap.updateValue(newValue?.resultMap, forKey: "posts") + } + } + + public var fragments: Fragments { + get { + return Fragments(unsafeResultMap: resultMap) + } + set { + resultMap += newValue.resultMap + } + } + + public struct Fragments { + public private(set) var resultMap: ResultMap + + public init(unsafeResultMap: ResultMap) { + self.resultMap = unsafeResultMap + } + + public var authorParts: AuthorParts { + get { + return AuthorParts(unsafeResultMap: resultMap) + } + set { + resultMap += newValue.resultMap + } + } + } + + public struct Post: GraphQLSelectionSet { + public static let possibleTypes: [String] = ["CoAuthorToPostConnection"] + + public static var selections: [GraphQLSelection] { + return [ + GraphQLField("__typename", type: .nonNull(.scalar(String.self))), + GraphQLField("nodes", type: .list(.object(Node.selections))), + GraphQLField("pageInfo", type: .object(PageInfo.selections)), + ] + } + + public private(set) var resultMap: ResultMap + + public init(unsafeResultMap: ResultMap) { + self.resultMap = unsafeResultMap + } + + public init(nodes: [Node?]? = nil, pageInfo: PageInfo? = nil) { + self.init(unsafeResultMap: ["__typename": "CoAuthorToPostConnection", "nodes": nodes.flatMap { (value: [Node?]) -> [ResultMap?] in value.map { (value: Node?) -> ResultMap? in value.flatMap { (value: Node) -> ResultMap in value.resultMap } } }, "pageInfo": pageInfo.flatMap { (value: PageInfo) -> 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 + @available(*, deprecated, message: "") + public var nodes: [Node?]? { + get { + return (resultMap["nodes"] as? [ResultMap?]).flatMap { (value: [ResultMap?]) -> [Node?] in value.map { (value: ResultMap?) -> Node? in value.flatMap { (value: ResultMap) -> Node in Node(unsafeResultMap: value) } } } + } + set { + resultMap.updateValue(newValue.flatMap { (value: [Node?]) -> [ResultMap?] in value.map { (value: Node?) -> ResultMap? in value.flatMap { (value: Node) -> ResultMap in value.resultMap } } }, forKey: "nodes") + } + } + + /// Information about pagination in a connection. + @available(*, deprecated, message: "") + public var pageInfo: PageInfo? { + get { + return (resultMap["pageInfo"] as? ResultMap).flatMap { PageInfo(unsafeResultMap: $0) } + } + set { + resultMap.updateValue(newValue?.resultMap, forKey: "pageInfo") + } + } + + public struct Node: GraphQLSelectionSet { + public static let possibleTypes: [String] = ["Post"] + + public static var selections: [GraphQLSelection] { + return [ + GraphQLField("__typename", type: .nonNull(.scalar(String.self))), + GraphQLFragmentSpread(ArticleTeaserParts.self), + ] + } + + public private(set) var resultMap: ResultMap + + public init(unsafeResultMap: ResultMap) { + self.resultMap = unsafeResultMap + } + + public var __typename: String { + get { + return resultMap["__typename"]! as! String + } + set { + resultMap.updateValue(newValue, forKey: "__typename") + } + } + + public var fragments: Fragments { + get { + return Fragments(unsafeResultMap: resultMap) + } + set { + resultMap += newValue.resultMap + } + } + + public struct Fragments { + public private(set) var resultMap: ResultMap + + public init(unsafeResultMap: ResultMap) { + self.resultMap = unsafeResultMap + } + + public var articleTeaserParts: ArticleTeaserParts { + get { + return ArticleTeaserParts(unsafeResultMap: resultMap) + } + set { + resultMap += newValue.resultMap + } + } + } + } + + public struct PageInfo: GraphQLSelectionSet { + public static let possibleTypes: [String] = ["WPPageInfo"] + + public static var selections: [GraphQLSelection] { + return [ + GraphQLField("__typename", type: .nonNull(.scalar(String.self))), + GraphQLField("endCursor", type: .scalar(String.self)), + GraphQLField("hasNextPage", type: .nonNull(.scalar(Bool.self))), + ] + } + + public private(set) var resultMap: ResultMap + + public init(unsafeResultMap: ResultMap) { + self.resultMap = unsafeResultMap + } + + public init(endCursor: String? = nil, hasNextPage: Bool) { + self.init(unsafeResultMap: ["__typename": "WPPageInfo", "endCursor": endCursor, "hasNextPage": hasNextPage]) + } + + public var __typename: String { + get { + return resultMap["__typename"]! as! String + } + set { + resultMap.updateValue(newValue, forKey: "__typename") + } + } + + /// When paginating forwards, the cursor to continue. + @available(*, deprecated, message: "") + public var endCursor: String? { + get { + return resultMap["endCursor"] as? String + } + set { + resultMap.updateValue(newValue, forKey: "endCursor") + } + } + + /// When paginating forwards, are there more items? + @available(*, deprecated, message: "") + public var hasNextPage: Bool { + get { + return resultMap["hasNextPage"]! as! Bool + } + set { + resultMap.updateValue(newValue, forKey: "hasNextPage") + } + } + } + } + } + } + } +} + public final class ArticlesByGuideQuery: GraphQLQuery { /// The raw GraphQL definition of this operation. public let operationDefinition: String =