Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

control-service: GraphQL executions query #478

Merged
merged 2 commits into from
Nov 9, 2021

Conversation

mivanov1988
Copy link
Collaborator

Extended the GraphQL schema (resources/schema.graphqls) by adding
an additional query called executions. It will allow us to filter
and sort executions by the following fields: status, startTime, endTime.

Sample request:

{{ baseUrl }}/data-jobs/for-team/no-team-specified/jobs?query={
  executions(filter: {
		endTime_gte: "2021-10-19T10:14:47Z",
		status_in: ["failed", "cancelled"]
             },
	     order: {property: "endTime", sort: DESC}) {
    content {
          id
          startTime
          endTime
          status
          jobName
    }
  }
}

Еvaluated an advanced filtering approach, but it seems to be out of scope
of this issue. It will take more implementation time since we should
introduce a new query engine.

{{ baseUrl }}/data-jobs/for-team/no-team-specified/jobs?query={
  executions(filter: [
		{op: gte, property: "endTime", value: "2021-10-19T10:14:47Z"},
		{op: in, property: "status", values: ["failed", "cancelled"]}
	     ],
             order: {property: "status", sort: DESC}) {
    content {
          id
          startTime
          endTime
          status
          jobName
    }
  }
}

Testing: unit tests

Signed-off-by: Miroslav Ivanov [email protected]

@antoniivanov
Copy link
Collaborator

antoniivanov commented Nov 5, 2021

Еvaluated an advanced filtering approach, but it seems to be out of scope

I was just looking at how dgraph and hasura handle that problem. Even if it's out of scope for now (with which I agree). Do you think it's worth going in that direction?

@mivanov1988
Copy link
Collaborator Author

Еvaluated an advanced filtering approach, but it seems to be out of scope

I was just looking at how dgraph and hasura handle that problem. Even if it's out of scope for now (with which I agree). Do you think it's worth going in that direction?

Yes, I think that's the way to go. I really like the where clause approach. I have played with the ontotext tutorial it is pretty good.

@mivanov1988 mivanov1988 force-pushed the person/miroslavi/graphql-executions-query branch 2 times, most recently from 3de7f4a to f9d234f Compare November 9, 2021 10:51
Extended the GraphQL schema (resources/schema.graphqls) by adding
an additional query called executions. It will allow us to filter
and sort executions by the following fields: status, startTime, endTime.

Sample request:
```
{{ baseUrl }}/data-jobs/for-team/no-team-specified/jobs?query={
  executions(filter: {
		endTimeGte: "2021-10-19T10:14:47Z",
		statusIn: [FAILED, CANCELLED]
             },
	     order: {property: "endTime", sort: DESC}) {
    content {
          id
          startTime
          endTime
          status
          jobName
    }
  }
}
```

Еvaluated an advanced filtering approach, but it seems to be out of scope
of this issue. It will take more implementation time since we should
introduce a new query engine.

```
{{ baseUrl }}/data-jobs/for-team/no-team-specified/jobs?query={
  executions(filter: [
		{op: gte, property: "endTime", value: "2021-10-19T10:14:47Z"},
		{op: in, property: "status", values: ["failed", "cancelled"]}
	     ],
             order: {property: "status", sort: DESC}) {
    content {
          id
          startTime
          endTime
          status
          jobName
    }
  }
}
```

Testing: unit tests

Signed-off-by: Miroslav Ivanov [email protected]
@mivanov1988 mivanov1988 force-pushed the person/miroslavi/graphql-executions-query branch from c9a9d05 to f734cae Compare November 9, 2021 11:10
@mivanov1988 mivanov1988 merged commit 3768785 into main Nov 9, 2021
@mivanov1988 mivanov1988 deleted the person/miroslavi/graphql-executions-query branch November 9, 2021 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GraphQL API - ability to list, filter and sort executions
3 participants