Skip to content

Commit

Permalink
feat(hierarchies): find hierarchies in all graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
tpluscode committed Dec 19, 2024
1 parent 7d28c55 commit 0efd2ad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/src/api/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import { rdf, schema } from '@tpluscode/rdf-ns-builders'
import { Actions } from '@/api/mixins/ApiResource'

export function findOperation (resource: RdfResource, idOrType: NamedNode): RuntimeOperation | null {
if (!resource.id.value.includes(window.APP_CONFIG.apiCoreBase)) {
return null
}

const matches = resource.operations.filter(op => op.pointer.has(rdf.type, idOrType).values.length)

if (matches.length > 1) {
Expand Down

0 comments on commit 0efd2ad

Please sign in to comment.