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

Mocca should not allow operation methods in client APIs that return void #17

Open
fabiocarvalho777 opened this issue Jul 13, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@fabiocarvalho777
Copy link
Member

GraphQL operations (including mutations) are not allowed to not have a selection set, or even to have an empty selection set.

This restriction though is not enforced in Mocca at the moment.

The goal of this issue is to change Mocca to not allow client APIs with GraphQL operation methods returning void. Ideally, this validation should happen at client build time. But, if not possible, it is ok to do so at operation execution time (in this case at least add a TODO comment in there stating to move it to client build time).

Tests, and that sample client, should also be changed accordingly.

@fabiocarvalho777 fabiocarvalho777 added the bug Something isn't working label Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant