graphql 2.5.4 → 2.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 170be4878ee16ebea26a272dde50923d35e624c87e1154b34de61a10f6a9fae0
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 5ac223538670c8a24c2748e0819cab3b5e0627c14b4a4745559fdedfcd8440fb
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 272a8d48f0ec1d0ad1a79021dc103aede933d34a35829512bf0d46bcbcbc3bafe3b3484cbd38c26ba8193144f3a4024c1c69bd732c9e4cf472307fd15c1d1a33
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: b1a66e945b02251b72410c792a91ba5d28cbe82e3eba3891bd3a708382076c2da9e6cf1349c3b688a0f7f87ba06d9bb1b83d06e4c3282e47c0c9724d76cb187b
         
     | 
| 
         @@ -28,14 +28,14 @@ module GraphQL 
     | 
|
| 
       28 
28 
     | 
    
         
             
                      end
         
     | 
| 
       29 
29 
     | 
    
         
             
                    when nil
         
     | 
| 
       30 
30 
     | 
    
         
             
                      subject.logger.warn <<~GRAPHQL
         
     | 
| 
       31 
     | 
    
         
            -
                        GraphQL-Ruby's complexity cost system is getting some "breaking fixes" in a future version. See the migration notes at https://graphql-ruby.org/api- 
     | 
| 
      
 31 
     | 
    
         
            +
                        GraphQL-Ruby's complexity cost system is getting some "breaking fixes" in a future version. See the migration notes at https://graphql-ruby.org/api-doc/#{GraphQL::VERSION}/GraphQL/Schema.html#complexity_cost_calculation_mode_for-class_method
         
     | 
| 
       32 
32 
     | 
    
         | 
| 
       33 
33 
     | 
    
         
             
                        To opt into the future behavior, configure your schema (#{subject.schema.name ? subject.schema.name : subject.schema.ancestors}) with:
         
     | 
| 
       34 
34 
     | 
    
         | 
| 
       35 
35 
     | 
    
         
             
                          complexity_cost_calculation_mode(:future) # or `:legacy`, `:compare`
         
     | 
| 
       36 
36 
     | 
    
         | 
| 
       37 
37 
     | 
    
         
             
                      GRAPHQL
         
     | 
| 
       38 
     | 
    
         
            -
                      max_possible_complexity
         
     | 
| 
      
 38 
     | 
    
         
            +
                      max_possible_complexity(mode: :legacy)
         
     | 
| 
       39 
39 
     | 
    
         
             
                    else
         
     | 
| 
       40 
40 
     | 
    
         
             
                      raise ArgumentError, "Expected `:future`, `:legacy`, `:compare`, or `nil` from `#{query.schema}.complexity_cost_calculation_mode_for` but got: #{query.schema.complexity_cost_calculation_mode.inspect}"
         
     | 
| 
       41 
41 
     | 
    
         
             
                    end
         
     | 
| 
         @@ -176,30 +176,33 @@ module GraphQL 
     | 
|
| 
       176 
176 
     | 
    
         
             
                        return GraphQL::Query::InputValidationResult.from_problem(INVALID_OBJECT_MESSAGE % { object: JSON.generate(input, quirks_mode: true) })
         
     | 
| 
       177 
177 
     | 
    
         
             
                      end
         
     | 
| 
       178 
178 
     | 
    
         | 
| 
       179 
     | 
    
         
            -
                      # Inject missing required arguments
         
     | 
| 
       180 
     | 
    
         
            -
                      missing_required_inputs = ctx.types.arguments(self).reduce({}) do |m, (argument)|
         
     | 
| 
       181 
     | 
    
         
            -
                        if !input.key?(argument.graphql_name) && argument.type.non_null? && !argument.default_value? && types.argument(self, argument.graphql_name)
         
     | 
| 
       182 
     | 
    
         
            -
                          m[argument.graphql_name] = nil
         
     | 
| 
       183 
     | 
    
         
            -
                        end
         
     | 
| 
       184 
     | 
    
         
            -
             
     | 
| 
       185 
     | 
    
         
            -
                        m
         
     | 
| 
       186 
     | 
    
         
            -
                      end
         
     | 
| 
       187 
179 
     | 
    
         | 
| 
       188 
180 
     | 
    
         
             
                      result = nil
         
     | 
| 
       189 
     | 
    
         
            -
             
     | 
| 
       190 
     | 
    
         
            -
             
     | 
| 
       191 
     | 
    
         
            -
             
     | 
| 
       192 
     | 
    
         
            -
             
     | 
| 
       193 
     | 
    
         
            -
             
     | 
| 
       194 
     | 
    
         
            -
             
     | 
| 
       195 
     | 
    
         
            -
             
     | 
| 
       196 
     | 
    
         
            -
                           
     | 
| 
       197 
     | 
    
         
            -
             
     | 
| 
       198 
     | 
    
         
            -
             
     | 
| 
      
 181 
     | 
    
         
            +
             
     | 
| 
      
 182 
     | 
    
         
            +
             
     | 
| 
      
 183 
     | 
    
         
            +
                      input.each do |argument_name, value|
         
     | 
| 
      
 184 
     | 
    
         
            +
                        argument = types.argument(self, argument_name)
         
     | 
| 
      
 185 
     | 
    
         
            +
                        # Items in the input that are unexpected
         
     | 
| 
      
 186 
     | 
    
         
            +
                        if argument.nil?
         
     | 
| 
      
 187 
     | 
    
         
            +
                          result ||= Query::InputValidationResult.new
         
     | 
| 
      
 188 
     | 
    
         
            +
                          result.add_problem("Field is not defined on #{self.graphql_name}", [argument_name])
         
     | 
| 
      
 189 
     | 
    
         
            +
                        else
         
     | 
| 
      
 190 
     | 
    
         
            +
                          # Items in the input that are expected, but have invalid values
         
     | 
| 
      
 191 
     | 
    
         
            +
                          argument_result = argument.type.validate_input(value, ctx)
         
     | 
| 
      
 192 
     | 
    
         
            +
                          if !argument_result.valid?
         
     | 
| 
       199 
193 
     | 
    
         
             
                            result ||= Query::InputValidationResult.new
         
     | 
| 
       200 
     | 
    
         
            -
                             
     | 
| 
       201 
     | 
    
         
            -
             
     | 
| 
       202 
     | 
    
         
            -
             
     | 
| 
      
 194 
     | 
    
         
            +
                            result.merge_result!(argument_name, argument_result)
         
     | 
| 
      
 195 
     | 
    
         
            +
                          end
         
     | 
| 
      
 196 
     | 
    
         
            +
                        end
         
     | 
| 
      
 197 
     | 
    
         
            +
                      end
         
     | 
| 
      
 198 
     | 
    
         
            +
             
     | 
| 
      
 199 
     | 
    
         
            +
                      # Check for missing non-null arguments
         
     | 
| 
      
 200 
     | 
    
         
            +
                      ctx.types.arguments(self).each do |argument|
         
     | 
| 
      
 201 
     | 
    
         
            +
                        if !input.key?(argument.graphql_name) && argument.type.non_null? && !argument.default_value?
         
     | 
| 
      
 202 
     | 
    
         
            +
                          result ||= Query::InputValidationResult.new
         
     | 
| 
      
 203 
     | 
    
         
            +
                          argument_result = argument.type.validate_input(nil, ctx)
         
     | 
| 
      
 204 
     | 
    
         
            +
                          if !argument_result.valid?
         
     | 
| 
      
 205 
     | 
    
         
            +
                            result.merge_result!(argument.graphql_name, argument_result)
         
     | 
| 
       203 
206 
     | 
    
         
             
                          end
         
     | 
| 
       204 
207 
     | 
    
         
             
                        end
         
     | 
| 
       205 
208 
     | 
    
         
             
                      end
         
     | 
| 
         @@ -12,7 +12,7 @@ module GraphQL 
     | 
|
| 
       12 
12 
     | 
    
         
             
                  # @param profiles [Hash<Symbol => Hash>] A hash of `name => context` pairs for preloading visibility profiles
         
     | 
| 
       13 
13 
     | 
    
         
             
                  # @param preload [Boolean] if `true`, load the default schema profile and all named profiles immediately (defaults to `true` for `Rails.env.production?`)
         
     | 
| 
       14 
14 
     | 
    
         
             
                  # @param migration_errors [Boolean] if `true`, raise an error when `Visibility` and `Warden` return different results
         
     | 
| 
       15 
     | 
    
         
            -
                  def self.use(schema, dynamic: false, profiles: EmptyObjects::EMPTY_HASH, preload: (defined?(Rails) ? Rails.env.production? : nil), migration_errors: false)
         
     | 
| 
      
 15 
     | 
    
         
            +
                  def self.use(schema, dynamic: false, profiles: EmptyObjects::EMPTY_HASH, preload: (defined?(Rails.env) ? Rails.env.production? : nil), migration_errors: false)
         
     | 
| 
       16 
16 
     | 
    
         
             
                    profiles&.each { |name, ctx|
         
     | 
| 
       17 
17 
     | 
    
         
             
                      ctx[:visibility_profile] = name
         
     | 
| 
       18 
18 
     | 
    
         
             
                      ctx.freeze
         
     | 
| 
         @@ -137,7 +137,9 @@ module GraphQL 
     | 
|
| 
       137 
137 
     | 
    
         | 
| 
       138 
138 
     | 
    
         
             
                  def dataloader_fiber_resume(source)
         
     | 
| 
       139 
139 
     | 
    
         
             
                    prev_ev = Fiber[PREVIOUS_EV_KEY]
         
     | 
| 
       140 
     | 
    
         
            -
                     
     | 
| 
      
 140 
     | 
    
         
            +
                    if prev_ev
         
     | 
| 
      
 141 
     | 
    
         
            +
                      begin_notifications_event(prev_ev.name, prev_ev.payload)
         
     | 
| 
      
 142 
     | 
    
         
            +
                    end
         
     | 
| 
       141 
143 
     | 
    
         
             
                    super
         
     | 
| 
       142 
144 
     | 
    
         
             
                  end
         
     | 
| 
       143 
145 
     | 
    
         | 
    
        data/lib/graphql/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,13 +1,13 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: graphql
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 2.5. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.5.5
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Robert Mosolgo
         
     | 
| 
       8 
8 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       9 
9 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       10 
     | 
    
         
            -
            date: 2025-04- 
     | 
| 
      
 10 
     | 
    
         
            +
            date: 2025-04-29 00:00:00.000000000 Z
         
     | 
| 
       11 
11 
     | 
    
         
             
            dependencies:
         
     | 
| 
       12 
12 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       13 
13 
     | 
    
         
             
              name: base64
         
     | 
| 
         @@ -163,6 +163,20 @@ dependencies: 
     | 
|
| 
       163 
163 
     | 
    
         
             
                - - ">="
         
     | 
| 
       164 
164 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       165 
165 
     | 
    
         
             
                    version: '0'
         
     | 
| 
      
 166 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 167 
     | 
    
         
            +
              name: ostruct
         
     | 
| 
      
 168 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 169 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 170 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 171 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 172 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 173 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 174 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 175 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 176 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 177 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 178 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 179 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       166 
180 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       167 
181 
     | 
    
         
             
              name: rake
         
     | 
| 
       168 
182 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -801,7 +815,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       801 
815 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       802 
816 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       803 
817 
     | 
    
         
             
            requirements: []
         
     | 
| 
       804 
     | 
    
         
            -
            rubygems_version: 3.6. 
     | 
| 
      
 818 
     | 
    
         
            +
            rubygems_version: 3.6.8
         
     | 
| 
       805 
819 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       806 
820 
     | 
    
         
             
            summary: A GraphQL language and runtime for Ruby
         
     | 
| 
       807 
821 
     | 
    
         
             
            test_files: []
         
     |