Infinite loop when using nextLink in GET /me/people response
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- node.js, typescript
- Domínio
- api
Direção de pesquisa
Start with the Node client entry point shown in the report, client.api('/me/people'), and reproduce the response using SDK version 3.0.7. Inspect whether the returned @odata.nextLink preserves the same results and skip=0; done means pagination advances or omits nextLink when no people remain.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Bug Report
Prerequisites
- Can you reproduce the problem?
- Are you running the latest version?
- Are you reporting to the correct repository?
- Did you perform a cursory search?
For more information, see the CONTRIBUTING guide.
Description
In my app, I'm using the people API to return a list of relevant people to the logged-in user. I'm then taking the nextLink in the API response to request the remaining people, but this results in an infinite loop. After taking a closer look, I noticed that the skip param value in the @odata.nextLink URL is 0, which I believe is the culprit.
Steps to Reproduce
For brevity, I'm including code to get the initial nextLink response, but I can include my looping logic if needed.
import { Client } from '@microsoft/microsoft-graph-client';
const client = Client.init({
authProvider: (done) => done(null, 'ACCESS_TOKEN')
});
let request = client.api('/me/people');
const properties = [
'id',
'displayName',
'givenName',
'surname',
'scoredEmailAddresses',
'phones'
];
request = request.select(properties);
const response = await request.get();
console.log(response['@odata.nextLink']);
The console should log https://graph.microsoft.com/v1.0/me/people?%24select=id%2cdisplayName%2cgivenName%2csurname%2cscoredEmailAddresses%2cphones&%24skip=0.
Expected behavior: The skip param in the @odata.nextLink URL should be offset by the number of returned results in order to request the following "page." If there are no more people to return, @odata.nextLink should be undefined.
Actual behavior: The @odata.nextLink URL in the response has a skip param of 0, thereby returning the same results in following requests and resulting in an infinite loop.
Usage Information
SDK Version - 3.0.7
- Node (Check, if using Node version of SDK)
Node Version - 20.11.1
- Linguagem predominante
- TypeScript
- Estrelas
- 836
- Forks
- 240
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de microsoftgraph/msgraph-sdk-javascript
-
status:waiting-for-triage
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 62/100
-
Is anyone here?Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 25/100
microsoftgraph/msgraph-sdk-javascript#2005 · 1 reação ·
-
Is it really correct that the Javascript version of the graph SDK doesn't offer typed requests?Abertastatus:waiting-for-triage
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 42/100
-
status:waiting-for-triage type:bug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 48/100
microsoftgraph/msgraph-sdk-javascript#1999 · 2 comentários · 1 reação ·
-
status:waiting-for-triage type:bug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 45/100
Todas as issues de microsoftgraph/msgraph-sdk-javascript
Issues semelhantes
-
dx hacktoberfest help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
Mantenedores costumam responder em até 1 dia
-
documentation
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
cloudflare/agents#2498 ·
Mantenedores costumam responder em até 1 dia
-
Missing repro Platform: Android
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
software-mansion/react-native-reanimated#10816 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
e2e-failure ready-to-code
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
redhat-developer/rhdh-plugin-export-overlays#4129 ·
Mantenedores costumam responder em até 1 dia