dherault / semantic-graphql

Create GraphQL schemas from RDF ontologies
MIT License
94 stars 14 forks source link

Support domainIncludes and rangeIncludes #1

Open steffansluis opened 6 years ago

steffansluis commented 6 years ago

Hi!

A couple of things: really like the library! I also saw you are on vacation until 2018 (enjoy!), so no expectations of urgency here. So I've been using you're library to build a GraphQL API based on an ontology, while using your aquest repo as a guideline. As part of my ontology I would like to extend some schema.org classes, but I ran into a problem there. I was able to include their ontology, but it uses schema:domainIncludes and schema:rangeIncludes to indicate relationships between classes. I did some work on Google and found a discussion about the subject here, which seems to indicate that the Includes version is preferable, although I imagine supported both should be easy enough as well. Any thoughts on the matter? Would be happy to help out with a PR.

xmnlab commented 5 years ago

hey @steffansluis did you could use this library to work with schema.org? I am playing with some alternatives to work with schema.org on graphql.

dherault commented 5 years ago

Yes this lib can work with the schema.org ontology!

VladimirAlexiev commented 5 years ago

@dherault rdfs:domain/range are monomorphic, i.e. should take only one value. Eg your use of multiple rdfs:domain at https://github.com/dherault/aquest/blob/master/ontology/_shared.ttl#L13 and L19 is incorrect.

schema:domain/rangeIncludes are polymorphic.

Cheers!