Skip to content

Commit

Permalink
docs(#200): example fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lukashornych committed Dec 13, 2023
1 parent 9d62b0a commit 03d5f5f
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
mutation {
updateCatalogSchema(
mutations: [
# first create stubs of the entity schemas that the product will reference
{
createEntitySchemaMutation: {
entityType: "Brand"
}
},
{
createEntitySchemaMutation: {
entityType: "Category"
}
},

{
createEntitySchemaMutation: {
entityType: "Product"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ PUT /rest/evita/schema

{
"mutations": [
// first create stubs of the entity schemas that the product will reference
{
"createEntitySchemaMutation": {
"entityType": "Brand"
}
},
{
"createEntitySchemaMutation": {
"entityType": "Category"
}
},
{
"createEntitySchemaMutation": {
"entityType": "Product"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
evita.UpdateCatalog(
"evita",
session => {
/* first create stubs of the entity schemas that the product will reference */
session.DefineEntitySchema("Brand");
session.DefineEntitySchema("Category");
session.DefineEntitySchema("Product")
/* all is strictly verified but associated data
and references can be added on the fly */
Expand Down
4 changes: 2 additions & 2 deletions documentation/user/en/use/api/schema-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ at the `https://your-server:5555/gql/evita/schema` URL:

or update the schema of a specific entity collection at the same URL using a GraphQL mutation of the selected collection like this:

<SourceCodeTabs requires="/documentation/user/en/get-started/example/complete-startup.java,/documentation/user/en/get-started/example/define-test-catalog.java" langSpecificTabOnly local>
<SourceCodeTabs requires="/documentation/user/en/use/api/example/imperative-schema-definition.java" langSpecificTabOnly local>

[Imperative collection schema definition via GraphQL API](/documentation/user/en/use/api/example/imperative-collection-schema-definition.graphql)
</SourceCodeTabs>
Expand Down Expand Up @@ -196,7 +196,7 @@ at the `https://your-server:5555/rest/evita/schema` URL:
or update the schema of a specific entity collection at e.g. an `https://your-server:5555/rest/evita/product/schema` URL
for the collection `Product` using a REST mutation of the selected collection like this:

<SourceCodeTabs requires="/documentation/user/en/get-started/example/complete-startup.java,/documentation/user/en/get-started/example/define-test-catalog.java" langSpecificTabOnly local>
<SourceCodeTabs requires="/documentation/user/en/use/api/example/imperative-schema-definition.java" langSpecificTabOnly local>

[Imperative collection schema definition via REST API](/documentation/user/en/use/api/example/imperative-collection-schema-definition.rest)
</SourceCodeTabs>
Expand Down

0 comments on commit 03d5f5f

Please sign in to comment.