-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
QZ-509 QZ-482 Specific queries to get first N latest and popular arti…
…cles (#85) * QZ-509 Add specific query to get first n latest articles * QZ-482 Add specific query to get first n popular articles Co-authored-by: GitHub Action <[email protected]>
- Loading branch information
1 parent
abd8a27
commit bfb721d
Showing
31 changed files
with
1,380 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
query FirstFeedConcentByRecency( | ||
$first: Int | ||
) { | ||
feedContent( first: $first ) @connection(key: "FirstFeedConcentByRecency") { | ||
nodes { | ||
...on Post { | ||
...ArticleTeaserParts | ||
} | ||
...on Email { | ||
...EmailParts | ||
link | ||
emailLists { | ||
nodes { | ||
slug | ||
} | ||
} | ||
} | ||
} | ||
pageInfo { | ||
endCursor | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
query FirstPopularArticles( | ||
$edition: EditionName | ||
$first: Int | ||
) { | ||
posts( | ||
first: $first | ||
where: { | ||
popular: { | ||
edition: $edition | ||
} | ||
} | ||
) @connection(key: "FirstPopularArticles") { | ||
nodes { | ||
...ArticleTeaserParts | ||
} | ||
pageInfo { | ||
endCursor | ||
hasNextPage | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import type * as Types from './types'; | ||
import type { ArticleTeaserPartsFragment } from './ArticleTeaserParts'; | ||
import type { EmailPartsFragment } from './EmailParts'; | ||
import * as Apollo from '@apollo/client'; | ||
export declare type FirstFeedConcentByRecencyQueryVariables = Types.Exact<{ | ||
first?: Types.Maybe<Types.Scalars['Int']>; | ||
}>; | ||
export declare type FirstFeedConcentByRecencyQuery = { | ||
__typename?: 'RootQuery'; | ||
feedContent?: Types.Maybe<{ | ||
__typename?: 'RootQueryToFeedContentConnection'; | ||
nodes?: Types.Maybe<Array<Types.Maybe<({ | ||
__typename?: 'Post'; | ||
} & ArticleTeaserPartsFragment) | { | ||
__typename?: 'Page'; | ||
} | { | ||
__typename?: 'MediaItem'; | ||
} | ({ | ||
__typename?: 'Email'; | ||
link?: Types.Maybe<string>; | ||
emailLists?: Types.Maybe<{ | ||
__typename?: 'EmailToEmailListConnection'; | ||
nodes?: Types.Maybe<Array<Types.Maybe<{ | ||
__typename?: 'EmailList'; | ||
slug?: Types.Maybe<string>; | ||
}>>>; | ||
}>; | ||
} & EmailPartsFragment) | { | ||
__typename?: 'Chapter'; | ||
} | { | ||
__typename?: 'Promotion'; | ||
} | { | ||
__typename?: 'Collection'; | ||
} | { | ||
__typename?: 'Bulletin'; | ||
}>>>; | ||
pageInfo?: Types.Maybe<{ | ||
__typename?: 'WPPageInfo'; | ||
endCursor?: Types.Maybe<string>; | ||
}>; | ||
}>; | ||
}; | ||
export declare const FirstFeedConcentByRecencyDocument: Apollo.DocumentNode; | ||
/** | ||
* __useFirstFeedConcentByRecencyQuery__ | ||
* | ||
* To run a query within a React component, call `useFirstFeedConcentByRecencyQuery` and pass it any options that fit your needs. | ||
* When your component renders, `useFirstFeedConcentByRecencyQuery` 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 } = useFirstFeedConcentByRecencyQuery({ | ||
* variables: { | ||
* first: // value for 'first' | ||
* }, | ||
* }); | ||
*/ | ||
export declare function useFirstFeedConcentByRecencyQuery(baseOptions?: Apollo.QueryHookOptions<FirstFeedConcentByRecencyQuery, FirstFeedConcentByRecencyQueryVariables>): Apollo.QueryResult<FirstFeedConcentByRecencyQuery, Types.Exact<{ | ||
first?: Types.Maybe<number> | undefined; | ||
}>>; | ||
export declare function useFirstFeedConcentByRecencyLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FirstFeedConcentByRecencyQuery, FirstFeedConcentByRecencyQueryVariables>): Apollo.QueryTuple<FirstFeedConcentByRecencyQuery, Types.Exact<{ | ||
first?: Types.Maybe<number> | undefined; | ||
}>>; | ||
export declare type FirstFeedConcentByRecencyQueryHookResult = ReturnType<typeof useFirstFeedConcentByRecencyQuery>; | ||
export declare type FirstFeedConcentByRecencyLazyQueryHookResult = ReturnType<typeof useFirstFeedConcentByRecencyLazyQuery>; | ||
export declare type FirstFeedConcentByRecencyQueryResult = Apollo.QueryResult<FirstFeedConcentByRecencyQuery, FirstFeedConcentByRecencyQueryVariables>; | ||
//# sourceMappingURL=FirstFeedConcentByRecency.d.ts.map |
Oops, something went wrong.