Repository navigation
Conversation
Page-
disabled auto-merge
October 22, 2026 22:18
Page-
enabled auto-merge
October 22, 2026 22:18
Page-
force-pushed
the
reject-invalid-count-options
branch
4 times, most recently
from
October 23, 2026 12:23
63146a3 to
90751eb
Compare
| let addPathKey = true; | ||
|
|
||
| if (hasQueryOpts && path.options?.$expand) { | ||
| if (path.count) { |
Contributor
There was a problem hiding this comment.
shouldn't this explicitely be path.count == 0 || path.count != null ? because I can't say for sure which is the comparison you actually want (same follows for follow up new ifs)
`/pilot/$count?$expand=licence` selected the expanded licence subquery alongside `COUNT(*)`, which is invalid sql as the subquery references an ungrouped column. The same happened for a nested `$expand` within an expanded `$count`, eg `$expand=licence/$count($expand=is_of__pilot)` or `$expand=can_fly__plane/$count/plane`. `$orderby`, `$top` and `$skip` cannot affect a count either, and were silently dropped. These are now all rejected with a `SyntaxError` rather than failing when the query is run or having part of the request silently ignored. Change-type: patch
Page-
force-pushed
the
reject-invalid-count-options
branch
from
October 26, 2026 11:13
90751eb to
1cfe7d4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/pilot/$count?$expand=licenceselected the expanded licence subquery alongsideCOUNT(*), which is invalid sql as the subquery references an ungrouped column. The same happened for a nested$expandwithin an expanded$count, eg$expand=licence/$count($expand=is_of__pilot)or$expand=can_fly__plane/$count/plane.$orderby,$topand$skipcannot affect a count either, and were silently dropped.These are now all rejected with a
SyntaxErrorrather than failing when the query is run or having part of the request silently ignored.Change-type: patch