Skip to content

Commit

Permalink
refactor: cleanup t.effect resolver logics and more (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamchanii committed Sep 17, 2023
2 parents 9bf8419 + 8b16453 commit 80b6bc9
Show file tree
Hide file tree
Showing 18 changed files with 1,744 additions and 1,660 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ const { typescript, ...restDprintOptions } = require('./dprint.json');

module.exports = {
extends: [
'plugin:perfectionist/recommended-natural',
'plugin:@typescript-eslint/recommended',
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'dprint-integration'],
root: true,
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-types': 'off',
'dprint-integration/dprint': [
'error',
restDprintOptions,
Expand Down
2 changes: 1 addition & 1 deletion dprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"markdown": {},
"toml": {},
"includes": ["**/*.{ts,tsx,js,jsx,cjs,mjs,json,md,toml}"],
"excludes": ["**/node_modules", "**/*-lock.json"],
"excludes": ["**/node_modules", "**/*-lock.json", "**/dist"],
"plugins": [
"https://plugins.dprint.dev/typescript-0.85.0.wasm",
"https://plugins.dprint.dev/json-0.17.4.wasm",
Expand Down
2 changes: 1 addition & 1 deletion examples/01-basic/src/GitHub.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Context, Effect, Layer, pipe } from 'effect';

import { Fetch } from './Fetch.js';
import { Fetch } from './Fetch';

export class NotFound {
readonly _tag = 'NotFound';
Expand Down
6 changes: 3 additions & 3 deletions examples/01-basic/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { createYoga } from 'graphql-yoga';
import { createServer } from 'node:http';
import EffectPlugin from 'pothos-plugin-effect';

import { Dice } from './Dice.js';
import { FetchLive } from './Fetch.js';
import { GitHub, GitHubLive, GitHubStub } from './GitHub.js';
import { Dice } from './Dice';
import { FetchLive } from './Fetch';
import { GitHub, GitHubLive, GitHubStub } from './GitHub';

const builder = new SchemaBuilder({
plugins: [EffectPlugin],
Expand Down
2 changes: 1 addition & 1 deletion examples/02-with-errors-plugin/src/GitHub.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Context, Effect, Layer, pipe } from 'effect';

import { Fetch } from './Fetch.js';
import { Fetch } from './Fetch';

export class NotFound extends Error {
readonly _tag = 'NotFound';
Expand Down
4 changes: 2 additions & 2 deletions examples/02-with-errors-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { createYoga } from 'graphql-yoga';
import { createServer } from 'node:http';
import EffectPlugin from 'pothos-plugin-effect';

import { FetchLive } from './Fetch.js';
import { ForbiddenUser, GitHub, GitHubLive, NotFound } from './GitHub.js';
import { FetchLive } from './Fetch';
import { ForbiddenUser, GitHub, GitHubLive, NotFound } from './GitHub';

const builder = new SchemaBuilder({
plugins: [ErrorsPlugin, EffectPlugin],
Expand Down
29 changes: 14 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}
},
"scripts": {
"test": "NODE_OPTIONS=--experimental-vm-modules pnpm jest",
"test": "NODE_OPTIONS=--experimental-vm-modules jest --watch",
"build": "nanobundle build",
"prepack": "pnpm build",
"release": "release-it"
Expand All @@ -37,28 +37,27 @@
},
"license": "MIT",
"devDependencies": {
"@pothos/core": "^3.30.0",
"@pothos/core": "^3.35.0",
"@pothos/plugin-errors": "^3.11.1",
"@pothos/plugin-relay": "^3.43.0",
"@swc/core": "^1.3.69",
"@swc/jest": "^0.2.26",
"@types/jest": "^29.5.3",
"@pothos/plugin-relay": "^3.43.1",
"@swc/core": "^1.3.84",
"@swc/jest": "^0.2.29",
"@types/jest": "^29.5.4",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"effect": "^2.0.0-next.23",
"eslint": "^8.44.0",
"effect": "2.0.0-next.32",
"eslint": "^8.49.0",
"eslint-plugin-dprint-integration": "^0.3.0",
"eslint-plugin-perfectionist": "^1.4.0",
"graphql": "^16.7.1",
"graphql-yoga": "^4.0.3",
"jest": "^29.6.1",
"graphql": "^16.8.0",
"graphql-yoga": "^4.0.4",
"jest": "^29.7.0",
"nanobundle": "^1.6.0",
"release-it": "^16.1.0",
"typescript": "^5.1.6"
"release-it": "^16.1.5",
"typescript": "^5.2.2"
},
"peerDependencies": {
"effect": ">=2.0.0-next.23 <3",
"@pothos/core": "^3",
"effect": ">=2.0.0-next.23 <3",
"graphql": "^16 || ^17"
},
"dependencies": {
Expand Down
Loading

0 comments on commit 80b6bc9

Please sign in to comment.