graphql-metrics 4.0.0 → 4.0.1
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 +4 -4
 - data/CHANGELOG.md +5 -0
 - data/Gemfile.lock +1 -1
 - data/lib/graphql/metrics/analyzer.rb +9 -2
 - data/lib/graphql/metrics/version.rb +1 -1
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 45de407a0b5642ad74d27cdb4ab00635590a38d8b719fc448a3e94d6244d7daf
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: cae841292ce06f25031974127696594b426b41f469e4f7f74f37f1f3a8c8f521
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 861b2728422d3f8c314024084497ef761c4ca83491f3967ccffa2d540ced0de524d318a380f7966b6555a539fd30ffdfaec83cafee42f020813875148434f734
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 83bde1129c7492cd92ffc097e3072275f179262530a5fccbe6e61b5c485a08bb231a3af8e29ddf88a6f0f3cdfdf5bd7101f0266e042afe37d19232a07195d922
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,3 +1,8 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            4.0.1
         
     | 
| 
      
 2 
     | 
    
         
            +
            -----
         
     | 
| 
      
 3 
     | 
    
         
            +
            - [24](https://github.com/Shopify/graphql-metrics/pull/24) Safely call `arguments_for` to handle arguments which may
         
     | 
| 
      
 4 
     | 
    
         
            +
            raise `ExecutionError`s in their `prepare` methods.
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
       1 
6 
     | 
    
         
             
            4.0.0
         
     | 
| 
       2 
7 
     | 
    
         
             
            -----
         
     | 
| 
       3 
8 
     | 
    
         
             
            - [23](https://github.com/Shopify/graphql-metrics/pull/23) graphql-ruby 1.10.8+ compatibility
         
     | 
    
        data/Gemfile.lock
    CHANGED
    
    
| 
         @@ -35,9 +35,16 @@ module GraphQL 
     | 
|
| 
       35 
35 
     | 
    
         
             
                    return if visitor.field_definition.introspection?
         
     | 
| 
       36 
36 
     | 
    
         
             
                    return if query.context[SKIP_FIELD_AND_ARGUMENT_METRICS]
         
     | 
| 
       37 
37 
     | 
    
         | 
| 
       38 
     | 
    
         
            -
                     
     | 
| 
      
 38 
     | 
    
         
            +
                    # Arguments can raise execution errors within their `prepare` methods
         
     | 
| 
      
 39 
     | 
    
         
            +
                    # which aren't properly handled during analysis so we have to handle
         
     | 
| 
      
 40 
     | 
    
         
            +
                    # them ourselves safely and return `nil`.
         
     | 
| 
      
 41 
     | 
    
         
            +
                    argument_values = begin
         
     | 
| 
      
 42 
     | 
    
         
            +
                      query.arguments_for(node, visitor.field_definition)
         
     | 
| 
      
 43 
     | 
    
         
            +
                    rescue ::GraphQL::ExecutionError
         
     | 
| 
      
 44 
     | 
    
         
            +
                      nil
         
     | 
| 
      
 45 
     | 
    
         
            +
                    end
         
     | 
| 
       39 
46 
     | 
    
         | 
| 
       40 
     | 
    
         
            -
                    extract_arguments(argument_values, visitor.field_definition)
         
     | 
| 
      
 47 
     | 
    
         
            +
                    extract_arguments(argument_values, visitor.field_definition) if argument_values
         
     | 
| 
       41 
48 
     | 
    
         | 
| 
       42 
49 
     | 
    
         
             
                    static_metrics = {
         
     | 
| 
       43 
50 
     | 
    
         
             
                      field_name: node.name,
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: graphql-metrics
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 4.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 4.0.1
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Christopher Butcher
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2020- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2020-06-05 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: graphql
         
     |