0.0.1 • Published 4 years ago

testcommerce v0.0.1

Weekly downloads
1
License
UNLICENSED
Repository
github
Last release
4 years ago

ixl-graphql-sap-commerce-adapter based on boilerplate ixl-graphql-module-shell

This a shell for creation of a graphql module, showing proposed structure. Contains server to test the module too.

Publish only to tuscany.

Installation

npm install

Start Server

npm run start

With hot reloading

npm run start:dev

Publish to npm

npm init --@scope=tuscany
npm publish

Lint testing (ESLint)

npm run test:lint

Format testing (Prettier)

npm run test:format

Build this on docker on your local machine

docker build -t uk.icr.io/ix-liberty/ixl-apollo-server-test .

Run in this on docker on your local machine

run this command

docker run -p 4002:4002 uk.icr.io/ix-liberty/ixl-apollo-server-test

Push to image registry

docker push uk.icr.io/ix-liberty/ixl-apollo-server-test2

Test in browser

open a browser and go to the following uri

http://localhost:4002/graphql

and within the browser run this command

query{hello}

Test with curl

If you want to test this service works in curl, run this command

curl 'http://localhost:4002/graphql' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: http://localhost:4002' --data-binary '{"query":"query{hello}# Write your query or mutation here\n"}' --compressed