microsoftgraph / microsoftgraph/msgraph-metadata

ODSP duplicate delta function

Open
#431 1 comment 2 reactions 1 assignee View on GitHub

@irvinesunday is already working on this.

Since Sep 13, 2023.

metadata-issue priority:p1
Dominant language
XSLT
Stars
166
Forks
55
Avg merge
16h 12m
Merged PRs (30d)
14

Description

ODSP defines two OData functions when only one is required

<Function Name="delta" IsBound="true">
   <Parameter Name="bindingParameter" Type="graph.driveItem" />
   <ReturnType Type="Collection(graph.driveItem)" />
</Function>
<Function Name="delta" IsBound="true">
  <Parameter Name="bindingParameter" Type="graph.driveItem" />
  <Parameter Name="token" Type="Edm.String" Unicode="false" />
  <ReturnType Type="Collection(graph.driveItem)" />
</Function>

During the conversion, this leads us to project the following paths

  • {+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/delta{?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}
  • {+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/delta(token='{token}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}

Which creates confusion for consumers, they start parsing delta links when they shouldn't. etc...
The only scenario where we need to support a token (not deltaToken) query parameter is when users only want to start from the latest with ?token=latest

We should implement a transformation to

  1. remove the second function
  2. add the token query parameter to the first function

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.