Skip to content

Commit

Permalink
Normalize fields for all guides queries (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
hallee authored Jan 11, 2021
1 parent fa6cd08 commit 9ec7968
Show file tree
Hide file tree
Showing 28 changed files with 92 additions and 76 deletions.
1 change: 1 addition & 0 deletions Queries/Articles/ArticlesByGuide.gql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ query ArticlesByGuide(
$slug: [String]
) {
guides(
last: 1,
where: {
slug: $slug
}
Expand Down
18 changes: 9 additions & 9 deletions Queries/Collections/EssentialsByGuide.gql
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
query EssentialsByGuide($slug: String!) {
guides(where: {slug: [$slug]}) {
nodes {
essentials(first: 1) {
nodes {
...CollectionParts
}
}
}
}
guides(last: 1, where: {slug: [$slug]}) {
nodes {
essentials(first: 1) {
nodes {
...CollectionParts
}
}
}
}
}
4 changes: 2 additions & 2 deletions Queries/Guides/GuidesBySlug.gql
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
query GuidesBySlug(
$perPage: Int!
$slugs: [String]!
$slug: [String]!
) {
guides(
last: $perPage
where: {
slug: $slugs
slug: $slug
}
) {
nodes {
Expand Down
3 changes: 2 additions & 1 deletion Queries/Guides/GuidesByTopic.gql
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
query GuidesByTopic(
$perPage: Int = 50
$slug: [String]!
) {
topics(
Expand All @@ -11,7 +12,7 @@ query GuidesByTopic(
name
slug
guides(
first: 50
last: $perPage
) {
nodes {
...GuideParts
Expand Down
16 changes: 8 additions & 8 deletions Schemas/ContentSchema.operations.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Web/ArticlesByGuide.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Web/EssentialsByGuide.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Web/GuidesBySlug.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Web/GuidesByTopic.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Web/dist-cjs/ArticlesByGuide.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Web/dist-cjs/EssentialsByGuide.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Web/dist-cjs/GuidesBySlug.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { GuidePartsFragment } from './GuideParts';
import * as Apollo from '@apollo/client';
export declare type GuidesBySlugQueryVariables = Types.Exact<{
perPage: Types.Scalars['Int'];
slugs: Array<Types.Maybe<Types.Scalars['String']>>;
slug: Array<Types.Maybe<Types.Scalars['String']>>;
}>;
export declare type GuidesBySlugQuery = {
__typename?: 'RootQuery';
Expand All @@ -28,17 +28,17 @@ export declare const GuidesBySlugDocument: Apollo.DocumentNode;
* const { data, loading, error } = useGuidesBySlugQuery({
* variables: {
* perPage: // value for 'perPage'
* slugs: // value for 'slugs'
* slug: // value for 'slug'
* },
* });
*/
export declare function useGuidesBySlugQuery(baseOptions: Apollo.QueryHookOptions<GuidesBySlugQuery, GuidesBySlugQueryVariables>): Apollo.QueryResult<GuidesBySlugQuery, Types.Exact<{
perPage: number;
slugs: (string | null)[];
slug: (string | null)[];
}>>;
export declare function useGuidesBySlugLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GuidesBySlugQuery, GuidesBySlugQueryVariables>): Apollo.QueryTuple<GuidesBySlugQuery, Types.Exact<{
perPage: number;
slugs: (string | null)[];
slug: (string | null)[];
}>>;
export declare type GuidesBySlugQueryHookResult = ReturnType<typeof useGuidesBySlugQuery>;
export declare type GuidesBySlugLazyQueryHookResult = ReturnType<typeof useGuidesBySlugLazyQuery>;
Expand Down
2 changes: 1 addition & 1 deletion Web/dist-cjs/GuidesBySlug.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Web/dist-cjs/GuidesBySlug.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Web/dist-cjs/GuidesByTopic.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type * as Types from './types';
import type { GuidePartsFragment } from './GuideParts';
import * as Apollo from '@apollo/client';
export declare type GuidesByTopicQueryVariables = Types.Exact<{
perPage?: Types.Maybe<Types.Scalars['Int']>;
slug: Array<Types.Maybe<Types.Scalars['String']>>;
}>;
export declare type GuidesByTopicQuery = {
Expand Down Expand Up @@ -35,14 +36,17 @@ export declare const GuidesByTopicDocument: Apollo.DocumentNode;
* @example
* const { data, loading, error } = useGuidesByTopicQuery({
* variables: {
* perPage: // value for 'perPage'
* slug: // value for 'slug'
* },
* });
*/
export declare function useGuidesByTopicQuery(baseOptions: Apollo.QueryHookOptions<GuidesByTopicQuery, GuidesByTopicQueryVariables>): Apollo.QueryResult<GuidesByTopicQuery, Types.Exact<{
perPage?: number | null | undefined;
slug: (string | null)[];
}>>;
export declare function useGuidesByTopicLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GuidesByTopicQuery, GuidesByTopicQueryVariables>): Apollo.QueryTuple<GuidesByTopicQuery, Types.Exact<{
perPage?: number | null | undefined;
slug: (string | null)[];
}>>;
export declare type GuidesByTopicQueryHookResult = ReturnType<typeof useGuidesByTopicQuery>;
Expand Down
2 changes: 1 addition & 1 deletion Web/dist-cjs/GuidesByTopic.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Web/dist-cjs/GuidesByTopic.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Web/dist-cjs/GuidesByTopic.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Web/dist/ArticlesByGuide.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Web/dist/EssentialsByGuide.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Web/dist/GuidesBySlug.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { GuidePartsFragment } from './GuideParts';
import * as Apollo from '@apollo/client';
export declare type GuidesBySlugQueryVariables = Types.Exact<{
perPage: Types.Scalars['Int'];
slugs: Array<Types.Maybe<Types.Scalars['String']>>;
slug: Array<Types.Maybe<Types.Scalars['String']>>;
}>;
export declare type GuidesBySlugQuery = {
__typename?: 'RootQuery';
Expand All @@ -28,17 +28,17 @@ export declare const GuidesBySlugDocument: Apollo.DocumentNode;
* const { data, loading, error } = useGuidesBySlugQuery({
* variables: {
* perPage: // value for 'perPage'
* slugs: // value for 'slugs'
* slug: // value for 'slug'
* },
* });
*/
export declare function useGuidesBySlugQuery(baseOptions: Apollo.QueryHookOptions<GuidesBySlugQuery, GuidesBySlugQueryVariables>): Apollo.QueryResult<GuidesBySlugQuery, Types.Exact<{
perPage: number;
slugs: (string | null)[];
slug: (string | null)[];
}>>;
export declare function useGuidesBySlugLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GuidesBySlugQuery, GuidesBySlugQueryVariables>): Apollo.QueryTuple<GuidesBySlugQuery, Types.Exact<{
perPage: number;
slugs: (string | null)[];
slug: (string | null)[];
}>>;
export declare type GuidesBySlugQueryHookResult = ReturnType<typeof useGuidesBySlugQuery>;
export declare type GuidesBySlugLazyQueryHookResult = ReturnType<typeof useGuidesBySlugLazyQuery>;
Expand Down
2 changes: 1 addition & 1 deletion Web/dist/GuidesBySlug.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9ec7968

Please sign in to comment.