Skip to content

Commit

Permalink
fix(cognitarium): fix incorrect resource type for describe
Browse files Browse the repository at this point in the history
  • Loading branch information
ccamel committed Jun 17, 2023
1 parent 360a9bf commit 5876c74
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion contracts/okp4-cognitarium/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ pub struct DescribeQuery {
/// The prefixes used in the query.
pub prefixes: Vec<Prefix>,
/// The resource to describe given as a variable or a node.
pub resource: VarOrNode,
pub resource: VarOrNamedNode,
/// The WHERE clause.
/// This clause is used to specify the resource identifier to describe using variable bindings.
pub r#where: WhereClause,
Expand Down Expand Up @@ -455,6 +455,18 @@ pub enum VarOrNode {
Node(Node),
}

/// # VarOrNamedNode {
/// Represents either a variable or a named node (IRI).
#[cw_serde]
pub enum VarOrNamedNode {
/// # Variable
/// A variable.
Variable(String),
/// # NamedNode
/// An RDF [IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri).
NamedNode(IRI),
}

/// # VarOrNodeOrLiteral
/// Represents either a variable, a node or a literal.
#[cw_serde]
Expand Down

0 comments on commit 5876c74

Please sign in to comment.