Skip to content

Commit

Permalink
changes to schema
Browse files Browse the repository at this point in the history
  • Loading branch information
vagrant committed Aug 17, 2023
1 parent be3da8d commit 7a7c2c6
Show file tree
Hide file tree
Showing 81 changed files with 305 additions and 783 deletions.
4 changes: 2 additions & 2 deletions pkg/assembler/clients/operations/artifact.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@

mutation IngestArtifact($artifact: ArtifactInputSpec!) {
ingestArtifact(artifact: $artifact) {
...AllArtifactTree
ID
}
}

# Bulk Ingest Artifacts

mutation IngestArtifacts($artifacts: [ArtifactInputSpec!]!) {
ingestArtifacts(artifacts: $artifacts) {
...AllArtifactTree
ID
}
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/assembler/clients/operations/builder.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@

mutation IngestBuilder($builder: BuilderInputSpec!) {
ingestBuilder(builder: $builder) {
uri
ID
}
}

# Bulk Ingest Builder

mutation IngestBuilders($builders: [BuilderInputSpec!]!) {
ingestBuilders(builders: $builders) {
uri
ID
}
}
12 changes: 6 additions & 6 deletions pkg/assembler/clients/operations/certifyBad.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -19,39 +19,39 @@

mutation CertifyBadPkg($pkg: PkgInputSpec!, $pkgMatchType: MatchFlags!, $certifyBad: CertifyBadInputSpec!) {
ingestCertifyBad(subject: {package: $pkg}, pkgMatchType: $pkgMatchType, certifyBad: $certifyBad) {
...AllCertifyBad
ID
}
}

mutation CertifyBadSrc($source: SourceInputSpec!, $certifyBad: CertifyBadInputSpec!) {
ingestCertifyBad(subject: {source: $source}, pkgMatchType: {pkg: ALL_VERSIONS}, certifyBad: $certifyBad) {
...AllCertifyBad
ID
}
}

mutation CertifyBadArtifact($artifact: ArtifactInputSpec!, $certifyBad: CertifyBadInputSpec!) {
ingestCertifyBad(subject: {artifact: $artifact}, pkgMatchType: {pkg: ALL_VERSIONS}, certifyBad: $certifyBad) {
...AllCertifyBad
ID
}
}

# Defines the GraphQL operations to bulk ingest a CertifyBad into GUAC

mutation CertifyBadPkgs($pkgs: [PkgInputSpec!]!, $pkgMatchType: MatchFlags!, $certifyBads: [CertifyBadInputSpec!]!) {
ingestCertifyBads(subjects: {packages: $pkgs}, pkgMatchType: $pkgMatchType, certifyBads: $certifyBads) {
...AllCertifyBad
ID
}
}

mutation CertifyBadSrcs($sources: [SourceInputSpec!]!, $certifyBads: [CertifyBadInputSpec!]!) {
ingestCertifyBads(subjects: {sources: $sources}, pkgMatchType: {pkg: ALL_VERSIONS}, certifyBads: $certifyBads) {
...AllCertifyBad
ID
}
}

mutation CertifyBadArtifacts($artifacts: [ArtifactInputSpec!]!, $certifyBads: [CertifyBadInputSpec!]!) {
ingestCertifyBads(subjects: {artifacts: $artifacts}, pkgMatchType: {pkg: ALL_VERSIONS}, certifyBads: $certifyBads) {
...AllCertifyBad
ID
}
}

Expand Down
12 changes: 6 additions & 6 deletions pkg/assembler/clients/operations/certifyGood.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -19,39 +19,39 @@

mutation CertifyGoodPkg($pkg: PkgInputSpec!, $pkgMatchType: MatchFlags!, $certifyGood: CertifyGoodInputSpec!) {
ingestCertifyGood(subject: {package: $pkg}, pkgMatchType: $pkgMatchType, certifyGood: $certifyGood) {
...AllCertifyGood
ID
}
}

mutation CertifyGoodSrc($source: SourceInputSpec!, $certifyGood: CertifyGoodInputSpec!) {
ingestCertifyGood(subject: {source: $source}, pkgMatchType: {pkg: ALL_VERSIONS}, certifyGood: $certifyGood) {
...AllCertifyGood
ID
}
}

mutation CertifyGoodArtifact($artifact: ArtifactInputSpec!, $certifyGood: CertifyGoodInputSpec!) {
ingestCertifyGood(subject: {artifact: $artifact}, pkgMatchType: {pkg: ALL_VERSIONS}, certifyGood: $certifyGood) {
...AllCertifyGood
ID
}
}

# Defines the GraphQL operations to bulk ingest a CertifyGood into GUAC

mutation CertifyGoodPkgs($pkgs: [PkgInputSpec!]!, $pkgMatchType: MatchFlags!, $certifyGoods: [CertifyGoodInputSpec!]!) {
ingestCertifyGoods(subjects: {packages: $pkgs}, pkgMatchType: $pkgMatchType, certifyGoods: $certifyGoods) {
...AllCertifyGood
ID
}
}

mutation CertifyGoodSrcs($sources: [SourceInputSpec!]!, $certifyGoods: [CertifyGoodInputSpec!]!) {
ingestCertifyGoods(subjects: {sources: $sources}, pkgMatchType: {pkg: ALL_VERSIONS}, certifyGoods: $certifyGoods) {
...AllCertifyGood
ID
}
}

mutation CertifyGoodArtifacts($artifacts: [ArtifactInputSpec!]!, $certifyGoods: [CertifyGoodInputSpec!]!) {
ingestCertifyGoods(subjects: {artifacts: $artifacts}, pkgMatchType: {pkg: ALL_VERSIONS}, certifyGoods: $certifyGoods) {
...AllCertifyGood
ID
}
}

4 changes: 2 additions & 2 deletions pkg/assembler/clients/operations/certifyScorecard.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@

mutation CertifyScorecard($source: SourceInputSpec!, $scorecard: ScorecardInputSpec!) {
ingestScorecard(source: $source, scorecard: $scorecard) {
...AllCertifyScorecard
ID
}
}

# Defines the GraphQL operations to bulk ingest Scorecard certifications into GUAC

mutation CertifyScorecards($sources: [SourceInputSpec!]!, $scorecards: [ScorecardInputSpec!]!) {
ingestScorecards(sources: $sources, scorecards: $scorecards) {
...AllCertifyScorecard
ID
}
}
4 changes: 2 additions & 2 deletions pkg/assembler/clients/operations/certifyVEXStatement.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@

mutation CertifyVexPkg($pkg: PkgInputSpec!, $vulnerability: VulnerabilityInputSpec!, $vexStatement: VexStatementInputSpec!) {
ingestVEXStatement(subject: {package: $pkg}, vulnerability: $vulnerability, vexStatement: $vexStatement) {
...AllCertifyVEXStatement
ID
}
}

mutation CertifyVexArtifact($artifact: ArtifactInputSpec!, $vulnerability: VulnerabilityInputSpec!, $vexStatement: VexStatementInputSpec!) {
ingestVEXStatement(subject: {artifact: $artifact}, vulnerability: $vulnerability,, vexStatement: $vexStatement) {
...AllCertifyVEXStatement
ID
}
}
4 changes: 2 additions & 2 deletions pkg/assembler/clients/operations/certifyVuln.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@

mutation CertifyVulnPkg($pkg: PkgInputSpec!, $vulnerability: VulnerabilityInputSpec!, $certifyVuln: ScanMetadataInput!) {
ingestCertifyVuln(pkg: $pkg, vulnerability: $vulnerability, certifyVuln: $certifyVuln) {
...AllCertifyVuln
ID
}
}

# Defines the GraphQL operations to bulk ingest vulnerability certifications into GUAC

mutation CertifyVulnPkgs($pkgs: [PkgInputSpec!]!, $vulnerabilities: [VulnerabilityInputSpec!]!, $certifyVulns: [ScanMetadataInput!]!) {
ingestCertifyVulns(pkgs: $pkgs, vulnerabilities: $vulnerabilities, certifyVulns: $certifyVulns) {
...AllCertifyVuln
ID
}
}
4 changes: 2 additions & 2 deletions pkg/assembler/clients/operations/contact.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@

mutation PointOfContactPkg($pkg: PkgInputSpec!, $pkgMatchType: MatchFlags!, $pointOfContact: PointOfContactInputSpec!) {
ingestPointOfContact(subject: {package: $pkg}, pkgMatchType: $pkgMatchType, pointOfContact: $pointOfContact) {
...AllPointOfContact
ID
}
}

mutation PointOfContactSrc($source: SourceInputSpec!, $pointOfContact: PointOfContactInputSpec!) {
ingestPointOfContact(subject: {source: $source}, pkgMatchType: {pkg: ALL_VERSIONS}, pointOfContact: $pointOfContact) {
...AllPointOfContact
ID
}
}

Expand Down
8 changes: 4 additions & 4 deletions pkg/assembler/clients/operations/hasSBOM.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,27 @@

mutation HasSBOMPkg($pkg: PkgInputSpec!, $hasSBOM: HasSBOMInputSpec!) {
ingestHasSBOM(subject: {package: $pkg}, hasSBOM: $hasSBOM) {
...AllHasSBOMTree
ID
}
}

mutation HasSBOMArtifact($artifact: ArtifactInputSpec!, $hasSBOM: HasSBOMInputSpec!) {
ingestHasSBOM(subject: {artifact: $artifact}, hasSBOM: $hasSBOM) {
...AllHasSBOMTree
ID
}
}

# Defines the GraphQL operations to bulk ingest hasSBOM information into GUAC

mutation HasSBOMPkgs($pkgs: [PkgInputSpec!]!, $hasSBOMs: [HasSBOMInputSpec!]!) {
ingestHasSBOMs(subjects: {packages: $pkgs}, hasSBOMs: $hasSBOMs) {
...AllHasSBOMTree
ID
}
}

mutation HasSBOMArtifacts($artifacts: [ArtifactInputSpec!]!, $hasSBOMs: [HasSBOMInputSpec!]!) {
ingestHasSBOMs(subjects: {artifacts: $artifacts}, hasSBOMs: $hasSBOMs) {
...AllHasSBOMTree
ID
}
}

4 changes: 2 additions & 2 deletions pkg/assembler/clients/operations/hasSLSA.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@

mutation SLSAForArtifact($artifact: ArtifactInputSpec!, $materials: [ArtifactInputSpec!]!, $builder: BuilderInputSpec!, $slsa: SLSAInputSpec!) {
ingestSLSA(subject: $artifact, builtFrom: $materials, builtBy: $builder, slsa: $slsa) {
...AllSLSATree
ID
}
}

# Defines the GraphQL operations to bulk ingest SLSA attestations into GUAC

mutation SLSAForArtifacts($artifacts: [ArtifactInputSpec!]!, $materialsList: [[ArtifactInputSpec!]!]!, $builders: [BuilderInputSpec!]!, $slsaList: [SLSAInputSpec!]!) {
ingestSLSAs(subjects: $artifacts, builtFromList: $materialsList, builtByList: $builders, slsaList: $slsaList) {
...AllSLSATree
ID
}
}
2 changes: 1 addition & 1 deletion pkg/assembler/clients/operations/hasSourceAt.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@

mutation HasSourceAt($pkg: PkgInputSpec!, $pkgMatchType: MatchFlags!, $source: SourceInputSpec!, $hasSourceAt: HasSourceAtInputSpec!) {
ingestHasSourceAt(pkg: $pkg, pkgMatchType: $pkgMatchType, source: $source, hasSourceAt: $hasSourceAt) {
...AllHasSourceAt
ID
}
}
4 changes: 2 additions & 2 deletions pkg/assembler/clients/operations/hashEqual.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@

mutation HashEqual($artifact: ArtifactInputSpec!, $otherArtifact: ArtifactInputSpec!, $hashEqual: HashEqualInputSpec!) {
ingestHashEqual(artifact: $artifact, otherArtifact: $otherArtifact, hashEqual: $hashEqual) {
...AllHashEqualTree
ID
}
}

# Defines the GraphQL operations to bulk ingest hasEqual information into GUAC

mutation HashEquals($artifacts: [ArtifactInputSpec!]!, $otherArtifacts: [ArtifactInputSpec!]!, $hashEquals: [HashEqualInputSpec!]!) {
ingestHashEquals(artifacts: $artifacts, otherArtifacts: $otherArtifacts, hashEquals: $hashEquals) {
...AllHashEqualTree
ID
}
}
4 changes: 2 additions & 2 deletions pkg/assembler/clients/operations/isDependency.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@

mutation IsDependency($pkg: PkgInputSpec!, $depPkg: PkgInputSpec!, $depPkgMatchType: MatchFlags!, $dependency: IsDependencyInputSpec!) {
ingestDependency(pkg: $pkg, depPkg: $depPkg, depPkgMatchType: $depPkgMatchType, dependency: $dependency) {
...AllIsDependencyTree
ID
}
}

# Defines the GraphQL operations to bulk ingest dependencies information into GUAC

mutation IsDependencies($pkgs: [PkgInputSpec!]!, $depPkgs: [PkgInputSpec!]!, $depPkgMatchType: MatchFlags!, $dependencies: [IsDependencyInputSpec!]!) {
ingestDependencies(pkgs: $pkgs, depPkgs: $depPkgs, depPkgMatchType: $depPkgMatchType, dependencies: $dependencies) {
...AllIsDependencyTree
ID
}
}
8 changes: 4 additions & 4 deletions pkg/assembler/clients/operations/isOccurrence.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,26 @@

mutation IsOccurrencePkg($pkg: PkgInputSpec!, $artifact: ArtifactInputSpec!, $occurrence: IsOccurrenceInputSpec!) {
ingestOccurrence(subject: {package: $pkg}, artifact: $artifact, occurrence: $occurrence) {
...AllIsOccurrencesTree
ID
}
}

mutation IsOccurrenceSrc($source: SourceInputSpec!, $artifact: ArtifactInputSpec!, $occurrence: IsOccurrenceInputSpec!) {
ingestOccurrence(subject: {source: $source}, artifact: $artifact, occurrence: $occurrence) {
...AllIsOccurrencesTree
ID
}
}

# Defines the GraphQL operations to bulk ingest occurrences information into GUAC

mutation IsOccurrencesPkg($pkgs: [PkgInputSpec!]!, $artifacts: [ArtifactInputSpec!]!, $occurrences: [IsOccurrenceInputSpec!]!) {
ingestOccurrences(subjects: {packages: $pkgs}, artifacts: $artifacts, occurrences: $occurrences) {
...AllIsOccurrencesTree
ID
}
}

mutation IsOccurrencesSrc($sources: [SourceInputSpec!]!, $artifacts: [ArtifactInputSpec!]!, $occurrences: [IsOccurrenceInputSpec!]!) {
ingestOccurrences(subjects: {sources: $sources}, artifacts: $artifacts, occurrences: $occurrences) {
...AllIsOccurrencesTree
ID
}
}
6 changes: 3 additions & 3 deletions pkg/assembler/clients/operations/metadata.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@

mutation HasMetadataPkg($pkg: PkgInputSpec!, $pkgMatchType: MatchFlags!, $hasMetadata: HasMetadataInputSpec!) {
ingestHasMetadata(subject: {package: $pkg}, pkgMatchType: $pkgMatchType, hasMetadata: $hasMetadata) {
...AllHasMetadata
ID
}
}

mutation HasMetadataSrc($source: SourceInputSpec!, $hasMetadata: HasMetadataInputSpec!) {
ingestHasMetadata(subject: {source: $source}, pkgMatchType: {pkg: ALL_VERSIONS}, hasMetadata: $hasMetadata) {
...AllHasMetadata
ID
}
}

mutation HasMetadataArtifact($artifact: ArtifactInputSpec!, $hasMetadata: HasMetadataInputSpec!) {
ingestHasMetadata(subject: {artifact: $artifact}, pkgMatchType: {pkg: ALL_VERSIONS}, hasMetadata: $hasMetadata) {
...AllHasMetadata
ID
}
}
4 changes: 2 additions & 2 deletions pkg/assembler/clients/operations/package.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@

mutation IngestPackage($pkg: PkgInputSpec!) {
ingestPackage(pkg: $pkg) {
...AllPkgTree
ID
}
}

# Bulk Ingest Packages

mutation IngestPackages($pkgs: [PkgInputSpec!]!) {
ingestPackages(pkgs: $pkgs) {
...AllPkgTree
ID
}
}

Expand Down
6 changes: 3 additions & 3 deletions pkg/assembler/clients/operations/pkgEqual.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@

mutation PkgEqual($pkg: PkgInputSpec!, $otherPackage: PkgInputSpec!, $pkgEqual: PkgEqualInputSpec!) {
pkg: ingestPackage(pkg: $pkg) {
...AllPkgTree
ID
}
otherPackage: ingestPackage(pkg: $otherPackage) {
...AllPkgTree
ID
}
ingestPkgEqual(pkg: $pkg, otherPackage: $otherPackage, pkgEqual: $pkgEqual) {
...AllPkgEqual
ID
}
}
4 changes: 2 additions & 2 deletions pkg/assembler/clients/operations/source.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@

mutation IngestSource($source: SourceInputSpec!) {
ingestSource(source: $source) {
...AllSourceTree
ID
}
}

# Bulk Ingest Sources

mutation IngestSources($sources: [SourceInputSpec!]!) {
ingestSources(sources: $sources) {
...AllSourceTree
ID
}
}

Expand Down
Loading

0 comments on commit 7a7c2c6

Please sign in to comment.