feat: add search capability by name in getFlows
This commit is contained in:
@@ -3,6 +3,7 @@ import paginate from '../../helpers/pagination';
|
|||||||
|
|
||||||
type Params = {
|
type Params = {
|
||||||
appKey?: string;
|
appKey?: string;
|
||||||
|
name?: string;
|
||||||
limit: number;
|
limit: number;
|
||||||
offset: number;
|
offset: number;
|
||||||
};
|
};
|
||||||
@@ -13,6 +14,10 @@ const getFlows = async (_parent: unknown, params: Params, context: Context) => {
|
|||||||
.joinRelated('steps')
|
.joinRelated('steps')
|
||||||
.withGraphFetched('steps.[connection]')
|
.withGraphFetched('steps.[connection]')
|
||||||
.where((builder) => {
|
.where((builder) => {
|
||||||
|
if (params.name) {
|
||||||
|
builder.where('flows.name', 'like', `%${params.name}%`);
|
||||||
|
}
|
||||||
|
|
||||||
if (params.appKey) {
|
if (params.appKey) {
|
||||||
builder.where('steps.app_key', params.appKey);
|
builder.where('steps.app_key', params.appKey);
|
||||||
}
|
}
|
||||||
|
@@ -4,7 +4,12 @@ type Query {
|
|||||||
getConnectedApps(name: String): [App]
|
getConnectedApps(name: String): [App]
|
||||||
testConnection(id: String!): Connection
|
testConnection(id: String!): Connection
|
||||||
getFlow(id: String!): Flow
|
getFlow(id: String!): Flow
|
||||||
getFlows(limit: Int!, offset: Int!, appKey: String): FlowConnection
|
getFlows(
|
||||||
|
limit: Int!
|
||||||
|
offset: Int!
|
||||||
|
appKey: String
|
||||||
|
name: String
|
||||||
|
): FlowConnection
|
||||||
getStepWithTestExecutions(stepId: String!): [Step]
|
getStepWithTestExecutions(stepId: String!): [Step]
|
||||||
getExecutions(limit: Int!, offset: Int!): ExecutionConnection
|
getExecutions(limit: Int!, offset: Int!): ExecutionConnection
|
||||||
getExecutionSteps(
|
getExecutionSteps(
|
||||||
|
Reference in New Issue
Block a user