Closed ahmadferdous closed 7 years ago
Well spotted. I probably broke this around 95206df37bb5b6 (for the SnippetType
/snippetType
), and other nearby commits for the other types (eg. 51c0f6a126d9).
Your explanation of why resolveType
never gets used sounds about right to me.
Disclaimer: I work on Relay, but this project was the first time I'd ever authored a GraphQL schema. I did it partly to get a feel for what that's like. So I wouldn't consider it an example of best practices or anything like that; it's just what I figured out.
Killed the code off in bdf8b68ffc96be6610255b3577cca72371796ce8.
First things first. I have been looking for open-source GraphQL, Relay projects that are more advanced that the example Relay projects. I happened to find this project of yours, while I was looking for a solution to split the GraphQL
schema
file of my project. I found your project very helpful. I came to know, for example, aboutdataloader
library, which I'll try out.Now, about the issue I noticed, the GraphQL types returned are not imported here: https://github.com/wincent/masochist/blob/515a71e141900679d8ac039a92db8b848310bab3/app/src/server/schema/interfaces/taggedInterface.js#L22-L28
I searched the code but could not find any match with the returned type names. For example, now there is
ArticleType
instead ofarticleType
. It seems thattaggedInterface
included in the content types (article, page etc.), as ininterfaces: [nodeInterface, taggedInterface]
, are not actually used. The resolution from object to GraphQL type is used only forUserType
. I think, that's whyresolveType
is not invoked.