graphql-hive / graphql-hive/envelop

Type errors when running examples

Open
#2,254 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
827
Forks
132
PR merge metrics
No merged PRs in 30d

Description

### Issue workflow progress

_Progress of the issue based on the
[Contributor Workflow](https://github.com/the-guild-org/Stack/blob/master/CONTRIBUTING.md#a-typical-contributor-workflow)_

- [ ] 1. The issue provides a
[minimal reproduction](https://en.wikipedia.org/wiki/Minimal_reproducible_example) available on
[Stackblitz](https://stackblitz.com/fork/node).
- _Please install the latest `@envelop/*` packages that you are using._
- _Please make sure the reproduction is as small as possible._
- [ ] 2. A failing test has been provided
- [ ] 3. A local solution has been provided
- [ ] 4. A pull request is pending review

---

**Describe the bug**

after doing a `pnpm install & pnpm run build`

I navigate to the examples directory and I am getting a type error

```
npm run start

> @envelop-examples/graphql-ws@1.0.0 start
> ts-node index.ts

/Users/reneosman/Desktop/projects/envelop/node_modules/.pnpm/ts-node@10.9.2_@types+node@20.11.30_typescript@5.1.3/node_modules/ts-node/src/index.ts:859
return new TSError(diagnosticText, diagnosticCodes, diagnostics);
^
TSError: ⨯ Unable to compile TypeScript:
index.ts:34:3 - error TS2345: Argument of type '{ parse: (source: string | Source, options?: ParseOptions) => DocumentNode; validate: (schema: GraphQLSchema, documentAST: DocumentNode, rules?: readonly ValidationRule[], options?: { ...; }, typeInfo?: TypeInfo) => readonly GraphQLError[]; execute: (args: ExecutionArgs) => PromiseOrValue<...>; subscribe: (args: Exe...' is not assignable to parameter of type '{ plugins: Plugin<{}>[]; enableInternalTracing?: boolean; }'.
Object literal may only specify known properties, and 'parse' does not exist in type '{ plugins: Plugin<{}>[]; enableInternalTracing?: boolean; }'.

34 parse,
~~~~~

at createTSError (/xxxx/envelop/node_modules/.pnpm/ts-node@10.9.2_@types+node@20.11.30_typescript@5.1.3/node_modules/ts-node/src/index.ts:859:12)
at reportTSError (/xxxxx/envelop/node_modules/.pnpm/ts-node@10.9.2_@types+node@20.11.30_typescript@5.1.3/node_modules/ts-node/src/index.ts:863:19)
at getOutput (/xxxxx/envelop/node_modules/.pnpm/ts-node@10.9.2_@types+node@20.11.30_typescript@5.1.3/node_modules/ts-node/src/index.ts:1077:36)
at Object.compile (/xxxxx/envelop/node_modules/.pnpm/ts-node@10.9.2_@types+node@20.11.30_typescript@5.1.3/node_modules/ts-node/src/index.ts:1433:41)
at Module.m._compile (/xxxxxx/envelop/node_modules/.pnpm/ts-node@10.9.2_@types+node@20.11.30_typescript@5.1.3/node_modules/ts-node/src/index.ts:1617:30)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Object.require.extensions. [as .ts] (/xxxxx/envelop/node_modules/.pnpm/ts-node@10.9.2_@types+node@20.11.30_typescript@5.1.3/node_modules/ts-node/src/index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Function.Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
diagnosticCodes: [ 2345 ]
}
```
![Screenshot 2024-06-14 at 2 23 45 PM](https://github.com/n1ru4l/envelop/assets/6494960/5b2b0fe9-1492-4e8b-88b6-e53de348e24f)

**To Reproduce** Steps to reproduce the behavior:

clone repo
`pnpm install`
`pnpm run build`
`cd examples`
`pnpm run start`

**Expected behavior**

it should run the project

**Environment:**

- OS: Mac OS 14.5
- NodeJS: v18.17.0
- `@envelop/*` versions:
- `@envelop/core`: `???` latest

**Additional context**

Is there something I am missing here?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.