goField forceResolver=true does not work as expected for subscriptions #2420
piccione99
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goal - create organized subscriptions in the graph so it's easier for users to navigate:
extend type Subscription {
cameraSubscriptions: CameraSubscriptions!
}
extend type CameraSubscriptions {
cameraEvent(accountId: String!, deviceId: String!): CameraEvent @gofield(forceResolver: true)
}
Generated Code:
func (r *cameraSubscriptionsResolver) CameraEvent(ctx context.Context, obj *model.CameraSubscriptions, accountID string, deviceID string) (*model.CameraEvent, error) {
panic(fmt.Errorf("not implemented: CameraEvent - cameraEvent"))
}
func (r *subscriptionResolver) CameraSubscriptions(ctx context.Context) (<-chan *model.CameraSubscriptions, error) {
panic(fmt.Errorf("not implemented: CameraSubscriptions - cameraSubscriptions"))
}
Expected:
The chan would be applied to the lowest level subscription resolver (CameraEvent) not CameraSubscriptions.
Is there a way to do this or do subscriptions all have to be at the top level of the graph?
Beta Was this translation helpful? Give feedback.
All reactions