Skip to main content

Plan Search

Query for Plans with a Specific Activity Directive Type

The query below retrieves all plans that contain an activity directive of a specified type (e.g., "GenerateData"):

query QueryPlansWithActivityType {
plan(where: { activity_directives: { type: { _eq: "GenerateData" } } }) {
id
name
activity_directives {
type
arguments
}
}
}

Query for Plans with Activity Directives with a Specific Argument Name

The query below retrieves all plans that contain an activity directive with a specific argument name (e.g., "bin"):

query QueryPlansWithArgumentName {
plan(where: { activity_directives: { arguments: { _has_key: "bin" } } }) {
id
name
activity_directives {
type
arguments
}
}
}

Query for Plans with Activity Directives with a Specific Argument Value

The query below and the variables that follow retrieves all plans that contain an activity directive with a specific argument value (e.g., "bin" equal to 20):

query QueryByArgValue($argPair: jsonb) {
plan(where: { activity_directives: { arguments: { _contains: $argPair } } }) {
id
name
activity_directives {
type
arguments
}
}
}

Variables

{
"argPair": {
"bin": 20
}
}

Activity Directive Search

Query for Activity Directives with a Specific Activity Type

query QueryPlansWithActivityType {
activity_directive(where: { type: { _eq: "GenerateData" } }) {
id
type
plan_id
}
}

Query for Activity Directives with a Specific Argument Value Across All Plans

The query below retrieves all activity directives across all plans that have a specific argument substring present (e.g., "thrust"):

query QueryPlansWithParameterSubstring {
activity_directive(where: { arguments: { _cast: { String: { _ilike: "%thrust%" } } } }) {
id
plan_id
arguments
}
}