microsoftgraph / microsoftgraph/msgraph-sdk-dotnet
Query parameters $select, $expand and $orderBy should not be an array
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 789
- Forks
- 264
- Avg merge
- 15h 17m
- Merged PRs (30d)
- 3
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the definitions for the $select, $expand, and $orderBy query parameters and the serializer that converts them to comma-separated values. Check existing tests around these parameters before changing the collection type. Done means supported collection implementations serialize correctly without changing the generated query format.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100