def is_error(response): """Check if graphql response is an error.""" # TODO: We should use response objects from graphql calls instead return isinstance(response, dict) and response.get('errors')