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

Correctly print deprecated argument with default value #1491

Merged
merged 1 commit into from
Dec 5, 2023

Conversation

ruudk
Copy link
Contributor

@ruudk ruudk commented Dec 1, 2023

Today I deprecated an argument with a default value and noticed that the schema was printed wrong:

type Query {
  singleField(id: ID @deprecated(reason: "this is deprecated") = 123): Int
}

The @deprecated directive should be put after the = 123 default value.

Today I deprecated an argument with a default value and noticed that the schema was printed wrong:

```graphql
type Query {
  singleField(id: ID @deprecated(reason: "this is deprecated") = 123): Int
}
```

The `@deprecated` directive should be put after the `= 123` default value.
@ruudk ruudk force-pushed the fix-deprecated-arg-default-value branch from 0e6c5e1 to 09ef235 Compare December 1, 2023 14:54
@ruudk
Copy link
Contributor Author

ruudk commented Dec 5, 2023

@spawnia Ready for review, whenever you have time 💙

@spawnia
Copy link
Collaborator

spawnia commented Dec 5, 2023

Good catch, also seems like a very natural progression to have this combination.

@spawnia spawnia merged commit a76cafc into webonyx:master Dec 5, 2023
13 checks passed
@ruudk ruudk deleted the fix-deprecated-arg-default-value branch November 11, 2024 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants