I am trying to integrate with graphql-relay and there are few obstacles I am facing.
Ability to set resolveType for an interface.
Ability to pass GraphQLInterfaceType instance as an interface for a type.
Get access to GraphQLObjectType instances generated from classes.
Are these possible?
Ability to set resolveType for an interface.
By design interfaces doesn't have resolveType implemented because it's done by implementing isTypeOf in ObjectTypes:
https://github.com/19majkel94/type-graphql/blob/master/src/schema/schema-generator.ts#L201-L204
But it's implementable by an @InterfaceType decorator option.
Ability to pass GraphQLInterfaceType instance as an interface for a type.
https://19majkel94.github.io/type-graphql/docs/interfaces-and-inheritance.html#interfaces
Get access to GraphQLObjectType instances generated from classes.
What do you mean? You can do GraphQLSchema.getTypeMap() and you have access to all types.
I think that Relay is a way too much opinionated. I have no experience in using it so it's hard for me to add support for it and as I have no problems with Apollo, I probably won't need to learn Relay 馃槂
Thanks! I will give it a try.
Most helpful comment
Thanks! I will give it a try.