Skip to content

Commit

Permalink
update queries and schema
Browse files Browse the repository at this point in the history
Signed-off-by: Huong Nguyen <[email protected]>
  • Loading branch information
Huong Nguyen committed Dec 5, 2024
1 parent b4364d0 commit e8623f4
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 204 deletions.
56 changes: 0 additions & 56 deletions src/apollo/queries.js
Original file line number Diff line number Diff line change
@@ -1,61 +1,5 @@
import gql from 'graphql-tag';

/** query for runsList sidebar */
export const GET_RUNS = gql`
query getRunsList {
runsList {
gitSha
id
}
}
`;

/** query for runMetadata and runDataset components */
export const GET_RUN_DATA = gql`
query getRunData($runIds: [ID!]!, $showDiff: Boolean) {
runMetadata(runIds: $runIds) {
id
author
gitBranch
gitSha
runCommand
}
plots: runTrackingData(runIds: $runIds, showDiff: $showDiff, group: PLOT) {
...trackingDatasetFields
}
metrics: runTrackingData(
runIds: $runIds
showDiff: $showDiff
group: METRIC
) {
...trackingDatasetFields
}
JSONData: runTrackingData(
runIds: $runIds
showDiff: $showDiff
group: JSON
) {
...trackingDatasetFields
}
}
fragment trackingDatasetFields on TrackingDataset {
data
datasetName
datasetType
runIds
}
`;

/** query for runMetricsData */
export const GET_METRIC_PLOT_DATA = gql`
query getMetricPlotData($limit: Int) {
runMetricsData(limit: $limit) {
data
}
}
`;

/** query for obtaining installed and latest Kedro-Viz versions */
export const GET_VERSIONS = gql`
query getVersion {
Expand Down
75 changes: 0 additions & 75 deletions src/apollo/schema.graphql
Original file line number Diff line number Diff line change
@@ -1,83 +1,8 @@
"""
The `JSON` scalar type represents JSON values as specified by [ECMA-404](https://ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf).
"""
scalar JSON @specifiedBy(url: "https://ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf")

"""Metric data"""
type MetricPlotDataset {
data: JSON!
}

type Mutation {
"""Update run metadata"""
updateRunDetails(runId: ID!, runInput: RunInput!): UpdateRunDetailsResponse!
}

type Query {
"""Get metadata for specified run_ids from the session store"""
runMetadata(runIds: [ID!]!): [Run!]!

"""Get metadata for all runs from the session store"""
runsList: [Run!]!

"""Get tracking datasets for specified group and run_ids"""
runTrackingData(runIds: [ID!]!, group: TrackingDatasetGroup!, showDiff: Boolean = true): [TrackingDataset!]!

"""Get metrics data for a limited number of recent runs"""
runMetricsData(limit: Int = 25): MetricPlotDataset!

"""Get the installed and latest Kedro-Viz versions"""
version: Version!
}

"""Run metadata"""
type Run {
author: String
bookmark: Boolean
gitBranch: String
gitSha: String
id: ID!
notes: String
runCommand: String
title: String!
}

"""Input to update run metadata"""
input RunInput {
bookmark: Boolean = null
notes: String = null
title: String = null
}

"""Tracking data for a Run"""
type TrackingDataset {
data: JSON!
datasetName: String!
datasetType: String!
runIds: [ID!]!
}

"""Group to show kind of tracking data"""
enum TrackingDatasetGroup {
PLOT
METRIC
JSON
}

"""Response for unsuccessful update of run metadata"""
type UpdateRunDetailsFailure {
id: ID!
errorMessage: String!
}

"""Response for update of run metadata"""
union UpdateRunDetailsResponse = UpdateRunDetailsSuccess | UpdateRunDetailsFailure

"""Response for successful update of run metadata"""
type UpdateRunDetailsSuccess {
run: Run!
}

"""Installed and latest Kedro-Viz versions"""
type Version {
installed: String!
Expand Down
73 changes: 0 additions & 73 deletions src/apollo/schema.js

This file was deleted.

0 comments on commit e8623f4

Please sign in to comment.