const list = await client.fetch(*[_type == "materials" && label == "${steintype}" && materialType._ref == "${materialTypeId}" && !(_id in path(\'drafts.**\')) ]);
result is:
[
{
"_createdAt": "2020-04-09T10:55:19Z",
"_updatedAt": "2025-02-28T01:50:53Z",
"_rev": "NW7fQSGpQvl6t4uRlB5gR0",
"_type": "materials",
"_id": "ehvYRdowYmhQFSSLXmNIxH",
"price": [
{
"price": 8700,
"_type": "materialPrice",
"_key": "e177466d5bee",
"thickness": 12
},
{
"thickness": 20,
"price": 10300,
"_type": "materialPrice",
"_key": "v1lfndy55zp",
"laborCostFactor": 1.25
},
{
"_key": "8c35f329e04f",
"flexibleOption": true,
"laborCostFactor": 1.25,
"thickness": 40,
"price": 15100,
"_type": "materialPrice"
}
],
"label": "Natura",
"materialType": {
"_ref": "132c2f6a-07a2-4711-ba35-ed084e5084b9",
"_type": "reference"
},
"dataSheet": [
{
"asset": {
"_ref": "file-bbac4e52b7ee25c17d9fee776674b63ae7d0bf2f-pdf",
"_type": "reference"
},
"_type": "file",
"_key": "825ab6ed2cb7"
},
{
"excludeFromEmailSelfMontage": true,
"file": {
"_type": "file",
"asset": {
"_ref": "file-bbac4e52b7ee25c17d9fee776674b63ae7d0bf2f-pdf",
"_type": "reference"
}
},
"_key": "00c9354748d7"
}
]
}
]
modify query to skip items from dataSheet where excludeFromEmailSelfMontage is true