* Relax regex for customId ; allow varying id length
* test
* remove trycatch, fix typo
* de-duplicate test names; test pointer targetclass
* fixed early return; detailed errors for protected
* Remove nested operations
* Improve error log
* Fix bug schema to load
* Fix ParseGraphQLSchema tests
* Fix tests
* Fix failing tests
* First verstion not complete of create class mutation
* Fix bug caused by circular dependency
* Renaming files
* Schema types should be loaded before parse classes
* Fix tests
* Create class mutation boilerplate
* Improve CreateClassSchemaInput fields names
* Remove fields
* Pointer and relation fields
* Improve pointer default type
* Class type
* Create class mutation resolver
* Schema field transformers
* Class types transformations
* First test
* Numbers test
* Boolean tests
* Date test
* Fix some get tests
* Test for created at and updated at
* File tests
* Test for objects
* Renaming reducerFabric to reducerGenerator
* Changing get tests for file and object
* Object composed queries test
* Array test
* Null field test
* Bytes test
* Geo Point test
* Polygons tests
* Remove create generic mutation
* Fix tests
* Create class test - isRequired and defaultValue will be added back later
* Enforce master key
* Fix tests
* Duplicated field test
* updateClass mutation
* Remove update generic mutation tests
* Remove update generic mutation
* deleteClass mutation
* Remove delete generic mutation tests
* Remove delete generic mutation
* class query
* Classes query
* Remove get generic query from tests
* Remove remaining generic operations and fix tests
* Fix last test
* Try to fix redis tests
* Fix postgres tests
* Update objectsMutations and objectsQueries files locations
* Rename classSchema files to schema files
* Rename ClassObject to ParseObject
* Fix names and paths
* Still some wrong names
* feat: Avoid setting a relation as required or with a defaultValue
* chore: Test to update a class with a relation field with options
* chore: Improve tests
* GraphQL Object constraints
Implements the GraphQL Object constraints, which allows us to filter queries results using the `$eq`, `$lt`, `$gt`, `$in`, and other Parse supported constraints.
Example:
```
query objects {
findMyClass(where: {
objField: {
_eq: {
key: 'foo.bar',
value: 'hello'
},
_gt: {
key: 'foo.number',
value: 10
},
_lt: {
key: 'anotherNumber',
value: 5
}
}
}) {
results {
objectId
}
}
}
```
In the example above, we have the `findMyClass` query (automatically generated for the `MyClass` class), and a field named `objField` whose type is Object. The object below represents a valid `objField` value and would satisfy all constraints:
```
{
"foo": {
"bar": "hello",
"number": 11
},
"anotherNumber": 4
}
```
The Object constraint is applied only when using Parse class object type queries. When using "generic" queries such as `get` and `find`, this type of constraint is not available.
* Objects constraints not working on Postgres
Fixes the $eq, $ne, $gt, and $lt constraints when applied on an Object type field.
* Fix object constraint field name
* Fix Postgres constraints indexes
* fix: Object type composed constraints not working
* fix: Rename key and value fields
* refactor: Object constraints for generic queries
* fix: Object constraints not working on Postgres
* Add field options to mongo schema metadata
* Add/fix test with fields options
* Add required validation failing test
* Add more tests
* Only set default value if field is undefined
* Fix redis test
* Fix tests
* Test for creating a new class with field options
* Validate default value type
* fix lint (weird)
* Fix lint another way
* Add tests for beforeSave trigger and solve small issue regarding the use of unset in the beforeSave trigger
* removes from emailverificationtoken spec
* updates winston
* Updates ValidationAndPasswordsReset
* Use local request in schemas
* Removes request in rest.spec
* Removes request from PushRouter0
* removes request from public API
* removes request from index.spec
* Removes request form parse.push spec
* removes request from ParseInstallation spec
* Removes from ParseHooks
* removes request from ParseGlobalConfig.spec
* Removes request from ParseAPI.spec.js
* removes request from LogsRouter
* removes in features
* Filters undefined headers instead of crashing
* Removes request from ParseUser spec
* Removes usage of request in ParseFile.spec.js
* Removes request from AuthAdapters.js
* removes request-promise from ParseGeoPoint.spec
* Removes request-promise from ParseQuery spec
* remove request-promise from UserPII
* removes request-promise from EnableExpressErrorHandler
* Updates RevocableSessionUpgrade spec
* Update RestQuery
* Removes read preferenceOptionM
* ensure we forward auth from URL
* use request in CloudCode.spec.js
* Removes request-promise from JobSchedule.spec
* Removes rp from VerifyUserPassword.spec.js
* Removes rp from PasswordPolicy spec
* Removes rp from ParsePolygon spec
* Removes rp from fullTextSearch spec
* Removes rp from PArseQuery.Aggregate
* Ensure we properly forward errors
* Removes request and request-promise
* Various improvements in test name / de-duplications
* Reverts to class by class deletion, introduced fast mode that just delete data for mongo
- Speeds up are incredible Executed 1695 of 1713 specs INCOMPLETE (18 PENDING) in 4 mins 19 secs.
* Adds documentation about the deleteEverything
* Removes need to use babel-register
- Adds watch to watch changes when running the test to regenerate
- Tests are now pure node 8
* Adds timing to helper.js
* Update contribution guide
* Adds inline sourcemaps generation to restore coverage
* nits
* chore(package): update jasmine to version 3.0.0
Closes#4547
* Fixes failing tests for jasmine 3.0
Starting 3.0, done(something) will fail
* Update tests so they dont leverage var, but let and const
With jasmine 3.0, the randomization engine was making the test fails because of the scope of `var`
* Remove randomizer
* Use same adapter for PG tests, drop table to ensure the tests dont side effect
* Add Indexes to Schema API
* error handling
* ci errors
* postgres support
* full text compound indexes
* pg clean up
* get indexes on startup
* test compound index on startup
* add default _id to index, full Text index on startup
* lint
* fix test
* Adds flow types / Configuration interfaces
* Lets call it options
* Use a single interface to generate the configurations
* Translates options to definitions only if comments are set
* improves logic
* Moves objects around
* Fixes issue affecting logging of circular objects
* fixes undefined env
* Moves all defaults to defaults
* Adds back CLI defaults
* Restored defaults in commander.js
* Merge provided defaults and platform defaults
* Addresses visual nits
* Improves Config.js code
* Adds ability to pass the default value in trailing comments
* Load platform defaults from the definitions file
* proper default values on various options
* Adds ParseServer.start and server.start(options) as quick startup methods
* Moves creating liveQueryServer http into ParseServer.js
* removes dead code
* Adds tests to guarantee we can start a LQ Server from main module
* Fixes incorrect code regading liveQuery init port
* Start a http server for LQ if port is specified
* ensure we dont fail if config.port is not set
* Specify port
* ignore other path skipped in tests
* Adds test for custom middleware setting
* Refactors new Config into Config.get
- Hides AppCache from ParseServer.js, use Config.put which validates
* Extracts controller creation into Controllers/index.js
- This makes the ParseServer init way simpler
* Move serverURL inference into ParseServer
* review nits
* Node modernization on CI
* Makes sure tests dont yeild unhandled promise rejections
* Adds small delay to startDB
* Adds mongodb service
* testing default
* stupid
* testing with silent nugget
* proper versions
* Single release step
* Adds index on _Role name property
In order to avoid having different _Role objects with the same name, adding an index on the name property of _Role is necessary.
Fixes#3579
* Uses throw instead of Promise.reject when enforcing unique indexes
* Fixes wrong sorting of results in schemas tests
1. Add no space in paren rule
2. fix spec/eslintrc.json so it allow for inheriting from root rc.
Because the spce rc specified reccomended, it "turned off" all of the
rule tweaks in the root. This fixes that.
* Adds passing tests
* Better containsAll implementation
* Full Geopoint support, fix inverted lat/lng
* Adds support for $and operator / PointerPermissions specs
* Fix issue updating CLPs on schema
* Extends query support
* Adds RestCreate to the specs
* Adds User specs
* Adds error handlers for failing tests
* nits
* Proper JSON update of AuthData
* fix for #1259 with PG
* Fix for Installations _PushStatus test
* Adds support for GlobalConfig
* Enables relations tests
* Exclude spec as legacy
* Makes corner case for 1 in GlobalConfig
* Adds files related tests through fs-adapter with PG
* Schema deletions implementations
* Adds Hooks spec
* Fix test
* Adds support for containsAll (numbers and strings)
* Better support for deleteFields and deleteClass
* Recursive JSON update for authData
* Adds node_modules to travis cache
* Disable temporarily to make tests pass
* Adds _perishable_token support for _User class
* ignore when a table creation fails at init (table exists)
* Adds support for AddUnique and Remove
* PG 9.4 compatible functions
* Re-enable tests
* nit
* Better handling of schema creation race
* Start DB runner from tests
* Connect GridstoreAdapter only when needed
* removes unused package
* better test errors reporting
* Adds support for __op.Delete
* Better test error reporting
* Makes sure all tests can run without crashing
* Use xdescribe to skip test suite
* Removes unused dependencies
* Let volatiles classes be created with PG on start
* Do not fail if class dont exist
* adds index.spec.js to the pg suite
* Use a new config each test to prevent side effects
* Enable EmailVerificationToken specs with pg
* Makes sure failure output is not cut
* Reduces number of ignored tests in ParseObject.spec
* Inspect reconfiguration errors
* Mark GlobalConfig is incompatible with PG
- Problem is with nested updates (param.prop = value)
* PG: Nested JSON queries and updates
- Adds support for nested json and . operator queries
- Adds debug support for PG adapter
- Adds loglevel support in helper
* Enable working specs in ParseUser
* Sets default logLevel in tests to undefined
* Adds File type support, retores purchaseValidation specs
* Adds support for updating jsonb objects
- Restores PushController tests
* Proper implementation of deleteByQuery and ORs
- Adds ParseInstallation spec to the test suite
* xit only failing tests
* Nit on ParseAPI spec
* add sorting operator
* properly bound order keys
* reverts describe_only_db behavior
* Enables passing tests
* Adds basic support for relations, upsertOneObject aliased to createObject
* progress on queries options
* Fix ACL update related problems
* Creates relation tables on class creation
* Adds Relation tests
* remove flaky tests
* use promises instead of CB
* disable flaky test
* nits
* Fixes on schema spec
- Next thing is to implemenet geopoint and files correctly
* fix failues
* Basic GeoPoint support
* Adds support for $nearSphere/$maxDistance geopoint queries
* enable passing tests
* drop tables afterEach for PG, clean up relation tables too
* Better initialization/dropTables
* Adds schema caching capabilities (off by default)
* Use InMemoryCacheAdapter
* Uses proper adapter to generate a cache
* Fix bugs when running disabled cache
* nits
* nits
* Use options object instead of boolean
* Imrpove concurrency of loadSchema
* Adds testing with SCHEMA_CACHE_ON
* Use CacheController instead of generator
- Makes caching SchemaCache use a generated prefix
- Makes clearing the SchemaCache clear only the cached schema keys
- Enable cache by default (ttl 5s)
* reload the right data
More passing postgres tests
Handle schema updates, and $in for non array columns
remove authdata from user and implement ensureUniqueness
Make some tests work, detect existing classes
Throw proper error for unique index violation
fix findOneAndUpdate
Support more types
support more type
Support boolean, fix _rperm/_wperm, add TODO
Support string types and also simplify tests
Move operator flattening into Parse Server and out of mongo adapters
Move authdata transform for create into Parse Server
Move authdata transforms completely in to Parse Server
Fix test setup
inline addSchema
Inject default schema to response from DB adapter
* Mark tests that don't work in Postgres
* Exclude one more test
* Exclude some more failing tests
* Exclude more tests
* reload the right data
More passing postgres tests
Handle schema updates, and $in for non array columns
remove authdata from user and implement ensureUniqueness
Make some tests work, detect existing classes
Throw proper error for unique index violation
* fix findOneAndUpdate
* Remove adaptiveCollection
* Remove an adaptiveCollection use
* Remove an adaptiveCollection
* make adaptiveCollection private
* Remove collection from mongoadapter
* Move schema collection usage into mongo adapter
* stop relying on mongo format for removing join tables
* reduce usage of schemaCollection
* remove uses of _collection
* Move CLP setting into mongo adapter
* remove all uses of schemaCollection
* make schemaCollection private
* remove transform from schemaCollection
* rename some stuff
* Tweak paramaters and stuff
* reorder some params
* reorder find() arguments
* finishsh touching up argument order
* Accept a database adapter as a parameter
* First passing test with postgres!
* Actually use the provided className
* index on unique-indexes: c454180 Revert "Log objects rather than JSON stringified objects (#1922)"
* Start dealing with test shittyness
* Make specific server config for tests async
* Fix email validation
* Fix broken cloud code
* Save callback to variable
* undo
* Fix tests
* Setup travis
* fix travis maybe
* try removing db user
* indentation?
* remove postgres version setting
* sudo maybe?
* use postgres username
* fix check for _PushStatus
* excludes
* remove db=mongo
* allow postgres to fail
* Fix allow failure
* postgres 9.4
* Remove mongo implementations and fix test
* Fix test leaving behind connections