Skip to content

Commit

Permalink
fix: Rename description to definition (#1447)
Browse files Browse the repository at this point in the history
`skos:description` does not exist, so rename to `skos:definition`.
  • Loading branch information
ddeboer authored Oct 28, 2024
1 parent 40f9033 commit 70d6857
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions packages/network-of-terms-graphql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ query {
prefLabel
altLabel
hiddenLabel
definition
scopeNote
seeAlso
broader {
Expand Down Expand Up @@ -166,6 +167,7 @@ query {
prefLabel
altLabel
hiddenLabel
definition
scopeNote
seeAlso
}
Expand Down Expand Up @@ -210,6 +212,7 @@ query {
prefLabel
altLabel
hiddenLabel
definition
scopeNote
seeAlso
broader {
Expand Down
2 changes: 1 addition & 1 deletion packages/network-of-terms-graphql/src/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function term(term: Term) {
hiddenLabel: term.hiddenLabels.map(
(hiddenLabel: RDF.Term) => hiddenLabel.value
),
description: term.scopeNotes.map((scopeNote: RDF.Term) => scopeNote.value),
definition: term.scopeNotes.map((scopeNote: RDF.Term) => scopeNote.value),
scopeNote: term.scopeNotes.map((scopeNote: RDF.Term) => scopeNote.value),
seeAlso: term.seeAlso.map((seeAlso: RDF.NamedNode) => seeAlso.value),
broader: term.broaderTerms.map(related => ({
Expand Down
4 changes: 2 additions & 2 deletions packages/network-of-terms-graphql/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export const schema = `
prefLabel: [String]!
altLabel: [String]!
hiddenLabel: [String]!
description: [String]!
"For the full description of the term, use \`description\` instead of scopeNote. The contents of \`scopeNote\` may change later."
definition: [String]!
"For the full definition of the term, use \`definition\` instead of \`scopeNote\`. The contents of \`scopeNote\` may change later."
scopeNote: [String]!
seeAlso: [String]!
broader: [RelatedTerm]
Expand Down
4 changes: 2 additions & 2 deletions packages/network-of-terms-graphql/test/server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ describe('Server', () => {
term.uri === 'https://example.com/resources/artwork'
);
expect(artwork.seeAlso).toEqual(['https://example.com/html/artwork']);
expect(artwork.description).toEqual([
expect(artwork.definition).toEqual([
'One of the most famous Dutch paintings',
]);
expect(artwork.exactMatch).toEqual([
Expand Down Expand Up @@ -259,7 +259,7 @@ function termsQuery(sources: string[], query = 'nachtwacht') {
prefLabel
altLabel
hiddenLabel
description
definition
scopeNote
seeAlso
broader {
Expand Down

0 comments on commit 70d6857

Please sign in to comment.