Skip to content

Commit

Permalink
refactor: Integrate GraphQL Yoga and Pothos GraphQL (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
koistya authored Jan 22, 2024
1 parent 3d88cb7 commit f15b6eb
Show file tree
Hide file tree
Showing 237 changed files with 9,882 additions and 14,542 deletions.
10 changes: 4 additions & 6 deletions env/.local.env → .env
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# Application settings for the "local" development environment.
# Use the following CLI commands for reading/writing secrets:
#
# $ yarn envars set <name> <value> --env=local --secret
# $ yarn envars get <name> --env=local
# Environment variables for the "local" development environment.
# https://vitejs.dev/guide/env-and-mode.html#env-files
#
# NOTE: You can override any of these settings by placing them
# into ".local.override.env" file (excluded from the repo).
# into `.env.local` file in the root of the project.

APP_NAME=example
APP_ENV=local
APP_HOSTNAME=localhost
APP_ORIGIN=http://localhost:5173
API_ORIGIN=http://localhost:8080
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* SPDX-FileCopyrightText: 2016-present Kriasoft */
/* SPDX-FileCopyrightText: 2014-present Kriasoft */
/* SPDX-License-Identifier: MIT */

/**
Expand Down
10 changes: 5 additions & 5 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to GraphQL API Starter Kit

[GraphQL API Starter Kit](https://github.com/kriasoft/relay-starter-kit) and
[GraphQL API Starter Kit](https://github.com/kriasoft/graphql-starter-kit) and
want to get involved? Thanks! There are plenty of ways you can help!

Please take a moment to review this document in order to make the contribution
Expand All @@ -13,7 +13,7 @@ patches and features.

## Using the issue tracker

The [issue tracker](https://github.com/kriasoft/relay-starter-kit/issues) is
The [issue tracker](https://github.com/kriasoft/graphql-starter-kit/issues) is
the preferred channel for [bug reports](#bugs), [features requests](#features)
and [submitting pull requests](#pull-requests), but please respect the following
restrictions:
Expand Down Expand Up @@ -101,11 +101,11 @@ included in the project:

```bash
# Clone your fork of the repo into the current directory
git clone https://github.com/<your-username>/relay-starter-kit.git
git clone https://github.com/<your-username>/graphql-starter-kit.git
# Navigate to the newly cloned directory
cd relay-starter-kit
cd graphql-starter-kit
# Assign the original repo to a remote called "upstream"
git remote add upstream https://github.com/kriasoft/relay-starter-kit.git
git remote add upstream https://github.com/kriasoft/graphql-starter-kit.git
```

2. If you cloned a while ago, get the latest changes from upstream:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# GitHub Actions workflow
# https://help.github.com/actions
# https://www.conventionalcommits.org

name: "Conventional Commits"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
lint:
name: "Lint PR Title"
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Node.js
node_modules

# Logs
Expand All @@ -28,6 +30,8 @@ yarn-error.log*
*.lcov

# Environment variables
.env.local
.env.*.local
.*.override.env
/env/gcp-key.*.json
!/env/gcp-key.test.json
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/app/queries/
/api/schema.graphql
/db/types.ts
/db/models/*

# Cache
/.cache
Expand Down
6 changes: 3 additions & 3 deletions .vscode/api.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
" return db.table<${1/^(.)(.*?)s?$/${1:/upcase}$2/}>(\"${1/^(.*?)s?$/$1/}\").select();",
" },",
"};",
""
"",
],
"description": "Query List Field"
}
"description": "Query List Field",
},
}
13 changes: 6 additions & 7 deletions .vscode/db.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"scope": "javascript,typescript",
"prefix": "migration",
"body": [
"import { Knex } from \"knex\";",
"import type { Knex } from \"knex\";",
"",
"/**",
" * Migrates database schema to the next version.",
Expand All @@ -12,7 +12,6 @@
"export async function up(db: Knex) {",
" await db.schema.createTable(\"${1:table}\", (table) => {",
" table$0",
" table.boolean(\"archived\").notNullable().defaultTo(false);",
" table.timestamps(false, true);",
" });",
"}",
Expand All @@ -22,8 +21,8 @@
"}",
"",
"export const configuration = { transaction: true };",
""
]
"",
],
},
"Database seed": {
"scope": "javascript,typescript",
Expand All @@ -42,7 +41,7 @@
" await db.table(\"${1:table}\").delete();",
" await db.table(\"${1:table}\").insert(${1:table});",
"};",
""
]
}
"",
],
},
}
4 changes: 2 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"github.copilot",
"github.vscode-github-actions",
"graphql.vscode-graphql",
"hashicorp.terraform",
"mgmcdermott.vscode-language-babel",
"mikestead.dotenv",
"streetsidesoftware.code-spell-checker",
"vscode-icons-team.vscode-icons",
"ZixuanChen.vitest-explorer"
"zixuanchen.vitest-explorer"
]
}
8 changes: 0 additions & 8 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@
"skipFiles": ["<node_internals>/**"],
"type": "node"
},
{
"name": "edge:start",
"request": "launch",
"runtimeExecutable": "yarn",
"runtimeArgs": ["workspace", "edge", "run", "vite"],
"skipFiles": ["<node_internals>/**"],
"type": "node"
},
{
"type": "node",
"request": "attach",
Expand Down
15 changes: 12 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"editor.codeActionsOnSave": {
"source.organizeImports": true
"source.organizeImports": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
"eslint.nodePath": ".yarn/sdks",
"eslint.runtime": "node",
"prettier.prettierPath": ".yarn/sdks/prettier/index.js",
"prettier.prettierPath": ".yarn/sdks/prettier/index.cjs",
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"vitest.commandLine": "yarn vitest",
Expand Down Expand Up @@ -35,12 +35,15 @@
"**/yarn.lock": true
},
"terminal.integrated.env.linux": {
"CLOUDSDK_ACTIVE_CONFIG_NAME": "default",
"CACHE_DIR": "${workspaceFolder}/.cache"
},
"terminal.integrated.env.osx": {
"CLOUDSDK_ACTIVE_CONFIG_NAME": "default",
"CACHE_DIR": "${workspaceFolder}/.cache"
},
"terminal.integrated.env.windows": {
"CLOUDSDK_ACTIVE_CONFIG_NAME": "default",
"CACHE_DIR": "${workspaceFolder}\\.cache"
},
"cSpell.ignoreWords": [
Expand Down Expand Up @@ -73,6 +76,7 @@
"hono",
"identitytoolkit",
"jsonb",
"kanel",
"knexfile",
"kriasoft",
"linkedin",
Expand All @@ -95,10 +99,13 @@
"pgsslrootcert",
"pguser",
"pnpify",
"reactstarter",
"postgres",
"pothos",
"psql",
"reactstarter",
"recase",
"refetchable",
"relyingparty",
"sendgrid",
"signup",
"sourcemap",
Expand All @@ -110,6 +117,8 @@
"typechecking",
"unprocessable",
"upsert",
"vite",
"vitest",
"webflow",
"websql",
"yarnpkg",
Expand Down
10 changes: 5 additions & 5 deletions .vscode/web.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"}",
"",
"export { ${TM_FILENAME_BASE}, type ${TM_FILENAME_BASE}Props };",
""
"",
],
"description": "React Component"
"description": "React Component",
},
"Mutation": {
"scope": "typescript",
Expand Down Expand Up @@ -88,8 +88,8 @@
"}",
"",
"export { use${1}, type Input, type InputErrors };",
""
"",
],
"description": "Mutation React Hook"
}
"description": "Mutation React Hook",
},
}
Loading

0 comments on commit f15b6eb

Please sign in to comment.