Commit Graph

66 Commits

Author SHA1 Message Date
Antoine Cormouls
85ef7217b0 feat: alphabetical graphql api, fix internal reassign, enhanced Graphql schema cache system (#7344) 2021-10-11 14:51:28 +02:00
Prerna Mehra
5d9bf24b02 GraphQL: reset password with emailed token (#7290)
* renamed "resetPassword" to "requestResetPassword" & created new "resetPassword" mutation

* added new route to handle resetPassword in UsersRouter.js

* updated resetPassword test to "requestResetPassword" mutation

* updated "resetPassword" mutation args description

* changed token arg description to rerun the tests

* directly using updatePassword for resetPassword

* removed handleResetPassword from UsersRouter.js file

* added test case for reset Password

* changed mutation names to "resetPassword" & "confirmResetPassword"

* changed mutation names in test also
2021-03-28 21:45:41 -07:00
Chris
6313656d8a Excluding keys that have trailing "edges.node" on them (#7273)
* Excluding keys that have trailing "edges.node" on them as they will not be selectable anyway

* Updated CHANGELOG and added test case

* Forgot to change fit back to it
2021-03-17 20:40:11 -07:00
Diamond Lewis
a02014f557 Improve single schema cache (#7214)
* Initial Commit

* fix flaky test

* temporary set ci timeout

* turn off ci check

* fix postgres tests

* fix tests

* node flaky test

* remove improvements

* Update SchemaPerformance.spec.js

* fix tests

* revert ci

* Create Singleton Object

* properly clear cache testing

* Cleanup

* remove fit

* try PushController.spec

* try push test rewrite

* try push enqueue time

* Increase test timeout

* remove pg server creation test

* xit push tests

* more xit

* remove skipped tests

* Fix conflicts

* reduce ci timeout

* fix push tests

* Revert "fix push tests"

This reverts commit 05aba62f1cbbca7d5d3e80b9444529f59407cb56.

* improve initialization

* fix flaky tests

* xit flaky test

* Update CHANGELOG.md

* enable debug logs

* Update LogsRouter.spec.js

* create initial indexes in series

* lint

* horizontal scaling documentation

* Update Changelog

* change horizontalScaling db option

* Add enableSchemaHooks option

* move enableSchemaHooks to databaseOptions
2021-03-16 16:05:36 -05:00
Diamond Lewis
033a0bd443 Fix Prettier (#7066) 2020-12-13 11:19:04 -06:00
Antoine Cormouls
b398894341 Remove viewer from logout (#7029) 2020-12-07 15:45:51 -08:00
Antoine Cormouls
88e958a75f Prettier some files + opti object relation (#7044) 2020-12-06 20:25:08 -08:00
Diamond Lewis
e6ac3b6932 fix(prettier): Properly handle lint-stage files (#6970)
Now handles top level files and recursive files in folders.

Set max line length to be 100
2020-10-25 15:06:58 -05:00
Antoine Cormouls
5693470101 transform input types also on user mutations (#6934) 2020-10-09 08:40:30 -07:00
Antoine Cormouls
62048260c9 GraphQL: Optimize queries, fixes some null returns (on object), fix stitched GraphQLUpload (#6709)
* Optimize query, fixes some null returns, fix stitched GraphQLUpload

* Fix authData key selection

* Prefer Iso string since other GraphQL solutions use this format

* fix tests

Co-authored-by: Antonio Davi Macedo Coelho de Castro <adavimacedo@gmail.com>
2020-10-01 15:19:26 -07:00
Antoine Cormouls
78239ac907 Merge pull request from GHSA-236h-rqv8-8q73
* Fix graphql viewer breach

* fix

* remove comment
2020-07-17 09:50:41 -07:00
Antoine Cormouls
93a88c5cde Add version to fix CDN (#6804) 2020-07-16 13:13:29 -07:00
Diamond Lewis
142eaa71bd Run Prettier JS #2 (#6796) 2020-07-13 15:13:08 -07:00
Diamond Lewis
e6a6354b29 Run Prettier JS (#6795) 2020-07-13 13:06:52 -05:00
Antoine Cormouls
c85501718e Change merge system to avoid ref bugs (#6791) 2020-07-13 10:13:47 +02:00
yog27ray
34614e0f78 Pass context in beforeDelete, afterDelete, beforeFind and Parse.Cloud.run. (#6666)
* add context for following hooks.
1. beforeDelete
2. afterDelete
3. beforeFind
4. Cloud Function

* revert un-necessary code change.

* fix: failing test cases.

* fix: failing test cases.

* fix: failing test cases.

* fix: failing test cases.

* fix: failing test cases.

* fix: failing test cases.

* fix: failing test cases.

* review changes

* revert changes

* revert changes

* review changes

* lint changes

* review changes
2020-07-10 22:47:27 +02:00
Yaacov Rydzinski
f56049b34b upgrade graphql-tools to v6 (#6701)
* upgrade to v6

* remove old graphql-tools package

Co-authored-by: Antonio Davi Macedo Coelho de Castro <adavimacedo@gmail.com>
2020-05-24 23:35:45 -07:00
Antoine Cormouls
4d1bd9346f Allow to unset file from graphql (#6651) 2020-04-29 22:18:25 -07:00
Antoine Cormouls
f2f772084f Allow to resolve automatically Parse Type fields from Custom Schema (#6562)
* add package

* Allow real GraphQL Schema via ParseServer.start

* Allow resolve fields from auto graphQL Schema

* Simple merge

* fix + improve

* Add tests
2020-04-21 10:15:00 -07:00
Yaacov Rydzinski
a6300a2201 Graphql tools v5 (#6611)
* Add test case for order option when extending the schema

* Remove fit

* upgrade to graphql-tools v5

revert #6515

Co-authored-by: Antonio Davi Macedo Coelho de Castro <adavimacedo@gmail.com>
2020-04-20 22:16:48 -07:00
Antoine Cormouls
b6506de90b Fix (#6507) 2020-03-23 01:58:23 -07:00
Antoine Cormouls
255cb15c19 GraphQL: Handle properly keys for pointer fields (#6499)
* Fix Unknow type bug on overloaded types

* check args too

* Additional fix to detect custom fields on pointer
2020-03-23 01:40:04 -07:00
Antoine Cormouls
312a4bc812 Switch ACL to Relay Global Id (#6495) 2020-03-23 01:35:42 -07:00
Antoine Cormouls
1b8f057904 GraphQL: Change Order Enum Strategy (#6515)
* fix merged enum

* fix
2020-03-23 01:02:52 -07:00
Antoine Cormouls
16a974a04a Fix Unknow type merge bug on overloaded types (#6494)
* Fix Unknow type bug on overloaded types

* check args too
2020-03-11 12:59:18 -07:00
Antoine Cormouls
c7f96c92cd GraphQL: Allow true GraphQL Schema Customization (#6360)
* Allow real GraphQL Schema via ParseServer.start

* wip

* working

* tests ok

* add tests about enum/input use case

* Add async function based merge

* Better naming

* remove useless condition
2020-02-21 15:12:49 -08:00
Antoine Cormouls
cbef90d66c fix (#6431) 2020-02-21 14:58:51 -08:00
Antoine Cormouls
30a5aa0b61 GraphQL: Nested File Upload (#6372)
* wip

* wip

* tested

* wip

* tested
2020-01-27 19:16:53 -08:00
Antoine Cormouls
df3fa029bc fix queries (#6363) 2020-01-27 19:10:39 -08:00
Antoine Cormouls
d4e264daf8 GraphQL: 3rd Party LoginWith Support (#6371)
* wip

* wip

* tested
2020-01-27 18:57:26 -08:00
Antoine Cormouls
576631f09e Reset and Send verification email (#6301) 2020-01-04 12:50:00 -08:00
Douglas Muraoka
d7236ba8ef fix(GraphQL): Timeout when fetching huge collections (#6304)
* fix(GraphQL): Timeout when fetching huge collections

Currently, when not specifying a `limit` to the GraphQL find-like query, it tries to fetch the entire collection of objects from a class. However, if the class contains a huge set of objects, it is never resolved and results in timeout.

In order to solve this kind of problem, `parse-server` allows us to define a `maxLimit` parameter when initialized, which limits the maximum number of objects fetched per query; but it is not properly considered when the `limit` is undefined.

* fix: Keep same behavior as REST fetch
2019-12-27 23:13:07 -06:00
Antoine Cormouls
a72ab50c70 GraphQL: Support required fields on output type (#6279)
* Handle required fields

* Fix output fields
2019-12-14 20:12:04 -08:00
Antoine Cormouls
e0e06ef131 Handle required fields (#6271) 2019-12-11 21:47:11 -08:00
Antoine Cormouls
5d76b2f354 GraphQL: DX Relational Where Query (#6255)
* DX Relational Where Query

* Remove WherePointer & fix tests

* Add have, haveNot, exists on Pointer/Relation where input

* Merge branch 'master' into gql-relational-query

* Enable inQueryKey

* better descrption
2019-12-05 10:14:16 -08:00
Old Grandpa
6db040bdec GraphQL alias for mutations in classConfigs (#6258)
* mutations

* removed duplicate tests
2019-12-03 21:38:28 -08:00
Old Grandpa
188f033330 GraphQL classConfig query alias (#6257)
* adds alias option

* added tests
2019-12-03 16:14:48 -08:00
Antonio Davi Macedo Coelho de Castro
a9066e20dc Relay Spec (#6089)
* Install graphql-relay

* Add relayNodeInterface to ParseGraphQLSchema

* Add support to global id

* Add support to global id in other operations

* Fix sort by glboal id

* Fix where by global id

* Introduce IdWhereInput

* Add Relay object identification tests

* Client mutation id on createFile mutation

* Client mutation id on callCloudCode mutation

* Client mutation id on signUp mutation

* Client mutation id on logIn mutation

* Client mutation id on logOut mutation

* Client mutation id on createClass mutation

* Client mutation id on updateClass mutation

* Client mutation id on deleteClass mutation

* Client mutation id on create object mutation

* Improve Viewer type

* Client mutation id on update object mutation

* Client mutation id on delete object mutation

* Introducing connections

* Fix tests

* Add pagination test

* Fix file location

* Fix postgres tests

* Add comments

* Tests to calculateSkipAndLimit
2019-12-01 21:43:08 -08:00
Antoine Cormouls
62459962dd Change ACL to Non null (#6249) 2019-12-01 20:46:06 -08:00
Omair Vaiyani
b70915098f fix(GraphQL): Mutations not returning updated information (#6130)
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.
2019-10-14 11:09:10 -03:00
Antoine Cormouls
2290145e82 GraphQL: ACL (#5957)
* Spec

Fix Spec

* Add ACL Type + Input

* Improvements

* Fix
2019-10-01 21:47:56 -07:00
Antonio Davi Macedo Coelho de Castro
1361bb3020 Introduce ReadOptionsInput (#6030) 2019-09-12 13:43:49 -07:00
Antonio Davi Macedo Coelho de Castro
a754b883b2 Improve callCloudCode mutation to receive a CloudCodeFunction enum instead of a String (#6029)
* Add listing test

* Improvements

* Fixinf package.json

* Fix package.json

* Fix tests
2019-09-09 15:07:22 -07:00
Douglas Muraoka
f9b77c1bc7 refactor(GraphQL): Pointer constraint input type as ID (#6020)
* 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
2019-09-04 15:46:18 -07:00
Antonio Davi Macedo Coelho de Castro
34f1bf384d GraphQL: Remove underline from operators (#6024)
* Change _or, _and, _nor to OR, AND, NOR

* Renaming where operators maps

* Fix tests

* Fix tests

* Remove CreateResult and UpdateResult types

* Remove KEYS_ATT and INCLUDE_ATT

* Full text search test

* Change the operation generator functions names

* Fix object constraints

* Improve constraint transformation
2019-09-04 10:57:51 -07:00
Antonio Davi Macedo Coelho de Castro
5a482bd661 GraphQL schema operations (#5993)
* 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
2019-09-01 22:11:03 -07:00
Douglas Muraoka
b47d9fb17e refactor(GraphQL): Rename objectId to id (#5985)
* 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
2019-08-30 16:23:45 -07:00
Antoine Cormouls
5b3a492965 GraphQL DX: Relation/Pointer (#5946)
* 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
2019-08-21 14:55:34 -07:00
Antonio Davi Macedo Coelho de Castro
fddd9c26b2 Fix GraphQL file upload (#5944) 2019-08-19 18:56:36 -05:00
Antonio Davi Macedo Coelho de Castro
f5ac94ddb2 Fix GraphQL max upload size (#5940) 2019-08-19 01:23:59 -05:00