Skip to content

Commit 2117cb2

Browse files
author
Niall
committed
Example for order_by being ignored
1 parent 7210e30 commit 2117cb2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

graphene_django/tests/test_query.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -488,18 +488,18 @@ class Query(graphene.ObjectType):
488488
)
489489

490490
def resolve_all_reporters(self, args, context, info):
491-
return Reporter.objects.all()
491+
return Reporter.objects.order_by('a_choice')
492492

493-
r = Reporter.objects.create(
494-
first_name='John',
495-
last_name='Doe',
496-
email='johndoe@example.com',
497-
a_choice=1
498-
)
499493
Reporter.objects.create(
500494
first_name='Bob',
501495
last_name='Doe',
502496
email='bobdoe@example.com',
497+
a_choice=2
498+
)
499+
r = Reporter.objects.create(
500+
first_name='John',
501+
last_name='Doe',
502+
email='johndoe@example.com',
503503
a_choice=1
504504
)
505505

0 commit comments

Comments
 (0)