@@ -2,6 +2,7 @@ import { execSync } from 'child_process';
2
2
import fs from 'fs' ;
3
3
import path from 'path' ;
4
4
import * as freshOrdering from './content/ordering' ;
5
+ import { typeDefs } from './graphql-types' ;
5
6
import div_to_probs from './src/components/markdown/ProblemsList/DivisionList/div_to_probs.json' ;
6
7
import { createXdmNode } from './src/gatsby/create-xdm-node' ;
7
8
import {
@@ -491,87 +492,6 @@ exports.createPages = async ({ graphql, actions, reporter }) => {
491
492
492
493
exports . createSchemaCustomization = ( { actions } ) => {
493
494
const { createTypes } = actions ;
494
- const typeDefs = `
495
- type Xdm implements Node {
496
- body: String
497
- fileAbsolutePath: String
498
- frontmatter: XdmFrontmatter!
499
- isIncomplete: Boolean
500
- cppOc: Int
501
- javaOc: Int
502
- pyOc: Int
503
- toc: TableOfContents
504
- mdast: String
505
- }
506
-
507
- type XdmFrontmatter implements Node {
508
- id: String
509
- title: String!
510
- author: String
511
- contributors: String
512
- description: String
513
- prerequisites: [String]
514
- redirects: [String]
515
- frequency: Int
516
- }
517
-
518
- type Heading {
519
- depth: Int
520
- value: String
521
- slug: String
522
- }
523
-
524
- type TableOfContents {
525
- cpp: [Heading]
526
- java: [Heading]
527
- py: [Heading]
528
- }
529
-
530
- type ModuleProblemLists implements Node {
531
- moduleId: String
532
- problemLists: [ModuleProblemList]
533
- }
534
-
535
- type ModuleProblemList {
536
- listId: String!
537
- problems: [ModuleProblemInfo]
538
- }
539
-
540
- type ProblemInfo implements Node {
541
- uniqueId: String!
542
- name: String!
543
- url: String!
544
- source: String!
545
- sourceDescription: String
546
- isStarred: Boolean!
547
- difficulty: String!
548
- tags: [String!]!
549
- solution: ProblemSolutionInfo!
550
- inModule: Boolean!
551
- module: Xdm @link(by: "frontmatter.id")
552
- }
553
-
554
- type ModuleProblemInfo {
555
- uniqueId: String!
556
- name: String!
557
- url: String!
558
- source: String!
559
- sourceDescription: String
560
- isStarred: Boolean!
561
- difficulty: String!
562
- tags: [String!]!
563
- solution: ProblemSolutionInfo
564
- }
565
-
566
- type ProblemSolutionInfo {
567
- kind: String!
568
- label: String
569
- labelTooltip: String
570
- url: String
571
- sketch: String
572
- hasHints:Boolean
573
- }
574
- ` ;
575
495
createTypes ( typeDefs ) ;
576
496
} ;
577
497
const FilterWarningsPlugin = require ( 'webpack-filter-warnings-plugin' ) ;
0 commit comments