Feature/handle multiple connection strings and list filters#3187
Feature/handle multiple connection strings and list filters#3187anthomaxcool wants to merge 3 commits intoAzure:mainfrom
Conversation
@microsoft-github-policy-service agree |
There was a problem hiding this comment.
1. In parser:
- any: true => ARRAY_ANY -> SQL ARRAY_LENGTH(field) > 0
- any: false => coerced to IS NULL
That makes “no elements” equivalent to “is null”, but empty array is not null. Expected
semantics for any: false are usually “array is null OR length == 0” (depending on product definition). This currently only checks null. If intended behavior is “not non-empty”, this is a bug.
2. CosmosQueryBuilder builds nested predicate text and then Replace(arrayField, elementAlias).
This is fragile when:
- field string appears in literals or function args
- nested structures include same token as substring
- multiple levels of nesting reuse similar field names
Safer would be AST-aware rendering with scoped symbol binding, not text replacement.
3. Build(PredicateOperation op) returns tokens not used as SQL operators
You added:
- ARRAY_SOME, ARRAY_NONE, ARRAY_ALL, ARRAY_ANY
But actual SQL emitted for these is custom branches in Build(Predicate?). Returning string constants here may be misleading and could accidentally leak if future code paths call Build(op) directly.
4. GraphQLSchemaCreator now dedups by INamedSyntaxNode.Name.Value across datasource roots.
If two sources define same type name differently, second definition is silently dropped. This may:
- mask config errors
- produce surprising schema depending on iteration order
You should likely detect conflict and throw explicit validation error on differing shapes.
5. Silent continue in Query/Mutation builders can hide config/schema mismatch
Skipping object types not in entities avoids crashes, but silently drops fields/types.
Good for robustness, but this should at least log diagnostic warnings; otherwise users may get “missing operations” with no clue why.
6. CreateListFilter adds legacy operators (contains, startsWith, endsWith) for every scalar list type via elementScalarType.
For non-string scalars these operators are semantically odd/unusable unless downstream validates/rejects later.
Could be intentional for backward compatibility, but deserves explicit gating or tests confirming behavior by scalar type.
Why make this change?
There's currently a bug that makes the use of multiple sources with nosql cosmos database impossible. This closes #2437
Also added list filters based on the HotChocolate documentation.
What is this change?
Fix
data-source-filesin dab-config.json and allows list filtering.How was this tested?
Sample Request(s)