doc: updated main menu #555
Annotations
4 errors
md`.Example `imperative-catalog-schema-definition.graphql`:
md`#L1
org.opentest4j.AssertionFailedError: The query mutation {
updateCatalogSchema(
mutations: [
# first create stubs of the entity schemas that the product will reference
{
createEntitySchemaMutation: {
entityType: "Brand"
}
},
{
createEntitySchemaMutation: {
entityType: "Category"
}
},
{
createEntitySchemaMutation: {
entityType: "Stock"
}
},
{
createEntitySchemaMutation: {
entityType: "Product"
}
},
{
modifyEntitySchemaMutation: {
entityType: "Product"
schemaMutations: [
# all is strictly verified but associated data and references can be added on the fly
{
disallowEvolutionModeInEntitySchemaMutation: {
evolutionModes: [
ADAPT_PRIMARY_KEY_GENERATION,
ADDING_ATTRIBUTES,
ADDING_PRICES,
ADDING_LOCALES,
ADDING_CURRENCIES,
ADDING_HIERARCHY
]
}
},
{
allowEvolutionModeInEntitySchemaMutation: {
evolutionModes: [
ADDING_ASSOCIATED_DATA,
ADDING_REFERENCES
]
}
},
# products are not organized in the tree
{
setEntitySchemaWithHierarchyMutation: {
withHierarchy: false,
indexedInScopes: [LIVE]
}
},
# prices are referencing another entity stored in Evita
{
setEntitySchemaWithPriceMutation: {
withPrice: true
indexedInScopes: [LIVE]
indexedPricePlaces: 2
}
},
# en + cs localized attributes and associated data are allowed only
{
allowLocaleInEntitySchemaMutation: {
locales: ["en", "cs-CZ"]
}
},
# here we define list of attributes with indexes for search / sort
{
createAttributeSchemaMutation: {
name: "code",
type: String
uniqueInScopes: [{
scope: LIVE,
uniquenessType: UNIQUE_WITHIN_COLLECTION
}]
}
},
{
createAttributeSchemaMutation: {
name: "url"
type: String
uniqueInScopes: [{
scope: LIVE,
uniquenessType: UNIQUE_WITHIN_COLLECTION
}]
localized: true
}
},
{
createAttributeSchemaMutation: {
name: "oldEntityUrls"
type: StringArray
filterableInScopes: [LIVE]
localized: true
}
},
{
createAttributeSchemaMutation: {
name: "name"
type: String
filterableInScopes: [LIVE]
sortableInScopes: [LIVE]
}
},
{
createAttributeSchemaMutation: {
name: "ean"
type: String
filterableInScopes: [LIVE]
}
},
{
createAttributeSchemaMutation: {
name: "priority"
type: Long
sortableInScopes: [LIVE]
}
},
{
createAttributeSchemaMutation: {
name: "validity"
type: DateTimeRange
filterableInScopes: [LIVE]
}
},
{
createAttributeSchemaMutation: {
name: "quantity"
type: BigDecimal
filterableInScopes: [LIVE]
indexedDecimalPlaces: 2
}
},
{
createAttributeSchemaMutation: {
name: "alias"
type: Boolean
filterableInScopes: [LIVE]
}
},
# here we define set of associated data, that can be stored along with entity
{
createAssociatedDataSchemaMutation: {
name: "referencedFiles"
type: ComplexDataObject
}
},
{
createAssociatedDataSchemaMutation: {
name: "labels"
type: ComplexDataObject
localized: true
}
},
# here we define references that relate to another entities stored in Evita
{
createReferenceSchemaMutation: {
name: "categories"
referencedEntityType: "Category"
referencedEntityTypeManaged: true
cardinality: ZERO_OR_MORE
indexedInScopes: [LIVE]
}
},
{
modifyReferenceAttributeSchemaMutation: {
name: "categories"
attributeSchemaMutation: {
createAttributeSchemaMutation: {
name: "categoryPriority"
type: Long
sortableInScopes: [LIVE]
}
}
}
},
# for faceted references we can compute "counts"
{
createReferenceSchemaMutation: {
name: "brand"
referencedEntityType: "Brand"
referencedEntityTypeManaged: true
cardinality: ZERO_OR_ONE
indexedInScopes: [LIVE]
facetedInScopes: [LIVE]
}
},
# references may be also represented be entities unknown to Evita
{
createReferenceSchemaMutation: {
name: "stock"
referencedEntityType: "Stock"
referencedEntityTypeManaged: true
cardinality: ZERO_OR_MORE
indexedInScopes: [LIVE]
facetedInScopes: [LIVE]
}
}
]
}
}
]
) {
version
}
} failed: Call to GraphQL server with document: {"data":null,"errors":[{"message":"Entity schema `Brand` and existing entity schema `Brand` produce the same name `brand` in `CAMEL_CASE` convention! Please choose different entity schema name.","locations":[{"line":2,"column":3,"sourceName":null}],"path":["updateCatalogSchema"],"extensions":{"errorCode":"73a20adb22d95068d7daa5f6e2d96230:af7e03290249dcf135c6dd7ad7cd6bc9:92"}}]} ended with errors: [{"message":"Entity schema `Brand` and existing entity schema `Brand` produce the same name `brand` in `CAMEL_CASE` convention! Please choose different entity schema name.","locations":[{"line":2,"column":3,"sourceName":null}],"path":["updateCatalogSchema"],"extensions":{"errorCode":"73a20adb22d95068d7daa5f6e2d96230:af7e03290249dcf135c6dd7ad7cd6bc9:92"}}]
|
md`.Example `labels.rest`:
md`#L1
The query {
"head" : [
{
"label" : {
"name" : "query-name",
"value" : "my-query"
}
},
{
"label" : {
"name" : "url",
"value" : "/test-url"
}
}
],
"filterBy" : {
"entityPrimaryKeyInSet" : [
1,
2,
3
]
}
} failed: Error calling server even with 2 retries:
|
build
❌ Tests reported 2 failures
|
build
Process completed with exit code 1.
|