1. 17 Feb, 2021 1 commit
    • Luke Duncalfe's avatar
      GlobalID handle GIDs with unknown resource names · 2e57c01c
      Luke Duncalfe authored
      Previously a GID with an invalid `model_name` portion would through an
      unhandled `NameError` when being parsed by `GlobalIdType`.
      
      The error was thrown when calling `model_class` on the GID:
      
          GlobalID.new("gid://gitlab/invalid_name/7").model_class
          # => NameError: wrong constant name invalid_name
      
      Which was due to `.model_class` calling `constantize` on the `String`.
      
      This change handles this situation as a `GraphQL::CoercionError`.
      2e57c01c
  2. 16 Feb, 2021 39 commits