Skip to content

[Feat]: Add endpoint to query for all indexed predicates. #548

Description

@matglas

Describe the solution you'd like:

It would be great if there is a query endpoint like subject to query for all known predicates. You could even extend that to dsse or subjects that are related to that predicate. Maybe like the first, last, etc. to get a number of subjects.

User value:

It would allow a implementation for a UI to easily give direction on discovery into the different types of data that are in a storage.

Expected behavior:

query {
  predicateTypes(first: 10, where: { predicateHasPrefix: "https://witness.dev/example-predicate" }) {
  }
}

Proposed solution:

Extend the implementation.

Testing changes required:

  • Test with a few different predicates and returning those thru query.
  • Test with one.
  • Test with different has prefix.
  • Test with last X and having more items then X.

Documentation changes required:

Extend the documentation for GraphQL. Probably auto generated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions