building-envelope-data / database

Reference implementation of a product data server as part of the product data network buildingenvelopedata.org
MIT License
0 stars 0 forks source link

Queries for cielabColors #62

Open christoph-maurer opened 2 weeks ago

christoph-maurer commented 2 weeks ago

@simon-wacker I can query with https://www.solarbuildingenvelopes.com/graphql/ with greaterThanOrEqualTo, but not with lessThan. Do you understand why?

query {
  allOpticalData(
    where: {
      cielabColors: {
        some: {
          and: [
            { lStar: { greaterThanOrEqualTo: 80 } }
            { aStar: { greaterThanOrEqualTo: -5 } }
            { bStar: { greaterThanOrEqualTo: -5 } }
          ]
        }
      }
    }
  ) {
{
  "data": {
    "allOpticalData": {
      "nodes": [
        {
          "name": "Example optical data set for color data. BED-JSON",
          "cielabColors": [
            {
              "lStar": 90,
              "aStar": -0.5,
              "bStar": 0.5
            }
          ],
query {
  allOpticalData(
    where: {
      cielabColors: {
        some: {
          and: [
            { lStar: { greaterThanOrEqualTo: 80 } }
            { aStar: { lessThan: 100 } }
          ]
        }
      }
    }
  ) {
{
  "data": {
    "allOpticalData": {
      "nodes": []
    }
  }
}