relay icon indicating copy to clipboard operation
relay copied to clipboard

ConnectionDefinitions should accept a Interface

Open aizatto opened this issue 5 years ago • 0 comments

func ConnectionDefinitions only accepts a graphql.Object as its NodeType

I'm trying to migrate a graphql service I have written JS, and I have an interface as one of the connections.

I can't migrate it to graphql-go/relay because of this blocker.

https://relay.dev/graphql/connections.htm

An “Edge Type” must contain a field called node. This field must return either a Scalar, Enum, Object, Interface, Union, or a Non‐Null wrapper around one of those types. Notably, this field cannot return a list.

I've created a PR for this fix https://github.com/graphql-go/relay/pull/43

aizatto avatar May 09 '20 08:05 aizatto