Skip to content

fix: replace dead v1 curriculum REST API with GraphQL#584

Draft
raisedadead wants to merge 1 commit intofreeCodeCamp:mainfrom
raisedadead:fix/curriculum-db-graphql
Draft

fix: replace dead v1 curriculum REST API with GraphQL#584
raisedadead wants to merge 1 commit intofreeCodeCamp:mainfrom
raisedadead:fix/curriculum-db-graphql

Conversation

@raisedadead
Copy link
Member

@raisedadead raisedadead commented Mar 6, 2026

The v1 REST API at freecodecamp.org/curriculum-data/v1/ now returns 404 HTML, crashing every page that loads curriculum data. Replace with the GraphQL API at curriculum-db.freecodecamp.org.

  • Add util/curriculum/fetchCurriculum.js (GraphQL client with cache)
  • Rewire getAllSuperblockTitlesAndDashedNames to use GraphQL
  • Rewire getSuperblockTitlesInClassroomByIndex to use GraphQL
  • Update classes page and all 3 dashboard pages

  The v1 REST API at freecodecamp.org/curriculum-data/v1/ now returns
  404 HTML, crashing every page that loads curriculum data. Replace with
  the GraphQL API at curriculum-db.freecodecamp.org.

  - Add util/curriculum/fetchCurriculum.js (GraphQL client with cache)
  - Rewire getAllSuperblockTitlesAndDashedNames to use GraphQL
  - Rewire getSuperblockTitlesInClassroomByIndex to use GraphQL
  - Update classes page and all 3 dashboard pages
blockObjects {
dashedName
name
order
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The field order does not currently exist in the GraphQL, and it's causing an error when queried. We should add this field to the GraphQL.

Copy link
Contributor

@CarlyAThomas CarlyAThomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @raisedadead

This PR returns several things that should not be in the list that a teacher can select for a classroom:

  1. Legacy Certifications are included (responsive-web-design)
  2. Courses that are parts of other curriculum certifications (basic-html)
  3. Upcoming Courses (a2-professional-spanish)

To solve this we can either:

  • In classroom app, hardcode a list of certifications that should be excluded.
  • In the GraphQL API add flags for isLegacy, etc. fields to use for the filtering

Which solution do you prefer? Do you think it is doable to add these flags into the GraphQL API or should we have them hardcoded?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants