Graphql query arguments do not map correctly

Hello!

I have this (manual) schema defined:

schema {
    query: QueryType
}

type QueryType {
    Organization(id: String): Organization @iri(namespace : "http://www.w3.org/ns/org#")
}

type Organization implements IOrganization {
  iri: ID!
  id: String!  @iri(prefix : "schema", localname: "identifier")                           
}

The field id is a simple string identifier mapped to whatever's in schema:identifier.
As expected, the query

{
   Organization {
    iri
    id 
  }
}

returns a result like

{
  "data": [
    {
      "iri": "meemoo_10009",
      "id": "10009"
    },
    ...
  ]
}

(this "meemoo_10009" result instead of an IRI is also very awkward btw, what are client apps suppose to make of that?)

Next, I add the id field as argument, something that should work according to the stardog docs, like so:

{
  Organization(id: "10009") {
    iri
    id 
  }
}

However, the result is empty because id is bound to :id instead of schema:identifier.
The sparql query is:

SELECT *
FROM <tag:stardog:api:context:local>
{
?0 rdf:type org:Organization .
?0 :id "OR-gb1xg6n" .
bind(?0 AS ?1)
?0 schema:identifier ?2 .
}

This seems like a bug? Or how can I configure this correctly server-side?

Anyone from Stardog who can shine a light on this?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.