Closed christoph-maurer closed 2 years ago
The first query at IGSDB looks good!
@simon-wacker Do you know why the second query returns no results?
The reason was that the IGSDB schema got upgraded to the current version while the metabase still sent queries that conformed to the old version. I upgraded the metabase and it should work now. Please check @christoph-maurer Next time, please also include the query as text (in addition or instead of as image) because I can copy plain-old text but I can't copy text inside images.
@christoph-maurer @simon-wacker Sorry, I should have noted that I updated the version of the database.graphql schema the IGSDB uses. I needed to do that in order to support #261. I will try to be explicit about when I update the database.graphql file in the IGSDB in the future.
It works now at the metabase endpoint, but not yet at the metabase frontend.
When I query the endpoint with
query {
MBforResourcesOfComponent: databases {
nodes {
uuid
name
locator
allOpticalData(
where: {
componentId: {
equalTo: "6a6a0f0b-5b79-4167-841e-b3a4462a1d6e" }
}
) {
nodes {
resourceTree {
root {
value {
locator
}
}
}
}
}
}
}
}
I get the result
{
"data": {
"MBforResourcesOfComponent": {
"nodes": [
{
"uuid": "e744cd25-a4bb-4d48-87e6-81f47ab49c3b",
"name": "Daylighting Database",
"locator": "http://daylightingdatabase.herokuapp.com/graphql/",
"allOpticalData": null
},
{
"uuid": "48994b60-670d-488d-aaf7-53333a64f1d6",
"name": "IGSDB",
"locator": "https://igsdb-icon.herokuapp.com/icon_graphql/",
"allOpticalData": {
"nodes": [
{
"resourceTree": {
"root": {
"value": {
"locator": "https://igsdb-icon.herokuapp.com/api/v1/products/13201/datafile/"
}
}
}
}
]
}
},
{
"uuid": "8a27aa0d-6026-4124-b185-4efd5cead953",
"name": "TestLab DB",
"locator": "https://www.solarbuildingenvelopes.com/graphql/",
"allOpticalData": {
"nodes": []
}
}
]
}
}
}
which looks good, because only the Klems format is returned and not the BED-JSON which is not yet implemented.
When I query the frontend for Component Id: Is equal to 6a6a0f0b-5b79-4167-841e-b3a4462a1d6e
, then I get no results. @simon-wacker Do you understand why?
For me it also works in the frontend. Maybe you have some caching issue? Try opening developer tools, reloading the page, and then doing the query in the frontend (opening developer tools disables caching, so reloading fetches the latest version).
Yes, with refreshed cache, it works. Thank you @StephenCzarnecki and @simon-wacker !
When I query https://www.buildingenvelopedata.org/data/optical for
Data set
Component Id is equal to 6a6a0f0b-5b79-4167-841e-b3a4462a1d6e
, then I receive two results:a3e6cbf6-b5ee-4df1-b2f9-eb300c384286
uses the BSDF XML format and works fine.Data set![Screenshot from 2021-11-16 17-42-17](https://user-images.githubusercontent.com/33456252/142028792-2e442b29-01f1-464c-8f36-b21bd0ebe90c.png)
28e981e9-d44e-464d-ae93-cfa9fbd63088
offers a locator for the BED-JSON format. When I click on the locator https://igsdb-icon.herokuapp.com/api/v1/products/13201/?json_format=buildingenvelopedata.org , then I seeIt would be better if IGSDB would return for shading only data sets like
a3e6cbf6-b5ee-4df1-b2f9-eb300c384286
which work fine and not return data sets like28e981e9-d44e-464d-ae93-cfa9fbd63088
which may confuse possible new partners.When the BED-JSON is implemented in the future also for shading, then both kind of data sets can be returned by IGSDB.