OData / OData/AspNetCoreOData

$skipToken is replaced with $skip when $compute is used

Open
#1,127 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
505
Forks
186
PR merge metrics
No merged PRs in 30d

Description

Assemblies affected
ASP.NET Core OData 8.x

Describe the bug
NextLink does not have $skipToken even when configured, but instead has $skip when a $compute expression is used in the request.

Reproduce steps

  1. Enable SkipToken for your controllers.
  2. Hit your API service with a $compute expression:
http://localhost:2000/beta/students?$orderby=lowername&$compute=tolower(name) as lowername

Data Model

public class Student
{
    [Key]
    public string Id {get; set;}
    public string Name {get; set;}
}

EDM (CSDL) Model

<EntityType Name="Student">
    <Key>
        <PropertyRef Name="id" />
    </Key>
    <Property Name="id" Type="Edm.String" Nullable="false" />
    <Property Name="name" Type="Edm.String" Nullable="false" />
</EntityType>

Request/Response

http://localhost:2000/beta/students?$orderby=lowername&$compute=tolower(name) as lowername

Expected behavior
NextLink in the response should have a $skipToken, but it instead has a $skip.

Screenshots
NA

Additional context

  1. The default SkipToken handler is used.
  2. The same code returns a $skipToken when used without the $compute expression and even with just the $orderby expression.

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.

Research direction

Reproduce the request using the default SkipToken handler with $orderby and $compute, then compare the generated NextLink with the behavior without $compute. Trace the pagination and NextLink generation path; done means the response retains $skipToken when $compute is present, without regressing the existing cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.