Sha256: 086761979f986c89a5592525db521cd5202df56386c3ec950f7b8f365d00e108
Contents?: true
Size: 1.43 KB
Versions: 23
Compression:
Stored size: 1.43 KB
Contents
# Prevent providing invalid arguments in function, render and graphql tags Liquid (`InvalidArgs`) This check exists to prevent providing invalid arguments via `function`, `render` and `graphql` tags. ## Examples The following examples contain code snippets that either fail or pass this check. ### ✗ Fail ```liquid {% comment %}app/graphql/my-query does not define invalid_argument{% endcomment %} {% graphql res = 'my-query', invalid_argument: 10 %} ``` ```liquid {% function res = 'my-function', arg: 1, arg: 2 %} ``` ```liquid {% render res = 'my-partial', context: context %} ``` ### ✓ Pass ```liquid {% comment %}app/graphql/my-query defines defined_argument{% endcomment %} {% graphql res = 'my-query', defined_argument: 10 %} ``` ## Options The following example contains the default configuration for this check: ```yaml InvalidArgs: enabled: true ``` | Parameter | Description | | --- | --- | | enabled | Whether the check is enabled. | | severity | The [severity](https://documentation.platformos.com/developer-guide/platformos-check/platformos-check#check-severity) of the check. | ## When Not To Use It It is not safe to disable this rule. ## Resources - [platformOS GraphQL Reference](https://documentation.platformos.com/api-reference/graphql/glossary) - [Rule source][codesource] - [Documentation source][docsource] [codesource]: /lib/platformos_check/checks/graphql_args.rb [docsource]: /docs/checks/graphql_args.md
Version data entries
23 entries across 23 versions & 1 rubygems