Skip to content

A service enabling easy interaction with DSNP private and public graphs on Frequency

License

Notifications You must be signed in to change notification settings

wesbiggs/graph-service

 
 

Repository files navigation

Graph-Service

A service enabling easy interaction with DSNP private and public graphs on Frequency

Table of Contents

Prerequisites

Getting Started

  1. Clone the repository

    git clone https://github.com/amplicalabls/graph-service.git
  2. Start docker compose

    docker-compose -f docker-compose.dev.yaml --profile instant up 

    This will start Frequency, Redis and Graph Service api/worker containers.

  3. Run a graph scenario from frequency scenario templates. Note the use of branch graph-service-setup of the frequency scenario template repo.

     git clone https://github.com/AmplicaLabs/frequency-scenario-template.git
     cd frequency-scenario-template
     git checkout graph-service-setup
     npm run run-example --example=graph-migration-setup

    This will create //Ferdie as provider along with DSNPIds 2,3,4,5 and 6 as users. The template will also add a public key for each user in itemized storage needed for private graph operations.

  4. Go to BullUI and check the graph service queue.

  5. Check the Swagger for API documentation.

Running E2E tests

  1. Start redis and frequency with instant profile.

    docker-compose -f docker-compose.dev.yaml --profile instant up frequency redis

    This will start Frequency and Redis containers.

  2. Using nest cli start the api and worker.

    npx nest start api
    npx nest start worker

    This will start the api and worker in watch mode.

  3. Run a graph scenario from frequency scenario templates. Note the use of branch graph-service-setup of the frequency scenario template repo.

     git clone https://github.com/AmplicaLabs/frequency-scenario-template.git
     cd frequency-scenario-template
     git checkout graph-service-setup
     npm run run-example --example=graph-migration-setup

    This will create //Ferdie as provider along with DSNPIds 2,3,4,5 and 6 as users. The template will also add a public key for each user in itemized storage needed for private graph operations.

  4. Check the job in BullUI, to monitor job progress based on defined tests.

  5. Run the tests

    npm run test:e2e

    This will run the tests in apps/api/test folder.

  6. Check e2e test file for more details on the test.

About

A service enabling easy interaction with DSNP private and public graphs on Frequency

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 97.3%
  • Lua 1.9%
  • Other 0.8%