pass vector as function argument c++ code example
Example 1: c++ passing vector to function
// Pass by value
void print(std::vector<int> arr) { }
// Pass by reference
void print(std::vector<int>& arr) { }
Example 2: graphql pass array as argument
//use type modifers. [] for arrays.
type Query {
Items(id:[ID]) : [item]
}