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

querying null values #894

moayadnajd opened this Issue Jun 25, 2018 · 3 comments


None yet
4 participants

moayadnajd commented Jun 25, 2018

Sorry if my question is stupid but i am new to feathers

I'am trying to get users where there phone number is null

GET /users?phone=null this is not working

so what is the best way to do this ?



This comment has been minimized.


bertho-zero commented Jun 25, 2018

Query is always a string, so you have to coerce this (in a before hook for exemple).


This comment has been minimized.


eddyystop commented Jun 25, 2018


This comment has been minimized.


daffl commented Jun 25, 2018

That's definitely the way to go. For reference here is how it could be done in a plain hook:

  before: {
    find(context) {
      const { params: { query = {} } } = context;

      if( === 'null') { = null;

      context.params.query = query;

      return context;

@daffl daffl closed this Jun 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment