Load loads the object with the given ID.
(ctx context.Context, id *call.ID)
| 1200 | |
| 1201 | // Load loads the object with the given ID. |
| 1202 | func (s *Server) Load(ctx context.Context, id *call.ID) (AnyObjectResult, error) { |
| 1203 | ctx = srvToContext(ctx, s) |
| 1204 | if id == nil { |
| 1205 | return nil, fmt.Errorf("load: nil ID") |
| 1206 | } |
| 1207 | // Delegate to the canonical server so IDs are always evaluated |
| 1208 | // against the real schema, not the sugared one. |
| 1209 | if c := s.canonical; c != nil { |
| 1210 | return c.Load(ctx, id) |
| 1211 | } |
| 1212 | res, err := s.LoadType(ctx, id) |
| 1213 | if err != nil { |
| 1214 | return nil, err |
| 1215 | } |
| 1216 | return s.toSelectable(ctx, res) |
| 1217 | } |
| 1218 | |
| 1219 | func (s *Server) loadNthValue( |
| 1220 | ctx context.Context, |
nothing calls this directly
no test coverage detected