graphql 1.11.1 → 1.11.6
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.
Potentially problematic release.
This version of graphql might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/generators/graphql/core.rb +8 -0
- data/lib/generators/graphql/templates/base_argument.erb +2 -0
- data/lib/generators/graphql/templates/base_enum.erb +2 -0
- data/lib/generators/graphql/templates/base_field.erb +2 -0
- data/lib/generators/graphql/templates/base_input_object.erb +2 -0
- data/lib/generators/graphql/templates/base_interface.erb +2 -0
- data/lib/generators/graphql/templates/base_mutation.erb +2 -0
- data/lib/generators/graphql/templates/base_object.erb +2 -0
- data/lib/generators/graphql/templates/base_scalar.erb +2 -0
- data/lib/generators/graphql/templates/base_union.erb +2 -0
- data/lib/generators/graphql/templates/enum.erb +2 -0
- data/lib/generators/graphql/templates/graphql_controller.erb +13 -9
- data/lib/generators/graphql/templates/interface.erb +2 -0
- data/lib/generators/graphql/templates/loader.erb +2 -0
- data/lib/generators/graphql/templates/mutation.erb +2 -0
- data/lib/generators/graphql/templates/mutation_type.erb +2 -0
- data/lib/generators/graphql/templates/object.erb +2 -0
- data/lib/generators/graphql/templates/query_type.erb +2 -0
- data/lib/generators/graphql/templates/scalar.erb +2 -0
- data/lib/generators/graphql/templates/schema.erb +2 -0
- data/lib/generators/graphql/templates/union.erb +3 -1
- data/lib/graphql.rb +16 -0
- data/lib/graphql/argument.rb +3 -3
- data/lib/graphql/backtrace/tracer.rb +2 -1
- data/lib/graphql/define/assign_global_id_field.rb +2 -2
- data/lib/graphql/directive.rb +4 -0
- data/lib/graphql/execution/interpreter.rb +10 -0
- data/lib/graphql/execution/interpreter/arguments.rb +1 -1
- data/lib/graphql/execution/interpreter/runtime.rb +59 -45
- data/lib/graphql/field.rb +4 -0
- data/lib/graphql/input_object_type.rb +4 -0
- data/lib/graphql/introspection.rb +96 -0
- data/lib/graphql/introspection/field_type.rb +7 -3
- data/lib/graphql/introspection/input_value_type.rb +6 -0
- data/lib/graphql/introspection/introspection_query.rb +6 -92
- data/lib/graphql/introspection/type_type.rb +7 -3
- data/lib/graphql/language/block_string.rb +24 -5
- data/lib/graphql/language/lexer.rb +7 -3
- data/lib/graphql/language/lexer.rl +7 -3
- data/lib/graphql/language/nodes.rb +2 -1
- data/lib/graphql/language/parser.rb +107 -103
- data/lib/graphql/language/parser.y +4 -0
- data/lib/graphql/language/sanitized_printer.rb +59 -26
- data/lib/graphql/language/visitor.rb +2 -2
- data/lib/graphql/name_validator.rb +6 -7
- data/lib/graphql/pagination/connection.rb +6 -8
- data/lib/graphql/pagination/connections.rb +23 -3
- data/lib/graphql/query.rb +2 -2
- data/lib/graphql/query/context.rb +30 -3
- data/lib/graphql/query/fingerprint.rb +2 -0
- data/lib/graphql/query/validation_pipeline.rb +3 -0
- data/lib/graphql/relay/range_add.rb +14 -5
- data/lib/graphql/schema.rb +40 -31
- data/lib/graphql/schema/argument.rb +56 -5
- data/lib/graphql/schema/build_from_definition.rb +67 -38
- data/lib/graphql/schema/build_from_definition/resolve_map.rb +3 -1
- data/lib/graphql/schema/directive/deprecated.rb +1 -1
- data/lib/graphql/schema/enum_value.rb +1 -0
- data/lib/graphql/schema/field.rb +17 -10
- data/lib/graphql/schema/field/connection_extension.rb +44 -34
- data/lib/graphql/schema/input_object.rb +21 -18
- data/lib/graphql/schema/interface.rb +1 -1
- data/lib/graphql/schema/late_bound_type.rb +2 -2
- data/lib/graphql/schema/loader.rb +20 -1
- data/lib/graphql/schema/member/build_type.rb +14 -4
- data/lib/graphql/schema/member/has_arguments.rb +19 -1
- data/lib/graphql/schema/member/has_fields.rb +17 -7
- data/lib/graphql/schema/member/type_system_helpers.rb +2 -2
- data/lib/graphql/schema/mutation.rb +4 -0
- data/lib/graphql/schema/relay_classic_mutation.rb +3 -1
- data/lib/graphql/schema/resolver.rb +6 -0
- data/lib/graphql/schema/resolver/has_payload_type.rb +2 -1
- data/lib/graphql/schema/subscription.rb +2 -12
- data/lib/graphql/schema/timeout.rb +29 -15
- data/lib/graphql/schema/union.rb +29 -0
- data/lib/graphql/schema/unique_within_type.rb +1 -2
- data/lib/graphql/schema/validation.rb +8 -0
- data/lib/graphql/schema/warden.rb +8 -3
- data/lib/graphql/static_validation/literal_validator.rb +7 -7
- data/lib/graphql/static_validation/rules/arguments_are_defined.rb +1 -1
- data/lib/graphql/static_validation/rules/required_arguments_are_present.rb +2 -2
- data/lib/graphql/static_validation/rules/required_input_object_attributes_are_present.rb +1 -2
- data/lib/graphql/static_validation/rules/variables_are_used_and_defined.rb +4 -2
- data/lib/graphql/static_validation/validator.rb +7 -4
- data/lib/graphql/subscriptions.rb +32 -22
- data/lib/graphql/subscriptions/action_cable_subscriptions.rb +45 -20
- data/lib/graphql/subscriptions/serialize.rb +22 -4
- data/lib/graphql/tracing/appoptics_tracing.rb +10 -2
- data/lib/graphql/types/iso_8601_date_time.rb +2 -1
- data/lib/graphql/types/relay/base_connection.rb +6 -5
- data/lib/graphql/unauthorized_error.rb +1 -1
- data/lib/graphql/version.rb +1 -1
- metadata +3 -3
| @@ -55,7 +55,15 @@ module GraphQL | |
| 55 55 | 
             
                  end
         | 
| 56 56 |  | 
| 57 57 | 
             
                  def platform_field_key(type, field)
         | 
| 58 | 
            -
                    "graphql.#{type. | 
| 58 | 
            +
                    "graphql.#{type.graphql_name}.#{field.graphql_name}"
         | 
| 59 | 
            +
                  end
         | 
| 60 | 
            +
                  
         | 
| 61 | 
            +
                  def platform_authorized_key(type)
         | 
| 62 | 
            +
                    "graphql.authorized.#{type.graphql_name}"
         | 
| 63 | 
            +
                  end
         | 
| 64 | 
            +
             | 
| 65 | 
            +
                  def platform_resolve_type_key(type)
         | 
| 66 | 
            +
                    "graphql.resolve_type.#{type.graphql_name}"
         | 
| 59 67 | 
             
                  end
         | 
| 60 68 |  | 
| 61 69 | 
             
                  private
         | 
| @@ -107,7 +115,7 @@ module GraphQL | |
| 107 115 | 
             
                      else
         | 
| 108 116 | 
             
                        [key, data[key]]
         | 
| 109 117 | 
             
                      end
         | 
| 110 | 
            -
                    end.flatten.each_slice(2).to_h.merge(Spec: 'graphql')
         | 
| 118 | 
            +
                    end.flatten(2).each_slice(2).to_h.merge(Spec: 'graphql')
         | 
| 111 119 | 
             
                  end
         | 
| 112 120 | 
             
                  # rubocop:enable Metrics/AbcSize, Metrics/MethodLength
         | 
| 113 121 |  | 
| @@ -48,7 +48,7 @@ module GraphQL | |
| 48 48 | 
             
                      # It's called when you subclass this base connection, trying to use the
         | 
| 49 49 | 
             
                      # class name to set defaults. You can call it again in the class definition
         | 
| 50 50 | 
             
                      # to override the default (or provide a value, if the default lookup failed).
         | 
| 51 | 
            -
                      def edge_type(edge_type_class, edge_class: GraphQL::Relay::Edge, node_type: edge_type_class.node_type, nodes_field: true)
         | 
| 51 | 
            +
                      def edge_type(edge_type_class, edge_class: GraphQL::Relay::Edge, node_type: edge_type_class.node_type, nodes_field: true, node_nullable: true)
         | 
| 52 52 | 
             
                        # Set this connection's graphql name
         | 
| 53 53 | 
             
                        node_type_name = node_type.graphql_name
         | 
| 54 54 |  | 
| @@ -61,7 +61,7 @@ module GraphQL | |
| 61 61 | 
             
                          description: "A list of edges.",
         | 
| 62 62 | 
             
                          edge_class: edge_class
         | 
| 63 63 |  | 
| 64 | 
            -
                        define_nodes_field if nodes_field
         | 
| 64 | 
            +
                        define_nodes_field(node_nullable) if nodes_field
         | 
| 65 65 |  | 
| 66 66 | 
             
                        description("The connection type for #{node_type_name}.")
         | 
| 67 67 | 
             
                      end
         | 
| @@ -90,9 +90,10 @@ module GraphQL | |
| 90 90 |  | 
| 91 91 | 
             
                      private
         | 
| 92 92 |  | 
| 93 | 
            -
                      def define_nodes_field
         | 
| 94 | 
            -
                         | 
| 95 | 
            -
             | 
| 93 | 
            +
                      def define_nodes_field(nullable = true)
         | 
| 94 | 
            +
                        type = nullable ? [@node_type, null: true] : [@node_type]
         | 
| 95 | 
            +
                        field :nodes, type,
         | 
| 96 | 
            +
                          null: nullable,
         | 
| 96 97 | 
             
                          description: "A list of nodes."
         | 
| 97 98 | 
             
                      end
         | 
| 98 99 | 
             
                    end
         | 
| @@ -22,7 +22,7 @@ module GraphQL | |
| 22 22 | 
             
                  @object = object
         | 
| 23 23 | 
             
                  @type = type
         | 
| 24 24 | 
             
                  @context = context
         | 
| 25 | 
            -
                  message ||= "An instance of #{object.class} failed #{type. | 
| 25 | 
            +
                  message ||= "An instance of #{object.class} failed #{type.graphql_name}'s authorization check"
         | 
| 26 26 | 
             
                  super(message)
         | 
| 27 27 | 
             
                end
         | 
| 28 28 | 
             
              end
         | 
    
        data/lib/graphql/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: graphql
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.11. | 
| 4 | 
            +
              version: 1.11.6
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Robert Mosolgo
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2020- | 
| 11 | 
            +
            date: 2020-10-29 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: benchmark-ips
         | 
| @@ -752,7 +752,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 752 752 | 
             
                - !ruby/object:Gem::Version
         | 
| 753 753 | 
             
                  version: '0'
         | 
| 754 754 | 
             
            requirements: []
         | 
| 755 | 
            -
            rubygems_version: 3. | 
| 755 | 
            +
            rubygems_version: 3.0.3
         | 
| 756 756 | 
             
            signing_key: 
         | 
| 757 757 | 
             
            specification_version: 4
         | 
| 758 758 | 
             
            summary: A GraphQL language and runtime for Ruby
         |