You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running validations for GraphQL request input parameters before our code calls data-loading(or data-fetching) functions, saves resources and separates responsibilities. One example I think that will benefit from this change is nodeStatusList API. Currently,validate_and_process_pagination_params is called in the middle of graphql::node::status::load, so if validation fails, the API will return error in the middle. But after change, input params will be validated before graphql::node::status::load, so server resource will be saved, and we are sure that input params are cleaned before we load something from our server.
Related Parts
Currently, validate_and_process_pagination_params is called inside graphql::load_nodes, graphql::load_edges, graphql::outlier::load, and graphql::outlier::load_ranked_outliers_with_filter.
The text was updated successfully, but these errors were encountered:
Background
#217 (comment)
Running validations for GraphQL request input parameters before our code calls data-loading(or data-fetching) functions, saves resources and separates responsibilities. One example I think that will benefit from this change is
nodeStatusList
API. Currently,validate_and_process_pagination_params
is called in the middle ofgraphql::node::status::load
, so if validation fails, the API will return error in the middle. But after change, input params will be validated beforegraphql::node::status::load
, so server resource will be saved, and we are sure that input params are cleaned before we load something from our server.Related Parts
Currently,
validate_and_process_pagination_params
is called insidegraphql::load_nodes
,graphql::load_edges
,graphql::outlier::load
, andgraphql::outlier::load_ranked_outliers_with_filter
.The text was updated successfully, but these errors were encountered: