Skip to content

Commit a3d3251

Browse files
committed
Corrections in PR
1 parent ccdd5b3 commit a3d3251

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

backend/family_tree/student/schema.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ class Meta:
1010

1111
class Query(graphene.ObjectType):
1212
students=graphene.List(StudentType)
13+
children=graphene.List(StudentType, id_of_parent=graphene.String())
14+
15+
def resolve_students(root,info):
16+
return Student.objects.all()
1317

1418
def resolve_children(id_of_parent):
15-
children_qset = Student.objects.filter(parentId=id)
19+
children_qset = Student.objects.filter(parentId=id_of_parent)
1620
return children_qset
1721

1822

0 commit comments

Comments
 (0)