* added ignore authData field
* add fix for Postgres
* add test for mongoDB
* add test login with provider despite invalid authData
* removed fit
* fixed ignoring authData in postgres
* Fix postgres test
* Throw error instead of ignore
* improve tests
* Add mongo test
* allow authData when not user class
* fix tests
* more tests
* add condition to synthesize authData field only in _User class
it is forbidden to add a custom field name beginning with `_`, so if the object is not `_User` , the transform should throw
* add warning log when ignoring invalid `authData` in `_User`
* add test to throw when custom field begins with underscore
* Move filename validation out of the Router and into the FilesAdaptor
* Address PR comments
* Update unittests to handle FilesAdapter interface change
* Make validateFilename optional
This issue was spotted when an updated field is modified in beforeSave, but the unmodified version is returned if requested by the resolver.
For example
```graphql
mutation UpdateTitle($id: ID!, $title: String!) {
updateSomeObject(id: $id, fields: { title: $title }) {
id
title
slug
}
}
```
In the above, if we modify the `title` by let's say, trimming it - the resolved `title` will not reflect this change, and instead just return the input variable. Other resolved fields that are not sent within the `fields` input are returned properly using the latest data.
* add microsoft graph auth
* change mail to id
* add graph user id and email
* add microsoft graph auth test case
* remove validating auth data using mail
* add test case to AuthenticationAdapters
* fix indentation
* fix httpsRequest and fakeClaim not found
* add newline eof last
* fix test in auth adapter
* fix unhandled promise rejection
* feat: add allowHeaders to Options
This allows developers to use custom headers in their API requests, and they will be accepted by their mounted app.
* refactor: convert allowCrossDomain to generator to add appId in scope
This is necessary as the middleware may run in OPTIONS request that do not contain the appId within the header.
* chore: update Definitions and docs
* fix: update test to use new allowCrossDomain params
* chore: add tests for allowCustomDomain middleware re: allowHeadrs
* Fix: aggregate not matching null values
* Exclude Postgres from this new test - it does not even support and is not working correctly - should be addressed separately
* refactor(GraphQL): Pointer constraint input type as ID
Redefines the Pointer constraint input type from a custom scalar to
a simple ID.
* fix: PR review requested changes
The method `createSessionToken` in RestWrite.js is assumed to always return a promise (see Line 961 in `handleFollowUp`) - this was throwing an error `cannot read 'then' of undefined`. This simply one word change fixes that error.
* 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
* refactor(GraphQL): Rename objectId to id
Renames `objectId` to `id` for the GraphQL API. Queries, mutations,
custom and generic types were updated.
Removes `RELATION_INPUT` and `POINTER_INPUT`. Now the user just need
to provide the ID of the object to link.
* fix: Column "id" not found on Postgres
* fix: Avoid deleting Parse class objectId
* fix: Undo objectId removal on mutations
* fix: Handle generic mutation id
* moved whitelisting of own user to remove conflict with custom classes and * permission
* added new pointer-perm regex to permissions
* added pointer-permissions support
* added tests
* fixed typo
* fixed typo 2
* added tests using find operation
* renamed protectedFields pointerPerm to userField
* decoupled readUserFields from CLP and removed readUser from protectedFields before querying
* updated tests
* Add a test on deep complex GraphQL Query
* Relation/Pointer new DX + deep nested mutations
* Fix lint
* Review
* Remove unnecessary code
* Fix objectId on update
* 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
* Support: serverCloseComplete option
Callback when server has fully shutdown.
Please check that all cases are covered.
* handle error on startup
* fix tests
* test workaround
* remove serverCloseComplete chech on startup failure
* added array support for pointer permissions
* added tests for array support for pointer permissions
* Postgres fix
* simplify PG, no idea why this works
* Renaming GraphQL Types/Inputs
* Add Native Type to avoid collision
* Use pluralize for renaming
* Fixing tests
* Improve name collision management - tests passsing
* Renaming few more default types
* Rename file input
* Reverting fields types to not collide with the relay spec types
Improver users mutations
* Adding ArrayResult to the reserved list
* Fixing tests
* Add more unit tests to ParseGraphQLSchema
* Test transformClassNameToGraphQL
* Name collision tests
* fix(package): update mongodb to version 3.3.0
* chore(package): update lockfile package-lock.json
* Fix tests
* Fix GraphQL tests for read preference
* Fix mongo adapter deprecation notice
* Fix the way the connections are checked, return promise when shutting down mongo
* 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
* Batch transaction boilerplate
* Refactoring transaction boilerplate
* Independent sessions test
* Transactions - partial
* Missing only one test
* All tests passing for mongo db
* Tests on Travis
* Transactions on postgres
* Fix travis to restart mongodb
* Remove mongodb service and keep only mongodb runner
* MongoDB service back
* Initialize replicaset
* Remove mongodb runner again
* Again only with mongodb-runner and removing cache
* Trying with pretest and posttest
* WiredTiger
* Pretest and posttest again
* Removing inexistent scripts
* wiredTiger
* One more attempt
* Trying another way to run mongodb-runner
* Fixing tests
* Include batch transaction on direct access
* Add tests to direct access