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

Improve callCloudCode mutation to receive a CloudCodeFunction enum instead of a String #6029

Merged
merged 6 commits into from
Sep 9, 2019

Conversation

davimacedo
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Sep 5, 2019

Codecov Report

Merging #6029 into master will decrease coverage by <.01%.
The diff coverage is 94.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6029      +/-   ##
==========================================
- Coverage   93.91%   93.91%   -0.01%     
==========================================
  Files         164      164              
  Lines       11084    11110      +26     
==========================================
+ Hits        10410    10434      +24     
- Misses        674      676       +2
Impacted Files Coverage Δ
src/GraphQL/ParseGraphQLServer.js 93.02% <ø> (ø) ⬆️
src/GraphQL/ParseGraphQLSchema.js 97.02% <100%> (+0.2%) ⬆️
src/GraphQL/loaders/functionsMutations.js 100% <100%> (ø) ⬆️
src/triggers.js 94.06% <83.33%> (-0.58%) ⬇️
src/RestWrite.js 93.39% <0%> (-0.5%) ⬇️
src/Adapters/Storage/Mongo/MongoStorageAdapter.js 92.94% <0%> (+0.7%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1ee6da4...973d44a. Read the comment docs.

Copy link
Contributor

@omairvaiyani omairvaiyani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add tests for less conventional cloud function names, such as "double-barrelled", "_underscored". "contains1Number" etc - I suspect GraphQL ENUM type might have some issues with those

src/GraphQL/ParseGraphQLSchema.js Outdated Show resolved Hide resolved
src/GraphQL/ParseGraphQLSchema.js Outdated Show resolved Hide resolved
@davimacedo
Copy link
Member Author

@omairvaiyani I added some tests with weird names and I also improved the code to check the function name and warn in the case it can not be used in the GraphQL Schema.

Copy link
Contributor

@omairvaiyani omairvaiyani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@omairvaiyani
Copy link
Contributor

I actually heavily use "double-barrelled" cloud function names in my codebase, for namespacing purposes. I'll have think in a separate PR if there's an elegant solution to it or whether it's either better to use the generic callCloudCode or migrate my functions. We may face some pressure on this from other developers too - let's wait and see!

@davimacedo davimacedo merged commit a754b88 into parse-community:master Sep 9, 2019
@davimacedo
Copy link
Member Author

@omairvaiyani what do you think about removing the - automatically?

@omairvaiyani
Copy link
Contributor

@davimacedo I have a mild preference for replacing - with _

@davimacedo
Copy link
Member Author

Nice. I've just added a task to the GraphQL project.

UnderratedDev pushed a commit to UnderratedDev/parse-server that referenced this pull request Mar 21, 2020
…stead of a String (parse-community#6029)

* Add listing test

* Improvements

* Fixinf package.json

* Fix package.json

* Fix tests
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

Successfully merging this pull request may close these issues.

2 participants