Created
March 3, 2023 15:58
-
-
Save cowboyd/fc85977e9b505a6d74e365392eed7580 to your computer and use it in GitHub Desktop.
Hypothetical GraphQL API for Backstage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Node { | |
id: ID! | |
} | |
interface Entity implements Node | |
@loads(from: "catalog") | |
@discriminates(with: "kind") { | |
id: ID! | |
kind: String! | |
} | |
interface Component implements Entity & Node | |
@discriminates(with: "spec.type") { | |
id: ID! | |
kind: String! | |
displayName: @field(at: "spec.profile.displayName") | |
} | |
type Service @implements(interface: "Component") { | |
id: ID! | |
} | |
type Library @implements(interface: "Component") { | |
id: ID! | |
} | |
type Website @implements(interface: "Component") { | |
id: ID! | |
} | |
interface Group | |
@implements(interface: "Entity") | |
@discriminates(with: "spec.type") | |
name: String! @field(at: "spec.profile.name") { | |
} | |
type BusinessUnit | |
@condition(when: "spec.type" is: "Organization") | |
@implements(interface: "Group") { | |
} | |
type Team @implements(interface: "Group") {} | |
type SubDepartment @implements(interface: "Group") {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment