Skip to content

Wrong typings #5116

Open
Open
@Warxcell

Description

@Warxcell

Issue workflow progress

Progress of the issue based on the
Contributor Workflow

Make sure to fork this template and run yarn generate in the terminal.

Please make sure Mesh package versions under package.json matches yours.

  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

Describe the bug

on stitching resolver: the return type is wrong

image

it says the return types is the Object returned by the graphql schema, but it says nothing about graphql errors - so you actually miss them, until they blow in your face at runtime as shown with this commit.

image

Furthermore: .then((data) => ...) has a wrong type also, when stitching is batched. ( Warxcell/graphql-mesh-wrong-typing@5790275 )

image

as seen on log:

image

To Reproduce Steps to reproduce the behavior:

https://github.com/Warxcell/graphql-mesh-wrong-typing

Expected behavior

return type to be the type from graphql | Error.

Environment:

not related, versions are seen in the repo.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions