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

docs: /docs/reference/graphql #875

Merged
merged 17 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 20 additions & 52 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,37 +28,35 @@ repos:
- id: deno-fmt
name: Deno format
language: system
entry: bash -c 'cd src/typegate && deno fmt --ignore=native,src/typegraphs,tmp,tests/e2e/nextjs,tests/metagen/typegraphs/sample/ts/client.ts && cd ../../tools && deno fmt && cd ../src/typegraph/deno && deno fmt --ignore=node_modules,dist && cd ../../../src/metagen/src && deno fmt'
entry: bash -c 'deno fmt'
pass_filenames: false
types:
- javascript
- ts
files: ^(src/typegate|tools|src/typegraph/deno)/
- tsx
- json
- yaml
- id: deno-lint
name: Deno lint
language: system
entry: bash -c 'cd src/typegate && deno lint --rules-exclude=no-explicit-any --ignore=native,tmp,tests/e2e/nextjs && cd ../../tools && deno lint && cd ../src/metagen/src/ && deno lint'
entry: bash -c 'deno lint && ghjk x lint-deno'
pass_filenames: false
types:
- javascript
- ts
- tsx
- json
- yaml
files: ^(src/typegate|tools)/
- id: es-lint
name: Eslint website
language: system
entry: bash -c 'cd website && [ -f node_modules/.bin/eslint ] && pnpm lint && pnpm prettier'
entry: bash -c 'cd ./docs/metatype.dev/ && [ -f node_modules/.bin/eslint ] && pnpm lint && pnpm prettier'
pass_filenames: false
types_or:
- ts
- tsx
files: ^website/
exclude: ^website/typegraphs/
- id: devtools-lint
name: ESLint meta-lsp
language: system
entry: bash -c 'cd meta-lsp && pnpm lint'
pass_filenames: false
types:
- ts
files: ^meta-lsp/
files: ^docs/metatype.dev
#- id: cargo-udeps
# name: Check for unused cargo dependencies
# language: system
Expand Down Expand Up @@ -87,9 +85,9 @@ repos:
.*deno.lock|
CHANGELOG.md|
.*\.snap$|
typegate/src/typegraphs/.*\.json|
website/docs/reference/|
libs/pyrt_wit_wire/pyrt|
src/typegate/src/typegraphs/.*\.json|
docs/metatype.dev/reference/|
src/pyrt_wit_wire/pyrt|
migration_lock.toml|
tests/metagen/typegraphs/sample/[rs|ts|py]/client\.[rs|ts|py]
)
Expand All @@ -103,9 +101,10 @@ repos:
- --license-filepath=tools/license-header-MPL-2.0.txt
- "--comment-style=#"
- "--skip-license-insertion-comment=no-auto-license-header"
- "--skip-license-insertion-comment=@generated"
types_or:
- python
files: ^typegraph/
exclude: ^examples/|src/metagen/src/.*/static/.*
- id: insert-license
name: "License MPL-2.0 rust"
args:
Expand All @@ -116,50 +115,19 @@ repos:
- "--skip-license-insertion-comment=@generated"
types_or:
- rust
files: ^(typegate|libs!(/metagen/.*))/
- id: insert-license
name: "License MPL-2.0 rust"
args:
#- --remove-header
- --license-filepath=tools/license-header-MPL-2.0.txt
- "--comment-style=//"
- "--skip-license-insertion-comment=no-auto-license-header"
types_or:
- rust
files: ^(meta-cli|typegraph|libs/metagen)/
- id: insert-license
name: "License MPL-2.0 deno"
args:
#- --remove-header
- --license-filepath=tools/license-header-MPL-2.0.txt
- "--comment-style=//"
- "--skip-license-insertion-comment=no-auto-license-header"
- "--skip-license-insertion-comment=@generated"
types_or:
- ts
files: ^(typegate|tools)/
- id: insert-license
name: "License MPL-2.0 deno"
args:
#- --remove-header
- --license-filepath=tools/license-header-MPL-2.0.txt
- "--comment-style=//"
- "--skip-license-insertion-comment=no-auto-license-header"
types_or:
- ts
files: ^typegraph/
exclude: ^examples/|src/metagen/src/.*/static/.*
- id: insert-license
name: "License MPL-2.0 typescript"
args:
#- --remove-header
- --license-filepath=tools/license-header-MPL-2.0.txt
- "--comment-style=//"
- "--skip-license-insertion-comment=no-auto-license-header"
- "--skip-license-insertion-comment=@generated"
types_or:
- ts
- tsx
files: ^website/
exclude: website/typegraphs
exclude: ^examples/|src/metagen/src/.*/static/.*
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.6
hooks:
Expand Down
34 changes: 17 additions & 17 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"recommendations": [
"charliermarsh.ruff",
"rust-lang.rust-analyzer",
"ms-python.black-formatter",
"denoland.vscode-deno",
"ms-vscode-remote.remote-containers",
"dbaeumer.vscode-eslint",
"graphql.vscode-graphql-syntax",
"unifiedjs.vscode-mdx",
"ms-python.vscode-pylance",
"ms-python.python",
"chrischinchilla.vale-vscode",
"hediet.vscode-drawio",
"davidlday.languagetool-linter",
"dtsvet.vscode-wasm",
"bierner.comment-tagged-templates"
]
"recommendations": [
"charliermarsh.ruff",
"rust-lang.rust-analyzer",
"ms-python.black-formatter",
"denoland.vscode-deno",
"ms-vscode-remote.remote-containers",
"dbaeumer.vscode-eslint",
"graphql.vscode-graphql-syntax",
"unifiedjs.vscode-mdx",
"ms-python.vscode-pylance",
"ms-python.python",
"chrischinchilla.vale-vscode",
"hediet.vscode-drawio",
"davidlday.languagetool-linter",
"dtsvet.vscode-wasm",
"bierner.comment-tagged-templates"
]
}
64 changes: 32 additions & 32 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
// A launch configuration that compiles the extension and then opens it inside a new window
{
"version": "0.2.0",
"configurations": [
{
"type": "extensionHost",
"request": "launch",
"name": "Launch Client",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}/meta-lsp"
],
"outFiles": [
"${workspaceRoot}/meta-lsp/vscode-metatype-support/out/**/*.js"
],
"preLaunchTask": "vscode-ext:build"
},
{
"name": "Language Server E2E Test",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionTestsPath=${workspaceRoot}/client/out/test/index",
"${workspaceRoot}/client/testFixture"
],
"outFiles": [
"${workspaceRoot}/client/out/test/**/*.js"
]
}
]
// A launch configuration that compiles the extension and then opens it inside a new window
{
"version": "0.2.0",
"configurations": [
{
"type": "extensionHost",
"request": "launch",
"name": "Launch Client",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}/meta-lsp"
],
"outFiles": [
"${workspaceRoot}/meta-lsp/vscode-metatype-support/out/**/*.js"
],
"preLaunchTask": "vscode-ext:build"
},
{
"name": "Language Server E2E Test",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionTestsPath=${workspaceRoot}/client/out/test/index",
"${workspaceRoot}/client/testFixture"
],
"outFiles": [
"${workspaceRoot}/client/out/test/**/*.js"
]
}
]
}
90 changes: 45 additions & 45 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "vscode-ext:build",
"type": "shell",
"command": "pnpm",
"args": [
"compile:vscode"
],
"group": "build",
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": [
"$tsc"
],
"options": {
"cwd": "${workspaceFolder}/meta-lsp"
}
},
{
"label": "vscode-ext:build:watch",
"type": "shell",
"command": "pnpm",
"args": [
"watch"
],
"isBackground": true,
"group": {
"kind": "build"
},
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": [
"$tsc-watch"
],
"options": {
"cwd": "${workspaceFolder}/meta-lsp/vscode-metatype-support"
}
}
]
{
"version": "2.0.0",
"tasks": [
{
"label": "vscode-ext:build",
"type": "shell",
"command": "pnpm",
"args": [
"compile:vscode"
],
"group": "build",
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": [
"$tsc"
],
"options": {
"cwd": "${workspaceFolder}/meta-lsp"
}
},
{
"label": "vscode-ext:build:watch",
"type": "shell",
"command": "pnpm",
"args": [
"watch"
],
"isBackground": true,
"group": {
"kind": "build"
},
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": [
"$tsc-watch"
],
"options": {
"cwd": "${workspaceFolder}/meta-lsp/vscode-metatype-support"
}
}
]
}
29 changes: 27 additions & 2 deletions deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,26 @@
"./examples/" // needed for published_test
]
},
"fmt": {
"exclude": [
"target",
"src/typegraph/deno/src/gen",
"src/typegraph/node",
"*.md",
"**/*.md",
".ghjk/**",
".git",
"vendor/**",
"node_modules",
"docs/metatype.dev/docusaurus.config.js",
"docs/metatype.dev/**/*.js",
"docs/metatype.dev/**/*.ts",
"docs/metatype.dev/**/*.tsx"
]
},
"compilerOptions": {
"allowJs": false,
"strict": true,
"experimentalDecorators": true,
"types": [
"./src/typegate/engine/runtime.d.ts"
],
Expand All @@ -26,13 +42,22 @@
"nodeModulesDir": false,
"lock": "deno.lock",
"lint": {
"exclude": [
".git",
"node_modules",
"./src/typegraph/deno/src/gen",
"./docs/metatype.dev",
"./src/typegraph/node",
"./src/meta-lsp",
"target"
],
"rules": {
"include": [
"no-sync-fn-in-async-fn",
"no-external-import",
"no-inferrable-types",
"no-self-compare",
"no-throw-literal"
// "no-external-import",
// "verbatim-module-syntax"
// "no-await-in-loop"
// "ban-untagged-todo"
Expand Down
Loading
Loading