Comments (7)
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.
Thank You @eric-burel
from vulcan.
@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.
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.
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.
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.
Implemented in PR #2672
from vulcan.
Related Issues (20)
- Support "reverse belongsTo" relations HOT 1
- query results are undefined during loading (due to breaking change in @apollo/client v3) HOT 11
- Migrate cache to Apollo v3 HOT 2
- Renaming Material UI base form controls HOT 12
- Cannot use SmartForm for creating new documents SmartForm.submitForm
- Smartform shows delete button regardless of collection.permissions.canDelete HOT 3
- RTL support for UI by adding top level class in HTML HOT 4
- Add more flexible low level GraphQL checks HOT 2
- objectSpread2 error after running unit test HOT 2
- Nested Schema document update not working HOT 2
- How do we coordinate work among Vulcan contributors? HOT 1
- useCookies is not a function or its return value is not iterable HOT 2
- I can't run the project Vulcan(Lubuntu) HOT 8
- collection.addField not working if schema is simpl-schema HOT 3
- Relations hasMany bug. HOT 12
- Duplicate Item with withMulti HOT 4
- Add className to FormComponentLoader
- Attempting to implement multiple interfaces on a type causes an error HOT 3
- Error: Cannot find module '@graphql-tools/utils'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vulcan.