Skip to content

Commit 7d7d7f7

Browse files
debugging Tutorial data
1 parent 128e8c7 commit 7d7d7f7

File tree

4 files changed

+59
-8
lines changed

4 files changed

+59
-8
lines changed

packages/gatsby-theme/codegen.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ schema:
33
- http://localhost:8000/___graphql
44
documents:
55
- ./src/*/*.{ts,tsx}
6+
- ./src/components/templates/*.{ts,tsx}
67
- ./src/components/queries/*.{ts,tsx}
78
- ../../../node_modules/gatsby-*/**/*.js
89
generates:

packages/gatsby-theme/src/components/TutorialSidebar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ export const TabletSidebar: React.FunctionComponent<SidebarProps> = ({
3535
tutorialTitle,
3636
chapters,
3737
}) => {
38-
console.log(tutorialTitle);
39-
console.log(chapters);
38+
// console.log(tutorialTitle);
39+
// console.log(chapters);
4040
return (
4141
<div>
4242
<Image

packages/gatsby-theme/src/components/templates/Tutorial.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const TutorialLayout: React.FunctionComponent<TutorialLayoutProps> = ({
1818
if (!data) {
1919
return null;
2020
}
21+
console.log(data);
2122
const { pageTitle } = data!.mdx!.frontmatter!;
2223
const tutorialTitle = optionalChaining(() => data!.tutorialTitle!.frontmatter!.tutorialTitle!);
2324
const chapters = optionalChaining(() => data!.pageTitles!.edges!.map(

packages/gatsby-theme/src/graphqlTypes.ts

Lines changed: 55 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,10 +1332,10 @@ export enum MdxFieldsEnum {
13321332
FrontmatterVideoId = 'frontmatter___videoId',
13331333
FrontmatterParent = 'frontmatter____PARENT',
13341334
FrontmatterDuration = 'frontmatter___duration',
1335-
FrontmatterVideoAuthor = 'frontmatter___videoAuthor',
1336-
FrontmatterDraft = 'frontmatter___draft',
13371335
FrontmatterTutorialTitle = 'frontmatter___tutorialTitle',
13381336
FrontmatterBanner = 'frontmatter___banner',
1337+
FrontmatterVideoAuthor = 'frontmatter___videoAuthor',
1338+
FrontmatterDraft = 'frontmatter___draft',
13391339
RawBody = 'rawBody',
13401340
FileAbsolutePath = 'fileAbsolutePath',
13411341
CodeBody = 'code___body',
@@ -1381,10 +1381,10 @@ export type MdxFrontmatter = {
13811381
readonly videoId: Maybe<Scalars['String']>;
13821382
readonly _PARENT: Maybe<Scalars['String']>;
13831383
readonly duration: Maybe<Scalars['Int']>;
1384-
readonly videoAuthor: Maybe<Scalars['String']>;
1385-
readonly draft: Maybe<Scalars['Boolean']>;
13861384
readonly tutorialTitle: Maybe<Scalars['String']>;
13871385
readonly banner: Maybe<Scalars['String']>;
1386+
readonly videoAuthor: Maybe<Scalars['String']>;
1387+
readonly draft: Maybe<Scalars['Boolean']>;
13881388
};
13891389

13901390
export type MdxFrontmatterFilterInput = {
@@ -1399,10 +1399,10 @@ export type MdxFrontmatterFilterInput = {
13991399
readonly videoId: Maybe<StringQueryOperatorInput>;
14001400
readonly _PARENT: Maybe<StringQueryOperatorInput>;
14011401
readonly duration: Maybe<IntQueryOperatorInput>;
1402-
readonly videoAuthor: Maybe<StringQueryOperatorInput>;
1403-
readonly draft: Maybe<BooleanQueryOperatorInput>;
14041402
readonly tutorialTitle: Maybe<StringQueryOperatorInput>;
14051403
readonly banner: Maybe<StringQueryOperatorInput>;
1404+
readonly videoAuthor: Maybe<StringQueryOperatorInput>;
1405+
readonly draft: Maybe<BooleanQueryOperatorInput>;
14061406
};
14071407

14081408
export type MdxGroupConnection = {
@@ -2759,3 +2759,52 @@ export type CommunityTutorialQueryQuery = {
27592759
}>;
27602760
}>;
27612761
};
2762+
2763+
export type TutorialMdxQueryVariables = {
2764+
id: Scalars['String'];
2765+
folderRegex: Maybe<Scalars['String']>;
2766+
};
2767+
2768+
export type TutorialMdxQuery = {
2769+
readonly mdx: Maybe<
2770+
Pick<Mdx, 'id'> & {
2771+
readonly code: Maybe<Pick<MdxCodeMdx, 'body'>>;
2772+
readonly frontmatter: Maybe<Pick<MdxFrontmatter, 'path' | 'pageTitle'>>;
2773+
}
2774+
>;
2775+
readonly pageTitles: Maybe<{
2776+
readonly edges: ReadonlyArray<{
2777+
readonly node: Pick<Mdx, 'id'> & {
2778+
readonly frontmatter: Maybe<Pick<MdxFrontmatter, 'pageTitle'>>;
2779+
};
2780+
}>;
2781+
}>;
2782+
readonly tutorialTitle: Maybe<{
2783+
readonly frontmatter: Maybe<Pick<MdxFrontmatter, 'tutorialTitle'>>;
2784+
}>;
2785+
};
2786+
2787+
export type TutorialOverviewQueryVariables = {
2788+
folderRegex: Maybe<Scalars['String']>;
2789+
};
2790+
2791+
export type TutorialOverviewQuery = {
2792+
readonly allMdx: Maybe<
2793+
Pick<MdxConnection, 'totalCount'> & {
2794+
readonly edges: ReadonlyArray<{
2795+
readonly node: Pick<Mdx, 'id' | 'fileAbsolutePath'> & {
2796+
readonly frontmatter: Maybe<
2797+
Pick<MdxFrontmatter, 'pageTitle' | 'description'>
2798+
>;
2799+
};
2800+
}>;
2801+
}
2802+
>;
2803+
readonly overview: Maybe<
2804+
Pick<Mdx, 'id'> & {
2805+
readonly frontmatter: Maybe<
2806+
Pick<MdxFrontmatter, 'tutorialTitle' | 'banner' | 'description'>
2807+
>;
2808+
}
2809+
>;
2810+
};

0 commit comments

Comments
 (0)