-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Connect home and discover screens to the backend #48
base: develop
Are you sure you want to change the base?
Conversation
d309a7c
to
264bcdd
Compare
Good point with the nullable id's, opened a issue with the backend code4romania/teacher-workout-backend#74 |
There is a small discussion that needs to happen here, The fact that The usual approach I see in the wild is for this
|
I've made a POC with a proposed approach to data access #50 Please take a look and let me know what you think. |
Good points at first. At the moment, I'm really caught into something and I'll try to take a deeper look into the PR Monday or Tuesday. |
@alexandru-calinoiu As I said in the other PR, what I did doesn't seem like the the way to go. It's too much of a REST approach 😵. So I think that we should close this PR. |
@daniyelp one can write a query similar to this one to fetch all the data query {
lessonStatuses(lessonIds: ["1"]) {
currentLessonStep {
id
... on SlideStep {
__typename
title
description
}
... on ExerciseStep {
__typename
}
}
}
themes {
edges {
node {
id
title
thumbnail {
url
}
}
}
}
} But I think we need to open a ticket with the backend so that the |
What does it fix?
Resolves #38.
As a quick sum-up, I imported the GraphQL schema, created the repository to fetch the lessons and the lesson themes and updated the screens to the new model classes (*interfaces) created by Apollo.
It might not be ready for merging yet, because there were some things that got me confused / I wasn't quite sure of: