You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to use NodeGraphType to implement the NodeInterface type. I'm trying to get my head around why NodeGraphType exists and how to use it. I think it:
Implements Interface<NodeInterface>(); for you.
Implements the If field for you using Id(x => x.Id) instead of defining it yourself:
this.Field(x => x.Id, type: typeof(NonNullGraphType<IdGraphType>))
.Description("The unique identifier of the droid.");
Registers the type globally, so that given you implement QueryGraphType, lets you resolve any object globally by it's ID.
I've also found a few problems:
It assumes that the ID is of type string. Can I use a System.Guid instead?
The GetById is not async and does not accept a CancellationToken. Ideally it should have the signature:
+1, our FEDs are asking for Relay support now and I'm thinking I'm going to have to implement this since you haven't heard back. Will open source it when I can.
I would like to use
NodeGraphType
to implement theNodeInterface
type. I'm trying to get my head around whyNodeGraphType
exists and how to use it. I think it:Interface<NodeInterface>();
for you.Id(x => x.Id)
instead of defining it yourself:QueryGraphType
, lets you resolve any object globally by it's ID.I've also found a few problems:
System.Guid
instead?CancellationToken
. Ideally it should have the signature:Where
T
is a generic type to allow you to specify the type of the ID. Allowing you to use aGuid
.The text was updated successfully, but these errors were encountered: