Skip to content

Commit 71784ee

Browse files
committed
added a resolver for students
1 parent 1d26c98 commit 71784ee

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

backend/family_tree/family_tree/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
'django.contrib.admin',
3737
'django.contrib.auth',
3838
'django.contrib.contenttypes',
39+
'django_filters',
3940
'django.contrib.sessions',
4041
'django.contrib.messages',
4142
'django.contrib.staticfiles',

backend/family_tree/student/schema.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ class Meta:
1111
class Query(graphene.ObjectType):
1212
students=graphene.List(StudentType)
1313

14+
def resolve_students(root,info):
15+
return Student.objects.all()
16+
1417
schema=graphene.Schema(query=Query)

0 commit comments

Comments
 (0)