mirror of
https://github.com/graphql-python/graphene.git
synced 2025-09-21 11:22:33 +03:00
Apply suggestions from code review
Change resolver examples to use better named arguments Co-Authored-By: allardhoeve <allardhoeve@gmail.com>
This commit is contained in:
parent
eb0c2d8e25
commit
c38b4d268c
|
@ -112,9 +112,9 @@ leaner code and at most 4 database requests, and possibly fewer if there are cac
|
|||
friends = graphene.List(lambda: User)
|
||||
|
||||
@staticmethod
|
||||
def resolve_best_friend(root, info):
|
||||
def resolve_best_friend(user, info):
|
||||
return user_loader.load(root.best_friend_id)
|
||||
|
||||
@staticmethod
|
||||
def resolve_friends(root, info):
|
||||
def resolve_friends(user, info):
|
||||
return user_loader.load_many(root.friend_ids)
|
||||
|
|
|
@ -42,5 +42,5 @@ that implements ``Node`` will have a default Connection.
|
|||
ships = relay.ConnectionField(ShipConnection)
|
||||
|
||||
@staticmethod
|
||||
def resolve_ships(root, info):
|
||||
def resolve_ships(faction, info):
|
||||
return []
|
||||
|
|
Loading…
Reference in New Issue
Block a user