diff --git a/README.md b/README.md index 8864776..8345c0b 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ Here's how it all fits together in the context of a movie search app: _TODO: [#27](https://github.com/cncf/landscape-graph/issues/27)_ | **Component** | **What it is** -| --- | --- +| --- | --- | Neo4j GraphQL Library | [{neo}/product/graphql-library](), ([dev blog](https://neo4j.com/developer-blog/announcing-the-release-of-the-neo4j-graphql-library-3-0-0/)) | Neo4j Streams | [{neo}/labs/kafka](), [{gh}/neo4j-contrib/neo4j-streams](https://github.com/neo4j-contrib/neo4j-streams) | gitbase | Git history as MySQL, [src-d/gitbase](https://github.com/src-d/gitbase) @@ -120,7 +120,7 @@ Using the [data][seeddata] underlying the existing landscape as input, a Labeled [neo]: https://neo4j.com [cypherdev]: https://neo4j.com/developer/cypher/ -![landscape-graph-data-model](db/model/Landscape-CNCF-GM.png) +![landscape-graph-data-model](db/core/generated/landscape-graph-core.png) ## Graph Data Science Algorithms ("Why Neo4j?") diff --git a/db/README.md b/db/README.md index 04f3aed..4d360f8 100644 --- a/db/README.md +++ b/db/README.md @@ -1 +1,116 @@ # Graph Data Model + +## Core Data Model + +![core-png](core/generated/landscape-graph-core.png) + +### Entities + +ctx->allTheThings.ToMarkdown(); + +## Sub-Graph Packs (SGP) + +Each pack will have the following: + +* GraphQL Schema, deriving from the base type. +* png, svg, .json (arrows.app :)) +* Description / Documentation covering entities + +```shell +. +├── blogs +│ └── sgp-blogcncf +├── boards +│ ├── sgp-ghdiscuss +│ └── sgp-stackoverflow +├── core +│ └── generated +├── corp +│ ├── sgp-crunchbase +│ └── sgp-yahoofinance +├── email +├── packages +│ ├── sgp-brew +│ ├── sgp-choco +│ ├── sgp-crate +│ ├── sgp-deb +│ ├── sgp-deno +│ ├── sgp-go +│ ├── sgp-maven +│ ├── sgp-npm +│ ├── sgp-pip +│ └── sgp-rpm +├── rtc +│ ├── sgp-discord +│ └── sgp-slack +├── social +│ ├── sgp-linkedin +│ └── sgp-twitter +├── threats +│ └── sgp-nist +└── videos + └── sgp-youtube + +``` + +## How Interfaces Work + +https://neo4j.com/docs/graphql-manual/current/type-definitions/interfaces/#_directive_inheritance + +> Any directives present on an interface or its fields will be "inherited" by any object types implementing it. For example, the type definitions above could be refactored to have the @relationship directive on the actors field in the Production interface instead of on each implementing type as it is currently: + +```graphql +interface Production { + title: String! + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") +} + +type Movie implements Production { + title: String! + actors: [Actor!]! + runtime: Int! +} + +type Series implements Production { + title: String! + actors: [Actor!]! + episodes: Int! +} + +interface ActedIn @relationshipProperties { + role: String! +} + +type Actor { + name: String! + actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") +} +``` + + + +> In addition to inheritance, directives can be overridden on a per-implementation basis. Say you had an interface defining some Content, with some basic authorization rules: + +```graphql +interface Content + @auth(rules: [{ operations: [CREATE, UPDATE, DELETE], allow: { author: { username: "$jwt.sub" } } }]) { + title: String! + author: [Author!]! @relationship(type: "HAS_CONTENT", direction: IN) +} + +type User { + username: String! + content: [Content!]! @relationship(type: "HAS_CONTENT", direction: OUT) +} + +type PublicContent implements Content { + title: String! + author: [Author!]! +} + +type PrivateContent implements Content + @auth(rules: [{ operations: [CREATE, READ, UPDATE, DELETE], allow: { author: { username: "$jwt.sub" } } }]) { + title: String! + author: [Author!]! +} +``` diff --git a/db/blogs/sgp-blogcncf/README.md b/db/blogs/sgp-blogcncf/README.md new file mode 100644 index 0000000..e69de29 diff --git a/db/boards/sgp-ghdiscuss/README.md b/db/boards/sgp-ghdiscuss/README.md new file mode 100644 index 0000000..e69de29 diff --git a/db/boards/sgp-stackoverflow/README.md b/db/boards/sgp-stackoverflow/README.md new file mode 100644 index 0000000..e69de29 diff --git a/db/corp/sgp-crunchbase/README.md b/db/corp/sgp-crunchbase/README.md new file mode 100644 index 0000000..e69de29 diff --git a/db/corp/sgp-yahoofinance/README.md b/db/corp/sgp-yahoofinance/README.md new file mode 100644 index 0000000..e69de29 diff --git a/db/packages/sgp-brew/README.md b/db/packages/sgp-brew/README.md new file mode 100644 index 0000000..e69de29 diff --git a/db/packages/sgp-choco/README.md b/db/packages/sgp-choco/README.md new file mode 100644 index 0000000..e69de29 diff --git a/db/packages/sgp-crate/README.md b/db/packages/sgp-crate/README.md new file mode 100644 index 0000000..e69de29 diff --git a/db/packages/sgp-deb/README.md b/db/packages/sgp-deb/README.md new file mode 100644 index 0000000..e69de29 diff --git a/db/packages/sgp-deno/README.md b/db/packages/sgp-deno/README.md new file mode 100644 index 0000000..e69de29 diff --git a/db/packages/sgp-go/README.md b/db/packages/sgp-go/README.md new file mode 100644 index 0000000..e69de29 diff --git a/db/packages/sgp-maven/README.md b/db/packages/sgp-maven/README.md new file mode 100644 index 0000000..e69de29 diff --git a/db/packages/sgp-npm/README.md b/db/packages/sgp-npm/README.md new file mode 100644 index 0000000..e69de29 diff --git a/db/packages/sgp-pip/README.md b/db/packages/sgp-pip/README.md new file mode 100644 index 0000000..e69de29 diff --git a/db/packages/sgp-rpm/README.md b/db/packages/sgp-rpm/README.md new file mode 100644 index 0000000..e69de29 diff --git a/db/rtc/sgp-discord/README.md b/db/rtc/sgp-discord/README.md new file mode 100644 index 0000000..cda73ea --- /dev/null +++ b/db/rtc/sgp-discord/README.md @@ -0,0 +1 @@ +# sgp-discord diff --git a/db/rtc/sgp-slack/README.md b/db/rtc/sgp-slack/README.md new file mode 100644 index 0000000..10739c2 --- /dev/null +++ b/db/rtc/sgp-slack/README.md @@ -0,0 +1 @@ +# sgp-slack diff --git a/db/social/sgp-linkedin/README.md b/db/social/sgp-linkedin/README.md new file mode 100644 index 0000000..e69de29 diff --git a/db/social/sgp-twitter/README.md b/db/social/sgp-twitter/README.md new file mode 100644 index 0000000..e69de29 diff --git a/db/threats/sgp-nist/README.md b/db/threats/sgp-nist/README.md new file mode 100644 index 0000000..884d997 --- /dev/null +++ b/db/threats/sgp-nist/README.md @@ -0,0 +1,18 @@ +# Sub-Graph Pack: sgp-nist + +https://www.cve.org +https://github.com/CVEProject/cve-schema +https://www.cve.org/ResourcesSupport/Glossary?activeTerm=glossaryRecord +https://www.cve.org/About/Process#CVERecordLifecycle + + +https://nvd.nist.gov/products/nvd +https://nvd.nist.gov/products/cpe +https://nvd.nist.gov/vuln/vulnerability-detail-pages +https://nvd.nist.gov/vuln/vulnerability-status +https://www.cvedetails.com/ + +https://www.cve.org/Media/News/item/news/2022/01/11/Changes-Coming-to-CVE-Record +https://www.cve.org/Media/News/item/podcast/2021/07/13/How-the-New-CVE-Record + + diff --git a/db/videos/sgp-youtube/README.md b/db/videos/sgp-youtube/README.md new file mode 100644 index 0000000..e1ac2e2 --- /dev/null +++ b/db/videos/sgp-youtube/README.md @@ -0,0 +1 @@ +# sgp-youtube