cayleygraph/cayley · error
Not implemented: should tag all properties
Error message
Not implemented: should tag all properties
What it means
resolveNames in properties.go:32 implements the Properties step's property-name resolution. A nil PropertyPath would mean 'match all properties', but this is not implemented, so the function returns this error. It is a placeholder for unfinished functionality rather than a user-data problem.
Source
Thrown at query/linkedql/steps/properties.go:32
linkedql.Register(&Properties{})
}
var _ linkedql.PathStep = (*Properties)(nil)
// Properties corresponds to .properties().
type Properties struct {
From linkedql.PathStep `json:"from"`
Names *linkedql.PropertyPath `json:"names"`
}
// Description implements Step.
func (s *Properties) Description() string {
return "adds tags for all properties of the current entity"
}
func resolveNames(names *linkedql.PropertyPath) (linkedql.PropertyIRIs, error) {
if names == nil {
return nil, fmt.Errorf("Not implemented: should tag all properties")
}
switch n := names.PropertyPathI.(type) {
case linkedql.PropertyStep:
return nil, fmt.Errorf("Not implemented: should use step to resolve to properties")
case linkedql.PropertyIRIs:
return n, nil
case linkedql.PropertyIRIStrings:
return n.PropertyIRIs(), nil
case linkedql.PropertyIRI:
return linkedql.PropertyIRIs{n}, nil
case linkedql.PropertyIRIString:
return linkedql.PropertyIRIs{linkedql.PropertyIRI(n)}, nil
default:
return nil, fmt.Errorf("Unexpected type")
}
}
// BuildPath implements linkedql.PathStep.View on GitHub (pinned to 81dcd7d73e)
Solutions
- Provide explicit property names/IRIs in the Properties step spec.
- If 'all properties' behavior is needed, enumerate the property IRIs explicitly since wildcard is unimplemented.
- Check upstream deserialization to ensure the property list field is correctly populated.
- Implement the nil case in resolveNames if contributing a fix to the library.
Example fix
// before
step := &steps.Properties{} // Names nil
// after
step := &steps.Properties{Names: []interface{}{"http://xmlns.com/foaf/0.1/name"}} Defensive patterns
Strategy: validation
Validate before calling
func ensureNamesSet(names *linkedql.PropertyPath) error {
if names == nil {
return fmt.Errorf("Properties step requires explicit property names; wildcard not supported")
}
return nil
} Type guard
func hasNames(s *steps.Properties) bool { return s.Names != nil } Try / catch
p, err := step.BuildPath(qs, ns)
if err != nil {
if strings.Contains(err.Error(), "should tag all properties") {
return fmt.Errorf("configure Properties.Names explicitly")
}
return err
} Prevention
- Always populate Names when constructing a Properties step
- Validate deserialized queries for missing property lists
- Enumerate property IRIs explicitly instead of relying on wildcard behavior
When it happens
Trigger: Building/using a Properties step (Properties.BuildPath → resolveNames) without setting any property names, i.e. s.Names == nil, e.g. constructing Properties{} with an empty spec.
Common situations: Deserializing a LinkedQL query from JSON where the properties list field was omitted or misnamed, so Names ended up nil.
Related errors
- Not implemented: should use step to resolve to properties
- must execute a IteratorStep or PathStep
- No matching values for the item %#v in %#v
- Expected %#v to be a map or a slice with a single map but in
- Unexpected type for @id %T
AI-assisted analysis of cayleygraph/cayley@81dcd7d73e (2026-09-06).
Data as JSON: /api/errors/d22d3f358c3b6ee4.
Report an issue: GitHub.