Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

makeWrapPlansAfterArgumentsHaveBeenAppliedPlugin - solve confusion #2062

Open
benjie opened this issue May 10, 2024 · 0 comments
Open

makeWrapPlansAfterArgumentsHaveBeenAppliedPlugin - solve confusion #2062

benjie opened this issue May 10, 2024 · 0 comments

Comments

@benjie
Copy link
Member

benjie commented May 10, 2024

makeWrapPlansPlugin can be confusing because it wraps the plan before the argument plans have been applied.

Let's say someone wanted to add a plan wrapper plugin to reject requests where the "limit" of a fetch was too high. How could we see the size of first/last when they've not been applied yet (without relying on argument names).

Also, in this case we'd probably want to raise the error from nodes rather than from allRows since {allRows{totalCount}} without pagination limits is a perfectly reasonable query, whereas {allRows{nodes{id}}} would not be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🦉 Owl
Development

No branches or pull requests

1 participant