Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add initial setup for config, GraphQL, Prisma, TypeScript, ESLint and Jest #1

Merged
merged 17 commits into from
May 19, 2022

Conversation

theskumar
Copy link
Member

@theskumar theskumar commented May 17, 2022

  • Prisma setup
  • GraphQL setup

@theskumar theskumar changed the title feat: add GraphQL and Prisma support feat: add GraphQL, Prisma & testing support May 17, 2022
@kasparszarinovs
Copy link
Contributor

kasparszarinovs commented May 17, 2022

  • Add NPM cache to GitHub actions.
  • Add TypeScript validator for GitHub actions.
  • Standardize logger - ideally console.log should not be used for anything other than debugging during development[MOVED TO A SEPARATE ISSUE]
  • Support external winston standards (e.g. CloudWatch) [MOVED TO A SEPARATE ISSUE]
  • Replace graphql-codegen with something more Prisma friendly, to avoid having to manually maintain a codegen.yml file [MOVED TO A SEPARATE ISSUE]

Added `tsc --noEmit` validation - attempts to compile TypeScript without emitting files.
Cache npm modules for GitHub actions.
Updated `npm install` to `npm ci` - CI specific npm install command.
- Updated tsconfig.json
- Removed the need for merging configs.
- Removed environment specific config - should be done via .env files
- Updated .env.sample
- Updated server & graphql files
docker-compose.yml Outdated Show resolved Hide resolved
src/prisma/seed.ts Outdated Show resolved Hide resolved
@kasparszarinovs kasparszarinovs marked this pull request as ready for review May 19, 2022 07:45
@kasparszarinovs
Copy link
Contributor

@theskumar this should be good to go in now. Outstanding points covered in issues.

codegen.yaml Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible we can pull this from the central config?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed on slack - this is needed here for npx prisma ... commands. I've added some config improvements here though - 842232b

src/context.ts Outdated Show resolved Hide resolved
src/types/index.ts Outdated Show resolved Hide resolved
@theskumar theskumar changed the title feat: add GraphQL, Prisma & testing support feat: add GraphQL, Prisma & Jest support May 19, 2022
package.json Outdated Show resolved Hide resolved
- Renamed Prisma client - client.ts => prisma-client.ts for explicit naming.
- Added config types.
@theskumar theskumar changed the title feat: add GraphQL, Prisma & Jest support feat: add initial setup for config, GraphQL, Prisma, ESLint and Jest May 19, 2022
@theskumar theskumar changed the title feat: add initial setup for config, GraphQL, Prisma, ESLint and Jest feat: add initial setup for config, GraphQL, Prisma, TypeScript, ESLint and Jest May 19, 2022
@theskumar theskumar merged commit 18d02dc into master May 19, 2022
@theskumar theskumar deleted the feature-graphql-primsa-setup branch May 19, 2022 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants