Skip to content

Commit

Permalink
Feat: improvements and fixes to seed file (#33)
Browse files Browse the repository at this point in the history
* feat: improvements and fixes to seed file

* fix: unnecesary script change

* fix: indentation and improve codegen config

* fix: revert script
  • Loading branch information
jesus4497 authored Nov 24, 2023
1 parent 3628c5c commit bcaa5f7
Show file tree
Hide file tree
Showing 10 changed files with 1,803 additions and 1,740 deletions.
1 change: 1 addition & 0 deletions codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const config: CodegenConfig = {
plugins: ['introspection'],
},
},
require: ['tsconfig-paths/register'],
};

export default config;
33 changes: 33 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

123 changes: 62 additions & 61 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,63 +1,64 @@
{
"name": "movies-api",
"version": "0.1.0",
"description": "Serverless Framework, Apollo Server, and Contentful CMS",
"main": "src/handlers/graphql.ts",
"scripts": {
"dev": "sls offline start",
"test": "npm run codegen && jest",
"lint": "eslint . --ext .ts",
"deploy": "sls deploy",
"format": "prettier --write \"**/*.{ts,js,json,md}\"",
"ts:check": "tsc --noEmit",
"codegen": "graphql-codegen --config codegen.ts",
"db:seed": "npm run codegen && ts-node ./scripts/seedData.ts"
},
"keywords": [
"serverless",
"apollo-server",
"contentful",
"jest",
"typescript",
"redis",
"aws-sqs"
],
"author": "This Dot Labs",
"license": "MIT",
"dependencies": {
"@apollo/server": "4.3.0",
"@as-integrations/aws-lambda": "1.2.1",
"aws-sdk": "2.1306.0",
"contentful": "^10.6.9",
"contentful-management": "10.26.0",
"graphql": "16.6.0",
"graphql-tag": "2.12.6",
"lodash": "^4.17.21",
"serverless": "3.26.0"
},
"devDependencies": {
"@aws-sdk/types": "3.267.0",
"@graphql-codegen/cli": "2.16.4",
"@graphql-codegen/introspection": "2.2.3",
"@graphql-codegen/typescript": "2.8.7",
"@graphql-codegen/typescript-resolvers": "2.7.12",
"@graphql-tools/executor": "0.0.12",
"@graphql-tools/merge": "8.3.15",
"@types/aws-lambda": "8.10.109",
"@types/jest": "29.2.5",
"@types/node": "18.11.18",
"@typescript-eslint/eslint-plugin": "5.48.2",
"@typescript-eslint/parser": "5.48.2",
"dotenv": "16.0.3",
"eslint": "8.32.0",
"jest": "29.3.1",
"prettier": "2.8.3",
"serverless-dotenv-plugin": "4.0.2",
"serverless-offline": "12.0.4",
"serverless-plugin-typescript": "^2.1.5",
"serverless-tscpaths": "^0.0.8",
"ts-jest": "29.0.5",
"ts-node": "10.9.1",
"typescript": "4.9.4"
}
"name": "movies-api",
"version": "0.1.0",
"description": "Serverless Framework, Apollo Server, and Contentful CMS",
"main": "src/handlers/graphql.ts",
"scripts": {
"dev": "sls offline start",
"test": "npm run codegen && jest",
"lint": "eslint . --ext .ts",
"deploy": "sls deploy",
"format": "prettier --write \"**/*.{ts,js,json,md}\"",
"ts:check": "tsc --noEmit",
"codegen": "graphql-codegen --config codegen.ts",
"db:seed": "npm run codegen && ts-node -r tsconfig-paths/register ./scripts/seedData.ts"
},
"keywords": [
"serverless",
"apollo-server",
"contentful",
"jest",
"typescript",
"redis",
"aws-sqs"
],
"author": "This Dot Labs",
"license": "MIT",
"dependencies": {
"@apollo/server": "4.3.0",
"@as-integrations/aws-lambda": "1.2.1",
"aws-sdk": "2.1306.0",
"contentful": "^10.6.9",
"contentful-management": "10.26.0",
"graphql": "16.6.0",
"graphql-tag": "2.12.6",
"lodash": "^4.17.21",
"serverless": "3.26.0"
},
"devDependencies": {
"@aws-sdk/types": "3.267.0",
"@graphql-codegen/cli": "2.16.4",
"@graphql-codegen/introspection": "2.2.3",
"@graphql-codegen/typescript": "2.8.7",
"@graphql-codegen/typescript-resolvers": "2.7.12",
"@graphql-tools/executor": "0.0.12",
"@graphql-tools/merge": "8.3.15",
"@types/aws-lambda": "8.10.109",
"@types/jest": "29.2.5",
"@types/node": "18.11.18",
"@typescript-eslint/eslint-plugin": "5.48.2",
"@typescript-eslint/parser": "5.48.2",
"dotenv": "16.0.3",
"eslint": "8.32.0",
"jest": "29.3.1",
"prettier": "2.8.3",
"serverless-dotenv-plugin": "4.0.2",
"serverless-offline": "12.0.4",
"serverless-plugin-typescript": "^2.1.5",
"serverless-tscpaths": "^0.0.8",
"ts-jest": "29.0.5",
"ts-node": "10.9.1",
"tsconfig-paths": "^4.2.0",
"typescript": "4.9.4"
}
}
Loading

0 comments on commit bcaa5f7

Please sign in to comment.