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.
Comment on Re^3: Throttling while using LWP for MS Graph request?