We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3d3251 commit 4c5f7e9Copy full SHA for 4c5f7e9
backend/family_tree/student/schema.py
@@ -10,14 +10,13 @@ class Meta:
10
11
class Query(graphene.ObjectType):
12
students=graphene.List(StudentType)
13
- children=graphene.List(StudentType, id_of_parent=graphene.String())
+ children=graphene.List(StudentType, parent_id=graphene.String())
14
15
def resolve_students(root,info):
16
return Student.objects.all()
17
18
- def resolve_children(id_of_parent):
19
- children_qset = Student.objects.filter(parentId=id_of_parent)
20
- return children_qset
+ def resolve_children(parent_id):
+ return Student.objects.filter(parentId=parent_id)
21
22
23
schema=graphene.Schema(query=Query)
0 commit comments