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

Larger queries return a 400 (bad request) response #208

Open
FNieschalk opened this issue Nov 13, 2024 · 0 comments
Open

Larger queries return a 400 (bad request) response #208

FNieschalk opened this issue Nov 13, 2024 · 0 comments

Comments

@FNieschalk
Copy link

Library version [e.g. 1.1.2]
3.0.4

Node.js version [e.g. 8.16.0]
22.11.0

Describe the bug
I have a query which works just fine with a couple of IRIs in it's VALUES ?targetClass { <iri1> <iri2> <iri3> ... } . Now if my code generates a larger query with hundreds of IRIs in ?targetClass, the client will give me a 400 (bad request) response.

Copying the same query, even with a lot of ?targetClasses, to the GraphDB Web UI and executing it will work.

To Reproduce

const query = 'add a big SPARQL query here'
GraphDbClient.validateSparqlQuery(query); // this passes just fine

const queryPayload = GraphDbClient.createSelectQueryPayload(query, limit);

let stream;
try {
    stream = await this.client.query(queryPayload);
} catch (error) {
    // error 400 is caught here
}

Expected behavior
Independent of the query length, it should be sent without a 400 error.

Additional context
Rolling back to 3.0.3 solved the issue for now, so I believe that this change of 3.0.4 which is mentioned in CHANGELOG.md may be responsible for this:

When executing a query with a POST request and a valid QueryPayload, regardless of the content type, the parameters will be included in the request.

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

1 participant