Skip to content

Commit

Permalink
Update query for scaling statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
iamvigneshwars committed Apr 12, 2024
1 parent e278c68 commit 7229f8f
Show file tree
Hide file tree
Showing 3 changed files with 233 additions and 44 deletions.
179 changes: 179 additions & 0 deletions dp.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
"""
Represents an auto processing integration
"""
type AutoProcIntegration @key(fields: "autoProcIntegrationId dataCollectionId autoProcProgramId refinedXBeam refinedYBeam", resolvable: false) {
"""
An opaque unique identifier for the auto processing integration
"""
autoProcIntegrationId: Int!
"""
An opaque unique identifier for the data collection
"""
dataCollectionId: Int!
"""
An opaque unique identifier for the auto processing program
"""
autoProcProgramId: Int
"""
Refined X position of the beam
"""
refinedXBeam: Float
"""
Refined Y position of the beam
"""
refinedYBeam: Float
}

"""
Represents an auto processed program
"""
type AutoProcProgram @key(fields: "autoProcProgramId processingPrograms processingStatus processingMessage processingJobId", resolvable: false) {
"""
An opaque unique identifier for the auto processing program
"""
autoProcProgramId: Int!
"""
Name of the processing programs
"""
processingPrograms: String
"""
Processing program status
"""
processingStatus: Int
"""
Processing program message
"""
processingMessage: String
"""
An opaque unique identifier for the processing processing job
"""
processingJobId: Int
}

type AutoProcessing @key(fields: "autoProcIntegrationId", resolvable: false) {
"""
An opaque unique identifier for the auto processing integration
"""
autoProcIntegrationId: Int!
"""
An opaque unique identifier for the data collection
"""
dataCollectionId: Int!
"""
An opaque unique identifier for the auto processing program
"""
autoProcProgramId: Int
"""
Refined X position of the beam
"""
refinedXBeam: Float
"""
Refined Y position of the beam
"""
refinedYBeam: Float
autoProcProgram: AutoProcProgram
}


"""
Represents processed image file stored in s3 bucket
"""
type DataProcessing @key(fields: "id", resolvable: false) {
"""
An opaque unique identifier for the collected file attachment
"""
id: Int!
"""
Gives downloadable link for the processed image in the s3 bucket
"""
downloadUrl: String!
}

"""
Datasets subgraph extension
"""
type Datasets @key(fields: "id") {
"""
An opaque unique identifier for the data collection
"""
id: Int!
"""
Fetched all the processed data from data collection during a session
"""
processedData: DataProcessing
"""
Fetched all the processing jobs
"""
processingJobs: [ProcessJob!]
"""
Fetches all the automatic process
"""
autoProcIntegration: [AutoProcessing!]
}




"""
Datasets subgraph extension
"""
type ProcessJob @key(fields: "processingJobId", resolvable: false) {
"""
An opaque unique identifier for the processing job
"""
processingJobId: Int!
"""
An opaque unique identifier for the data collection
"""
dataCollectionId: Int
"""
Processing job display name
"""
displayName: String
"""
Represents if the job is automatic or downstream
"""
automatic: Int
parameters: ProcessingJobParameter
}

"""
Represents a processing job
"""
type ProcessingJob @key(fields: "processingJobId dataCollectionId displayName automatic", resolvable: false) {
"""
An opaque unique identifier for the processing job
"""
processingJobId: Int!
"""
An opaque unique identifier for the data collection
"""
dataCollectionId: Int
"""
Processing job display name
"""
displayName: String
"""
Represents if the job is automatic or downstream
"""
automatic: Int
}

"""
Represents a processing job parameters
"""
type ProcessingJobParameter @key(fields: "processingJobParameterId processingJobId parameterKey parameterValue", resolvable: false) {
processingJobParameterId: Int!
processingJobId: Int
parameterKey: String
parameterValue: String
}



directive @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
directive @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
extend schema @link(
url: "https://specs.apollo.dev/federation/v2.3",
import: ["@key", "@tag", "@shareable", "@inaccessible", "@override", "@external", "@provides", "@requires", "@composeDirective", "@interfaceObject"]
)
18 changes: 14 additions & 4 deletions processed_data/src/graphql/entities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl From<processing_job_parameter::Model> for ProcessingJobParameter {

/// Represents an auto processed job
#[derive(Clone, Debug, PartialEq, SimpleObject)]
#[graphql(name = "AutoProc", unresolvable, complex)]
#[graphql(name = "AutoProc", unresolvable)]
pub struct AutoProc {
/// An opaque unique identifier for the auto processing
pub auto_proc_id: u32,
Expand Down Expand Up @@ -114,7 +114,7 @@ impl From<auto_proc::Model> for AutoProc {

/// Represents an auto processed program
#[derive(Clone, Debug, PartialEq, SimpleObject)]
#[graphql(name = "AutoProcProgram", unresolvable, complex)]
#[graphql(name = "AutoProcProgram", unresolvable)]
pub struct AutoProcProgram {
/// An opaque unique identifier for the auto processing program
pub auto_proc_program_id: u32,
Expand Down Expand Up @@ -170,7 +170,7 @@ impl From<auto_proc_integration::Model> for AutoProcIntegration {

/// Represents and auto processing scaling
#[derive(Clone, Debug, PartialEq, SimpleObject)]
#[graphql(name = "AutoProcScaling", unresolvable, complex)]
#[graphql(name = "AutoProcScaling", unresolvable)]
pub struct AutoProcScaling {
/// An opaque unique identifier for the auto processing scaling
pub auto_proc_scaling_id: u32,
Expand Down Expand Up @@ -270,13 +270,23 @@ pub struct DataCollection {
#[derive(Debug, Clone, SimpleObject)]
#[graphql(name = "ProcessJob", unresolvable = "processingJobId")]
pub struct ProcessJob {
#[graphql(flatten)]
pub processing_job: ProcessingJob,

Check failure on line 274 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct field

Check failure on line 274 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct field

Check failure on line 274 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct field
pub parameters: Option<ProcessingJobParameter>,

Check failure on line 275 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct field

Check failure on line 275 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct field

Check failure on line 275 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct field
}

#[derive(Debug, Clone, SimpleObject)]
#[graphql(name = "AutoProcessing", unresolvable = "auto_proc_integration_id")]
#[graphql(name = "AutoProcessing", unresolvable = "autoProcIntegrationId")]
pub struct AutoProcessing {

Check failure on line 280 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct

Check failure on line 280 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct

Check failure on line 280 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct
#[graphql(flatten)]
pub auto_proc_integration: AutoProcIntegration,

Check failure on line 282 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct field

Check failure on line 282 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct field

Check failure on line 282 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct field
pub auto_proc_program: Option<AutoProcProgram>,

Check failure on line 283 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct field

Check failure on line 283 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct field

Check failure on line 283 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct field
}

#[derive(Debug, Clone, SimpleObject)]
#[graphql(name = "Process", unresolvable = "autoProcId", complex)]
pub struct Process {

Check failure on line 288 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct

Check failure on line 288 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct

Check failure on line 288 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct
#[graphql(flatten)]
pub auto_proc: AutoProc,

Check failure on line 290 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct field

Check failure on line 290 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct field

Check failure on line 290 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct field
pub auto_proc_scaling: Option<AutoProcScaling>,

Check failure on line 291 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct field

Check failure on line 291 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct field

Check failure on line 291 in processed_data/src/graphql/entities.rs

View workflow job for this annotation

GitHub Actions / lint

missing documentation for a struct field
}
Loading

0 comments on commit 7229f8f

Please sign in to comment.