The difficulty for the mapping between SHACL and GraphQL is that GraphQL has a
weak notion of classes and inheritance. I had tried to work with interfaces
originally but didn't get far, so ended up with a structure in which all
GraphQL types are independent of each other, and thus no dynamic cas
This is quite interesting, thank you!
1) Yes - but combined with other workarounds, such as pushing the property
shapes up the hierarchy, or querying multiple subclasses in parallel,
provides options
2) Yes - it changes the structure with respect to a common interface/union
class, which we don'
One more thought: it seems like you want to dynamically cast from one type to
another. You can theoretically do that through a virtual property that points
at the instance itself but with a different declared sh:class. Add these
triples to your ontology;
hst:AAA
sh:property hst:AAA-asBB
> On 28 Nov 2023, at 3:08 pm, Davide Sottara wrote:
>
> I have put together a simple ontology with a class hierarchy, a property on
> each class, and one individual per class - attached
> AAA
> DDD
> BBB
> CCC
Thanks for the file, which I was able to play with. I also tried something
I have put together a simple ontology with a class hierarchy, a property on
each class, and one individual per class - attached
AAA
DDD
BBB
CCC
I was looking for a behavior that replicates unions or interfaces:
https://www.apollographql.com/docs/apollo-server/schema/unions-interfaces/
In
Hi Davide,
thanks for the error message. I had to read up on GraphQL fragments as I have
never used them.
It seems that they would need to be declared using the fragment keyword but I
don't see that in your query.
Our GraphQL engine does not declare such fragments automatically.
It would stream
Unfortunately I get an error
"Fragment cannot be spread here as objects of type (super) can never be of
type (sub)
On Tuesday, November 21, 2023 at 2:55:51 PM UTC-6 Holger Knublauch wrote:
> Have you tried it out? What happened?
>
> Holger
>
>
> On 21 Nov 2023, at 5:35 am, Davide Sottara wrote:
Have you tried it out? What happened?
Holger
> On 21 Nov 2023, at 5:35 am, Davide Sottara wrote:
>
> I have a class hierarchy, where the classes are also node shapes with
> property shapes
>
> class AA
>propA :String
>
> class BB subClassOf AA
> propB : String
>
> Is a query like the
I have a class hierarchy, where the classes are also node shapes with
property shapes
class AA
propA :String
class BB subClassOf AA
propB : String
Is a query like the following supported?
aaas {
propA
... on bbb {
propB
}
}
Thank you
--
The topics of this mailing list inc