graphql-go / graphql-go/graphql

How to implement interfaces with ResolveType

Open
#328 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
10.1k
Forks
845
PR merge metrics
No merged PRs in 30d

Description

I finally got interfaces to work but only using `IsTypeOf` on the concrete type.

As far as I see the concrete type needs to reference the interface type in the `Interfaces` property of the `ObjectConfig`. If thats the case you always get a circular dependency when the interface tries to reference the concrete type in `ResolveType`.

Do I miss something? Are there any examples on how to use interface types?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.