Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read course id null #188

Open
ramanxg opened this issue Mar 22, 2022 · 1 comment
Open

Cannot read course id null #188

ramanxg opened this issue Mar 22, 2022 · 1 comment
Labels
bug Something isn't working good first task Good for newcomers graphql graphql related items

Comments

@ramanxg
Copy link
Member

ramanxg commented Mar 22, 2022

For queries to websoc, some courses we don't have in our cache, and this throws an error.

This is the error message:

Cannot read property 'id' of null"

Example query:

{
  schedule(year:2020, quarter:"Fall", department:"COMPSCI", course_number:"275") {
     course {
      id
      department
      course_level
      description
    }
  }
}
@ramanxg ramanxg added bug Something isn't working graphql graphql related items labels Mar 22, 2022
@y-dejong y-dejong self-assigned this Mar 26, 2022
@ramanxg ramanxg added good first task Good for newcomers fellowship labels May 26, 2022
@ramanxg
Copy link
Member Author

ramanxg commented May 26, 2022

In schedule.helper.ts under getCourseSchedules. getCourse will sometimes return null, if it's not in our cache. If it's null, we can return what we can: id, title, department, number.

@ramanxg ramanxg removed the good first task Good for newcomers label May 26, 2022
@ChaseC99 ChaseC99 added good first task Good for newcomers and removed fellowship labels Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first task Good for newcomers graphql graphql related items
Projects
Status: Fellowship Tasks
Development

No branches or pull requests

3 participants