Skip to content

Commit 29af7e4

Browse files
QZ-552 Added graphql method for fetching non-homepage collections. (#87)
* QZ-552 Added graphql method for fetching non-homepage collections. * QZ-552 Added graphql method for fetching non-homepage collections. * Updated Xcode version to 12.4 * Add Swift types * Add TypeScript types Co-authored-by: GitHub Action <action@github.com>
1 parent bfb721d commit 29af7e4

22 files changed

Lines changed: 641 additions & 5 deletions

.github/workflows/generation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
ref: ${{ github.head_ref }}
1919

2020
- name: Switch to Xcode 12
21-
run: ls /Applications; sudo xcode-select -s /Applications/Xcode_12.3.app
21+
run: ls /Applications; sudo xcode-select -s /Applications/Xcode_12.4.app
2222

2323
- name: Cache build
2424
uses: actions/cache@v2
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
query NonHomeEssentials(
2+
$after: String = ""
3+
$perPage: Int
4+
) {
5+
collections(
6+
first: $perPage
7+
after: $after
8+
where: {
9+
tagNotIn: 400
10+
}
11+
) {
12+
nodes {
13+
...CollectionParts
14+
bulletin {
15+
...BulletinDataParts
16+
}
17+
}
18+
pageInfo {
19+
endCursor
20+
hasNextPage
21+
}
22+
}
23+
}

Schemas/ContentSchema.operations.json

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Web/NonHomeEssentials.ts

Lines changed: 70 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import type * as Types from './types';
2+
import type { CollectionPartsFragment } from './CollectionParts';
3+
import type { BulletinDataPartsFragment } from './BulletinDataParts';
4+
import * as Apollo from '@apollo/client';
5+
export declare type NonHomeEssentialsQueryVariables = Types.Exact<{
6+
after?: Types.Maybe<Types.Scalars['String']>;
7+
perPage?: Types.Maybe<Types.Scalars['Int']>;
8+
}>;
9+
export declare type NonHomeEssentialsQuery = {
10+
__typename?: 'RootQuery';
11+
collections?: Types.Maybe<{
12+
__typename?: 'RootQueryToCollectionConnection';
13+
nodes?: Types.Maybe<Array<Types.Maybe<({
14+
__typename?: 'Collection';
15+
bulletin?: Types.Maybe<({
16+
__typename?: 'BulletinData';
17+
} & BulletinDataPartsFragment)>;
18+
} & CollectionPartsFragment)>>>;
19+
pageInfo?: Types.Maybe<{
20+
__typename?: 'WPPageInfo';
21+
endCursor?: Types.Maybe<string>;
22+
hasNextPage: boolean;
23+
}>;
24+
}>;
25+
};
26+
export declare const NonHomeEssentialsDocument: Apollo.DocumentNode;
27+
/**
28+
* __useNonHomeEssentialsQuery__
29+
*
30+
* To run a query within a React component, call `useNonHomeEssentialsQuery` and pass it any options that fit your needs.
31+
* When your component renders, `useNonHomeEssentialsQuery` returns an object from Apollo Client that contains loading, error, and data properties
32+
* you can use to render your UI.
33+
*
34+
* @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;
35+
*
36+
* @example
37+
* const { data, loading, error } = useNonHomeEssentialsQuery({
38+
* variables: {
39+
* after: // value for 'after'
40+
* perPage: // value for 'perPage'
41+
* },
42+
* });
43+
*/
44+
export declare function useNonHomeEssentialsQuery(baseOptions?: Apollo.QueryHookOptions<NonHomeEssentialsQuery, NonHomeEssentialsQueryVariables>): Apollo.QueryResult<NonHomeEssentialsQuery, Types.Exact<{
45+
after?: Types.Maybe<string> | undefined;
46+
perPage?: Types.Maybe<number> | undefined;
47+
}>>;
48+
export declare function useNonHomeEssentialsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<NonHomeEssentialsQuery, NonHomeEssentialsQueryVariables>): Apollo.QueryTuple<NonHomeEssentialsQuery, Types.Exact<{
49+
after?: Types.Maybe<string> | undefined;
50+
perPage?: Types.Maybe<number> | undefined;
51+
}>>;
52+
export declare type NonHomeEssentialsQueryHookResult = ReturnType<typeof useNonHomeEssentialsQuery>;
53+
export declare type NonHomeEssentialsLazyQueryHookResult = ReturnType<typeof useNonHomeEssentialsLazyQuery>;
54+
export declare type NonHomeEssentialsQueryResult = Apollo.QueryResult<NonHomeEssentialsQuery, NonHomeEssentialsQueryVariables>;
55+
//# sourceMappingURL=NonHomeEssentials.d.ts.map

Web/dist-cjs/NonHomeEssentials.d.ts.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Web/dist-cjs/NonHomeEssentials.js

Lines changed: 72 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)