parse-community / docs

Parse Platform docs
https://docs.parseplatform.org
Other
313 stars 517 forks source link

Add cloud code resolver example #771

Closed 185driver closed 4 years ago

185driver commented 4 years ago

This PR is a response to a suggestion made in the Parse Community Forum to add a custom Cloud Code resolver example to Parse's GraphQL docs.

I think the example fits the need for a real-life scenario showing the usefulness of custom resolvers and includes examples of both decoding and encoding a Relay Global Object Identification.

The included example does not include a section on how to set up custom schema for use with a Cloud Code resolver on a Parse Server, as that is covered in the README.md file. However, my personal view, having encountered difficulty in finding the setup instructions after much searching of the docs earlier, is that custom schema setup instructions for Cloud Code resolver use should be added to the docs as well. This would make it easier for newer users to discover and use this excellent feature of Parse Server.

Additionally, this PR fixes a minor punctuation error in the definition of a Relay Global Object Identification.

Moumouls commented 4 years ago

I'll take a look tomorrow !

185driver commented 4 years ago

Sounds good. Shall I place it on the second level then (as a sibling with Configuration)? Should I do it now or would you like me to wait for additional feedback to be given?

davimacedo commented 4 years ago

Yes. I believe it makes sense. You can wait for @Moumouls feedback.

Moumouls commented 4 years ago

@185driver also may be move your code to customisation.md section :)

185driver commented 4 years ago

I thought it might be easier to make the changes suggested by @Moumouls and submit them here for review. Hopefully things are moving in the right direction. Further suggestions are welcome.

185driver commented 4 years ago

I've added the link back to Getting Started and to the GraphQL Relay lib as suggested.

After adding the custom schema section, the cloud code resolver section felt incomplete without a balancing query section, so I added that. Suggestions to change or remove it are welcome.

My feeling right now is that the two sections feel pretty complete and seem to fit together well. I believe the docs now provide someone like myself with enough official information to venture into Parse Server custom schema with a bit of confidence.

Moumouls commented 4 years ago

Everything looks good to me :)

davimacedo commented 4 years ago

Good job guys!