Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to iterate over all the types? #5

Open
martinheidegger opened this issue Jun 28, 2017 · 2 comments
Open

How to iterate over all the types? #5

martinheidegger opened this issue Jun 28, 2017 · 2 comments

Comments

@martinheidegger
Copy link

First off, it seems like you did exactly what I wanted to do, nice work.

However, I am slightly confused: I would like to be able to get all types of a RDF definition and turn them into GraphQL types: (I.e. I would like to turn http://imi.ipa.go.jp/ns/core/Core231.html into a GraphQL spec following the https://en.wikipedia.org/wiki/SPARQL definition). I havn't found a way to do that properly? Is this supported?

@dherault
Copy link
Member

dherault commented Jun 28, 2017

Hi,

This library can help you create GraphQLObjectTypes and GraphQLInterfaceTypes for all the classes listed in your first link.
To do that you'll need the triples for your ontology (maybe there's a download link somewhere, I can't read Japanese). If you manage to find a turtle (.ttl) file containing your ontology then you can follow the examples (in examples folder). Otherwise you can still add your triples manually (with the addTriplemethod).

I don't understand what you want to achieve using SPARQL.
If you want to fetch your data using SPARQL, then your can write your SPARQL queries in your "resolvers" (see the docs). By doing that, you are just transforming a SPARQL endpoint into a GraphQL endpoint.

@martinheidegger
Copy link
Author

I would like to turn a given SPARQL API (a few endpoints) into a GraphQL APi endpoint. Thank you for your hints. I will look into them. (bedtime now, sadly)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants