Skip to content

Conversation

@pmoleri
Copy link
Contributor

@pmoleri pmoleri commented Mar 20, 2025

Update ExecuteQuery endpoint so returned items contains only the projected properties

e.g.

{
    "entity": "customers",
    "returnFields": [
        "CompanyName", "ADDRESS", "ContactTITLE"
    ],
    "operator": "And",
    "filteringOperands": [
          { "fieldName": "CONTACTTitle", "condition": { "name": "contains", "isUnary": false, "iconName": "filter_true" }, "conditionName": "contains", "searchVal": "Sales" }
    ]
}

Returns:

{
  "customers": [
    {
      "companyName": "Alfreds Futterkiste",
      "address": {
        "street": "Obere Str. 57",
        "city": "Berlin",
        "region": "",
        "postalCode": "12209",
        "country": "Germany",
        "phone": "(171) 555-7788"
      },
      "contactTitle": "Sales Representative"
    },
    {
      "companyName": "Around the Horn",
      "address": {
        "street": "120 Hanover Sq.",
        "city": "London",
        "region": "",
        "postalCode": "WA1 1DP",
        "country": "UK",
        "phone": "(171) 555-7788"
      },
      "contactTitle": "Sales Representative"
    },
    //...
  ]
}

Closes #55

@pmoleri pmoleri requested a review from teodosiah March 20, 2025 21:11
pmoleri added 4 commits March 20, 2025 18:39
StyleCop.Analyzers main version was supporting newer C#8 & 9 features like nullable declarations.
They've moved to beta since 2020.
@pmoleri pmoleri force-pushed the pmoleri/improve-qb-projection branch from dd2e465 to c43fab6 Compare March 25, 2025 13:18
@teodosiah teodosiah added the ✅ status: verified Applies to PRs that have passed manual verification label Mar 27, 2025
Co-authored-by: Zdravko Kolev <[email protected]>
@pmoleri pmoleri merged commit 6d7842d into main Mar 28, 2025
3 checks passed
@pmoleri pmoleri deleted the pmoleri/improve-qb-projection branch March 28, 2025 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✅ status: verified Applies to PRs that have passed manual verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Post request returns all fields from /QueryBuilder/ExecuteQuery regardless of what is set in returnFields

4 participants