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-1899] Expose qr and code for get beam #87

Merged
merged 2 commits into from
Jul 17, 2024

Conversation

enjinabner
Copy link
Contributor

@enjinabner enjinabner commented Jul 17, 2024

PR Type

enhancement


Description

  • Removed the 'excludeFrom' attribute for the 'code' and 'qr' fields in the BeamType class to simplify the field definitions.
  • This change ensures that the 'code' and 'qr' fields are now included in the 'GetBeam' and 'GetBeams' queries.

Changes walkthrough 📝

Relevant files
Enhancement
BeamType.php
Simplify BeamType fields by removing 'excludeFrom' attributes

src/GraphQL/Types/BeamType.php

  • Removed 'excludeFrom' attribute for 'code' and 'qr' fields in the
    BeamType class.
  • Simplified the fields definition by excluding unnecessary attributes.
  • +0/-2     

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    @enjinabner enjinabner self-assigned this Jul 17, 2024
    @github-actions github-actions bot added the enhancement New feature or request label Jul 17, 2024
    Copy link

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ No key issues to review

    Copy link

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Possible issue
    Reintroduce the 'excludeFrom' key to restrict field exposure in specific queries

    Consider reintroducing the 'excludeFrom' key with values 'GetBeam' and 'GetBeams'
    for the 'code' field to ensure that it is not exposed in these queries if it was
    intentionally restricted previously.

    src/GraphQL/Types/BeamType.php [47-49]

     'code' => [
         'type' => GraphQL::type('String!'),
         'description' => __('enjin-platform-beam::mutation.claim_beam.args.code'),
    +    'excludeFrom' => ['GetBeam', 'GetBeams'],
     ],
     
    Suggestion importance[1-10]: 9

    Why: The suggestion addresses a potential security or access control issue by ensuring that the 'code' field is not exposed in specific queries, which might have been an intentional restriction previously.

    9
    Reintroduce the 'excludeFrom' key to maintain consistent access control

    Consider reintroducing the 'excludeFrom' key with values 'GetBeam' and 'GetBeams'
    for the 'probabilities' field to maintain consistent access control as previously
    configured.

    src/GraphQL/Types/BeamType.php [95-96]

     'probabilities' => [
         'type' => GraphQL::type('Object'),
    +    'excludeFrom' => ['GetBeam', 'GetBeams'],
     ],
     
    Suggestion importance[1-10]: 9

    Why: The suggestion ensures consistent access control for the 'probabilities' field, which aligns with the previous configuration and might be crucial for maintaining the intended security measures.

    9

    @enjinabner enjinabner requested a review from pawell67 July 17, 2024 05:49
    @enjinabner enjinabner merged commit bfe711e into master Jul 17, 2024
    5 checks passed
    @enjinabner enjinabner deleted the feature/pla-1899/fix-get-beam branch July 17, 2024 05:52
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Development

    Successfully merging this pull request may close these issues.

    2 participants