SHARE
TWEET

Untitled

a guest Dec 9th, 2019 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def resolve_query_user(parent, args, context, info):
  2.     """Resolve User information under top level Query.
  3.  
  4.    Args:
  5.        parent: Result from parent resolver.
  6.        args: field arguments passed in the query.
  7.        context: Per-request state, usually from server.
  8.        info: Introspection about the query itself.
  9.  
  10.    Returns:
  11.        Something that maps to GraphQL types or that can be
  12.        understood by another resolver.
  13.    """
  14.     return business.load_user_from_login(args["login"])
  15.  
  16.  
  17. def resolve_query_user_name(parent, args, context, info):
  18.     assert isinstance(parent, ExpectedBusinessUserClass)
  19.     return f"{parent.firstname} {parent.lastname}"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top