Skip to content

add mutation conventions #141

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

Merged
merged 2 commits into from
May 29, 2025
Merged

add mutation conventions #141

merged 2 commits into from
May 29, 2025

Conversation

danstarns
Copy link
Member

Was going back and forth wondering why my function was not being exposed via the graphql mutations api, turns out its a hardcoded convention in the codebase located here:

@Copilot Copilot AI review requested due to automatic review settings May 29, 2025 04:20
@danstarns danstarns requested a review from a team as a code owner May 29, 2025 04:20
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds documentation for GraphQL mutation naming conventions, outlining how exported functions are classified based on their name prefixes.

  • Introduces a new Generating Mutations section in the API guide.
  • Lists the exact prefixes that trigger mutation generation.
  • Provides examples contrasting query vs. mutation naming.
Comments suppressed due to low confidence (1)

modus/api-generation.mdx:146

  • Clarify whether the prefix matching is case-sensitive or case-insensitive so users know if variants like AddUser vs addUser are both recognized as mutations.
Functions are automatically classified as **mutations** when they start with these prefixes:

Copy link

trunk-io bot commented May 29, 2025

Running Code Quality on PRs by uploading data to Trunk will soon be removed. You can still run checks on your PRs using trunk-action - see the migration guide for more information.

@ryanfoxtyler ryanfoxtyler merged commit af32ac3 into main May 29, 2025
7 checks passed
@ryanfoxtyler ryanfoxtyler deleted the mutation-conventions branch May 29, 2025 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants