{"record":{"id":"501cba06992e4412","repo":"cayleygraph/cayley","slug":"not-implemented-should-use-step-to-resolve-to-pro","errorCode":null,"errorMessage":"Not implemented: should use step to resolve to properties","messagePattern":"Not implemented: should use step to resolve to properties","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"query/linkedql/steps/properties.go","lineNumber":36,"sourceCode":"\n// Properties corresponds to .properties().\ntype Properties struct {\n\tFrom  linkedql.PathStep      `json:\"from\"`\n\tNames *linkedql.PropertyPath `json:\"names\"`\n}\n\n// Description implements Step.\nfunc (s *Properties) Description() string {\n\treturn \"adds tags for all properties of the current entity\"\n}\n\nfunc resolveNames(names *linkedql.PropertyPath) (linkedql.PropertyIRIs, error) {\n\tif names == nil {\n\t\treturn nil, fmt.Errorf(\"Not implemented: should tag all properties\")\n\t}\n\tswitch n := names.PropertyPathI.(type) {\n\tcase linkedql.PropertyStep:\n\t\treturn nil, fmt.Errorf(\"Not implemented: should use step to resolve to properties\")\n\tcase linkedql.PropertyIRIs:\n\t\treturn n, nil\n\tcase linkedql.PropertyIRIStrings:\n\t\treturn n.PropertyIRIs(), nil\n\tcase linkedql.PropertyIRI:\n\t\treturn linkedql.PropertyIRIs{n}, nil\n\tcase linkedql.PropertyIRIString:\n\t\treturn linkedql.PropertyIRIs{linkedql.PropertyIRI(n)}, nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"Unexpected type\")\n\t}\n}\n\n// BuildPath implements linkedql.PathStep.\nfunc (s *Properties) BuildPath(qs graph.QuadStore, ns *voc.Namespaces) (*path.Path, error) {\n\tfromPath, err := s.From.BuildPath(qs, ns)\n\tif err != nil {\n\t\treturn nil, err","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/cayleygraph/cayley/blob/81dcd7d73e45136bc0d01802a8ba4685d8a533eb/query/linkedql/steps/properties.go#L18-L54","documentation":"resolveNames in properties.go:36 switches on the concrete type of the PropertyPath. If it is a linkedql.PropertyStep (a step-based property path, e.g. nested path expressions), resolution to property IRIs is not implemented and this error is returned. It marks an unsupported, unfinished feature of the Properties step.","triggerScenarios":"Using a Properties step whose Names contain a PropertyStep (step-based path) instead of plain IRIs or IRI strings.","commonSituations":"Building queries with nested property path steps where simple IRI lists were expected; porting queries from other GraphQL-like APIs that allow path expressions.","solutions":["Replace the PropertyStep with explicit property IRIs or IRI strings in the Names field.","Flatten the path expression into concrete IRIs before constructing the step.","Contribute or wait for library support for step-based property resolution."],"exampleFix":"// before\nnames := linkedql.NewPropertyPath(thePropertyStep)\n// after\nnames := linkedql.NewPropertyPath(linkedql.PropertyIRIs{\"http://xmlns.com/foaf/0.1/knows\"})","handlingStrategy":"validation","validationCode":"if _, isStep := names.PropertyPathI.(linkedql.PropertyStep); isStep {\n  return fmt.Errorf(\"PropertyStep unsupported in Properties.Names; use explicit IRIs\")\n}","typeGuard":"func isSupportedPropertyPath(p linkedql.PropertyPath) bool {\n  switch p.(type) {\n  case linkedql.PropertyIRIs, linkedql.PropertyIRIStrings, linkedql.PropertyIRI, linkedql.PropertyIRIString:\n    return true\n  }\n  return false\n}","tryCatchPattern":"p, err := step.BuildPath(qs, ns)\nif err != nil {\n  if strings.Contains(err.Error(), \"should use step to resolve\") {\n    return fmt.Errorf(\"replace PropertyStep with explicit property IRIs\")\n  }\n  return err\n}","preventionTips":["Use plain IRI lists in Properties.Names, not path steps","Flatten nested path expressions into concrete IRIs before building","Check library docs for supported PropertyPath implementations"],"tags":["linkedql","not-implemented","go"],"backgroundTag":"method-not-implemented","analyzedSha":"81dcd7d73e45136bc0d01802a8ba4685d8a533eb","analyzedAt":"2026-09-06T06:14:12.358Z","contentChangedAt":"2026-09-06T06:14:12.358Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}