Skip to content

Instantly share code, notes, and snippets.

@nderkach
Created November 26, 2017 11:56
Show Gist options
  • Save nderkach/97e1fa2f063f54bca2dcda9a1313e430 to your computer and use it in GitHub Desktop.
Save nderkach/97e1fa2f063f54bca2dcda9a1313e430 to your computer and use it in GitHub Desktop.
class Query(ObjectType):
reviews = List(Review, id=Int(required=True))
def resolve_reviews(self, args, context, info):
reviews = api_call(args.get("id"))["reviews"]
return json2obj(json.dumps(reviews))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment