Commit Graph

2754 Commits

Author SHA1 Message Date
greenkeeper[bot]
45dabbbcda Update pg-promise to the latest version 🚀 (#5919)
* fix(package): update pg-promise to version 9.0.1

* chore(package): update lockfile package-lock.json
2019-08-14 18:05:30 +00:00
greenkeeper[bot]
10ac88eec5 Update mongodb-runner to the latest version 🚀 (#5918)
* chore(package): update mongodb-runner to version 4.7.2

* chore(package): update lockfile package-lock.json
2019-08-14 12:36:39 +00:00
Antoine Cormouls
b61a34356b Add instructions to launch a compatible Docker Postgres (#5915)
* Add instructions to launch a Docker Postgres

* Update CONTRIBUTING.md

Co-Authored-By: Tom Fox <tomfox@surprises.io>

* Update CONTRIBUTING.md

Co-Authored-By: Tom Fox <tomfox@surprises.io>
2019-08-14 09:14:56 +01:00
Diamond Lewis
1a7f64d8d9 Fix: Undefined dot notation in matchKeyInQuery (#5917)
* Fix: Undefined dot notation in matchKeyInQuery

* fix test

* fix postgres test

* improve tests

* FINAL test
2019-08-13 21:34:46 -07:00
Diamond Lewis
470bb238b5 Fix: Logger print JSON and Numbers (#5916)
* Fix: Logger print JSON and Numbers

* fix test
2019-08-13 18:44:03 -07:00
greenkeeper[bot]
4c1be61bed Update mongodb to the latest version 🚀 (#5914)
* 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
2019-08-14 01:25:49 +00:00
greenkeeper[bot]
6760ceb836 Update flow-bin to the latest version 🚀 (#5911)
* chore(package): update flow-bin to version 0.105.2

* chore(package): update lockfile package-lock.json
2019-08-13 03:36:10 +00:00
greenkeeper[bot]
5113b01ecb Update ws to the latest version 🚀 (#5909)
* fix(package): update ws to version 7.1.2

* chore(package): update lockfile package-lock.json
2019-08-12 21:53:55 +00:00
Antoine Cormouls
9031961e86 Return specific Type on specific Mutation (#5893)
* Return specific Type on specific Mutation

* Add Optimization on Mutation

* Optimize SignUp
2019-08-12 01:38:59 -07:00
greenkeeper[bot]
6f6210387e Update flow-bin to the latest version 🚀 (#5903)
* chore(package): update flow-bin to version 0.105.0

* chore(package): update lockfile package-lock.json

* Update flow-bin to 0.105.1
2019-08-12 07:37:25 +00:00
greenkeeper[bot]
decd04157a Update apollo-client to the latest version 🚀 (#5905)
* chore(package): update apollo-cache-inmemory to version 1.6.3

* chore(package): update apollo-client to version 2.6.4

* chore(package): update lockfile package-lock.json
2019-08-12 07:31:53 +00:00
greenkeeper[bot]
4513edbfd3 Update eslint-plugin-flowtype to the latest version 🚀 (#5902)
* chore(package): update eslint-plugin-flowtype to version 4.2.0

* chore(package): update lockfile package-lock.json
2019-08-09 22:06:52 +00:00
greenkeeper[bot]
b3270d887b Update eslint-plugin-flowtype to the latest version 🚀 (#5901)
* chore(package): update eslint-plugin-flowtype to version 4.0.0

* chore(package): update lockfile package-lock.json
2019-08-09 14:10:17 +00:00
dependabot-preview[bot]
b611746ae5 Bump commander from 2.20.0 to 3.0.0 (#5899)
Bumps [commander](https://github.com/tj/commander.js) from 2.20.0 to 3.0.0.
- [Release notes](https://github.com/tj/commander.js/releases)
- [Changelog](https://github.com/tj/commander.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tj/commander.js/compare/v2.20.0...v3.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-09 11:03:12 +00:00
greenkeeper[bot]
7de747972e Update husky to the latest version 🚀 (#5895)
* chore(package): update husky to version 3.0.3

* chore(package): update lockfile package-lock.json
2019-08-08 17:51:22 +00:00
SebC
b246bad5c7 Fix apple signin authAdapter (#5891)
* Fix apple signin authAdapter to use the user id instead of the user token

* Update spec
2019-08-07 18:08:14 -05:00
Antonio Davi Macedo Coelho de Castro
0e9462bfb5 Add GraphQL beta notice (#5886)
* Add GraphQL beta notice

* Add beta notice
2019-08-07 10:48:29 +01:00
Douglas Muraoka
f81da11b84 fix(GraphQL): Remove "password" output field from _User class (#5889) 2019-08-06 17:21:33 -07:00
Douglas Muraoka
ef14ca530d GraphQL Object constraints (#5715)
* 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
2019-08-02 12:18:07 -07:00
greenkeeper[bot]
e0690d0c56 Update eslint-plugin-flowtype to the latest version 🚀 (#5881)
* chore(package): update eslint-plugin-flowtype to version 3.13.0

* chore(package): update lockfile package-lock.json
2019-08-02 16:52:24 +00:00
Tom Fox
cbcca36a84 README top section overhaul + add sponsors (#5876)
* top section overhaul

add open collective sponsors

* fix bold formatting

* formatting

* add b4a logo
2019-08-01 15:11:43 +01:00
Lucas Alencar
78c42d97fd fix: Promise is not being returned in classUpdate method (#5877)
* fix: Set falsy values as default to schema fields

* fix: Promise is not being returned in classUpdate method
2019-08-01 08:52:36 -05:00
Antonio Davi Macedo Coelho de Castro
f3b84242d7 Fix month in aggregate tests (#5879) 2019-07-31 19:55:16 -07:00
Antonio Davi Macedo Coelho de Castro
14a8d333a3 FIX: Transaction was aborting before all promises have either resolved or rejected (#5878) 2019-07-31 18:34:49 -07:00
greenkeeper[bot]
baa5daefa4 Update apollo-server to the latest version 🚀 (#5873)
* fix(package): update apollo-server-express to version 2.8.1

* chore(package): update lockfile package-lock.json
2019-07-31 17:45:41 +00:00
Antonio Davi Macedo Coelho de Castro
8b97c1380b Batch transaction (#5849)
* 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
2019-07-31 02:41:07 -07:00
Antonio Davi Macedo Coelho de Castro
fe18fe0f61 3.7.2 (#5872) 2019-07-31 02:19:01 -07:00
Antonio Davi Macedo Coelho de Castro
bde96a9002 Fix live query (#5871)
* Fix live query

* fix test
2019-07-30 22:40:54 -05:00
Antonio Davi Macedo Coelho de Castro
d4fa62ae26 3.7.1 (#5870) 2019-07-30 17:31:56 -07:00
greenkeeper[bot]
c70401857c Update @parse/push-adapter to the latest version 🚀 (#5869)
* fix(package): update @parse/push-adapter to version 3.0.9

* chore(package): update lockfile package-lock.json
2019-07-30 22:18:58 +00:00
Lucas Alencar
6080dbc4f9 fix: Set falsy values as default to schema fields (#5868) 2019-07-30 15:51:49 -05:00
Diamond Lewis
218c3499f9 Implement WebSocketServer Adapter (#5866)
* Implement WebSocketServerAdapter

* lint

* clean up
2019-07-30 09:05:41 -05:00
greenkeeper[bot]
7c8e940f53 Update apollo-server to the latest version 🚀 (#5865)
* fix(package): update apollo-server-express to version 2.8.0

* chore(package): update lockfile package-lock.json
2019-07-29 23:32:32 +00:00
greenkeeper[bot]
747cb47b6b Update husky to the latest version 🚀 (#5864)
* chore(package): update husky to version 3.0.2

* chore(package): update lockfile package-lock.json
2019-07-29 17:43:16 +00:00
Tom Fox
b96087ec61 3.7.0 version bump + changelog (#5854)
* 3.7.0 version bump + changelog

* Update CHANGELOG.md
2019-07-28 23:46:13 -07:00
Ivan SZKIBA
dfe0ff753c support PhantAuth authentication (#5850)
* support PhantAuth authentication

* fix spelling issues

* Add test case
2019-07-29 00:58:43 -05:00
greenkeeper[bot]
d810f34cc5 Update parse to the latest version 🚀 (#5862)
* fix(package): update parse to version 2.6.0

* chore(package): update lockfile package-lock.json
2019-07-29 05:14:44 +00:00
Diamond Lewis
95208e96e0 Postgres: Safely escape strings in nested objects (#5855)
* Postgres: Safely handle string in nested objects

* fix failing tests
2019-07-28 23:54:13 -05:00
Zeal Murapa
4f21c36825 Update ParseWebSocketServer.js (#5860)
* Update ParseWebSocketServer.js

fix wss:// error by requiring 'ws' module, remove uws as it has been deprecated and removed from npm

* Update ParseWebSocketServer.js

* remove uws
2019-07-28 22:17:09 -05:00
greenkeeper[bot]
1903f59db5 Update eslint-plugin-flowtype to the latest version 🚀 (#5858)
* chore(package): update eslint-plugin-flowtype to version 3.12.2

* chore(package): update lockfile package-lock.json
2019-07-29 00:35:51 +00:00
Diamond Lewis
f1619e428e Add git to Dockerfile (#5861) 2019-07-28 16:52:19 -05:00
greenkeeper[bot]
80bb2b6389 Update pg-promise to the latest version 🚀 (#5857)
* fix(package): update pg-promise to version 9.0.0

* chore(package): update lockfile package-lock.json

* remove es6 generators
2019-07-27 19:07:36 +00:00
greenkeeper[bot]
8c321ed750 Update apollo-server to the latest version 🚀 (#5856)
* fix(package): update apollo-server-express to version 2.7.2

* chore(package): update lockfile package-lock.json
2019-07-26 23:56:24 +00:00
greenkeeper[bot]
601a6ff788 Update @parse/push-adapter to the latest version 🚀 (#5852)
* fix(package): update @parse/push-adapter to version 3.0.5

* chore(package): update lockfile package-lock.json

* Update flow-bin to the latest version 🚀 (#5853)

* chore(package): update flow-bin to version 0.104.0

* chore(package): update lockfile package-lock.json

* Update package.json

* Pin to 3.0.8
2019-07-26 22:33:14 +00:00
greenkeeper[bot]
7eadf35840 Update flow-bin to the latest version 🚀 (#5853)
* chore(package): update flow-bin to version 0.104.0

* chore(package): update lockfile package-lock.json
2019-07-26 20:43:47 +00:00
Antonio Davi Macedo Coelho de Castro
fd637ff4f8 Required fields and default values (#5835)
* 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
2019-07-25 21:13:59 -07:00
Omair Vaiyani
d3810c2eba GraphQL Configuration Options (#5782)
* add parse-graph-ql configuration for class schema customisation

Not yet tested - essentially an RFC

* refactor and add graphql router, controller and config cache

* fix(GraphQLController): add missing check isEnabled

* chore(GraphQLController): remove awaits from cache put

* chore(GraphQLController): remove check for if its enabled

* refactor(GraphQLController): only use cache if mounted

* chore(GraphQLController): group all validation errors and throw at once

* chore(GraphQLSchema): move transformations into controller validation

* refactor(GraphQL): improve ctrl validation and fix schema usage of config

* refactor(GraphQLSchema): remove code related to additional schema

This code has been moved into a separate feature branch.

* fix(GraphQLSchema): fix incorrect default return type for class configs

* refactor(GraphQLSchema): update staleness check code to account for config

* fix(GraphQLServer): fix regressed tests due to internal schema changes

This will be followed up with a backwards compatability fix for the `ClassFields` issue to avoid breakages for our users

* refactor: rename to ParseGraphQLController for consistency

* fix(ParseGraphQLCtrl): numerous fixes for validity checking

Also includes some minor code refactoring

* chore(GraphQL): minor syntax cleanup

* fix(SchemaController): add _GraphQLConfig to volatile classes

* refactor(ParseGraphQLServer): return update config value in setGraphQLConfig

* testing(ParseGraphQL): add test cases for new graphQLConfig

* fix(GraphQLController): fix issue where config with multiple items was not being mapped to the db

* fix(postgres): add _GraphQLConfig default schema on load

fixes failing postgres tests

* GraphQL @mock directive (#5836)

* Add mock directive
* Include tests for @mock directive

* Fix existing tests due to the change from ClassFields to ClassCreateFields

* fix(parseClassMutations): safer type transformation based on input type

* fix(parseClassMutations): only define necessary input fields

* fix(GraphQL): fix incorrect import paths
2019-07-25 12:46:25 -07:00
dependabot-preview[bot]
bbcc20fd60 Bump apollo-server-express from 2.7.0 to 2.7.1 (#5847)
Bumps [apollo-server-express](https://github.com/apollographql/apollo-server) from 2.7.0 to 2.7.1.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Changelog](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-server/compare/apollo-server-express@2.7.0...apollo-server-express@2.7.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-25 18:33:03 +00:00
dependabot-preview[bot]
c475a14408 Bump lint-staged from 9.2.0 to 9.2.1 (#5846)
* Bump lint-staged from 9.2.0 to 9.2.1

Bumps [lint-staged](https://github.com/okonet/lint-staged) from 9.2.0 to 9.2.1.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v9.2.0...v9.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* remove flaky test

* re-add test
2019-07-25 18:28:18 +00:00
Antonio Davi Macedo Coelho de Castro
8a925177e1 Cache apple public key for the case it fails to fetch again (#5848) 2019-07-25 10:20:28 -07:00