query PreviewCardPredicates($cardId: String!, $predicates: [Predicate!]!) {
previewCardPredicates(cardId: $cardId, predicates: $predicates) {
entries {
applicable
entryId
evidence {
conditionIndex
evidence {
__typename
}
}
matches
}
evaluatedAt
}
}{
"cardId": "string",
"predicates": [
{}
]
}{
"data": {
"previewCardPredicates": {
"entries": [
{
"applicable": true,
"entryId": "string",
"evidence": [
{
"conditionIndex": 1,
"evidence": {
"__typename": "LifecycleRuleEvidence"
}
}
],
"matches": [
true
]
}
],
"evaluatedAt": "value"
}
}
}previewCardPredicates
Tests predicates on the first sampleSize live entries of a card definition, by ascending entry id, so repeated calls return the same entries. The result covers only those entries.
previewCardPredicates(applicability: Predicate, cardId: String!, evidenceConditions: [PredicateEvidenceConditionInput!], predicates: [Predicate!]!, sampleSize: Int!): PredicateSampleArguments
Decides which sampled entries the predicates apply to. An entry that doesn't match it has applicable: false and every matches false. Null applies them to every entry.
Raw id of the card definition (e.g. products), not the global CardDefinition.id.
Predicates, by index into predicates, to collect failure evidence for. Null collects none.
Predicates to test, at least one. Each sampled entry's matches has one result per item, in the same order. Together with applicability, at most 513 predicates and 1 MiB as JSON, and sampleSize times their count at most 10,000. Over a limit fails with BAD_USER_INPUT and a message starting PREVIEW_LIMIT_EXCEEDED:.
Number of entries to sample, 1 to 100. Default 25.
Returns
The sampled entries, in ascending entryId order.
When the sample was evaluated.
query PreviewCardPredicates($cardId: String!, $predicates: [Predicate!]!) {
previewCardPredicates(cardId: $cardId, predicates: $predicates) {
entries {
applicable
entryId
evidence {
conditionIndex
evidence {
__typename
}
}
matches
}
evaluatedAt
}
}{
"cardId": "string",
"predicates": [
{}
]
}{
"data": {
"previewCardPredicates": {
"entries": [
{
"applicable": true,
"entryId": "string",
"evidence": [
{
"conditionIndex": 1,
"evidence": {
"__typename": "LifecycleRuleEvidence"
}
}
],
"matches": [
true
]
}
],
"evaluatedAt": "value"
}
}
}Was this page helpful?