Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/taxonomy #79

Merged
merged 26 commits into from
Jan 15, 2020
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
cfa3ed5
Add basic taxonomy support
mattnield Oct 16, 2019
7a01fcd
Merge remote-tracking branch 'upstream/master'
mattnield Nov 3, 2019
f528451
Merge branch 'master' into feature/taxonomy
mattnield Nov 3, 2019
72a2f68
Update to include fdeatures in master including rename to Kontent
mattnield Nov 3, 2019
24bfd9f
Fix linting issues
mattnield Nov 3, 2019
8cd485e
Remove merve issue in test config
mattnield Nov 3, 2019
7d59859
Remove lint issue with trailing space
mattnield Nov 3, 2019
6b1f79a
Add validation for taxonomy nodes
mattnield Nov 8, 2019
98fb4d3
Resolve issues with jest for taxonomy support
mattnield Nov 9, 2019
06b25b5
Merge branch 'master' into feature/taxonomy
mattnield Nov 9, 2019
9260cf0
Correct lintin issues
mattnield Nov 9, 2019
a598e03
Update readme for taxonomy support
mattnield Nov 9, 2019
4791383
Merge branch 'master' into feature/taxonomy
mattnield Nov 11, 2019
8cc6bdc
Fix errors in test following merge of master (custom element resolver…
mattnield Nov 11, 2019
0923a42
Correct eslint issues
mattnield Nov 11, 2019
2d0904c
Merge branch 'master' into feature/taxonomy
mattnield Nov 21, 2019
fb7b4cc
Merge branch 'master' into feature/taxonomy
Simply007 Jan 14, 2020
f8ebcd5
Update src/__tests__/custom-element-resolver/__snapshots__/customElem…
mattnield Jan 15, 2020
af0ade2
Update src/__tests__/linked-items/__snapshots__/simple-resolution.spe…
mattnield Jan 15, 2020
53eadb3
Update src/__tests__/richtext-resolution/__snapshots__/type-resolvers…
mattnield Jan 15, 2020
e4fbfcd
Update src/taxonomyNodes.js
mattnield Jan 15, 2020
d1a0e35
Update src/taxonomyNodes.js
mattnield Jan 15, 2020
61ba102
Update src/__tests__/richtext-resolution/circular-reference.spec.js
mattnield Jan 15, 2020
bba35ac
Update src/taxonomyNodes.js
mattnield Jan 15, 2020
762da13
Update src/__tests__/richtext-resolution/__snapshots__/circular-refer…
mattnield Jan 15, 2020
e0b5daa
Update src/__tests__/linked-items/__snapshots__/circular-reference.sp…
mattnield Jan 15, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 23 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
# Project dependencies
node_modules

# Gatsby source generated filed
/public

# Output files
/gatsby-node.js
/normalize.js
/config.js
/validation.js
/itemNodes.js
/typeNodes.js
/typeNodesSchema.js
/decorators/languageVariantsDecorator.js
/decorators/typeItemDecorator.js
/decorators/richTextElementDecorator.js
/decorators/linkedItemsElementDecorator.js
/decorators/urlSlugElementDecorator.js

# Test coverage
/coverage
# Project dependencies
node_modules

# Gatsby source generated filed
/public

# Output files
/gatsby-node.js
/normalize.js
/config.js
/validation.js
/itemNodes.js
/typeNodes.js
/taxonomyNodes.js
/typeNodesSchema.js
/decorators/languageVariantsDecorator.js
/decorators/typeItemDecorator.js
/decorators/richTextElementDecorator.js
/decorators/linkedItemsElementDecorator.js
/decorators/urlSlugElementDecorator.js

# Test coverage
/coverage
78 changes: 78 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,84 @@ Custom element is now supported including [custom element models definition](htt

> External properties are not automatically generated [using Schema API](docs/UPGRADE.md#schema-definition-api--all-items-query).

### Taxonomy support

Each taxonomy group can be returned as a nested group of taxonomy terms. To retrieve the `Personas`, the following graphQL can be used:

<details><summary>Query to recieve the personas taxonomy group</summary>

```gql
query MyQuery {
allKontentTaxonomyPersonas {
nodes {
terms {
terms {
codename
name
}
name
codename
}
system {
codename
name
}
}
}
}
```

This would result in the following response:

```json
{
"data": {
"allKontentTaxonomyPersonas": {
"nodes": [
{
"terms": [
{
"terms": [
{
"codename": "barista",
"name": "Barista"
},
{
"codename": "cafe_owner",
"name": "Cafe owner"
}
],
"name": "Coffee expert",
"codename": "coffee_expert"
},
{
"terms": [
{
"codename": "coffee_lover",
"name": "Coffee lover"
},
{
"codename": "coffee_blogger",
"name": "Coffee blogger"
}
],
"name": "Coffee enthusiast",
"codename": "coffee_enthusiast"
}
],
"system": {
"codename": "personas",
"name": "Personas"
}
}
]
}
}
}
```

</details>

### Rich text resolution

With following features, it is possible to resolve rich text [into the HTML string](#embedded-JS-SDK-resolution), that could be injected to the site. For more complex scenarios, it is possible to use the raw `value` property in combination with [`linked_items`](#content-items-in-rich-text-elements-relationships), [`links`](#links-in-rich-text-elements), and [`images`](#images-in-rich-text-elements) property.
Expand Down
Loading