msgraph-sdk-dotnet icon indicating copy to clipboard operation
msgraph-sdk-dotnet copied to clipboard

Query parameters $select, $expand and $orderBy should not be an array

Open olivermue opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe. In v4 the query parameters of $select, $expand and $orderBy have been set by a single string that had to match the expected structure of the underlying API (values separated by a comma without spaces). Abstract this away by using an array and let the serializer doing the work is the right approach. But the currently used type is an explicit array (string[]) which is IMHO to specific.

Describe the solution you'd like Instead of using such a concrete type I would prefer some collection interface like IEnumerable<string> or IReadOnlyCollection<string>. Using an enumerator at this place is maybe not the best option, cause it could be evaluated lazily and could lead to awkward errors deep down in the serializer. So my favourite would be IReadOnlyCollection<string>. In that case we could use different concrete types depending on the users scenario like List<string>, HashSet<string> or Dictionary<string, object>.Keys.

olivermue avatar Mar 09 '23 08:03 olivermue