-
Notifications
You must be signed in to change notification settings - Fork 194
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
Differences in Lesson Loading GraphQL Requests #1138
Comments
jbranchaud
added a commit
that referenced
this issue
Jul 15, 2022
jbranchaud
added a commit
that referenced
this issue
Jul 15, 2022
We are in the process of moving away from egghead-rails as the source of lesson metadata. This moves us along that path by eliminating one of th huge graphql queries for lesson metadata. issue: #1138
kodiakhq bot
pushed a commit
that referenced
this issue
Jul 20, 2022
We are in the process of moving away from egghead-rails as the source of lesson metadata. This moves us along that path by eliminating one of th huge graphql queries for lesson metadata. issue: #1138
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As part of trying to understand what attributes and associated data we need when loading a Lesson for a lesson page, I compared and contrasted the
loadLesson
andloadBasicLesson
graphql queries that appear insrc/lib/lessons.ts
.I'll summarize my findings and then reproduce the entire annotated queries.
Headline
The headline for me is that I think we can make a couple (4) small adjustments to the
loadLesson
function for all our needs and then throw away theloadBasicLesson
function. For starters, this will reduce confusion about which to use and when. There is no way to make that decision at a quick glance because both are loading most of the kitchen sink. From here, there is probably additional trimming down and clarifying that we can do.Summary
After doing a side-by-side comparison of the two queries, I was able to rearrange a few attributes and then add comments on both sides for the ones that were missing (annotated by
""" some_attr """
).For
loadLesson
, the only attributes thatloadBasicLesson
requests that it doesn't already request are:lesson.updated_at
lesson.published_at
collection.playlist.lesson[].media_url
collection.course.lesson[].media_url
For
loadBasicLesson
, they are still quite similar but it is missing a few more attributes:lesson.duration
lesson.transcript_url
lesson.next_up_url
lesson.dash_url
lesson.http_url
lesson.lesson_view_url
lesson.download_url
collection.playlist.lesson[].thumb_url
collection.course.lesson[].thumb_url
lesson.course.title
lesson.course.square_cover_480_url
lesson.course.slug
lesson.repo_url
lesson.code_url
Annotated Queries
The text was updated successfully, but these errors were encountered: