GithubHelp home page GithubHelp logo

Comments (7)

eric-burel avatar eric-burel commented on June 11, 2024

For the record you can nest _not and _in to simulate _nin.
Happy to accept a PR with _nin someday.

Note that this part of the code is being transitioned from Meteor to a NPM package at the moment, we'll be back at adding feature when it's done.

from vulcan.

adalidda avatar adalidda commented on June 11, 2024

Thank You @eric-burel

from vulcan.

ErikDakoda avatar ErikDakoda commented on June 11, 2024

@eric-burel I just noticed that in vulcan-lib/lib/server/graphql/typedefs.js in String_Selector and others many of the selector options are commented out. I needed to use _gt for a string input parameter, so I uncommented it, and the selector worked just fine, returning documents filtered correctly.

Can you let me know what the status of this is? It actually appears that _gte and _lte are even unit tested in vulcan:lib/mongoParams/keep multiple filters.

from vulcan.

eric-burel avatar eric-burel commented on June 11, 2024

Good question, ping @SachaG

I've noticed that but I am not sure why, I have started to convert the whole thing in TS but haven't run much filters yet https://github.com/VulcanJS/vulcan-npm/blob/devel/packages/mongo/mongoParams.ts

from vulcan.

eric-burel avatar eric-burel commented on June 11, 2024

They live here now: https://github.com/VulcanJS/vulcan-npm/blob/devel/packages/graphql/server/defaultSchema.ts

I remember asking the same for Date_selector. I think they indeed just lack testing, if you have unit tests for them then I think we're good activating them.
Let me know because I'll need to reenable them on Vulcan NPM too until we have unified both.

The main security threat is not the options in themselves, but the ability to remove document that you shouldn't have been able to filter, and it is correctly handled and unit tested in current version. So adding operators shouldn't be a problem as long as you confirm they work as expected.

from vulcan.

kevinashworth avatar kevinashworth commented on June 11, 2024

EDIT: Oops. Ignore what's below. I see Erik already changed things!

Should this issue be marked as resolved?


Sacha had previously said it was commented out because it wasn't implemented yet. See https://vulcanjs.slack.com/archives/C02L990AF/p1595281668431400

The minimal change to get _nin working for me was only for a string (_id) so just to uncomment its first occurence in typedefs.js. Seems to me that now uncommenting most of the selectors would work fine. I don't see the "ilike" or "contain_all" operators being in place, but otherwise I count maybe a dozen selectors to uncomment in that file.

from vulcan.

ErikDakoda avatar ErikDakoda commented on June 11, 2024

Implemented in PR #2672

from vulcan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.