Skip to content

eMazeika/vc-module-experience-api

 
 

Repository files navigation

The project "Experience API" it is primarily a intermediated layer between clients and enterprise services powered by GraphQL protocol and is tightly coupled to a specific user/touchpoint experience with fast and reliable access, it represents an implementation of Backend for Frontend design pattern (BFF).

The context diagramm

image

Key features

  • “Experience API” project at beginning consists from these three functional blocks :

  • Use GraphQL protocol to leverage more selective and flexible control of resulting data retrieving from API

  • Fast and reliable indexed search thanks to integration with ES 7.x and single data source for indexed search and data storage. (<= 300ms)

  • Autonomy. Shared nothing with rest VC data infrastructure except index data source.

  • Tracing and performance requests metrics

Prerequisities

  • VC platform 3.0 or later
  • The platform is configured to use ElasticSearch engine

appsettings.json

"Search": {
        "Provider": "ElasticSearch",
        "Scope": "default",       
        "ElasticSearch": {
            "Server": "localhost:9200",
            "User": "elastic",
            "Key": "",
            "EnableHttpCompression": ""
        }
    },
  • The settings “Store full object in index modules” are enabled for catalog and pricing modules: image image

  • Rebuild index

Digital catalog experience API - Getting started.

The sample requests:

{
  product(id: "0f7a77cc1b9a46a29f6a159e5cd49ad1")
  {
    id
    name

    properties {
      name
      type
      values
    }
  }
  
  products(query: "sony" fuzzy: true filter: "price.USD:(400 TO 1000]")
  {
    totalCount
   	items {
       name
       id
       prices (currency: "USD") {
        list
        currency
      }
    }
  } 
}

Recommendations gateway API - Getting started.

  recommendations(scenario:"vc-recommendations" after: "10" first: 5 itemId: "8b7b07c165924a879392f4f51a6f7ce0") 
  {
    items
    {
      scenario      
      product
      {
        id
        name       
      }
    }
  }

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%