diff --git a/crates/rover-client/.schema/hash.id b/crates/rover-client/.schema/hash.id index 711dfb291..0b3658d37 100644 --- a/crates/rover-client/.schema/hash.id +++ b/crates/rover-client/.schema/hash.id @@ -1 +1 @@ -d323d8a381432a4df7853010df12bebeef89aba0ed9e5f103059e4e2b1512d6d \ No newline at end of file +6ef06df407922a89fe1d190a2c446236a4e83aece1b8771c78f9e1a49adb7768 \ No newline at end of file diff --git a/crates/rover-client/.schema/last_run.uuid b/crates/rover-client/.schema/last_run.uuid index b14ad76e8..a28e6f645 100644 --- a/crates/rover-client/.schema/last_run.uuid +++ b/crates/rover-client/.schema/last_run.uuid @@ -1 +1 @@ -bc25a899-feef-443f-96bd-fbc62834c18b \ No newline at end of file +4b9d4d9c-c3f3-44b2-b3bf-a1592e34d759 \ No newline at end of file diff --git a/crates/rover-client/.schema/schema.graphql b/crates/rover-client/.schema/schema.graphql index a83178fa6..be944f35e 100644 --- a/crates/rover-client/.schema/schema.graphql +++ b/crates/rover-client/.schema/schema.graphql @@ -502,6 +502,8 @@ type SubgraphPublicationResult { wasUpdated: Boolean! """All subgraphs that were created from this mutation""" subgraphsCreated: [String!]! + """The Launch result part of this subgraph publish.""" + launch: Launch """The URL of the Studio page for this update's associated launch, if available.""" launchUrl: String """Human-readable text describing the launch result of the subgraph publish.""" @@ -747,6 +749,282 @@ input FilterConfigInput { include: [String!]! } +type FlatDiffAddArgument implements FlatDiffItem & FlatDiffItemCoordinate & FlatDiffItemValue { + coordinate: String! + type: FlatDiffType! + value: String! +} + +type FlatDiffAddDirective implements FlatDiffItem & FlatDiffItemCoordinate { + coordinate: String! + type: FlatDiffType! +} + +type FlatDiffAddDirectiveUsage implements FlatDiffItem & FlatDiffItemCoordinate & FlatDiffItemValue { + coordinate: String! + type: FlatDiffType! + value: String! +} + +type FlatDiffAddEnum implements FlatDiffItem & FlatDiffItemCoordinate { + coordinate: String! + type: FlatDiffType! +} + +type FlatDiffAddEnumValue implements FlatDiffItem & FlatDiffItemCoordinate { + coordinate: String! + type: FlatDiffType! +} + +type FlatDiffAddField implements FlatDiffItem & FlatDiffItemCoordinate & FlatDiffItemValue { + coordinate: String! + type: FlatDiffType! + value: String! +} + +type FlatDiffAddImplementation implements FlatDiffItem & FlatDiffItemCoordinate & FlatDiffItemValue { + coordinate: String! + type: FlatDiffType! + value: String! +} + +type FlatDiffAddInput implements FlatDiffItem & FlatDiffItemCoordinate { + coordinate: String! + type: FlatDiffType! +} + +type FlatDiffAddInterface implements FlatDiffItem & FlatDiffItemCoordinate { + coordinate: String! + type: FlatDiffType! +} + +type FlatDiffAddObject implements FlatDiffItem & FlatDiffItemCoordinate { + coordinate: String! + type: FlatDiffType! +} + +type FlatDiffAddScalar implements FlatDiffItem & FlatDiffItemCoordinate { + coordinate: String! + type: FlatDiffType! +} + +type FlatDiffAddSchemaDefinition implements FlatDiffItem { + type: FlatDiffType! +} + +type FlatDiffAddSchemaDirectiveUsage implements FlatDiffItem & FlatDiffItemValue { + type: FlatDiffType! + value: String! +} + +type FlatDiffAddSchemaRootOperation implements FlatDiffItem & FlatDiffItemRootType & FlatDiffItemValue { + rootType: String! + type: FlatDiffType! + value: String! +} + +type FlatDiffAddUnion implements FlatDiffItem & FlatDiffItemCoordinate { + coordinate: String! + type: FlatDiffType! +} + +type FlatDiffAddUnionMember implements FlatDiffItem & FlatDiffItemCoordinate & FlatDiffItemValue { + coordinate: String! + type: FlatDiffType! + value: String! +} + +type FlatDiffAddValidLocation implements FlatDiffItem & FlatDiffItemCoordinate & FlatDiffItemValue { + coordinate: String! + type: FlatDiffType! + value: String! +} + +type FlatDiffChangeArgumentDefault implements FlatDiffItem & FlatDiffItemCoordinate & FlatDiffItemNullableValue { + coordinate: String! + type: FlatDiffType! + value: String +} + +type FlatDiffChangeDescription implements FlatDiffItem & FlatDiffItemCoordinate & FlatDiffItemNullableValue { + coordinate: String! + type: FlatDiffType! + value: String +} + +type FlatDiffChangeDirectiveRepeatable implements FlatDiffItem & FlatDiffItemCoordinate { + coordinate: String! + type: FlatDiffType! + value: Boolean! +} + +type FlatDiffChangeInputFieldDefault implements FlatDiffItem & FlatDiffItemCoordinate & FlatDiffItemNullableValue { + coordinate: String! + type: FlatDiffType! + value: String +} + +type FlatDiffChangeSchemaDescription implements FlatDiffItem & FlatDiffItemNullableValue { + type: FlatDiffType! + value: String +} + +interface FlatDiffItem { + type: FlatDiffType! +} + +interface FlatDiffItemCoordinate implements FlatDiffItem { + coordinate: String! + type: FlatDiffType! +} + +interface FlatDiffItemNullableValue implements FlatDiffItem { + type: FlatDiffType! + value: String +} + +interface FlatDiffItemRootType implements FlatDiffItem { + rootType: String! + type: FlatDiffType! +} + +interface FlatDiffItemValue implements FlatDiffItem { + type: FlatDiffType! + value: String! +} + +type FlatDiffRemoveArgument implements FlatDiffItem & FlatDiffItemCoordinate & FlatDiffItemValue { + coordinate: String! + type: FlatDiffType! + value: String! +} + +type FlatDiffRemoveDirective implements FlatDiffItem & FlatDiffItemCoordinate { + coordinate: String! + type: FlatDiffType! +} + +type FlatDiffRemoveDirectiveUsage implements FlatDiffItem & FlatDiffItemCoordinate & FlatDiffItemValue { + coordinate: String! + type: FlatDiffType! + value: String! +} + +type FlatDiffRemoveEnum implements FlatDiffItem & FlatDiffItemCoordinate { + coordinate: String! + type: FlatDiffType! +} + +type FlatDiffRemoveEnumValue implements FlatDiffItem & FlatDiffItemCoordinate { + coordinate: String! + type: FlatDiffType! +} + +type FlatDiffRemoveField implements FlatDiffItem & FlatDiffItemCoordinate & FlatDiffItemValue { + coordinate: String! + type: FlatDiffType! + value: String! +} + +type FlatDiffRemoveImplementation implements FlatDiffItem & FlatDiffItemCoordinate & FlatDiffItemValue { + coordinate: String! + type: FlatDiffType! + value: String! +} + +type FlatDiffRemoveInput implements FlatDiffItem & FlatDiffItemCoordinate { + coordinate: String! + type: FlatDiffType! +} + +type FlatDiffRemoveInterface implements FlatDiffItem & FlatDiffItemCoordinate { + coordinate: String! + type: FlatDiffType! +} + +type FlatDiffRemoveObject implements FlatDiffItem & FlatDiffItemCoordinate { + coordinate: String! + type: FlatDiffType! +} + +type FlatDiffRemoveScalar implements FlatDiffItem & FlatDiffItemCoordinate { + coordinate: String! + type: FlatDiffType! +} + +type FlatDiffRemoveSchemaDefinition implements FlatDiffItem { + type: FlatDiffType! +} + +type FlatDiffRemoveSchemaDirectiveUsage implements FlatDiffItem & FlatDiffItemValue { + type: FlatDiffType! + value: String! +} + +type FlatDiffRemoveSchemaRootOperation implements FlatDiffItem & FlatDiffItemRootType { + rootType: String! + type: FlatDiffType! +} + +type FlatDiffRemoveUnion implements FlatDiffItem & FlatDiffItemCoordinate { + coordinate: String! + type: FlatDiffType! +} + +type FlatDiffRemoveUnionMember implements FlatDiffItem & FlatDiffItemCoordinate & FlatDiffItemValue { + coordinate: String! + type: FlatDiffType! + value: String! +} + +type FlatDiffRemoveValidLocation implements FlatDiffItem & FlatDiffItemCoordinate & FlatDiffItemValue { + coordinate: String! + type: FlatDiffType! + value: String! +} + +enum FlatDiffType { + ADD_ARGUMENT + ADD_DIRECTIVE + ADD_DIRECTIVE_USAGE + ADD_ENUM + ADD_ENUM_VALUE + ADD_FIELD + ADD_IMPLEMENTATION + ADD_INPUT + ADD_INTERFACE + ADD_OBJECT + ADD_SCALAR + ADD_SCHEMA_DEFINITION + ADD_SCHEMA_DIRECTIVE_USAGE + ADD_SCHEMA_ROOT_OPERATION + ADD_UNION + ADD_UNION_MEMBER + ADD_VALID_LOCATION + CHANGE_ARGUMENT_DEFAULT + CHANGE_DESCRIPTION + CHANGE_INPUT_FIELD_DEFAULT + CHANGE_REPEATABLE + CHANGE_SCHEMA_DESCRIPTION + REMOVE_ARGUMENT + REMOVE_DIRECTIVE + REMOVE_DIRECTIVE_USAGE + REMOVE_ENUM + REMOVE_ENUM_VALUE + REMOVE_FIELD + REMOVE_IMPLEMENTATION + REMOVE_INPUT + REMOVE_INTERFACE + REMOVE_OBJECT + REMOVE_SCALAR + REMOVE_SCHEMA_DEFINITION + REMOVE_SCHEMA_DIRECTIVE_USAGE + REMOVE_SCHEMA_ROOT_OPERATION + REMOVE_UNION + REMOVE_UNION_MEMBER + REMOVE_VALID_LOCATION +} + type GitContext { commit: ID } @@ -1745,6 +2023,90 @@ type PlanError { message: String! } +type Proposal { + """The variant this Proposal is under the hood.""" + backingVariant: GraphVariant! + createdAt: Timestamp! + """ + null if user is deleted, or if user removed from org + and others in the org no longer have access to this user's info + """ + createdBy: Identity + displayName: String! + id: ID! + """True if only some of the changes in this proposal are currently published to the implementation variant""" + isPartiallyImplemented: Boolean! + """The variant this Proposal was cloned/sourced from.""" + sourceVariant: GraphVariant! + status: ProposalStatus! + updatedAt: Timestamp! + updatedBy: Identity +} + +enum ProposalChangeMismatchSeverity { + ERROR + OFF + WARN +} + +enum ProposalCoverage { + FULL + NONE + OVERRIDDEN + PARTIAL + PENDING +} + +type ProposalRevision { + checkWorkflows: [CheckWorkflow!]! + createdBy: Identity + id: ID! + launch: Launch + """null if this is the first revision""" + previousRevision: ProposalRevision + summary: String! +} + +type ProposalsCheckTask implements CheckWorkflowTask { + completedAt: Timestamp + createdAt: Timestamp! + graphID: ID! + id: ID! + status: CheckWorkflowTaskStatus! + targetURL: String + workflow: CheckWorkflow! + """The results of this proposal check were overridden""" + didOverrideProposalsCheckTask: Boolean! + """Diff items in this Check task.""" + diffs: [ProposalsCheckTaskDiff!]! + """Indicates the level of coverage a check's changeset is in approved Proposals. PENDING while Check is still running.""" + proposalCoverage: ProposalCoverage! + """Proposals with their state at the time the check was run associated to this check task.""" + relatedProposalResults: [RelatedProposalResult!]! + """The configured severity at the time the check was run. If the check failed, this is the severity that should be shown. While this Check is PENDING defaults to Service's severityLevel.""" + severityLevel: ProposalChangeMismatchSeverity! +} + +"""A diff item in this Check Task and their related Proposals.""" +type ProposalsCheckTaskDiff { + """A diff item in this Check Task.""" + diffItem: FlatDiffItem! + """If this diff item is associated with an approved Proposal.""" + hasApprovedProposal: Boolean! + """Proposals associated with this diff.""" + relatedProposalResults: [RelatedProposalResult!]! + """The subgraph this diff belongs to.""" + subgraph: String! +} + +enum ProposalStatus { + APPROVED + CLOSED + DRAFT + IMPLEMENTED + OPEN +} + """The result of a successful call to PersistedQueryListMutation.publishOperations.""" type PublishOperationsResult { """The build created by this publish operation.""" @@ -1792,6 +2154,16 @@ type Readme { lastUpdatedTime: Timestamp } +"""A Proposal related to a Proposal Check Task.""" +type RelatedProposalResult { + """The latest revision at the time the check was run, defaults to current revision if nothing found for time of the check.""" + latestRevisionAtCheck: ProposalRevision! + """The Proposal related to the check. State may have changed since the Check was run.""" + proposal: Proposal! + """The status of the Proposal at the time the check was run, defaults to current state if nothing found for time of the check.""" + statusAtCheck: ProposalStatus! +} + union RemoveOperationCollectionEntryResult = OperationCollection | PermissionError type Router { @@ -2306,14 +2678,14 @@ type SchemaPublicationResult { """A registered Apollo Studio user.""" type User implements Identity { + """Returns a list of all active user API keys for the user.""" + apiKeys(includeCookies: Boolean = false): [UserApiKey!]! """Returns a representation of this user as an `Actor` type. Useful when determining which actor (usually a `User` or `Graph`) performed a particular action in Studio.""" asActor: Actor! """The user's unique ID.""" id: ID! """The user's first and last name.""" name: String! - """Returns a list of all active user API keys for the user.""" - apiKeys(includeCookies: Boolean = false): [UserApiKey!]! """A list of the user's memberships in Apollo Studio organizations.""" memberships: [UserMembership!]! } diff --git a/src/command/template/queries.rs b/src/command/template/queries.rs index 6f2ef5604..c00345abe 100644 --- a/src/command/template/queries.rs +++ b/src/command/template/queries.rs @@ -18,6 +18,7 @@ pub mod list_templates_for_language { type Url = crate::command::template::custom_scalars::Url; #[derive(Clone, Debug, Eq, PartialEq)] pub enum Language { + C_SHARP, GO, JAVA, JAVASCRIPT, @@ -30,6 +31,7 @@ pub mod list_templates_for_language { impl ::serde::Serialize for Language { fn serialize(&self, ser: S) -> Result { ser.serialize_str(match *self { + Language::C_SHARP => "C_SHARP", Language::GO => "GO", Language::JAVA => "JAVA", Language::JAVASCRIPT => "JAVASCRIPT", @@ -45,6 +47,7 @@ pub mod list_templates_for_language { fn deserialize>(deserializer: D) -> Result { let s: String = ::serde::Deserialize::deserialize(deserializer)?; match s.as_str() { + "C_SHARP" => Ok(Language::C_SHARP), "GO" => Ok(Language::GO), "JAVA" => Ok(Language::JAVA), "JAVASCRIPT" => Ok(Language::JAVASCRIPT), @@ -148,6 +151,7 @@ pub mod get_templates_for_language { type Url = crate::command::template::custom_scalars::Url; #[derive(Clone, Debug, Eq, PartialEq)] pub enum Language { + C_SHARP, GO, JAVA, JAVASCRIPT, @@ -160,6 +164,7 @@ pub mod get_templates_for_language { impl ::serde::Serialize for Language { fn serialize(&self, ser: S) -> Result { ser.serialize_str(match *self { + Language::C_SHARP => "C_SHARP", Language::GO => "GO", Language::JAVA => "JAVA", Language::JAVASCRIPT => "JAVASCRIPT", @@ -175,6 +180,7 @@ pub mod get_templates_for_language { fn deserialize>(deserializer: D) -> Result { let s: String = ::serde::Deserialize::deserialize(deserializer)?; match s.as_str() { + "C_SHARP" => Ok(Language::C_SHARP), "GO" => Ok(Language::GO), "JAVA" => Ok(Language::JAVA), "JAVASCRIPT" => Ok(Language::JAVASCRIPT), diff --git a/src/options/template.rs b/src/options/template.rs index a19e1c6de..af4caf418 100644 --- a/src/options/template.rs +++ b/src/options/template.rs @@ -83,6 +83,7 @@ pub(crate) fn extract_tarball( #[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize, clap::ValueEnum)] pub enum ProjectLanguage { + CSharp, Go, Java, Javascript, @@ -98,6 +99,7 @@ impl Display for ProjectLanguage { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { use ProjectLanguage::*; let readable = match self { + CSharp => "C#", Go => "Go", Java => "Java", Javascript => "JavaScript", @@ -114,6 +116,7 @@ impl Display for ProjectLanguage { impl From for get_templates_for_language::Language { fn from(language: ProjectLanguage) -> get_templates_for_language::Language { match language { + ProjectLanguage::CSharp => get_templates_for_language::Language::C_SHARP, ProjectLanguage::Go => get_templates_for_language::Language::GO, ProjectLanguage::Java => get_templates_for_language::Language::JAVA, ProjectLanguage::Javascript => get_templates_for_language::Language::JAVASCRIPT, @@ -129,6 +132,7 @@ impl From for get_templates_for_language::Language { impl From for list_templates_for_language::Language { fn from(language: ProjectLanguage) -> list_templates_for_language::Language { match language { + ProjectLanguage::CSharp => list_templates_for_language::Language::C_SHARP, ProjectLanguage::Go => list_templates_for_language::Language::GO, ProjectLanguage::Java => list_templates_for_language::Language::JAVA, ProjectLanguage::Javascript => list_templates_for_language::Language::JAVASCRIPT, @@ -144,6 +148,7 @@ impl From for list_templates_for_language::Language { impl From for ProjectLanguage { fn from(language: list_templates_for_language::Language) -> Self { match language { + list_templates_for_language::Language::C_SHARP => ProjectLanguage::CSharp, list_templates_for_language::Language::GO => ProjectLanguage::Go, list_templates_for_language::Language::JAVA => ProjectLanguage::Java, list_templates_for_language::Language::JAVASCRIPT => ProjectLanguage::Javascript,