Description
Add an exists field to the EntityAttributeFilter input object
Schema
input EntityAttributeFilter {
attribute: String!
exists: Boolean! = true # <---------- NEW
value: String
valueNot: String
valueIn: [String!]
valueNotIn: [String!]
valueType: ValueType
valueTypeNot: ValueType
valueTypeIn: [ValueType!]
valueTypeNotIn: [ValueType!]
}
Example Query
query {
entities(
# Select entities for which the name attribute ("LuBWqZAu6pz54eiJS5mLv8") exists
where: {
attributes: [
{attribute: "LuBWqZAu6pz54eiJS5mLv8", exists: true}
]
},
spaceId: "25omwWh6HYgeRQKCaSpVpa",
first: 10
) {
id
...
}
}
Implementation checklist
Description
Add an
existsfield to theEntityAttributeFilterinput objectSchema
Example Query
Implementation checklist
PropFilterstruct in thegrc20-core/src/mapping/query_utils/prop_filter.rsmoduleexists: Option<bool>field to the structPropFilter::subquerymethod to apply the an{field} IS NOT nullor{field} IS nullfilter (if it is notNone) to the where clause only if no other filter have been applied.EntityAttributeFilterstruct in theapi/src/schema/attribute_filter.rsmoduleexistsfield to the structimpl From<EntityAttributeFilter> for mapping::AttributeFilterblockEntityAttributeFilter::value_filtermethod to set the newexistsfield on thePropFilter