Skip to content
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

Allow to use validate and export tree at NodeJS (for security) #614

Closed
noam7700 opened this issue Jan 13, 2022 · 2 comments
Closed

Allow to use validate and export tree at NodeJS (for security) #614

noam7700 opened this issue Jan 13, 2022 · 2 comments

Comments

@noam7700
Copy link

Is your feature request related to a problem? Please describe.
I want the ability for users to upload Tree to my backend that represents some complex DB query. I want to validate and export the tree to DB query at backend. Currently I can validate and export to DB Query at only frontend, which will allow users to query my DB freely w/o validation (which is bad for security).

Maybe Im doing it wrong, but importing Utils only import { Utils as QbUtils } from 'react-awesome-query-builder';, and also enabling "skipLibCheck" in tsconfig. but still Im receiving: Error: Cannot find module 'react'.

Describe the solution you'd like
Support using the library in NodeJS too only for defining Config (w/o render/factory functions, only formats functions configs), and for exporting to DB query.

Describe alternatives you've considered
maybe allow using the library at NodeJS by importing only part of the library. for example: import {Utils} from "raqb/nodejs;

@noam7700
Copy link
Author

related to issue #331

@ukrbublik
Copy link
Owner

Now it's possible with version 6
Please see core package:
https://github.com/ukrbublik/react-awesome-query-builder/tree/master/packages/core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants