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

Generated query to use rdf:type in match #57

Open
CyberDaedalus00 opened this issue Oct 17, 2021 · 2 comments
Open

Generated query to use rdf:type in match #57

CyberDaedalus00 opened this issue Oct 17, 2021 · 2 comments
Labels
question Further information is requested

Comments

@CyberDaedalus00
Copy link

CyberDaedalus00 commented Oct 17, 2021

When I generate a SPARQL query from a GraphQL query, I always see the statement in the WHERE clause is something like:

?df_3_0 <http://example.org/hero> ?hero.

which won't match anything in our knowledge base and thus cause the query to return with no results.

What I was expected was a statement more like:

?hero <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/hero>

which would then be followed by the remainder of the statements used to obtain the predicate values of interest.

Is there a way to get the code to generate that? Perhaps I've missed something.

@rubensworks
Copy link
Owner

Sure, you can use inline fragments for that: https://github.com/rubensworks/graphql-to-sparql.js#inline-fragments

@rubensworks rubensworks added the question Further information is requested label Oct 18, 2021
@nikolaswise

This comment was marked as off-topic.

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

No branches or pull requests

3 participants