-
Notifications
You must be signed in to change notification settings - Fork 32
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
Make DB add/remove more flexible #199
Comments
This is a good point, but flexibility also has costs. In the |
Example: https://github.com/stardog-union/stardog.js/blob/v2-typescript/lib/db/main.ts#L26 Currently, TypeScript can flag errors when you supply params that are unexpected. Does that seem too inconvenient to be of benefit? It's pretty nice to not have to look at another codebase when writing code consuming stardog.js. |
Am I wrong to think that a user of stardog.js could then ignore the error? Or, could the type simply be open to other stuff so it validates known params but doesn't restrict the user from using others? |
For this issue...I really just wanted to flag that at some point support for |
Yeah, something along these lines seems reasonable. |
We sit on different sides of the flexibility / dev experience fence :) |
Let's wait and see (for now, at least) whether a user of stardog.js (other than ourselves) wants this. |
The following code restricts the accepted query params to
graph-uri
. That is the only supported param, at the moment. But the inflexibility means each new param requires a stardog.js change. Here is a Stardog issue for a new param: https://github.com/stardog-union/stardog/issues/7816stardog.js/lib/db/main.js
Lines 17 to 20 in f5f4072
The text was updated successfully, but these errors were encountered: