Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,41 @@ type Subscription {
assignmentReportProgress(course: String!, name: String!): ReportProgress!
}

# ----- repos.graphqls -----
"One target repository of an assignment and whether it actually exists in GitLab."
type RepoStatus {
"The student's email (or username/id) or the group's name."
for: String!
"The repository's project name."
repo: String!
"The full web URL of the repository."
url: String!
"Whether the repository has been generated (exists in GitLab)."
exists: Boolean!
}

"""
How many of an assignment's target repositories have been generated. `note` is set
when the assignment could not be checked (abstract/unresolvable, or its GitLab group
does not exist yet — i.e. nothing generated).
"""
type AssignmentRepos {
name: String!
"Whether repos are per student or per group."
per: String!
"How many repositories the assignment targets."
targets: Int!
"How many of them actually exist in GitLab."
existing: Int!
repos: [RepoStatus!]!
note: String
}

extend type Query {
"Per assignment of one of the caller's courses, which target repositories actually exist in GitLab. Needs a stored GitLab token."
courseRepoOverview(course: String!): [AssignmentRepos!]!
}

# ----- scheduling.graphqls -----
"The lifecycle state of a scheduled job. It starts PENDING, is claimed to RUNNING, and ends in exactly one terminal state."
enum JobStatus {
Expand Down
6 changes: 6 additions & 0 deletions src/lib/gql/gql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type Documents = {
"\n\t\t\t\tquery CourseLint($name: String!) {\n\t\t\t\t\tcourseLint(name: $name) {\n\t\t\t\t\t\tpath\n\t\t\t\t\t\tmessage\n\t\t\t\t\t\tseverity\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t": typeof types.CourseLintDocument,
"\n\t\t\t\tquery CourseActivity($name: String!) {\n\t\t\t\t\tcourseActivity(course: $name) {\n\t\t\t\t\t\tassignment\n\t\t\t\t\t\top\n\t\t\t\t\t\tstatus\n\t\t\t\t\t\tdetail\n\t\t\t\t\t\tat\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t": typeof types.CourseActivityDocument,
"\n\t\t\t\tquery AssignmentEditor($course: String!, $name: String!) {\n\t\t\t\t\tcourse(name: $course) {\n\t\t\t\t\t\tassignmentNames\n\t\t\t\t\t}\n\t\t\t\t\tassignmentSchema {\n\t\t\t\t\t\tkey\n\t\t\t\t\t\tlabel\n\t\t\t\t\t\tdescription\n\t\t\t\t\t\tgroup\n\t\t\t\t\t\tkind\n\t\t\t\t\t\trequired\n\t\t\t\t\t\tdeprecated\n\t\t\t\t\t\texample\n\t\t\t\t\t\toptions {\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\tdescription\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbranchRuleSchema {\n\t\t\t\t\t\tkey\n\t\t\t\t\t\tlabel\n\t\t\t\t\t\tdescription\n\t\t\t\t\t\tkind\n\t\t\t\t\t\trequired\n\t\t\t\t\t\texample\n\t\t\t\t\t}\n\t\t\t\t\tapprovalSettingsSchema {\n\t\t\t\t\t\tkey\n\t\t\t\t\t\tlabel\n\t\t\t\t\t\tdescription\n\t\t\t\t\t\tkind\n\t\t\t\t\t\trequired\n\t\t\t\t\t\texample\n\t\t\t\t\t\toptions {\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\tdescription\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tapprovalRuleSchema {\n\t\t\t\t\t\tkey\n\t\t\t\t\t\tlabel\n\t\t\t\t\t\tdescription\n\t\t\t\t\t\tkind\n\t\t\t\t\t\trequired\n\t\t\t\t\t\texample\n\t\t\t\t\t}\n\t\t\t\t\tassignment(course: $course, name: $name) {\n\t\t\t\t\t\tcourse\n\t\t\t\t\t\tname\n\t\t\t\t\t\textends\n\t\t\t\t\t\textendsOptions\n\t\t\t\t\t\tabstract\n\t\t\t\t\t\town {\n\t\t\t\t\t\t\tkey\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresolved\n\t\t\t\t\t\tresolveError\n\t\t\t\t\t}\n\t\t\t\t\tassignmentUrls(course: $course, name: $name) {\n\t\t\t\t\t\tper\n\t\t\t\t\t\tgroupUrl\n\t\t\t\t\t\trepos {\n\t\t\t\t\t\t\tfor\n\t\t\t\t\t\t\turl\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tassignmentActivity(course: $course, name: $name) {\n\t\t\t\t\t\top\n\t\t\t\t\t\tstatus\n\t\t\t\t\t\tdetail\n\t\t\t\t\t\tat\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t": typeof types.AssignmentEditorDocument,
"\n\t\t\t\tquery CourseRepoOverview($course: String!) {\n\t\t\t\t\tcourseRepoOverview(course: $course) {\n\t\t\t\t\t\tname\n\t\t\t\t\t\tper\n\t\t\t\t\t\ttargets\n\t\t\t\t\t\texisting\n\t\t\t\t\t\tnote\n\t\t\t\t\t\trepos {\n\t\t\t\t\t\t\tfor\n\t\t\t\t\t\t\turl\n\t\t\t\t\t\t\texists\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t": typeof types.CourseRepoOverviewDocument,
"\n\t\t\t\tquery CourseStudents($course: String!) {\n\t\t\t\t\tcourseStudents(course: $course) {\n\t\t\t\t\t\temail\n\t\t\t\t\t\tfound\n\t\t\t\t\t\tfirstName\n\t\t\t\t\t\tlastName\n\t\t\t\t\t\tgender\n\t\t\t\t\t\tgroup\n\t\t\t\t\t\tmtknr\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t": typeof types.CourseStudentsDocument,
"\n\t\t\t\tquery CourseYAML($name: String!) {\n\t\t\t\t\tcourseYAML(name: $name)\n\t\t\t\t}\n\t\t\t": typeof types.CourseYamlDocument,
"\n\t\t\t\tquery ScheduledJobs {\n\t\t\t\t\tscheduledJobs {\n\t\t\t\t\t\tid\n\t\t\t\t\t\top\n\t\t\t\t\t\tcourse\n\t\t\t\t\t\tassignment\n\t\t\t\t\t\trunAt\n\t\t\t\t\t\tgraceMinutes\n\t\t\t\t\t\tstatus\n\t\t\t\t\t\tcreatedAt\n\t\t\t\t\t\tstartedAt\n\t\t\t\t\t\tfinishedAt\n\t\t\t\t\t\terr\n\t\t\t\t\t\tparams {\n\t\t\t\t\t\t\tkey\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t": typeof types.ScheduledJobsDocument,
Expand Down Expand Up @@ -78,6 +79,7 @@ const documents: Documents = {
"\n\t\t\t\tquery CourseLint($name: String!) {\n\t\t\t\t\tcourseLint(name: $name) {\n\t\t\t\t\t\tpath\n\t\t\t\t\t\tmessage\n\t\t\t\t\t\tseverity\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t": types.CourseLintDocument,
"\n\t\t\t\tquery CourseActivity($name: String!) {\n\t\t\t\t\tcourseActivity(course: $name) {\n\t\t\t\t\t\tassignment\n\t\t\t\t\t\top\n\t\t\t\t\t\tstatus\n\t\t\t\t\t\tdetail\n\t\t\t\t\t\tat\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t": types.CourseActivityDocument,
"\n\t\t\t\tquery AssignmentEditor($course: String!, $name: String!) {\n\t\t\t\t\tcourse(name: $course) {\n\t\t\t\t\t\tassignmentNames\n\t\t\t\t\t}\n\t\t\t\t\tassignmentSchema {\n\t\t\t\t\t\tkey\n\t\t\t\t\t\tlabel\n\t\t\t\t\t\tdescription\n\t\t\t\t\t\tgroup\n\t\t\t\t\t\tkind\n\t\t\t\t\t\trequired\n\t\t\t\t\t\tdeprecated\n\t\t\t\t\t\texample\n\t\t\t\t\t\toptions {\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\tdescription\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbranchRuleSchema {\n\t\t\t\t\t\tkey\n\t\t\t\t\t\tlabel\n\t\t\t\t\t\tdescription\n\t\t\t\t\t\tkind\n\t\t\t\t\t\trequired\n\t\t\t\t\t\texample\n\t\t\t\t\t}\n\t\t\t\t\tapprovalSettingsSchema {\n\t\t\t\t\t\tkey\n\t\t\t\t\t\tlabel\n\t\t\t\t\t\tdescription\n\t\t\t\t\t\tkind\n\t\t\t\t\t\trequired\n\t\t\t\t\t\texample\n\t\t\t\t\t\toptions {\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\tdescription\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tapprovalRuleSchema {\n\t\t\t\t\t\tkey\n\t\t\t\t\t\tlabel\n\t\t\t\t\t\tdescription\n\t\t\t\t\t\tkind\n\t\t\t\t\t\trequired\n\t\t\t\t\t\texample\n\t\t\t\t\t}\n\t\t\t\t\tassignment(course: $course, name: $name) {\n\t\t\t\t\t\tcourse\n\t\t\t\t\t\tname\n\t\t\t\t\t\textends\n\t\t\t\t\t\textendsOptions\n\t\t\t\t\t\tabstract\n\t\t\t\t\t\town {\n\t\t\t\t\t\t\tkey\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresolved\n\t\t\t\t\t\tresolveError\n\t\t\t\t\t}\n\t\t\t\t\tassignmentUrls(course: $course, name: $name) {\n\t\t\t\t\t\tper\n\t\t\t\t\t\tgroupUrl\n\t\t\t\t\t\trepos {\n\t\t\t\t\t\t\tfor\n\t\t\t\t\t\t\turl\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tassignmentActivity(course: $course, name: $name) {\n\t\t\t\t\t\top\n\t\t\t\t\t\tstatus\n\t\t\t\t\t\tdetail\n\t\t\t\t\t\tat\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t": types.AssignmentEditorDocument,
"\n\t\t\t\tquery CourseRepoOverview($course: String!) {\n\t\t\t\t\tcourseRepoOverview(course: $course) {\n\t\t\t\t\t\tname\n\t\t\t\t\t\tper\n\t\t\t\t\t\ttargets\n\t\t\t\t\t\texisting\n\t\t\t\t\t\tnote\n\t\t\t\t\t\trepos {\n\t\t\t\t\t\t\tfor\n\t\t\t\t\t\t\turl\n\t\t\t\t\t\t\texists\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t": types.CourseRepoOverviewDocument,
"\n\t\t\t\tquery CourseStudents($course: String!) {\n\t\t\t\t\tcourseStudents(course: $course) {\n\t\t\t\t\t\temail\n\t\t\t\t\t\tfound\n\t\t\t\t\t\tfirstName\n\t\t\t\t\t\tlastName\n\t\t\t\t\t\tgender\n\t\t\t\t\t\tgroup\n\t\t\t\t\t\tmtknr\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t": types.CourseStudentsDocument,
"\n\t\t\t\tquery CourseYAML($name: String!) {\n\t\t\t\t\tcourseYAML(name: $name)\n\t\t\t\t}\n\t\t\t": types.CourseYamlDocument,
"\n\t\t\t\tquery ScheduledJobs {\n\t\t\t\t\tscheduledJobs {\n\t\t\t\t\t\tid\n\t\t\t\t\t\top\n\t\t\t\t\t\tcourse\n\t\t\t\t\t\tassignment\n\t\t\t\t\t\trunAt\n\t\t\t\t\t\tgraceMinutes\n\t\t\t\t\t\tstatus\n\t\t\t\t\t\tcreatedAt\n\t\t\t\t\t\tstartedAt\n\t\t\t\t\t\tfinishedAt\n\t\t\t\t\t\terr\n\t\t\t\t\t\tparams {\n\t\t\t\t\t\t\tkey\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t": types.ScheduledJobsDocument,
Expand Down Expand Up @@ -214,6 +216,10 @@ export function graphql(source: "\n\t\t\t\tquery CourseActivity($name: String!)
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "\n\t\t\t\tquery AssignmentEditor($course: String!, $name: String!) {\n\t\t\t\t\tcourse(name: $course) {\n\t\t\t\t\t\tassignmentNames\n\t\t\t\t\t}\n\t\t\t\t\tassignmentSchema {\n\t\t\t\t\t\tkey\n\t\t\t\t\t\tlabel\n\t\t\t\t\t\tdescription\n\t\t\t\t\t\tgroup\n\t\t\t\t\t\tkind\n\t\t\t\t\t\trequired\n\t\t\t\t\t\tdeprecated\n\t\t\t\t\t\texample\n\t\t\t\t\t\toptions {\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\tdescription\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbranchRuleSchema {\n\t\t\t\t\t\tkey\n\t\t\t\t\t\tlabel\n\t\t\t\t\t\tdescription\n\t\t\t\t\t\tkind\n\t\t\t\t\t\trequired\n\t\t\t\t\t\texample\n\t\t\t\t\t}\n\t\t\t\t\tapprovalSettingsSchema {\n\t\t\t\t\t\tkey\n\t\t\t\t\t\tlabel\n\t\t\t\t\t\tdescription\n\t\t\t\t\t\tkind\n\t\t\t\t\t\trequired\n\t\t\t\t\t\texample\n\t\t\t\t\t\toptions {\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\tdescription\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tapprovalRuleSchema {\n\t\t\t\t\t\tkey\n\t\t\t\t\t\tlabel\n\t\t\t\t\t\tdescription\n\t\t\t\t\t\tkind\n\t\t\t\t\t\trequired\n\t\t\t\t\t\texample\n\t\t\t\t\t}\n\t\t\t\t\tassignment(course: $course, name: $name) {\n\t\t\t\t\t\tcourse\n\t\t\t\t\t\tname\n\t\t\t\t\t\textends\n\t\t\t\t\t\textendsOptions\n\t\t\t\t\t\tabstract\n\t\t\t\t\t\town {\n\t\t\t\t\t\t\tkey\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresolved\n\t\t\t\t\t\tresolveError\n\t\t\t\t\t}\n\t\t\t\t\tassignmentUrls(course: $course, name: $name) {\n\t\t\t\t\t\tper\n\t\t\t\t\t\tgroupUrl\n\t\t\t\t\t\trepos {\n\t\t\t\t\t\t\tfor\n\t\t\t\t\t\t\turl\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tassignmentActivity(course: $course, name: $name) {\n\t\t\t\t\t\top\n\t\t\t\t\t\tstatus\n\t\t\t\t\t\tdetail\n\t\t\t\t\t\tat\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"): (typeof documents)["\n\t\t\t\tquery AssignmentEditor($course: String!, $name: String!) {\n\t\t\t\t\tcourse(name: $course) {\n\t\t\t\t\t\tassignmentNames\n\t\t\t\t\t}\n\t\t\t\t\tassignmentSchema {\n\t\t\t\t\t\tkey\n\t\t\t\t\t\tlabel\n\t\t\t\t\t\tdescription\n\t\t\t\t\t\tgroup\n\t\t\t\t\t\tkind\n\t\t\t\t\t\trequired\n\t\t\t\t\t\tdeprecated\n\t\t\t\t\t\texample\n\t\t\t\t\t\toptions {\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\tdescription\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbranchRuleSchema {\n\t\t\t\t\t\tkey\n\t\t\t\t\t\tlabel\n\t\t\t\t\t\tdescription\n\t\t\t\t\t\tkind\n\t\t\t\t\t\trequired\n\t\t\t\t\t\texample\n\t\t\t\t\t}\n\t\t\t\t\tapprovalSettingsSchema {\n\t\t\t\t\t\tkey\n\t\t\t\t\t\tlabel\n\t\t\t\t\t\tdescription\n\t\t\t\t\t\tkind\n\t\t\t\t\t\trequired\n\t\t\t\t\t\texample\n\t\t\t\t\t\toptions {\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\tdescription\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tapprovalRuleSchema {\n\t\t\t\t\t\tkey\n\t\t\t\t\t\tlabel\n\t\t\t\t\t\tdescription\n\t\t\t\t\t\tkind\n\t\t\t\t\t\trequired\n\t\t\t\t\t\texample\n\t\t\t\t\t}\n\t\t\t\t\tassignment(course: $course, name: $name) {\n\t\t\t\t\t\tcourse\n\t\t\t\t\t\tname\n\t\t\t\t\t\textends\n\t\t\t\t\t\textendsOptions\n\t\t\t\t\t\tabstract\n\t\t\t\t\t\town {\n\t\t\t\t\t\t\tkey\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresolved\n\t\t\t\t\t\tresolveError\n\t\t\t\t\t}\n\t\t\t\t\tassignmentUrls(course: $course, name: $name) {\n\t\t\t\t\t\tper\n\t\t\t\t\t\tgroupUrl\n\t\t\t\t\t\trepos {\n\t\t\t\t\t\t\tfor\n\t\t\t\t\t\t\turl\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tassignmentActivity(course: $course, name: $name) {\n\t\t\t\t\t\top\n\t\t\t\t\t\tstatus\n\t\t\t\t\t\tdetail\n\t\t\t\t\t\tat\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "\n\t\t\t\tquery CourseRepoOverview($course: String!) {\n\t\t\t\t\tcourseRepoOverview(course: $course) {\n\t\t\t\t\t\tname\n\t\t\t\t\t\tper\n\t\t\t\t\t\ttargets\n\t\t\t\t\t\texisting\n\t\t\t\t\t\tnote\n\t\t\t\t\t\trepos {\n\t\t\t\t\t\t\tfor\n\t\t\t\t\t\t\turl\n\t\t\t\t\t\t\texists\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"): (typeof documents)["\n\t\t\t\tquery CourseRepoOverview($course: String!) {\n\t\t\t\t\tcourseRepoOverview(course: $course) {\n\t\t\t\t\t\tname\n\t\t\t\t\t\tper\n\t\t\t\t\t\ttargets\n\t\t\t\t\t\texisting\n\t\t\t\t\t\tnote\n\t\t\t\t\t\trepos {\n\t\t\t\t\t\t\tfor\n\t\t\t\t\t\t\turl\n\t\t\t\t\t\t\texists\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
Expand Down
Loading