ardatan / ardatan/graphql-mesh

[OData Handler] Add default filter param of ID for all queries on collections when talking to Microsoft Graph

Open
#787 7 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
TypeScript
Stars
3.5k
Forks
363
Avg merge
6h 10m
Merged PRs (30d)
19

Description

Every entity in OData carries a unique Entity ID. In Graph we also have a default `id` property on every entity. When querying against a collection, the id can be used in the url as part of the path. Currently there is no way to filter on the id other than using the `Filter` property on `QueryOptions`. Without having id first class, I cannot currently create a request to with the following urls

```https://graph.microsoft.com/v1.0/me/drive/items/F8B2FD72406FB218!6801/versions```

or

```https://graph.microsoft.com/v1.0/me/drive/items('F8B2FD72406FB218!6801')/versions```

If id is added as a first class param and implemented such that the id is used in the path (using either of the two approaches) then I could use the following GraphQL query to get that url

```javascript
{
me {
drive {
items(id:"F8B2FD72406FB218!6801")
{
versions {
id
}
}
}
}
}
```

Adding this behavior would enhance overall drill down with GraphQL on OData feeds.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the OData Handler and inspect how QueryOptions currently exposes the Filter property for collection queries. Trace how collection paths are built, then verify that a first-class id parameter produces one of the requested Microsoft Graph URL forms and supports the shown GraphQL query.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
api, backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.