Skip to content

Commit

Permalink
refactor: integrate GraphQL Yoga and Pothos GraphQL
Browse files Browse the repository at this point in the history
  • Loading branch information
koistya committed Jan 22, 2024
1 parent 233b835 commit a468810
Show file tree
Hide file tree
Showing 233 changed files with 8,395 additions and 13,571 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
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});",
"};",
""
]
}
"",
],
},
}
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
13 changes: 10 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 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",
},
}
893 changes: 0 additions & 893 deletions .yarn/releases/yarn-4.0.0-rc.52.cjs

This file was deleted.

893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.0.2.cjs

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions .yarn/sdks/eslint/lib/unsupported-api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint/use-at-your-own-risk
require(absPnpApiPath).setup();
}
}

// Defer to the real eslint/use-at-your-own-risk your application uses
module.exports = absRequire(`eslint/use-at-your-own-risk`);
12 changes: 10 additions & 2 deletions .yarn/sdks/eslint/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
"name": "eslint",
"version": "8.43.0-sdk",
"version": "8.56.0-sdk",
"main": "./lib/api.js",
"type": "commonjs"
"type": "commonjs",
"bin": {
"eslint": "./bin/eslint.js"
},
"exports": {
"./package.json": "./package.json",
".": "./lib/api.js",
"./use-at-your-own-risk": "./lib/unsupported-api.js"
}
}
20 changes: 20 additions & 0 deletions .yarn/sdks/prettier/bin/prettier.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require prettier/bin/prettier.cjs
require(absPnpApiPath).setup();
}
}

// Defer to the real prettier/bin/prettier.cjs your application uses
module.exports = absRequire(`prettier/bin/prettier.cjs`);
6 changes: 3 additions & 3 deletions .yarn/sdks/prettier/index.js → .yarn/sdks/prettier/index.cjs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require prettier/index.js
// Setup the environment to be able to require prettier
require(absPnpApiPath).setup();
}
}

// Defer to the real prettier/index.js your application uses
module.exports = absRequire(`prettier/index.js`);
// Defer to the real prettier your application uses
module.exports = absRequire(`prettier`);
7 changes: 4 additions & 3 deletions .yarn/sdks/prettier/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "prettier",
"version": "2.8.8-sdk",
"main": "./index.js",
"type": "commonjs"
"version": "3.2.4-sdk",
"main": "./index.cjs",
"type": "commonjs",
"bin": "./bin/prettier.cjs"
}
6 changes: 3 additions & 3 deletions .yarn/sdks/typescript/lib/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/typescript.js
// Setup the environment to be able to require typescript
require(absPnpApiPath).setup();
}
}

// Defer to the real typescript/lib/typescript.js your application uses
module.exports = absRequire(`typescript/lib/typescript.js`);
// Defer to the real typescript your application uses
module.exports = absRequire(`typescript`);
8 changes: 6 additions & 2 deletions .yarn/sdks/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"name": "typescript",
"version": "5.1.3-sdk",
"version": "5.3.3-sdk",
"main": "./lib/typescript.js",
"type": "commonjs"
"type": "commonjs",
"bin": {
"tsc": "./bin/tsc",
"tsserver": "./bin/tsserver"
}
}
8 changes: 5 additions & 3 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ packageExtensions:
babel-plugin-relay@*:
dependencies:
"@babel/runtime": "*"
graphql: ^16.8.1
local-pkg@*:
dependencies:
happy-dom: "*"
vite-plugin-relay@*:
kanel-zod@*:
dependencies:
babel-plugin-relay: ^15.0.0
kanel: "*"
ramda: "*"

pnpEnableEsmLoader: true

yarnPath: .yarn/releases/yarn-4.0.0-rc.52.cjs
yarnPath: .yarn/releases/yarn-4.0.2.cjs
Loading

0 comments on commit a468810

Please sign in to comment.