hughhhh commented on a change in pull request #16558:
URL: https://github.com/apache/superset/pull/16558#discussion_r701279897



##########
File path: superset/views/graphql.py
##########
@@ -27,10 +44,25 @@ def resolve_database(obj, info, database_id):
     return payload
 
 
+def resolve_dashboardInfo(obj, info, dashboard_id):
+    dashboard = db.session.query(Dashboard).filter_by(id=dashboard_id).one()
+    try:
+        payload = {
+            "success": True,
+            "dashboard": dashboard.data,
+        }
+
+    except Exception as error:
+        payload = {"success": False, "errors": [str(error)]}
+    return payload
+
+
 query = ObjectType("Query")
 
 query.set_field("database", resolve_database)
 
+query.set_field("dashboardInfo", resolve_dashboardInfo)

Review comment:
       make this `dashboard`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to