graphql 1.7.6 → 1.8.0
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/lib/generators/graphql/function_generator.rb +1 -1
- data/lib/generators/graphql/install_generator.rb +14 -8
- data/lib/generators/graphql/loader_generator.rb +1 -1
- data/lib/generators/graphql/mutation_generator.rb +6 -1
- data/lib/generators/graphql/templates/function.erb +2 -2
- data/lib/generators/graphql/templates/loader.erb +2 -2
- data/lib/generators/graphql/templates/schema.erb +1 -1
- data/lib/graphql/argument.rb +25 -19
- data/lib/graphql/backtrace/tracer.rb +16 -22
- data/lib/graphql/backtrace.rb +1 -1
- data/lib/graphql/backwards_compatibility.rb +2 -3
- data/lib/graphql/base_type.rb +31 -31
- data/lib/graphql/compatibility/query_parser_specification/parse_error_specification.rb +14 -0
- data/lib/graphql/compatibility/query_parser_specification.rb +117 -0
- data/lib/graphql/define/assign_object_field.rb +5 -12
- data/lib/graphql/deprecated_dsl.rb +42 -0
- data/lib/graphql/directive.rb +1 -0
- data/lib/graphql/enum_type.rb +3 -1
- data/lib/graphql/execution/execute.rb +21 -13
- data/lib/graphql/execution/instrumentation.rb +82 -0
- data/lib/graphql/execution/lazy/lazy_method_map.rb +1 -1
- data/lib/graphql/execution/lazy/resolve.rb +1 -3
- data/lib/graphql/execution/multiplex.rb +12 -29
- data/lib/graphql/execution.rb +1 -0
- data/lib/graphql/field.rb +21 -4
- data/lib/graphql/function.rb +14 -0
- data/lib/graphql/input_object_type.rb +3 -1
- data/lib/graphql/interface_type.rb +5 -3
- data/lib/graphql/internal_representation/node.rb +26 -14
- data/lib/graphql/internal_representation/visit.rb +3 -6
- data/lib/graphql/introspection/base_object.rb +16 -0
- data/lib/graphql/introspection/directive_location_enum.rb +11 -7
- data/lib/graphql/introspection/directive_type.rb +23 -16
- data/lib/graphql/introspection/dynamic_fields.rb +11 -0
- data/lib/graphql/introspection/entry_points.rb +29 -0
- data/lib/graphql/introspection/enum_value_type.rb +16 -11
- data/lib/graphql/introspection/field_type.rb +21 -12
- data/lib/graphql/introspection/input_value_type.rb +26 -23
- data/lib/graphql/introspection/schema_field.rb +7 -2
- data/lib/graphql/introspection/schema_type.rb +36 -22
- data/lib/graphql/introspection/type_by_name_field.rb +10 -2
- data/lib/graphql/introspection/type_kind_enum.rb +10 -6
- data/lib/graphql/introspection/type_type.rb +85 -23
- data/lib/graphql/introspection/typename_field.rb +1 -0
- data/lib/graphql/introspection.rb +3 -10
- data/lib/graphql/language/block_string.rb +47 -0
- data/lib/graphql/language/document_from_schema_definition.rb +280 -0
- data/lib/graphql/language/generation.rb +3 -182
- data/lib/graphql/language/lexer.rb +144 -69
- data/lib/graphql/language/lexer.rl +15 -4
- data/lib/graphql/language/nodes.rb +141 -78
- data/lib/graphql/language/parser.rb +677 -630
- data/lib/graphql/language/parser.y +18 -12
- data/lib/graphql/language/printer.rb +361 -0
- data/lib/graphql/language/token.rb +10 -3
- data/lib/graphql/language.rb +3 -0
- data/lib/graphql/non_null_type.rb +1 -1
- data/lib/graphql/object_type.rb +1 -6
- data/lib/graphql/query/arguments.rb +63 -32
- data/lib/graphql/query/context.rb +32 -2
- data/lib/graphql/query/literal_input.rb +4 -1
- data/lib/graphql/query/null_context.rb +1 -1
- data/lib/graphql/query/result.rb +1 -1
- data/lib/graphql/query/variables.rb +21 -3
- data/lib/graphql/query.rb +19 -6
- data/lib/graphql/railtie.rb +109 -0
- data/lib/graphql/relay/connection_resolve.rb +3 -0
- data/lib/graphql/relay/connection_type.rb +5 -3
- data/lib/graphql/relay/edge_type.rb +2 -1
- data/lib/graphql/relay/global_id_resolve.rb +5 -1
- data/lib/graphql/relay/mongo_relation_connection.rb +40 -0
- data/lib/graphql/relay/mutation/instrumentation.rb +1 -1
- data/lib/graphql/relay/mutation/resolve.rb +5 -1
- data/lib/graphql/relay/relation_connection.rb +14 -19
- data/lib/graphql/relay/type_extensions.rb +30 -0
- data/lib/graphql/relay.rb +2 -0
- data/lib/graphql/scalar_type.rb +14 -2
- data/lib/graphql/schema/argument.rb +92 -0
- data/lib/graphql/schema/build_from_definition.rb +64 -18
- data/lib/graphql/schema/enum.rb +85 -0
- data/lib/graphql/schema/enum_value.rb +74 -0
- data/lib/graphql/schema/field.rb +372 -0
- data/lib/graphql/schema/finder.rb +153 -0
- data/lib/graphql/schema/input_object.rb +87 -0
- data/lib/graphql/schema/interface.rb +105 -0
- data/lib/graphql/schema/introspection_system.rb +93 -0
- data/lib/graphql/schema/late_bound_type.rb +32 -0
- data/lib/graphql/schema/list.rb +32 -0
- data/lib/graphql/schema/loader.rb +2 -2
- data/lib/graphql/schema/member/accepts_definition.rb +152 -0
- data/lib/graphql/schema/member/base_dsl_methods.rb +100 -0
- data/lib/graphql/schema/member/build_type.rb +137 -0
- data/lib/graphql/schema/member/cached_graphql_definition.rb +26 -0
- data/lib/graphql/schema/member/graphql_type_names.rb +21 -0
- data/lib/graphql/schema/member/has_arguments.rb +50 -0
- data/lib/graphql/schema/member/has_fields.rb +130 -0
- data/lib/graphql/schema/member/instrumentation.rb +115 -0
- data/lib/graphql/schema/member/type_system_helpers.rb +34 -0
- data/lib/graphql/schema/member.rb +28 -0
- data/lib/graphql/schema/middleware_chain.rb +5 -1
- data/lib/graphql/schema/mutation.rb +138 -0
- data/lib/graphql/schema/non_null.rb +38 -0
- data/lib/graphql/schema/object.rb +81 -0
- data/lib/graphql/schema/printer.rb +33 -266
- data/lib/graphql/schema/relay_classic_mutation.rb +87 -0
- data/lib/graphql/schema/rescue_middleware.rb +8 -7
- data/lib/graphql/schema/resolver.rb +122 -0
- data/lib/graphql/schema/scalar.rb +35 -0
- data/lib/graphql/schema/traversal.rb +102 -22
- data/lib/graphql/schema/union.rb +36 -0
- data/lib/graphql/schema/validation.rb +3 -2
- data/lib/graphql/schema.rb +381 -12
- data/lib/graphql/static_validation/definition_dependencies.rb +1 -1
- data/lib/graphql/static_validation/literal_validator.rb +16 -4
- data/lib/graphql/static_validation/rules/fields_are_defined_on_type.rb +6 -6
- data/lib/graphql/static_validation/rules/fields_have_appropriate_selections.rb +5 -1
- data/lib/graphql/static_validation/rules/fields_will_merge.rb +15 -8
- data/lib/graphql/static_validation/rules/variables_are_used_and_defined.rb +11 -1
- data/lib/graphql/static_validation/validation_context.rb +1 -1
- data/lib/graphql/subscriptions/action_cable_subscriptions.rb +7 -5
- data/lib/graphql/subscriptions/instrumentation.rb +5 -1
- data/lib/graphql/subscriptions/serialize.rb +2 -0
- data/lib/graphql/subscriptions.rb +90 -16
- data/lib/graphql/tracing/data_dog_tracing.rb +49 -0
- data/lib/graphql/tracing/new_relic_tracing.rb +26 -0
- data/lib/graphql/tracing/platform_tracing.rb +20 -7
- data/lib/graphql/tracing/scout_tracing.rb +2 -2
- data/lib/graphql/tracing.rb +1 -0
- data/lib/graphql/unresolved_type_error.rb +3 -2
- data/lib/graphql/upgrader/member.rb +894 -0
- data/lib/graphql/upgrader/schema.rb +37 -0
- data/lib/graphql/version.rb +1 -1
- data/lib/graphql.rb +5 -25
- data/readme.md +2 -2
- data/spec/dummy/app/channels/graphql_channel.rb +23 -2
- data/spec/dummy/log/development.log +239 -0
- data/spec/dummy/log/test.log +410 -0
- data/spec/dummy/test/system/action_cable_subscription_test.rb +4 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-x/-xYZjAnuuzgR79fcznLTQtSdh6AARxu8FcQ_J6p7L3U.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/13/13HiV12xyoQvT-1L39ZzLwMZxjyaGMiENmfw7f-QTIc.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/3W/3Wtf5pCWdqq0AB-iB0Y9uUNrTkruRxIEf1XFn_BETU0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5i/5iguGafb4hOn8262Kn8Q37ogNN9MxxQKGKNzHAzUcvI.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8m/8mj2T6yy847Mc2Z7k3Xzh8O91hhVJt3NrPe8ASNDlIA.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/DT/DTQyMpr4ABZYQetsdRJ5A7S4jf1r3ie4FGOR7GZBNSs.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Dq/DqJ5_yJPrP5iLlOQyTQsjAVI5FE5LCVDkED0f7GgsSo.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/F8/F8MUNRzORGFgr329fNM0xLaoWCXdv3BIalT7dsvLfjs.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/KB/KB07ZaKNC5uXJ7TjLi-WqnY6g7dq8wWp_8N3HNjBNxg.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Rw/RwDuCV-XpnCtjNkvhpJfBuxXMk0b5AD3L9eR6M-wcy0.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/UL/ULdjhhb0bRuqmaG7XSZlFYzGYCXTDnqZuJBTWRlzqgw.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Up/UpPNgh0yYoUsyMDh5zWqe_U6qJIyTC6-dxMMAs1vvlM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Wg/Wguh-szFGTI1gaL6npYwPekMXflugRei7F_mOyRucXg.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/X-/X-khLYMA9mqFRPg3zAi86mREDxpKl4bdKYp3uF6WHos.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/bi/BIkdhfxsezxM4q-HZ4oCNTq97WEJTigcq0tpX2cDvbY.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ff/FfxmA4CMHQZT7exx0G7NS1Wpcnny0vzp-Jhc2H36bp8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/gE/gEiiG4GZNy_djEjK2pHm_NgA-gyhLZhdQvo0Yt96GqE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/gn/gnA9ZSqpjccNL2m8pe_jBvY6SinXlCzXDWyop83Od8s.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lO/lOAan3cMwCE_Hli6gsDML88xFNfn0nxPmvrSkW7eEOw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/m1/M1pv8MJEPLXGLvS8QxVh3DSO9cI4mRt5FHFWdrvUj6o.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/m7/m77qH7ZqH0_0SmwJbiKGDd-aLau1Dav847DC6ge46zY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sj/sjRjnjRB37lH2vrgtkdJ8Cz84__IJ978IuKTM7HcztI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/um/um1JrirR4hJhK-1rE-HywlyCi5ibgxHVrReiujZBWJM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/v4/v4fwVytD7ITcE0_GDbslZEYud8a5Okm85fV1o7SDl6g.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/v_/v_0PAQt0iipQjFP5zjgkkk9Stnpf4VzvnMv67d1Keuw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wd/wdT9U4MKxe1PyqNjVuCKMpCl3dxGCIRJIlwUTfh2DQU.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xI/xIaxut_fEIhKBDqljTNwYaADK9kj3gG0ESrfHs-5_og.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/y0/y0SJOqIx2fn1SKqOkAihsQow0trRJrSIyAswufVuoA8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/zg/zgpzeaX-KZErHyGJ1aBH3ZusweNXMneVZule88XsIJI.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/zy/zYFltDy-8VC-uKq2BVEiJJyYXNFvVzAKuMlR3ZIYZsk.cache +0 -0
- data/spec/dummy/tmp/screenshots/failures_test_it_handles_subscriptions.png +0 -0
- data/spec/fixtures/upgrader/account.original.rb +19 -0
- data/spec/fixtures/upgrader/account.transformed.rb +20 -0
- data/spec/fixtures/upgrader/blame_range.original.rb +43 -0
- data/spec/fixtures/upgrader/blame_range.transformed.rb +30 -0
- data/spec/fixtures/upgrader/date_time.original.rb +24 -0
- data/spec/fixtures/upgrader/date_time.transformed.rb +23 -0
- data/spec/fixtures/upgrader/delete_project.original.rb +28 -0
- data/spec/fixtures/upgrader/delete_project.transformed.rb +27 -0
- data/spec/fixtures/upgrader/gist_order_field.original.rb +14 -0
- data/spec/fixtures/upgrader/gist_order_field.transformed.rb +13 -0
- data/spec/fixtures/upgrader/increment_count.original.rb +59 -0
- data/spec/fixtures/upgrader/increment_count.transformed.rb +50 -0
- data/spec/fixtures/upgrader/photo.original.rb +10 -0
- data/spec/fixtures/upgrader/photo.transformed.rb +12 -0
- data/spec/fixtures/upgrader/release_order.original.rb +15 -0
- data/spec/fixtures/upgrader/release_order.transformed.rb +14 -0
- data/spec/fixtures/upgrader/starrable.original.rb +49 -0
- data/spec/fixtures/upgrader/starrable.transformed.rb +46 -0
- data/spec/fixtures/upgrader/subscribable.original.rb +55 -0
- data/spec/fixtures/upgrader/subscribable.transformed.rb +51 -0
- data/spec/fixtures/upgrader/type_x.original.rb +65 -0
- data/spec/fixtures/upgrader/type_x.transformed.rb +56 -0
- data/spec/generators/graphql/function_generator_spec.rb +26 -0
- data/spec/generators/graphql/install_generator_spec.rb +1 -1
- data/spec/generators/graphql/loader_generator_spec.rb +24 -0
- data/spec/graphql/analysis/max_query_complexity_spec.rb +3 -3
- data/spec/graphql/analysis/max_query_depth_spec.rb +3 -3
- data/spec/graphql/argument_spec.rb +21 -0
- data/spec/graphql/backtrace_spec.rb +10 -0
- data/spec/graphql/base_type_spec.rb +42 -0
- data/spec/graphql/boolean_type_spec.rb +3 -3
- data/spec/graphql/directive_spec.rb +3 -1
- data/spec/graphql/enum_type_spec.rb +18 -5
- data/spec/graphql/execution/execute_spec.rb +4 -4
- data/spec/graphql/execution/instrumentation_spec.rb +165 -0
- data/spec/graphql/execution/multiplex_spec.rb +2 -2
- data/spec/graphql/execution_error_spec.rb +18 -0
- data/spec/graphql/float_type_spec.rb +2 -2
- data/spec/graphql/id_type_spec.rb +1 -1
- data/spec/graphql/input_object_type_spec.rb +15 -2
- data/spec/graphql/int_type_spec.rb +2 -2
- data/spec/graphql/interface_type_spec.rb +12 -0
- data/spec/graphql/internal_representation/rewrite_spec.rb +2 -2
- data/spec/graphql/introspection/schema_type_spec.rb +2 -0
- data/spec/graphql/language/block_string_spec.rb +70 -0
- data/spec/graphql/language/document_from_schema_definition_spec.rb +770 -0
- data/spec/graphql/language/generation_spec.rb +21 -186
- data/spec/graphql/language/lexer_spec.rb +21 -1
- data/spec/graphql/language/nodes_spec.rb +21 -12
- data/spec/graphql/language/parser_spec.rb +1 -1
- data/spec/graphql/language/printer_spec.rb +203 -0
- data/spec/graphql/object_type_spec.rb +22 -0
- data/spec/graphql/query/arguments_spec.rb +25 -15
- data/spec/graphql/query/context_spec.rb +18 -0
- data/spec/graphql/query/executor_spec.rb +2 -1
- data/spec/graphql/query/serial_execution/value_resolution_spec.rb +2 -8
- data/spec/graphql/query/variables_spec.rb +42 -1
- data/spec/graphql/query_spec.rb +31 -5
- data/spec/graphql/rake_task_spec.rb +3 -1
- data/spec/graphql/relay/base_connection_spec.rb +1 -1
- data/spec/graphql/relay/connection_instrumentation_spec.rb +2 -2
- data/spec/graphql/relay/connection_resolve_spec.rb +1 -1
- data/spec/graphql/relay/connection_type_spec.rb +1 -1
- data/spec/graphql/relay/mongo_relation_connection_spec.rb +474 -0
- data/spec/graphql/relay/mutation_spec.rb +9 -7
- data/spec/graphql/relay/range_add_spec.rb +5 -1
- data/spec/graphql/relay/relation_connection_spec.rb +65 -1
- data/spec/graphql/schema/argument_spec.rb +87 -0
- data/spec/graphql/schema/build_from_definition_spec.rb +89 -5
- data/spec/graphql/schema/enum_spec.rb +74 -0
- data/spec/graphql/schema/field_spec.rb +225 -0
- data/spec/graphql/schema/finder_spec.rb +135 -0
- data/spec/graphql/schema/input_object_spec.rb +111 -0
- data/spec/graphql/schema/instrumentation_spec.rb +40 -0
- data/spec/graphql/schema/interface_spec.rb +185 -0
- data/spec/graphql/schema/introspection_system_spec.rb +39 -0
- data/spec/graphql/schema/member/accepts_definition_spec.rb +111 -0
- data/spec/graphql/schema/member/build_type_spec.rb +17 -0
- data/spec/graphql/schema/member/has_fields_spec.rb +129 -0
- data/spec/graphql/schema/member/type_system_helpers_spec.rb +63 -0
- data/spec/graphql/schema/mutation_spec.rb +148 -0
- data/spec/graphql/schema/object_spec.rb +175 -0
- data/spec/graphql/schema/printer_spec.rb +111 -15
- data/spec/graphql/schema/relay_classic_mutation_spec.rb +38 -0
- data/spec/graphql/schema/rescue_middleware_spec.rb +11 -0
- data/spec/graphql/schema/resolver_spec.rb +131 -0
- data/spec/graphql/schema/scalar_spec.rb +95 -0
- data/spec/graphql/schema/traversal_spec.rb +31 -0
- data/spec/graphql/schema/union_spec.rb +65 -0
- data/spec/graphql/schema/validation_spec.rb +1 -1
- data/spec/graphql/schema/warden_spec.rb +11 -11
- data/spec/graphql/schema_spec.rb +55 -12
- data/spec/graphql/static_validation/rules/fields_have_appropriate_selections_spec.rb +10 -2
- data/spec/graphql/static_validation/rules/fields_will_merge_spec.rb +2 -2
- data/spec/graphql/string_type_spec.rb +3 -3
- data/spec/graphql/subscriptions_spec.rb +273 -184
- data/spec/graphql/tracing/active_support_notifications_tracing_spec.rb +1 -1
- data/spec/graphql/tracing/new_relic_tracing_spec.rb +47 -0
- data/spec/graphql/tracing/platform_tracing_spec.rb +60 -1
- data/spec/graphql/union_type_spec.rb +1 -1
- data/spec/graphql/upgrader/member_spec.rb +516 -0
- data/spec/graphql/upgrader/schema_spec.rb +82 -0
- data/spec/spec_helper.rb +8 -0
- data/spec/support/dummy/schema.rb +53 -24
- data/spec/support/jazz.rb +544 -0
- data/spec/support/lazy_helpers.rb +21 -23
- data/spec/support/new_relic.rb +24 -0
- data/spec/support/star_trek/data.rb +109 -0
- data/spec/support/star_trek/schema.rb +388 -0
- data/spec/support/star_wars/data.rb +6 -7
- data/spec/support/star_wars/schema.rb +127 -171
- metadata +233 -11
- data/lib/graphql/introspection/arguments_field.rb +0 -7
- data/lib/graphql/introspection/enum_values_field.rb +0 -18
- data/lib/graphql/introspection/fields_field.rb +0 -13
- data/lib/graphql/introspection/input_fields_field.rb +0 -12
- data/lib/graphql/introspection/interfaces_field.rb +0 -11
- data/lib/graphql/introspection/of_type_field.rb +0 -6
- data/lib/graphql/introspection/possible_types_field.rb +0 -11
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module GraphQL
|
4
|
+
module Upgrader
|
5
|
+
class Schema
|
6
|
+
def initialize(schema)
|
7
|
+
@schema = schema
|
8
|
+
end
|
9
|
+
|
10
|
+
def upgrade
|
11
|
+
transformable = schema.dup
|
12
|
+
|
13
|
+
transformable.sub!(
|
14
|
+
/([a-zA-Z_0-9]*) = GraphQL::Schema\.define do/, 'class \1 < GraphQL::Schema'
|
15
|
+
)
|
16
|
+
|
17
|
+
transformable.sub!(
|
18
|
+
/object_from_id ->\s?\((.*)\) do/, 'def self.object_from_id(\1)'
|
19
|
+
)
|
20
|
+
|
21
|
+
transformable.sub!(
|
22
|
+
/resolve_type ->\s?\((.*)\) do/, 'def self.resolve_type(\1)'
|
23
|
+
)
|
24
|
+
|
25
|
+
transformable.sub!(
|
26
|
+
/id_from_object ->\s?\((.*)\) do/, 'def self.id_from_object(\1)'
|
27
|
+
)
|
28
|
+
|
29
|
+
transformable
|
30
|
+
end
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
attr_reader :schema
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
data/lib/graphql/version.rb
CHANGED
data/lib/graphql.rb
CHANGED
@@ -3,32 +3,10 @@ require "delegate"
|
|
3
3
|
require "json"
|
4
4
|
require "set"
|
5
5
|
require "singleton"
|
6
|
+
require "forwardable"
|
7
|
+
require_relative "./graphql/railtie" if defined? Rails::Railtie
|
6
8
|
|
7
9
|
module GraphQL
|
8
|
-
if RUBY_VERSION == "2.4.0"
|
9
|
-
# Ruby stdlib was pretty busted until this fix:
|
10
|
-
# https://bugs.ruby-lang.org/issues/13111
|
11
|
-
# https://github.com/ruby/ruby/commit/46c0e79bb5b96c45c166ef62f8e585f528862abb#diff-43adf0e587a50dbaf51764a262008d40
|
12
|
-
module Delegate
|
13
|
-
def def_delegators(accessor, *method_names)
|
14
|
-
method_names.each do |method_name|
|
15
|
-
class_eval <<-RUBY
|
16
|
-
def #{method_name}(*args)
|
17
|
-
if block_given?
|
18
|
-
#{accessor}.#{method_name}(*args, &Proc.new)
|
19
|
-
else
|
20
|
-
#{accessor}.#{method_name}(*args)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
RUBY
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
else
|
28
|
-
require "forwardable"
|
29
|
-
Delegate = Forwardable
|
30
|
-
end
|
31
|
-
|
32
10
|
class Error < StandardError
|
33
11
|
end
|
34
12
|
|
@@ -89,7 +67,6 @@ require "graphql/string_type"
|
|
89
67
|
require "graphql/directive"
|
90
68
|
require "graphql/name_validator"
|
91
69
|
|
92
|
-
require "graphql/introspection"
|
93
70
|
require "graphql/language"
|
94
71
|
require "graphql/analysis"
|
95
72
|
require "graphql/tracing"
|
@@ -98,6 +75,7 @@ require "graphql/relay"
|
|
98
75
|
require "graphql/schema"
|
99
76
|
require "graphql/schema/loader"
|
100
77
|
require "graphql/schema/printer"
|
78
|
+
require "graphql/introspection"
|
101
79
|
|
102
80
|
require "graphql/analysis_error"
|
103
81
|
require "graphql/coercion_error"
|
@@ -116,3 +94,5 @@ require "graphql/filter"
|
|
116
94
|
require "graphql/subscriptions"
|
117
95
|
require "graphql/parse_error"
|
118
96
|
require "graphql/backtrace"
|
97
|
+
|
98
|
+
require "graphql/deprecated_dsl"
|
data/readme.md
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
A Ruby implementation of [GraphQL](http://graphql.org/).
|
10
10
|
|
11
11
|
- [Website](https://rmosolgo.github.io/graphql-ruby)
|
12
|
-
- [API Documentation](http://www.rubydoc.info/
|
12
|
+
- [API Documentation](http://www.rubydoc.info/gems/graphql)
|
13
13
|
- [Newsletter](https://tinyletter.com/graphql-ruby)
|
14
14
|
|
15
15
|
## Installation
|
@@ -37,7 +37,7 @@ Or, see ["Getting Started"](https://rmosolgo.github.io/graphql-ruby/).
|
|
37
37
|
|
38
38
|
## Upgrade
|
39
39
|
|
40
|
-
I also sell [GraphQL::Pro](http://graphql.pro) which provides several features on top of the GraphQL runtime, including [authorization](http://rmosolgo.github.io/graphql-ruby/pro/authorization), [
|
40
|
+
I also sell [GraphQL::Pro](http://graphql.pro) which provides several features on top of the GraphQL runtime, including [authorization](http://rmosolgo.github.io/graphql-ruby/pro/authorization), [Pusher-based subscriptions](http://graphql-ruby.org/subscriptions/pusher_implementation) and [persisted queries](http://rmosolgo.github.io/graphql-ruby/operation_store/overview). Besides that, Pro customers get email support and an opportunity to support graphql-ruby's development!
|
41
41
|
|
42
42
|
## Goals
|
43
43
|
|
@@ -17,10 +17,31 @@ class GraphqlChannel < ActionCable::Channel::Base
|
|
17
17
|
field :value, types.Int
|
18
18
|
end
|
19
19
|
|
20
|
-
|
20
|
+
# Wacky behavior around the number 4
|
21
|
+
# so we can confirm it's used by the UI
|
22
|
+
module CustomSerializer
|
23
|
+
def self.load(value)
|
24
|
+
if value == "4x"
|
25
|
+
ExamplePayload.new(400)
|
26
|
+
else
|
27
|
+
GraphQL::Subscriptions::Serialize.load(value)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.dump(obj)
|
32
|
+
if obj.is_a?(ExamplePayload) && obj.value == 4
|
33
|
+
"4x"
|
34
|
+
else
|
35
|
+
GraphQL::Subscriptions::Serialize.dump(obj)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
class GraphQLSchema < GraphQL::Schema
|
21
41
|
query(QueryType)
|
22
42
|
subscription(SubscriptionType)
|
23
|
-
use GraphQL::Subscriptions::ActionCableSubscriptions
|
43
|
+
use GraphQL::Subscriptions::ActionCableSubscriptions,
|
44
|
+
serializer: CustomSerializer
|
24
45
|
end
|
25
46
|
|
26
47
|
def subscribed
|
@@ -358,3 +358,242 @@ GraphqlChannel#make_trigger({"id"=>"updates-2", "value"=>5})
|
|
358
358
|
[ActionCable] Broadcasting to graphql-event::payload:id:updates-2: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzU\"}"
|
359
359
|
[ActionCable] Broadcasting to graphql-subscription:c2334c1a-d146-4b1c-90d9-9cb1c7b4046d: {:result=>{"data"=>{"payload"=>{"value"=>5}}}, :more=>true}
|
360
360
|
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>5}}}, "more"=>true} (via streamed from graphql-subscription:c2334c1a-d146-4b1c-90d9-9cb1c7b4046d)
|
361
|
+
Started GET "/" for 127.0.0.1 at 2017-11-16 21:27:24 -0500
|
362
|
+
Processing by PagesController#show as HTML
|
363
|
+
Rendering pages/show.html within layouts/application
|
364
|
+
Rendered pages/show.html within layouts/application (0.8ms)
|
365
|
+
Completed 200 OK in 173ms (Views: 171.5ms)
|
366
|
+
|
367
|
+
|
368
|
+
Started GET "/assets/application-aca150c4b2db51d5326af18134f6281fbce7e823a372b0337cca65ff41b4a7ea.js" for 127.0.0.1 at 2017-11-16 21:27:24 -0500
|
369
|
+
Started GET "/cable" for 127.0.0.1 at 2017-11-16 21:27:24 -0500
|
370
|
+
Started GET "/cable/" [WebSocket] for 127.0.0.1 at 2017-11-16 21:27:24 -0500
|
371
|
+
Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)
|
372
|
+
GraphqlChannel is transmitting the subscription confirmation
|
373
|
+
GraphqlChannel is transmitting the subscription confirmation
|
374
|
+
GraphqlChannel#execute({"query"=>"subscription($id: ID!) { payload(id: $id) { value } }", "variables"=>{"id"=>"updates-2"}})
|
375
|
+
GraphqlChannel transmitting {:result=>{"data"=>nil}, :more=>true}
|
376
|
+
GraphqlChannel is streaming from graphql-subscription:34ad7c3f-9311-4982-b873-312032bbcd76
|
377
|
+
GraphqlChannel#execute({"query"=>"subscription($id: ID!) { payload(id: $id) { value } }", "variables"=>{"id"=>"updates-1"}})
|
378
|
+
GraphqlChannel transmitting {:result=>{"data"=>nil}, :more=>true}
|
379
|
+
GraphqlChannel is streaming from graphql-event::payload:id:updates-2
|
380
|
+
GraphqlChannel is streaming from graphql-subscription:73055d69-7575-4caa-88b7-74e1a1070c0d
|
381
|
+
GraphqlChannel is streaming from graphql-event::payload:id:updates-1
|
382
|
+
GraphqlChannel#make_trigger({"id"=>"updates-1", "value"=>1})
|
383
|
+
Could not execute command from ({"command"=>"message", "identifier"=>"{\"channel\":\"GraphqlChannel\",\"id\":\"15fc7cd712b\"}", "data"=>"{\"id\":\"updates-1\",\"value\":1,\"action\":\"make_trigger\"}"}) [NoMethodError - undefined method `dump_value' for GraphqlChannel::CustomSerializer:Module]: /Users/rmosolgo/code/graphql-ruby/lib/graphql/subscriptions/serialize.rb:21:in `dump' | /Users/rmosolgo/code/graphql-ruby/spec/dummy/app/channels/graphql_channel.rb:36:in `dump' | /Users/rmosolgo/code/graphql-ruby/lib/graphql/subscriptions/action_cable_subscriptions.rb:78:in `execute_all' | /Users/rmosolgo/code/graphql-ruby/lib/graphql/subscriptions.rb:52:in `trigger' | /Users/rmosolgo/code/graphql-ruby/spec/dummy/app/channels/graphql_channel.rb:83:in `make_trigger'
|
384
|
+
Started GET "/" for 127.0.0.1 at 2017-11-16 21:28:22 -0500
|
385
|
+
Processing by PagesController#show as HTML
|
386
|
+
Rendering pages/show.html within layouts/application
|
387
|
+
Rendered pages/show.html within layouts/application (0.6ms)
|
388
|
+
Completed 200 OK in 166ms (Views: 164.8ms)
|
389
|
+
|
390
|
+
|
391
|
+
Started GET "/cable" for 127.0.0.1 at 2017-11-16 21:28:23 -0500
|
392
|
+
Started GET "/cable/" [WebSocket] for 127.0.0.1 at 2017-11-16 21:28:23 -0500
|
393
|
+
Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)
|
394
|
+
GraphqlChannel is transmitting the subscription confirmation
|
395
|
+
GraphqlChannel is transmitting the subscription confirmation
|
396
|
+
GraphqlChannel#execute({"query"=>"subscription($id: ID!) { payload(id: $id) { value } }", "variables"=>{"id"=>"updates-2"}})
|
397
|
+
GraphqlChannel transmitting {:result=>{"data"=>nil}, :more=>true}
|
398
|
+
GraphqlChannel#execute({"query"=>"subscription($id: ID!) { payload(id: $id) { value } }", "variables"=>{"id"=>"updates-1"}})
|
399
|
+
GraphqlChannel is streaming from graphql-subscription:dee02509-90a6-4ac1-8c1d-c765cb445ddd
|
400
|
+
GraphqlChannel transmitting {:result=>{"data"=>nil}, :more=>true}
|
401
|
+
GraphqlChannel is streaming from graphql-event::payload:id:updates-2
|
402
|
+
GraphqlChannel is streaming from graphql-subscription:0f50c340-d3cd-4ab7-8e6a-055d23083185
|
403
|
+
GraphqlChannel is streaming from graphql-event::payload:id:updates-1
|
404
|
+
GraphqlChannel#make_trigger({"id"=>"updates-1", "value"=>1})
|
405
|
+
Could not execute command from ({"command"=>"message", "identifier"=>"{\"channel\":\"GraphqlChannel\",\"id\":\"15fc7cf7d8b\"}", "data"=>"{\"id\":\"updates-1\",\"value\":1,\"action\":\"make_trigger\"}"}) [NameError - undefined local variable or method `value' for GraphqlChannel::CustomSerializer:Module]: /Users/rmosolgo/code/graphql-ruby/spec/dummy/app/channels/graphql_channel.rb:35:in `dump' | /Users/rmosolgo/code/graphql-ruby/lib/graphql/subscriptions/action_cable_subscriptions.rb:78:in `execute_all' | /Users/rmosolgo/code/graphql-ruby/lib/graphql/subscriptions.rb:52:in `trigger' | /Users/rmosolgo/code/graphql-ruby/spec/dummy/app/channels/graphql_channel.rb:82:in `make_trigger' | /Users/rmosolgo/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/actioncable-5.1.4/lib/action_cable/channel/base.rb:262:in `public_send'
|
406
|
+
Started GET "/" for 127.0.0.1 at 2017-11-16 21:28:40 -0500
|
407
|
+
Processing by PagesController#show as HTML
|
408
|
+
Rendering pages/show.html within layouts/application
|
409
|
+
Rendered pages/show.html within layouts/application (0.6ms)
|
410
|
+
Completed 200 OK in 11ms (Views: 8.8ms)
|
411
|
+
|
412
|
+
|
413
|
+
Started GET "/cable" for 127.0.0.1 at 2017-11-16 21:28:40 -0500
|
414
|
+
Started GET "/cable/" [WebSocket] for 127.0.0.1 at 2017-11-16 21:28:40 -0500
|
415
|
+
Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)
|
416
|
+
GraphqlChannel is transmitting the subscription confirmation
|
417
|
+
GraphqlChannel is transmitting the subscription confirmation
|
418
|
+
GraphqlChannel#execute({"query"=>"subscription($id: ID!) { payload(id: $id) { value } }", "variables"=>{"id"=>"updates-2"}})
|
419
|
+
GraphqlChannel transmitting {:result=>{"data"=>nil}, :more=>true}
|
420
|
+
GraphqlChannel is streaming from graphql-subscription:528198ff-21c1-4051-a319-1feb9060f335
|
421
|
+
GraphqlChannel is streaming from graphql-event::payload:id:updates-2
|
422
|
+
GraphqlChannel#execute({"query"=>"subscription($id: ID!) { payload(id: $id) { value } }", "variables"=>{"id"=>"updates-1"}})
|
423
|
+
GraphqlChannel transmitting {:result=>{"data"=>nil}, :more=>true}
|
424
|
+
GraphqlChannel is streaming from graphql-event::payload:id:updates-1
|
425
|
+
GraphqlChannel is streaming from graphql-subscription:dba8445d-3284-4734-90f6-fdf8f0707a50
|
426
|
+
GraphqlChannel#make_trigger({"id"=>"updates-1", "value"=>1})
|
427
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-1: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzE\"}"
|
428
|
+
[ActionCable] Broadcasting to graphql-subscription:dba8445d-3284-4734-90f6-fdf8f0707a50: {:result=>{"data"=>{"payload"=>{"value"=>1}}}, :more=>true}
|
429
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>1}}}, "more"=>true} (via streamed from graphql-subscription:dba8445d-3284-4734-90f6-fdf8f0707a50)
|
430
|
+
GraphqlChannel#make_trigger({"id"=>"updates-1", "value"=>2})
|
431
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-1: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzI\"}"
|
432
|
+
[ActionCable] Broadcasting to graphql-subscription:dba8445d-3284-4734-90f6-fdf8f0707a50: {:result=>{"data"=>{"payload"=>{"value"=>2}}}, :more=>true}
|
433
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>2}}}, "more"=>true} (via streamed from graphql-subscription:dba8445d-3284-4734-90f6-fdf8f0707a50)
|
434
|
+
GraphqlChannel#make_trigger({"id"=>"updates-1", "value"=>3})
|
435
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-1: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzM\"}"
|
436
|
+
[ActionCable] Broadcasting to graphql-subscription:dba8445d-3284-4734-90f6-fdf8f0707a50: {:result=>{"data"=>{"payload"=>{"value"=>3}}}, :more=>true}
|
437
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>3}}}, "more"=>true} (via streamed from graphql-subscription:dba8445d-3284-4734-90f6-fdf8f0707a50)
|
438
|
+
GraphqlChannel#make_trigger({"id"=>"updates-1", "value"=>4})
|
439
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-1: "4x"
|
440
|
+
[ActionCable] Broadcasting to graphql-subscription:dba8445d-3284-4734-90f6-fdf8f0707a50: {:result=>{"data"=>{"payload"=>{"value"=>4}}}, :more=>true}
|
441
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>4}}}, "more"=>true} (via streamed from graphql-subscription:dba8445d-3284-4734-90f6-fdf8f0707a50)
|
442
|
+
GraphqlChannel#make_trigger({"id"=>"updates-1", "value"=>5})
|
443
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-1: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzU\"}"
|
444
|
+
[ActionCable] Broadcasting to graphql-subscription:dba8445d-3284-4734-90f6-fdf8f0707a50: {:result=>{"data"=>{"payload"=>{"value"=>5}}}, :more=>true}
|
445
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>5}}}, "more"=>true} (via streamed from graphql-subscription:dba8445d-3284-4734-90f6-fdf8f0707a50)
|
446
|
+
Started GET "/" for 127.0.0.1 at 2017-11-16 21:29:15 -0500
|
447
|
+
Processing by PagesController#show as HTML
|
448
|
+
Rendering pages/show.html within layouts/application
|
449
|
+
Rendered pages/show.html within layouts/application (0.8ms)
|
450
|
+
Completed 200 OK in 178ms (Views: 176.8ms)
|
451
|
+
|
452
|
+
|
453
|
+
Started GET "/cable" for 127.0.0.1 at 2017-11-16 21:29:15 -0500
|
454
|
+
Started GET "/cable/" [WebSocket] for 127.0.0.1 at 2017-11-16 21:29:15 -0500
|
455
|
+
Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)
|
456
|
+
GraphqlChannel is transmitting the subscription confirmation
|
457
|
+
GraphqlChannel is transmitting the subscription confirmation
|
458
|
+
GraphqlChannel#execute({"query"=>"subscription($id: ID!) { payload(id: $id) { value } }", "variables"=>{"id"=>"updates-1"}})
|
459
|
+
GraphqlChannel transmitting {:result=>{"data"=>nil}, :more=>true}
|
460
|
+
GraphqlChannel#execute({"query"=>"subscription($id: ID!) { payload(id: $id) { value } }", "variables"=>{"id"=>"updates-2"}})
|
461
|
+
GraphqlChannel is streaming from graphql-event::payload:id:updates-1
|
462
|
+
GraphqlChannel transmitting {:result=>{"data"=>nil}, :more=>true}
|
463
|
+
GraphqlChannel is streaming from graphql-subscription:ac17fc47-fdf3-4951-813b-f4d04fdc7847
|
464
|
+
GraphqlChannel is streaming from graphql-event::payload:id:updates-2
|
465
|
+
GraphqlChannel is streaming from graphql-subscription:8642d019-1a8c-4eb9-ada2-7a5b1ccffeee
|
466
|
+
GraphqlChannel#make_trigger({"id"=>"updates-1", "value"=>1})
|
467
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-1: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzE\"}"
|
468
|
+
[ActionCable] Broadcasting to graphql-subscription:ac17fc47-fdf3-4951-813b-f4d04fdc7847: {:result=>{"data"=>{"payload"=>{"value"=>1}}}, :more=>true}
|
469
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>1}}}, "more"=>true} (via streamed from graphql-subscription:ac17fc47-fdf3-4951-813b-f4d04fdc7847)
|
470
|
+
GraphqlChannel#make_trigger({"id"=>"updates-1", "value"=>2})
|
471
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-1: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzI\"}"
|
472
|
+
[ActionCable] Broadcasting to graphql-subscription:ac17fc47-fdf3-4951-813b-f4d04fdc7847: {:result=>{"data"=>{"payload"=>{"value"=>2}}}, :more=>true}
|
473
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>2}}}, "more"=>true} (via streamed from graphql-subscription:ac17fc47-fdf3-4951-813b-f4d04fdc7847)
|
474
|
+
GraphqlChannel#make_trigger({"id"=>"updates-1", "value"=>3})
|
475
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-1: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzM\"}"
|
476
|
+
[ActionCable] Broadcasting to graphql-subscription:ac17fc47-fdf3-4951-813b-f4d04fdc7847: {:result=>{"data"=>{"payload"=>{"value"=>3}}}, :more=>true}
|
477
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>3}}}, "more"=>true} (via streamed from graphql-subscription:ac17fc47-fdf3-4951-813b-f4d04fdc7847)
|
478
|
+
GraphqlChannel#make_trigger({"id"=>"updates-1", "value"=>4})
|
479
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-1: "4x"
|
480
|
+
[ActionCable] Broadcasting to graphql-subscription:ac17fc47-fdf3-4951-813b-f4d04fdc7847: {:result=>{"data"=>{"payload"=>{"value"=>4}}}, :more=>true}
|
481
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>4}}}, "more"=>true} (via streamed from graphql-subscription:ac17fc47-fdf3-4951-813b-f4d04fdc7847)
|
482
|
+
GraphqlChannel#make_trigger({"id"=>"updates-1", "value"=>5})
|
483
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-1: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzU\"}"
|
484
|
+
[ActionCable] Broadcasting to graphql-subscription:ac17fc47-fdf3-4951-813b-f4d04fdc7847: {:result=>{"data"=>{"payload"=>{"value"=>5}}}, :more=>true}
|
485
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>5}}}, "more"=>true} (via streamed from graphql-subscription:ac17fc47-fdf3-4951-813b-f4d04fdc7847)
|
486
|
+
GraphqlChannel#make_trigger({"id"=>"updates-1", "value"=>6})
|
487
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-1: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzY\"}"
|
488
|
+
[ActionCable] Broadcasting to graphql-subscription:ac17fc47-fdf3-4951-813b-f4d04fdc7847: {:result=>{"data"=>{"payload"=>{"value"=>6}}}, :more=>true}
|
489
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>6}}}, "more"=>true} (via streamed from graphql-subscription:ac17fc47-fdf3-4951-813b-f4d04fdc7847)
|
490
|
+
GraphqlChannel#make_trigger({"id"=>"updates-2", "value"=>1})
|
491
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-2: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzE\"}"
|
492
|
+
[ActionCable] Broadcasting to graphql-subscription:8642d019-1a8c-4eb9-ada2-7a5b1ccffeee: {:result=>{"data"=>{"payload"=>{"value"=>1}}}, :more=>true}
|
493
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>1}}}, "more"=>true} (via streamed from graphql-subscription:8642d019-1a8c-4eb9-ada2-7a5b1ccffeee)
|
494
|
+
GraphqlChannel#make_trigger({"id"=>"updates-2", "value"=>2})
|
495
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-2: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzI\"}"
|
496
|
+
[ActionCable] Broadcasting to graphql-subscription:8642d019-1a8c-4eb9-ada2-7a5b1ccffeee: {:result=>{"data"=>{"payload"=>{"value"=>2}}}, :more=>true}
|
497
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>2}}}, "more"=>true} (via streamed from graphql-subscription:8642d019-1a8c-4eb9-ada2-7a5b1ccffeee)
|
498
|
+
GraphqlChannel#make_trigger({"id"=>"updates-2", "value"=>3})
|
499
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-2: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzM\"}"
|
500
|
+
[ActionCable] Broadcasting to graphql-subscription:8642d019-1a8c-4eb9-ada2-7a5b1ccffeee: {:result=>{"data"=>{"payload"=>{"value"=>3}}}, :more=>true}
|
501
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>3}}}, "more"=>true} (via streamed from graphql-subscription:8642d019-1a8c-4eb9-ada2-7a5b1ccffeee)
|
502
|
+
GraphqlChannel#make_trigger({"id"=>"updates-2", "value"=>4})
|
503
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-2: "4x"
|
504
|
+
[ActionCable] Broadcasting to graphql-subscription:8642d019-1a8c-4eb9-ada2-7a5b1ccffeee: {:result=>{"data"=>{"payload"=>{"value"=>4}}}, :more=>true}
|
505
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>4}}}, "more"=>true} (via streamed from graphql-subscription:8642d019-1a8c-4eb9-ada2-7a5b1ccffeee)
|
506
|
+
Started GET "/" for 127.0.0.1 at 2017-11-16 21:30:10 -0500
|
507
|
+
Processing by PagesController#show as HTML
|
508
|
+
Rendering pages/show.html within layouts/application
|
509
|
+
Rendered pages/show.html within layouts/application (0.7ms)
|
510
|
+
Completed 200 OK in 12ms (Views: 10.1ms)
|
511
|
+
|
512
|
+
|
513
|
+
Started GET "/cable" for 127.0.0.1 at 2017-11-16 21:30:10 -0500
|
514
|
+
Started GET "/cable/" [WebSocket] for 127.0.0.1 at 2017-11-16 21:30:10 -0500
|
515
|
+
Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)
|
516
|
+
GraphqlChannel is transmitting the subscription confirmation
|
517
|
+
GraphqlChannel is transmitting the subscription confirmation
|
518
|
+
GraphqlChannel#execute({"query"=>"subscription($id: ID!) { payload(id: $id) { value } }", "variables"=>{"id"=>"updates-2"}})
|
519
|
+
GraphqlChannel transmitting {:result=>{"data"=>nil}, :more=>true}
|
520
|
+
GraphqlChannel#execute({"query"=>"subscription($id: ID!) { payload(id: $id) { value } }", "variables"=>{"id"=>"updates-1"}})
|
521
|
+
GraphqlChannel transmitting {:result=>{"data"=>nil}, :more=>true}
|
522
|
+
GraphqlChannel is streaming from graphql-subscription:e33017bd-68e0-4443-81b9-cb2b750d345e
|
523
|
+
GraphqlChannel is streaming from graphql-event::payload:id:updates-2
|
524
|
+
GraphqlChannel is streaming from graphql-subscription:ff9f5a68-c71c-4b5c-8135-cb902840a584
|
525
|
+
GraphqlChannel is streaming from graphql-event::payload:id:updates-1
|
526
|
+
GraphqlChannel#make_trigger({"id"=>"updates-1", "value"=>1})
|
527
|
+
dumping: #<GraphqlChannel::ExamplePayload:0x007fc09dee35f8>
|
528
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-1: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzE\"}"
|
529
|
+
Loading: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzE\"}"
|
530
|
+
[ActionCable] Broadcasting to graphql-subscription:ff9f5a68-c71c-4b5c-8135-cb902840a584: {:result=>{"data"=>{"payload"=>{"value"=>1}}}, :more=>true}
|
531
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>1}}}, "more"=>true} (via streamed from graphql-subscription:ff9f5a68-c71c-4b5c-8135-cb902840a584)
|
532
|
+
GraphqlChannel#make_trigger({"id"=>"updates-1", "value"=>2})
|
533
|
+
dumping: #<GraphqlChannel::ExamplePayload:0x007fc09deb3330>
|
534
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-1: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzI\"}"
|
535
|
+
Loading: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzI\"}"
|
536
|
+
[ActionCable] Broadcasting to graphql-subscription:ff9f5a68-c71c-4b5c-8135-cb902840a584: {:result=>{"data"=>{"payload"=>{"value"=>2}}}, :more=>true}
|
537
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>2}}}, "more"=>true} (via streamed from graphql-subscription:ff9f5a68-c71c-4b5c-8135-cb902840a584)
|
538
|
+
GraphqlChannel#make_trigger({"id"=>"updates-1", "value"=>3})
|
539
|
+
dumping: #<GraphqlChannel::ExamplePayload:0x007fc09de7b020>
|
540
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-1: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzM\"}"
|
541
|
+
Loading: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzM\"}"
|
542
|
+
[ActionCable] Broadcasting to graphql-subscription:ff9f5a68-c71c-4b5c-8135-cb902840a584: {:result=>{"data"=>{"payload"=>{"value"=>3}}}, :more=>true}
|
543
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>3}}}, "more"=>true} (via streamed from graphql-subscription:ff9f5a68-c71c-4b5c-8135-cb902840a584)
|
544
|
+
GraphqlChannel#make_trigger({"id"=>"updates-1", "value"=>4})
|
545
|
+
dumping: #<GraphqlChannel::ExamplePayload:0x007fc09de41f78>
|
546
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-1: "4x"
|
547
|
+
Loading: "4x"
|
548
|
+
[ActionCable] Broadcasting to graphql-subscription:ff9f5a68-c71c-4b5c-8135-cb902840a584: {:result=>{"data"=>{"payload"=>{"value"=>4}}}, :more=>true}
|
549
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>4}}}, "more"=>true} (via streamed from graphql-subscription:ff9f5a68-c71c-4b5c-8135-cb902840a584)
|
550
|
+
Started GET "/" for 127.0.0.1 at 2017-11-16 21:30:26 -0500
|
551
|
+
Processing by PagesController#show as HTML
|
552
|
+
Rendering pages/show.html within layouts/application
|
553
|
+
Rendered pages/show.html within layouts/application (0.3ms)
|
554
|
+
Completed 200 OK in 7ms (Views: 5.4ms)
|
555
|
+
|
556
|
+
|
557
|
+
Started GET "/cable" for 127.0.0.1 at 2017-11-16 21:30:27 -0500
|
558
|
+
Started GET "/cable/" [WebSocket] for 127.0.0.1 at 2017-11-16 21:30:27 -0500
|
559
|
+
Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)
|
560
|
+
GraphqlChannel is transmitting the subscription confirmation
|
561
|
+
GraphqlChannel is transmitting the subscription confirmation
|
562
|
+
GraphqlChannel#execute({"query"=>"subscription($id: ID!) { payload(id: $id) { value } }", "variables"=>{"id"=>"updates-2"}})
|
563
|
+
GraphqlChannel transmitting {:result=>{"data"=>nil}, :more=>true}
|
564
|
+
GraphqlChannel#execute({"query"=>"subscription($id: ID!) { payload(id: $id) { value } }", "variables"=>{"id"=>"updates-1"}})
|
565
|
+
GraphqlChannel is streaming from graphql-event::payload:id:updates-2
|
566
|
+
GraphqlChannel transmitting {:result=>{"data"=>nil}, :more=>true}
|
567
|
+
GraphqlChannel is streaming from graphql-subscription:ba2e384c-cbcf-4f9f-aa5e-8f666effd2a8
|
568
|
+
GraphqlChannel is streaming from graphql-subscription:18c8f852-04c7-4bb8-b6f7-ecc64a2a8ac9
|
569
|
+
GraphqlChannel is streaming from graphql-event::payload:id:updates-1
|
570
|
+
GraphqlChannel#make_trigger({"id"=>"updates-1", "value"=>1})
|
571
|
+
dumping: #<GraphqlChannel::ExamplePayload:0x007fc09e9fc660>
|
572
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-1: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzE\"}"
|
573
|
+
Loading: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzE\"}"
|
574
|
+
[ActionCable] Broadcasting to graphql-subscription:18c8f852-04c7-4bb8-b6f7-ecc64a2a8ac9: {:result=>{"data"=>{"payload"=>{"value"=>1}}}, :more=>true}
|
575
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>1}}}, "more"=>true} (via streamed from graphql-subscription:18c8f852-04c7-4bb8-b6f7-ecc64a2a8ac9)
|
576
|
+
GraphqlChannel#make_trigger({"id"=>"updates-1", "value"=>2})
|
577
|
+
dumping: #<GraphqlChannel::ExamplePayload:0x007fc09dced938>
|
578
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-1: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzI\"}"
|
579
|
+
Loading: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzI\"}"
|
580
|
+
[ActionCable] Broadcasting to graphql-subscription:18c8f852-04c7-4bb8-b6f7-ecc64a2a8ac9: {:result=>{"data"=>{"payload"=>{"value"=>2}}}, :more=>true}
|
581
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>2}}}, "more"=>true} (via streamed from graphql-subscription:18c8f852-04c7-4bb8-b6f7-ecc64a2a8ac9)
|
582
|
+
GraphqlChannel#make_trigger({"id"=>"updates-1", "value"=>3})
|
583
|
+
dumping: #<GraphqlChannel::ExamplePayload:0x007fc09e8c41d0>
|
584
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-1: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzM\"}"
|
585
|
+
Loading: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzM\"}"
|
586
|
+
[ActionCable] Broadcasting to graphql-subscription:18c8f852-04c7-4bb8-b6f7-ecc64a2a8ac9: {:result=>{"data"=>{"payload"=>{"value"=>3}}}, :more=>true}
|
587
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>3}}}, "more"=>true} (via streamed from graphql-subscription:18c8f852-04c7-4bb8-b6f7-ecc64a2a8ac9)
|
588
|
+
GraphqlChannel#make_trigger({"id"=>"updates-1", "value"=>4})
|
589
|
+
dumping: #<GraphqlChannel::ExamplePayload:0x007fc09d407ad0>
|
590
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-1: "4x"
|
591
|
+
Loading: "4x"
|
592
|
+
[ActionCable] Broadcasting to graphql-subscription:18c8f852-04c7-4bb8-b6f7-ecc64a2a8ac9: {:result=>{"data"=>{"payload"=>{"value"=>400}}}, :more=>true}
|
593
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>400}}}, "more"=>true} (via streamed from graphql-subscription:18c8f852-04c7-4bb8-b6f7-ecc64a2a8ac9)
|
594
|
+
GraphqlChannel#make_trigger({"id"=>"updates-1", "value"=>5})
|
595
|
+
dumping: #<GraphqlChannel::ExamplePayload:0x007fc09dbbf250>
|
596
|
+
[ActionCable] Broadcasting to graphql-event::payload:id:updates-1: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzU\"}"
|
597
|
+
Loading: "{\"__gid__\":\"Z2lkOi8vZHVtbXkvR3JhcGhxbENoYW5uZWw6OkV4YW1wbGVQYXlsb2FkLzU\"}"
|
598
|
+
[ActionCable] Broadcasting to graphql-subscription:18c8f852-04c7-4bb8-b6f7-ecc64a2a8ac9: {:result=>{"data"=>{"payload"=>{"value"=>5}}}, :more=>true}
|
599
|
+
GraphqlChannel transmitting {"result"=>{"data"=>{"payload"=>{"value"=>5}}}, "more"=>true} (via streamed from graphql-subscription:18c8f852-04c7-4bb8-b6f7-ecc64a2a8ac9)
|