| 124 | } |
| 125 | |
| 126 | func (gs *graphqlSubscription) isValid(namespace uint64) error { |
| 127 | gs.graphqlHandler.pollerMux.RLock() |
| 128 | defer gs.graphqlHandler.pollerMux.RUnlock() |
| 129 | if err := gs.graphqlHandler.isValid(namespace); err != nil { |
| 130 | return err |
| 131 | } |
| 132 | if gs.graphqlHandler.poller == nil { |
| 133 | return errors.New("poller is nil") |
| 134 | } |
| 135 | if gs.graphqlHandler.poller[namespace] == nil { |
| 136 | return errors.New("poller not found") |
| 137 | } |
| 138 | return nil |
| 139 | } |
| 140 | |
| 141 | func (gs *graphqlSubscription) Subscribe( |
| 142 | ctx context.Context, |