README
![CircleCI](https://circleci.com/gh/API-Market/aikon-oreid-shared .svg?style=svg)
Overview
This library shares commonly used models, assets, and utilities for ORE ID projects.
How to use
This project is published to NPM as a private package (under @aikon). You must have an .npmrc file on your machine (with an npmjs access token in it) to install the package
package.json
"@aikon/aikon-js": "^2.2.1",
To dynamically update graphql types
- Update graphql fragments, queries, or muations in src/graphql
- Copy a current graphql access token into a file name .graphqlAccessToken in the root of this project directory IMPORTANT: There should be no New Line after the token value (or you will get a 'is not a legal HTTP header value' error)
- Copy an .env file from .env.staging (for ORE ID api-key)
- Make sure your Graphql schema changes are in place on oreid-service instance running on localhost:8080
npm run generateGraphql (in root of project)
OR
ts-node generateGraphqlTypes.ts (in root of its directory)
Types will be generated and copied into /src/models/graphql_generated/graphql.ts. To use the updated types in another project, you'll need to create a new Github Release tag and then use that verion tag in package.json in your target project