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

feat: update all gql schemas and fix typings issues #98

Merged
merged 4 commits into from
Jan 23, 2024
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
48 changes: 35 additions & 13 deletions client/internal/meta/schema/acceleration.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -31,37 +31,52 @@ type AccelerationError implements ErrorInstance @goModel(model: "observe/meta/me
}

"""
Describes the minimum target staleness of any datasets and monitors downstream
of this dataset/monitor, and the set of datasets and monitors downstream of
this dataset that have that target staleness. Currently only considers
configured target staleness.
Describes the minimum target staleness of any downstream objects from a dataset:

* Dataset
* Monitor
* Dataset outbound share

Downstream objects may either reference this dataset directly or depend on it
indirectly via other intermediate datasets.

It is not applicable to monitors, since they do not have downstream objects.

Currently only considers configured target staleness.
"""
type MinimumDownstreamTargetStaleness @goModel(model: "observe/meta/metatypes.MinimumDownstreamTargetStaleness") {
"""
Minimum target staleness of all datasets/monitors downstream of this one.
Currently this only considers the configured target staleness of downstream
datasets/monitors.
Minimum target staleness of all datasets, monitors, and outbound shares
downstream of this dataset. Currently this only considers the configured
target staleness of downstream objects.
"""
minimumDownstreamTargetStalenessSeconds: Float!

"""
List of Downstream datasets that have the configured target staleness in
minimumDownstreamTargetStalenessSeconds
List of downstream datasets that have the configured target staleness given
in `minimumDownstreamTargetStalenessSeconds`.
"""
datasetIds: [ObjectId!]

"""
List of Downstream monitors that have the configured target staleness in
minimumDownstreamTargetStalenessSeconds
List of downstream monitors that have the configured target staleness given
in `minimumDownstreamTargetStalenessSeconds`.
"""
monitorIds: [ObjectId!]

"""
List of downstream dataset outbound shares that have the configured target
staleness given in `minimumDownstreamTargetStalenessSeconds`.
"""
shareIds: [ObjectId!]
}

# FIXME: to be removed once the frontend has changed to the renamed
# accelerationInfo field
enum StreamingState @goModel(model: "observe/meta/metatypes.AccelerationState") {
Initializing
Live
LiveMode
Unavailable
Disabled
Error
Expand All @@ -79,6 +94,13 @@ enum AccelerationState @goModel(model: "observe/meta/metatypes.AccelerationState
"""
Live

"""
Like normal operation (Live), but additionally this dataset is updated as fast
as possible. As long as this dataset is in live mode, the freshness goal is
reduced to "zero" and reset to the original value again afterwards.
"""
LiveMode

"""
Acceleration is unavailable because the dataset or its upstream dataset is
broken (has compilation error). The dataset cannot be queried.
Expand Down Expand Up @@ -111,7 +133,7 @@ type StreamingInfo @goModel(model: "observe/meta/metatypes.AccelerationInfo") {
acceleratedRangeStart: Time
targetAcceleratedRangeStart: Time
freshnessTime: Time
errors: [AccelerationError]!
errors: [AccelerationError!]!
}

type AccelerationInfo @goModel(model: "observe/meta/metatypes.AccelerationInfo") {
Expand Down Expand Up @@ -229,5 +251,5 @@ type AccelerationInfo @goModel(model: "observe/meta/metatypes.AccelerationInfo")
now it only includes acceleration error of the particular dataset, but in
the future shall include upstream dataset's errors.
"""
errors: [AccelerationError]!
errors: [AccelerationError!]!
}
10 changes: 10 additions & 0 deletions client/internal/meta/schema/acceleration_job.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ type AccelerationRequestStatus @goModel(model: "observe/meta/metatypes.Accelerat
in the requested windows.
"""
acceleratedWindows: [TimeRange!]!

"""
Optional credits used for this particular dataset in the parent acceleration job.
"""
credits: Float
}

enum AccelerationJobState @goModel(model: "observe/meta/metatypes.AccelerationJobState") {
Expand Down Expand Up @@ -161,6 +166,11 @@ type AccelerationJob @goModel(model: "observe/meta/metatypes.AccelerationJob") {
Status of the requests in this job. One per dataset.
"""
datasetStatuses: [AccelerationRequestStatus!]!

"""
Optional value of the credits used for this acceleration job summed for all datasets
"""
credits: Float
}

type DatasetAccelerationStatus @goModel(model: "observe/meta/metatypes.DatasetAccelerationStatus") {
Expand Down
9 changes: 7 additions & 2 deletions client/internal/meta/schema/app.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ extend type Mutation {
createApp(workspaceId: ObjectId!, app: AppInput!): App!
updateApp(id: ObjectId!, app: AppInput!): App!
deleteApp(id: ObjectId!): ResultStatus!
installApp(workspaceId: ObjectId!, moduleId: String!, variables: [AppVariableInput!]): App!

createFolder(workspaceId: ObjectId!, folder: FolderInput!): Folder!
updateFolder(id: ObjectId!, folder: FolderInput!): Folder!
Expand Down Expand Up @@ -143,7 +144,7 @@ type AppChangeCount @goModel(model: "observe/meta/metatypes.AppChangeCount") {
}

type AppResourceChange @goModel(model: "observe/meta/metatypes.AppResourceChange") {
resourceType: ObjectKind!
resourceType: ORNType!
counts: [AppChangeCount!]!
}

Expand Down Expand Up @@ -194,6 +195,7 @@ enum AppDataSourceKind @goModel(model: "observe/meta/metatypes.AppDataSourceKind
Documentation
Token
Poller
Filedrop
}

"""
Expand Down Expand Up @@ -243,7 +245,10 @@ type AppDataSource implements WorkspaceObject & AuditedObject @goModel(model: "o
# data source specific fields
sourceUrl: String!
variables: [AppVariable!]
instructions: String!
instructions: String! @goField(forceResolver:true)
preInstallInstructions: String! @goField(forceResolver:true)
postInstallInstructions: String @goField(forceResolver:true)
outputs: JsonObject! @goField(forceResolver:true)
}

type AppDataConnection @goModel(model: "observe/meta/metatypes.AppDataConnection") {
Expand Down
37 changes: 37 additions & 0 deletions client/internal/meta/schema/connection.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
extend type Query {
"""
Return all connections for this customer, or all connections of a given kind.
If you have connection manager role, the credentials in the connection will
be included, else they will be redacted in the returned payload.
"""
connections(kind: String): [Connection!]!
}

type Connection @goModel(model:"observe/restapiservices/connection.Connection") {
meta: ConnectionMeta!
config: ConnectionConfig!
state: ConnectionState!
}

type ConnectionMeta @goModel(model:"observe/restapiservices/connection.ConnectionMeta") {
id: ORN!
customerId: CustomerId!
}

type ConnectionConfig @goModel(model:"observe/restapiservices/connection.ConnectionConfig") {
kind: String!
xid: String!
comment: String!
remoteKey: String!
observeKey: String!
configData: ConfigData!
}

type ConnectionState @goModel(model:"observe/restapiservices/connection.ConnectionState") {
createdDate: Time!
createdBy: UserId!
updatedDate: Time!
updatedBy: UserId!
}

scalar ConfigData @goModel(model: "observe/restapiservices/connection.ConfigData")
17 changes: 13 additions & 4 deletions client/internal/meta/schema/dataset.graphql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
extend type Query {
dataset(id: ObjectId!): Dataset
datasets(ids: [ObjectId!]!): [DatasetEnumerationResult!]!
pathsBetweenDatasets(from: ObjectId!, to: ObjectId!, limit: Int64): [RelationshipPath]!
pathsBetweenDatasets(from: ObjectId!, to: ObjectId!, limit: Int64): [RelationshipPath!]!
pathsBetweenDatasets2(from: [ObjectId!]!, to: ObjectId!, limit: Int64, costModel: RelationshipCostAttributes): RelationshipPathResult!

"""
Expand Down Expand Up @@ -121,7 +121,7 @@ input MultiStageQueryInput @goModel(model: "observe/meta/metatypes.MultiStageQue

type MultiStageQuery @goModel(model: "observe/meta/metatypes.MultiStageQuery") {
outputStage: String!
stages: [StageQuery]!
stages: [StageQuery!]!
parameters: [ParameterSpec!]!
parameterValues: [ParameterBinding!]
layout: JsonObject
Expand All @@ -144,7 +144,7 @@ type TransformVersion @goModel(model: "observe/meta/metatypes.TransformVersion")
type StageQuery @goModel(model: "observe/meta/metatypes.StageQuery") {
stageID: String @deprecated(reason: "use id instead")
id: String! @goField(name:StageID)
input: [InputDefinition]!
input: [InputDefinition!]!
params: JsonObject
pipeline: String!
layout: JsonObject
Expand Down Expand Up @@ -271,6 +271,14 @@ type GroupingKey @goModel(model: "observe/compiler/comptypes.GroupingKey") {
elements: [GroupingElement!]!
}

"""
IndexMetadata represents the metadata information of a dataset of the result schema of a query.
Currently only used for token index.
"""
type IndexMetadata @goModel(model: "observe/compiler/comptypes.IndexMetadata") {
columns: [String!]
}

type DatasetInputDataset @goModel(model: "observe/meta/metatypes.DatasetInputDataset") {
datasetId: ObjectId!,
inputRole: InputRole!,
Expand Down Expand Up @@ -317,6 +325,7 @@ type Dataset implements WorkspaceObject & FolderObject & AuditedObject & Acceler
managedBy: WorkspaceObject @goField(forceResolver:true)
managedById: ObjectId
folderId: ObjectId!
indexMetadata: IndexMetadata

"""
Optional custom configured override value of the on demand materialization
Expand Down Expand Up @@ -475,7 +484,7 @@ type RelationshipPathElement @goModel(model: "observe/meta/metapath.Relationship
}

type RelationshipPathResult @goModel(model: "observe/meta/metapath.RelationshipPathResult") {
paths: [RelationshipPath]!
paths: [RelationshipPath!]!
comments: [String!]!
errors: [String!]!
}
Expand Down
17 changes: 17 additions & 0 deletions client/internal/meta/schema/email.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
extend type Query {
"""
Get Target Email Address Verification State.
"""
email(address: String!): EmailAddress @goField(forceResolver:true)
"""
Get Target Email Addresses Verification States.
"""
emails(addresses: [String!]!): [EmailAddress!] @goField(forceResolver:true)
}

type EmailAddress @goModel(model: "observe/meta/metatypes.EmailAddress") {
email: String!
verificationState: EmailActionTargetState!
customerId: CustomerId!
userId: UserId
}
12 changes: 6 additions & 6 deletions client/internal/meta/schema/filedrop.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@ extend type Mutation {
}

enum FiledropEndpointType @goModel(model: "observe/meta/metatypes.FiledropEndpointType") {
S3
S3
}

enum FiledropProviderType @goModel(model: "observe/meta/metatypes.FiledropProviderType") {
Aws
Aws
}

enum FiledropStatus @goModel(model: "observe/meta/metatypes.FiledropStatus") {
Disabled
Initializing
Running
Updating
Disabled
Initializing
Running
Updating
}

type Filedrop implements WorkspaceObject & AuditedObject & FolderObject @goModel(model: "observe/meta/metatypes.Filedrop") {
Expand Down
Loading
Loading