Closed roshaans closed 9 months ago
This is the query I will make from the frontend.
query Query {
dataplatform_near_developer_info(
where: {widget_path: {_eq: "\"dataplatform.near\""}}
) {
total_widgets
join_date
}
}
You may use this widget as a base called widget-activity-feed
here.
I forked the @roshaans 's component to: https://near.org/dataplatform.near/widget/QueryApi.App?selectedIndexerPath=eduohe.near/nearcon-2023-widget-activity-feed&view=editor-window
And asked @roshaans to review the GraphiQL queries below:
Number of Components per user
query MyQuery {
eduohe_near_nearcon_2023_widget_activity_feed_widget_activity_aggregate(
where: {account_id: {_eq: "calebjacob.near"}}
) {
aggregate {
count(distinct: true, columns: widget_name)
}
}
}
Developer Since
query MyQuery {
eduohe_near_nearcon_2023_widget_activity_feed_widget_activity_aggregate(
where: {account_id: {_eq: "calebjacob.near"}}
) {
aggregate {
min {
block_timestamp
}
}
}
}
@bucanero please consider creating an article on how to use aggregations with QueryAPI GraphQL endpoints. Example could be posts per day or this widget activity widget.
We would like to retrieve some information for the new component detail redesign. We need to display when the user first became a BOS developer as well as the total number of components the developer has created