-
Notifications
You must be signed in to change notification settings - Fork 7
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
@optional bugged #35
Comments
Are you certain you're using the latest versions of everything? (how are you invoking this code?) Because if calling graphql-to-sparql.js manually works, then I guess it's a versioning issue. |
@rubensworks |
We are using the latest version:
|
I've made a failing example JavaScript:
Data:
The |
The following query:
On the following ttl file:
Returns the correct results.
But when adding an
@optional
field.Changing the query to:
Causes the resultset to shrink, the missing results may or may not have the
rules
field.When adding another field to this query like so:
The resultset was suddenly back to what was to be expected.
I have had similar behavior on other queries and datasets.
Interesting note:
When using SPARQLAlgebra.js to convert the algebra object made by GraphQL-LD into sparql code and then back into an algebra object (producing a new but very different algebra object, I realise multiple algebra objects can represent the same query, but perhaps this could help towards debugging), the problem was solved.
Context for reference:
The text was updated successfully, but these errors were encountered: