in reply to Throttling while using LWP for MS Graph request?

You're having to make 2700 requests to get each thing, having first got a list of the things. This sounds like a classic "1 + n" problem for REST APIs. Are you able to use GraphQL to get everything in one request? It looks like Microsoft experimented with that, see https://github.com/microsoftgraph/graphql-demo.
  • Comment on Re: Throttling while using LWP for MS Graph request?

Replies are listed 'Best First'.
Re^2: Throttling while using LWP for MS Graph request?
by PeterKaagman (Beadle) on May 15, 2024 at 07:08 UTC

    It's even worse: 2700 request for the owners and 2700 requests for the member. Firing them off as fast as I can. Did I mention I'm a candidate for throttling ;)
    I know, not really efficient. Reminds me of my SQL days before I learned about joins.

    Never heard of GraphQL, but wil most certainly have a look. Thanks for the reply

      To be clear, GraphQL is a technology that's designed for this situation, but it has to be provided by the service. To learn more, see https://www.graphql.org/, and for the Perl implementation (ported by yours truly) see GraphQL.