MichalLytek / MichalLytek/type-graphql

A type does not implement an interface with a complex field

Open
#907 4 comments 1 reaction 1 assignee View on GitHub

@MichalLytek is already working on this.

Since Jun 3, 2021.

Bug :bug: Community :family_man_girl:
Dominant language
TypeScript
Stars
8.1k
Forks
672
PR merge metrics
No merged PRs in 30d

Description

**Describe the Bug**
The generated schema does not properly handle the inheritance of interfaces having a non-scalar field. More concretely, an object type declared to implement an interface does not show up as an implementation in the schema.

**To Reproduce**
A repo with a reproducible example: https://github.com/dzhelezov/type-graphql-interface-example
Run with `yarn ts-node src/index.ts` and inspect `src/schema.gql`:
```gql
type EventImpl {
....
}
```

**Expected Behavior**
(Referring to the repo above): The generated schema includes `type EventImpl implements IEvent`

**Environment (please complete the following information):**

- OS: [MacOS]
- Node: v12.19.0
- Package version: 1.1.1
- TypeScript version: 3.9.9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.