Skip to content

Commit

Permalink
feat: add CNCF subgraph
Browse files Browse the repository at this point in the history
Add cncf subgraph GraphQL SDL (Schema Design Language)

Signed-off-by: Matt Young <[email protected]>
  • Loading branch information
halcyondude committed Aug 18, 2022
1 parent a6c365e commit 5a207ea
Show file tree
Hide file tree
Showing 14 changed files with 5,553 additions and 0 deletions.
1 change: 1 addition & 0 deletions db/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Each of these is an Interface, acting as a base class with shared properties.
| --- | --- |
| [blogs](blogs) | CNCF, thenewstack, medium.*, LinkedIn Posts, ... |
| [boards](boards) | GH Discuss, StackOverflow |
| [cncf](cncf) | Member, Project, License, TAG, EUG, TOC, Organizations, ...
| [core](core) | Core Data Model |
| [corp](corp) | crunchbase, yahoofinance |
| [email](email) | cncf project lists, k8s lists |
Expand Down
10 changes: 10 additions & 0 deletions db/cncf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Sub-Graph Module: cncf

## GraphQL Entities

![](cncf-graphql-entities.jpg)

## Original Arrows proto

![](arrows-cncf-schema.png)

Binary file added db/cncf/arrows-cncf-schema.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
125 changes: 125 additions & 0 deletions db/cncf/cncf-arrows-schema.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
type Card {
name: someCard
isAProject: Project @relationship(type: "IS_A", direction: OUT)
isAMember: Member @relationship(type: "IS_A", direction: OUT)
inCatCategory: Category @relationship(type: "IN_CAT", direction: OUT)
}

type Project {
name: someProject
cardIsA: Card @relationship(type: "IS_A", direction: IN)
usesLicense: License @relationship(type: "USES", direction: OUT)
usesLanguage: Language @relationship(type: "USES", direction: OUT)
inScopeTagrp: TAGrp @relationship(type: "IN_SCOPE", direction: OUT)
isPlvlPlvl: PLvl @relationship(type: "IS_PLVL", direction: OUT)
inCatCategory: Category @relationship(type: "IN_CAT", direction: OUT)
projroleServed: ProjRole @relationship(type: "SERVED", direction: IN)
}

type Member {
name: someMember
cardIsA: Card @relationship(type: "IS_A", direction: IN)
isMlvlMlvl: MLvl @relationship(type: "IS_MLVL", direction: OUT)
memberOfEugrp: EUGrp @relationship(type: "MEMBER_OF", direction: OUT)
ownsOrganization: Organization @relationship(type: "OWNS", direction: OUT)
inCatCategory: Category @relationship(type: "IN_CAT", direction: OUT)
}

type License {
name: someLicense
projectUses: Project @relationship(type: "USES", direction: IN)
}

type Language {
name: someLanguage
projectUses: Project @relationship(type: "USES", direction: IN)
}

type TAGrp {
name: someTAGrp
projectInScope: Project @relationship(type: "IN_SCOPE", direction: IN)
tagroleServed: TagRole @relationship(type: "SERVED", direction: IN)
}

type Person {
name: somePerson
hasRoleTagrole: TagRole @relationship(type: "HAS_ROLE", direction: OUT)
hasRoleEurole: EuRole @relationship(type: "HAS_ROLE", direction: OUT)
hasRoleProjrole: ProjRole @relationship(type: "HAS_ROLE", direction: OUT)
hasRoleTocrole: TocRole @relationship(type: "HAS_ROLE", direction: OUT)
isBoardOrganization: Organization @relationship(type: "IS_BOARD", direction: OUT)
organizationEmployed: Organization @relationship(type: "EMPLOYED", direction: IN)
}

type EUGrp {
name: someEUGrp
memberMemberOf: Member @relationship(type: "MEMBER_OF", direction: IN)
euroleServed: EuRole @relationship(type: "SERVED", direction: IN)
}

type Category {
name: someCategory
cardInCat: Card @relationship(type: "IN_CAT", direction: IN)
projectInCat: Project @relationship(type: "IN_CAT", direction: IN)
memberInCat: Member @relationship(type: "IN_CAT", direction: IN)
}

type MLvl {
name: someMLvl
memberIsMlvl: Member @relationship(type: "IS_MLVL", direction: IN)
}

type PLvl {
name: somePLvl
projectIsPlvl: Project @relationship(type: "IS_PLVL", direction: IN)
}

type Organization {
name: someOrganization
memberOwns: Member @relationship(type: "OWNS", direction: IN)
personIsBoard: Person @relationship(type: "IS_BOARD", direction: IN)
isSubOrganization: Organization @relationship(type: "IS_SUB", direction: OUT)
organizationIsSub: Organization @relationship(type: "IS_SUB", direction: IN)
operatesInIndustry: Industry @relationship(type: "OPERATES_IN", direction: OUT)
employedPerson: Person @relationship(type: "EMPLOYED", direction: OUT)
hqInCity: City @relationship(type: "HQ_IN", direction: OUT)
}

type Industry {
name: someIndustry
organizationOperatesIn: Organization @relationship(type: "OPERATES_IN", direction: IN)
}

type TagRole {
name: someTagRole
personHasRole: Person @relationship(type: "HAS_ROLE", direction: IN)
servedTagrp: TAGrp @relationship(type: "SERVED", direction: OUT)
}

type EuRole {
name: someEuRole
personHasRole: Person @relationship(type: "HAS_ROLE", direction: IN)
servedEugrp: EUGrp @relationship(type: "SERVED", direction: OUT)
}

type ProjRole {
name: someProjRole
personHasRole: Person @relationship(type: "HAS_ROLE", direction: IN)
servedProject: Project @relationship(type: "SERVED", direction: OUT)
}

type TocRole {
name: someTocRole
personHasRole: Person @relationship(type: "HAS_ROLE", direction: IN)
servedToc: TOC @relationship(type: "SERVED", direction: OUT)
}

type TOC {
name: Technical Oversight Committee
tocroleServed: TocRole @relationship(type: "SERVED", direction: IN)
}

type City {
name: someCity
organizationHqIn: Organization @relationship(type: "HQ_IN", direction: IN)
}
Loading

0 comments on commit 5a207ea

Please sign in to comment.