1.1.0 • Published 1 month ago

acen-graphql-template v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 month ago

Setup

Please follow the below steps to create a new service from the service template.

  1. Clone the cbg-graphql-servicetemplate codebase from BitBucket.

  2. In package.json, update package name with the service name and description with a meaningful description. eg: cbg-graphql-consumerservice

  3. In sonarProject.ts, update sonar.projectKey with service name. eg: cbg-graphql-consumerservice

  4. In sonarProject.properties, update sonar.projectName and sonar.projectKey and with service name.

  5. Update the app application-config.yml and error-config.yml with service specific property values.

  6. Add GQL schema files to src\schema\typedefs.

  7. Add resolvers.ts to src\schema\resolvers.

  8. Add datasources.ts to src\datasources.

  9. Add necessary sub folders (or) .ts files to src and test folders if required.

  10. Update the errorHandler.ts files in the src\common\errorHandlers.ts

  11. Update handler.ts and handlerLocalDev.ts to include updated classes and functions.

  12. Update listener port in handlerLocalDev.ts to a unique port which is not used by any other CBG services.

  13. Rename interface.ts in \src\interfaces\interface.ts as appropriate serviceNameInterface.ts

  14. Add the necessary test cases in the test folder.

  15. Remove unnecessary dependencies and scripts from package.json if any. Update the merge-schema script with appropriate file names instead of *.gql.

  16. Then do npm install to download all required dependencies. Build should be success and the workspace should be free of errors.

  17. Delete README.md

  18. Rename README-TEMPLATE.md to README.md and make any specific changes required.

  19. In BitBucket create a repository for the new service with master and develop branches.

  20. Clone the new service repository and copy the contents from cbg-graphql-servicetemplate to the new service folder.

  21. Commit and Push the changes to BitBucket.