Skip to content
This repository has been archived by the owner on Jun 22, 2023. It is now read-only.

Commit

Permalink
feat(schema): Add Rating "templates"
Browse files Browse the repository at this point in the history
  • Loading branch information
alastair committed Mar 10, 2021
1 parent eb044a0 commit ef53fb9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
12 changes: 12 additions & 0 deletions src/routes/helpers/jsonld/Rating.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,18 @@
"url": [
"https://schema.org/url"
],
"wasGeneratedBy": [
"http://www.w3.org/ns/prov#wasGeneratedBy"
],
"wasDerivedFrom": [
"http://www.w3.org/ns/prov#wasDerivedFrom"
],
"wasAttributedTo": [
"http://www.w3.org/ns/prov#wasAttributedTo"
],
"used": [
"http://www.w3.org/ns/prov#used"
],
"author": [
"https://schema.org/author"
],
Expand Down
15 changes: 13 additions & 2 deletions src/schema/type/Rating.graphql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"https://schema.org/Rating"
type Rating implements ThingInterface {
type Rating implements ThingInterface & ProvenanceEntityInterface {
### Metadata properties ###
"http://purl.org/dc/terms/identifier,https://schema.org/identifier"
identifier: ID @id
Expand Down Expand Up @@ -61,6 +61,17 @@ type Rating implements ThingInterface {
"https://schema.org/url"
url: String

############################################
### ProvenanceEntityInterface properties ###
"http://www.w3.org/ns/prov#wasGeneratedBy"
wasGeneratedBy: [ActionInterface] @relation(name: "WAS_GENERATED_BY", direction: OUT)
"http://www.w3.org/ns/prov#wasDerivedFrom"
wasDerivedFrom: [ThingInterface] @relation(name: "WAS_DERIVED_FROM", direction: OUT)
"http://www.w3.org/ns/prov#wasAttributedTo"
wasAttributedTo: [LegalPersonInterface] @relation(name: "WAS_ATTRIBUTED_TO", direction: OUT)
"http://www.w3.org/ns/prov#used"
used: [ThingInterface] @relation(name: "USED", direction: OUT)

#########################
### Rating properties ###
"https://schema.org/author"
Expand All @@ -70,7 +81,7 @@ type Rating implements ThingInterface {
"https://pending.schema.org/ratingExplanation"
ratingExplanation: String
"https://schema.org/ratingValue"
ratingValue: Int!
ratingValue: Int
"https://schema.org/reviewAspect"
reviewAspect: String
"https://schema.org/worstRating"
Expand Down

0 comments on commit ef53fb9

Please sign in to comment.