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

Repeatable Directives are ignored, only first directive is applied #671

Closed
jimartinmoreno opened this issue Jun 18, 2022 · 0 comments
Closed
Labels

Comments

@jimartinmoreno
Copy link

The graphql-java library support repeatable directives as we can see here: graphql-java/graphql-java#1763
Example:
directive @auth(authorities : [String]!) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION | FIELD_DEFINITION | MUTATION | QUERY

But "SchemaParser" is reading only the first repeated directive like in the example below we got only the first directive triggered:

type Persona {
billingAddress: BillingAddress @retryable @auth(authorities: ["BILLING_ADDRESS_READ"]) @auth(authorities: ["BILLING_ADDRESS_WRITE"])
}

Expected behavior
When more the one of a"repeatable" directive is applied to a field, all repeated directives should be processed.

Actual behavior
Only the first directive is been processed.

Steps to reproduce the bug

  1. Define a directive as "repeatable" like the example above.
  2. Apply this directive more than once to a single field.
  3. All directives should run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant