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

Extra empty list item in GraphQL output #1014

Closed
russellbanks opened this issue Aug 25, 2024 · 1 comment
Closed

Extra empty list item in GraphQL output #1014

russellbanks opened this issue Aug 25, 2024 · 1 comment

Comments

@russellbanks
Copy link
Contributor

I have this defined in my cynic query:

#[arguments(first: 5, states: [MERGED, CLOSED])]
pub associated_pull_requests: PullRequestConnection,

However in the actual GraphQL query, the output has an extra empty item:

associatedPullRequests(first: 5, states: [MERGED, CLOSED, ]) {

This doesn't affect anything, it just looked unintentional when I was asserting the query output.

@obmarg
Copy link
Owner

obmarg commented Aug 25, 2024

Thanks for the report @russellbanks - I think this was just me being lazy and taking advantage of the fact that commas are treated as whitespace in GraphQL syntax (states: [MERGED,,,, CLOSED,,,] would also work the same, as would states: [MERGED CLOSED]).

But I did notice this myself the other day and fixed it in #1009

@obmarg obmarg closed this as completed Aug 25, 2024
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

No branches or pull requests

2 participants