Skip to content

Instantly share code, notes, and snippets.

@taras
Last active April 4, 2022 19:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taras/8ca16257b9204e641db14ffe493b4368 to your computer and use it in GitHub Desktop.
Save taras/8ca16257b9204e641db14ffe493b4368 to your computer and use it in GitHub Desktop.
type Component {
ownedBy: ComponentOwners
providesApi: [API]
dependsOn: Component
parentOf: Component
childOf: Component
partOf: PartOf
}
union PartOf = Component | System | Domain
union ComponentOwners = User | Group
type API {
apiProvidedBy: Component
}
type User {
ownerOf: [Component]
memberOf: [Group]
}
type Group {
hasMember: [User]
ownerOf: [Component]
}
type System {
hasPart: PartOf
partOf: PartOf
}
type Domain {
hasPart: PartOf
partOf: PartOf
}
# necessary for graphql-voyager to not complain
type Query {
node: Component
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment