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

improvement: Support generic actions without a return type. #238

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jimsynz
Copy link
Contributor

@jimsynz jimsynz commented Nov 12, 2024

Infer that their return type is :boolean and they always return true. We considered returning null but that's also returned when the query/mutation fails and might convey the wrong information.

Contributor checklist

  • Bug fixes include regression tests
  • Features include unit/acceptance tests

Infer that their return type is `:boolean` and they always return `true`.
We considered returning `null` but that's also returned when the query/mutation fails and might convey the wrong information.
@jimsynz jimsynz force-pushed the improvement/generic-actions-without-return-type branch from da265fe to 2d39db5 Compare November 12, 2024 02:43
@jimsynz
Copy link
Contributor Author

jimsynz commented Nov 12, 2024

@sevenseacat relevant to your interests.

@sevenseacat
Copy link
Contributor

This makes the most sense to me.

Well null for "no return" would make more sense, but then its not distinguishable from the error case, so this is a good compromise!

Copy link
Contributor

@barnabasJ barnabasJ left a comment

Choose a reason for hiding this comment

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

we also used true for mutations without a result in the last 2 companies I worked at, so I'd guess it's not that uncommon as a pattern

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.

3 participants