You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
A GraphQL operation is composed of many tokens. Parsing and validating an operation requires to check each token for validity. Therefore having a request with many many tokens may take extra long to validate, or might even cause server issues.
Having a max-tokens protection mechanism should help prevent such issues by disallowing requests that exceed a certain configurable token count.
Describe the solution you'd like
Build a new Rule that itilizes GraphQL ValidationRules feature to count the number of tokens in the AST.
Register the Rule with the GraphQL engine, and allow for configuration options to enable/disable the feature, as well as configure the token limit.
Provide sane defaults.
Include test cases to prove the feature works.
Update user documentation.
Additional context
This feature is inspired by GraphQL Armor so inspiration can be drawn from their known working implementation.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
A GraphQL operation is composed of many tokens. Parsing and validating an operation requires to check each token for validity. Therefore having a request with many many tokens may take extra long to validate, or might even cause server issues.
Having a max-tokens protection mechanism should help prevent such issues by disallowing requests that exceed a certain configurable token count.
Describe the solution you'd like
Build a new Rule that itilizes GraphQL ValidationRules feature to count the number of tokens in the AST.
Register the Rule with the GraphQL engine, and allow for configuration options to enable/disable the feature, as well as configure the token limit.
Provide sane defaults.
Include test cases to prove the feature works.
Update user documentation.
Additional context
This feature is inspired by GraphQL Armor so inspiration can be drawn from their known working implementation.
The text was updated successfully, but these errors were encountered: