1.5.1 • Published 4 years ago

data-abstraction v1.5.1

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

data-abstraction-api

This project handles all backend logic for the SWF-platform and provides a GraphQL interface for each of its services.

Development

First time

rm -rf node_modules
npm install
lerna bootstrap --hoist
npm run build:shared
npm run build:recipe

Installing new packages?

lerna clean -y
rm -rf node_modules
npm install
lerna add xyz@1.2.3 --scope=product
lerna bootstrap
npm run build:shared
npm run build:recipe
--- commit code changes

update package-lock.json files after merging multiple package.json changes?

lerna exec -- rimraf dist package-lock.json && lerna clean -y && rm -rf node_modules package-lock.json && npm install && lerna bootstrap
--- commit changes to package lock files

ERROR (Error: Cannot determine GraphQL input type for xxx)

lerna exec -- rimraf dist && lerna clean -y && rm -rf node_modules && npm install && lerna bootstrap --hoist && npm run build:shared && npm run build:recipe

How to run

Start a service first using

lerna run serve:watch --stream --scope=product  // start product part
npm run serve:watch:product                     // starts the same product part
npm run serve:watch                             // starts all services

and afterwards start the gateway which stitches the schemas using

npm run serve:watch:gateway

Interacting

Interaction is now possible on http://localhost:8000 by default.

Sidenote

Do not forget to add a completed .env file to your local environment, otherwise the services won't function properly.

New package

Location

If the package is meant for internal use by SWF and it's employees or services, the new functionality should be added to the config package. If on the other hand external third parties should be able to access the feature, then a package should be reused or created. Think wisely before creating a new package, yet feel free to do so if it seperates concerns.

1.5.1

4 years ago

1.2.2

4 years ago