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
Query Parameters not implemented? #21
Comments
You are correct that I am not returning a 400. I'll have to fix this. |
Ah ok I see the specification leaves QP implementation up to the engineer. Did you ever get a chance to implement this: https://github.com/ColtonProvias/sqlalchemy-jsonapi/wiki/Filtering Or Ember-style filters? |
I was actually considering making it pluggable. Default to Ember but allow for those other ideas as well. |
Does it default to ember-style filtering at the moment? |
No filtering at the moment yet. It's on my todo list. With a few of my projects, we're doing all of our filtering client-side temporarily. However, with us getting ready for production, I'm putting focus back into this, so expect filtering soon! |
@ColtonProvias, you are truly the man! |
Looking at the Ember-style filtering, I found a potential problem. Ember serializes null to an empty-string. Let's assume I want to query for an object where Thus I'm probably going to have to allow for pluggable filtering. Ship with a basic Ember-compatible filter, but also offer custom filtering and maybe make an adapter for Ember that incorporates it. |
I'd say the main use case for this library will indeed be for a "Flyer" stack (Flask-Python-Ember), so Ember-style filters should probably be the default. But pluggability supports the flexibility afforded by the api. What about a QueryAdapter class that we can sub and inject into FlaskJSONAPI's constructor? |
I was thinking about just an overridable function in FlaskJSONAPI for simplicity. Also, our main use case for this library is providing consistency across mobile platforms with Ember-compatibility being second importance. One of the filtering requirements we have are date ranges, which Ember doesn't exactly handle server-side from what I've seen. My current plan is to do the following:
|
Ping :) just checking in to see if there's any progress on this. |
cough Still wheeze alive... thud Got a release tomorrow night that is taking priority, but this is still on my todo list! |
This is what it's like as I try to get a chance to work on this: https://www.youtube.com/watch?v=GjJCdCXFslY |
@ColtonProvias Do you have a POC/WIP branch that we could contribute to/help with/play with? |
Hey there,
I'll take a look at serializer again later this week, but from my side it looks like query parameters aren't implemented. From the spec:
I'm sending nonsensical query params, and I don't get a 400. Also correctly-formatted QP's don't seem to elicit the right response either.
The text was updated successfully, but these errors were encountered: