Skip to content

Resource limitations: Enforcing pagination limits at router level #1246

Answered by garypen
andrew-kolesnikov asked this question in Q&A
Discussion options

You must be logged in to vote

I think the best way to address this would be to write a plugin. You've got two options: depending on how sophisticated you want your processing to be. If it's very simple, then you might be able to achieve your goal with a rhai plugin, which facilitates basic text manipulation, math, etc.. However, I think you are looking for something more sophisticated, since the link you provide seems to require knowledge of GraphQL Query structure. This would probably require you to write a rust plugin.

You may be able to get the information you need to make decisions from the QueryPlan that we provide in query_planning_service. If not, you will need to parse the request (perhaps using apollo-parser)…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by andrew-kolesnikov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants