Skip to content

Commit

Permalink
feat: expose .env to turborepo
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmanuel-Melon committed Jan 13, 2024
1 parent 7ecd46a commit 5eca15b
Show file tree
Hide file tree
Showing 8 changed files with 14,994 additions and 10 deletions.
7 changes: 3 additions & 4 deletions codegen.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { CodegenConfig } from "@graphql-codegen/cli";

const HASURA_GRAPHQL_ADMIN_SECRET = "";
const HASURA_GRAPHQL_ENDPOINT = "";
const HASURA_GRAPHQL_ADMIN_SECRET = process.env.HASURA_GRAPHQL_ADMIN_SECRET;
const HASURA_GRAPHQL_ENDPOINT = process.env.HASURA_GRAPHQL_ENDPOINT;

const config: CodegenConfig = {
overwrite: true,
Expand All @@ -16,8 +16,7 @@ const config: CodegenConfig = {
},
],
documents: [
"packages/lib/graphql/**/*.{ts,tsx}",
"packages/lib/graphql/queries/mutations/!payments.{ts,tsx}",
"packages/lib/graphql/**/*.{ts,tsx}"
],
ignoreNoDocuments: true,
generates: {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dev": "turbo run dev",
"lint": "turbo run lint",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"codegen": "graphql-codegen --config codegen.ts",
"codegen": "dotenv -e .env -- graphql-codegen --config codegen.ts",
"prepare": "husky install"
},
"devDependencies": {
Expand All @@ -17,6 +17,7 @@
"@parcel/watcher": "^2.3.0",
"@turbo/gen": "^1.9.7",
"add": "^2.0.6",
"dotenv-cli": "^7.3.0",
"eslint": "^7.32.0",
"eslint-config-custom": "*",
"husky": "^8.0.3",
Expand Down
85 changes: 85 additions & 0 deletions packages/lib/graphql/__generated__/fragment-masking.ts

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

262 changes: 262 additions & 0 deletions packages/lib/graphql/__generated__/gql.ts

Large diffs are not rendered by default.

Loading

0 comments on commit 5eca15b

Please sign in to comment.