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

[PLA-2059] Add RequireAccount to InsertRuleSet #69

Merged
merged 1 commit into from
Oct 28, 2024
Merged

Conversation

leonardocustodio
Copy link
Contributor

@leonardocustodio leonardocustodio commented Oct 28, 2024

PR Type

Enhancement, Tests


Description

  • Added a new requireAccount argument to the InsertRuleSetMutation class, allowing users to specify if an account is required.
  • Updated the resolve method and getEncodableParams to handle the new requireAccount parameter.
  • Added feature and unit tests to ensure the correct functionality of the requireAccount parameter in both mutation and encoding processes.
  • Updated GraphQL mutation to include the requireAccount variable.

Changes walkthrough 📝

Relevant files
Enhancement
InsertRuleSetMutation.php
Add `requireAccount` argument to InsertRuleSetMutation     

src/GraphQL/Mutations/InsertRuleSetMutation.php

  • Added requireAccount argument to the mutation.
  • Set default value for requireAccount to false.
  • Updated resolve method to handle requireAccount.
  • Modified getEncodableParams to include requireAccount.
  • +9/-2     
    InsertRuleSet.graphql
    Update GraphQL mutation to include requireAccount               

    tests/Feature/GraphQL/Resources/InsertRuleSet.graphql

    • Added requireAccount variable to GraphQL mutation.
    +2/-0     
    Tests
    InsertRuleSetTest.php
    Add test for InsertRuleSet with requireAccount                     

    tests/Feature/GraphQL/Mutations/InsertRuleSetTest.php

  • Added a test for inserting rule set with requireAccount.
  • Verified encoded data includes requireAccount.
  • +22/-0   
    EncodingTest.php
    Add encoding test for InsertRuleSet with requireAccount   

    tests/Unit/EncodingTest.php

  • Added unit test for encoding InsertRuleSet with requireAccount.
  • Verified encoded data correctness.
  • +23/-0   

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    @leonardocustodio leonardocustodio self-assigned this Oct 28, 2024
    @leonardocustodio leonardocustodio requested review from v16Studios and enjinabner and removed request for v16Studios October 28, 2024 13:10
    Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
    🧪 PR contains tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Default Value Handling
    Ensure that the default value for 'requireAccount' is consistently handled across all relevant methods to prevent unexpected behavior.

    Parameter Integration
    Verify the integration of 'requireAccount' in the 'resolve' method and its impact on the mutation's logic and performance.

    Copy link

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @leonardocustodio leonardocustodio merged commit 3732797 into master Oct 28, 2024
    7 checks passed
    @leonardocustodio leonardocustodio deleted the PLA-2059 branch October 28, 2024 15:10
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Development

    Successfully merging this pull request may close these issues.

    2 participants