Skip to content

Generated TypeScript code contains references to an undefined name '_Service'? #335

@api-haus

Description

@api-haus

package.json

  "dependencies": {
    "fastify": "^4.3.0",
    "mercurius": "^10.1.0",
    "mercurius-codegen": "^4.0.1",
  }

Steps to reproduce:

TypeScript errors in generated code:

src/generated.ts:148:33 - error TS2304: Cannot find name '_Service'.

148   _Service: ResolverTypeWrapper<_Service>;
                                    ~~~~~~~~

This issue is persistent for many months. I wonder why this is happening. Previously we had a working version and just removed broken code from file so the typings would work correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions