Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: graphql-python/graphene
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b3db1c0
Choose a base ref
...
head repository: graphql-python/graphene
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8290326
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on Nov 9, 2024

  1. fix: raise proper error when UUID parsing fails (#1582)

    * Do not raise AttributeError when parsing non-string UUIDs
    
    When a user sends a dictionary or other object as a UUID variable like `{[123]}`, previously graphene crashed with an `AttributeError`, like this:
    
    ```
    (…)
      File "…/lib/python3.12/site-packages/graphql/utils/is_valid_value.py", line 78, in is_valid_value
        parse_result = type.parse_value(value)
                       ^^^^^^^^^^^^^^^^^^^^^^^
      File "…/lib/python3.12/site-packages/graphene/types/uuid.py", line 33, in parse_value
        return _UUID(value)
               ^^^^^^^^^^^^
      File "/usr/lib/python3.12/uuid.py", line 175, in __init__
        hex = hex.replace('urn:', '').replace('uuid:', '')
              ^^^^^^^^^^^
    AttributeError: 'dict' object has no attribute 'replace'
    ```
    
    But an `AttributeError` makes it seem like this is the server's fault, when it's obviously the client's.
    
    Report a proper GraphQLError.
    
    * fix: adjust exception message structure
    
    ---------
    
    Co-authored-by: Erik Wrede <[email protected]>
    phihag and erikwrede authored Nov 9, 2024
    Configuration menu
    Copy the full SHA
    4a274b8 View commit details
    Browse the repository at this point in the history
  2. release: 3.4.3

    erikwrede authored Nov 9, 2024
    Configuration menu
    Copy the full SHA
    8290326 View commit details
    Browse the repository at this point in the history
Loading