Skip to content

Commit 1f6e28e

Browse files
authored
Fix logging requests with an empty query (#16)
1 parent 2a07d95 commit 1f6e28e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/graphql/rails_logger/subscriber.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def start_processing(event)
3737

3838
(params['_json'] || [params.slice('query', 'variables', 'extensions')]).each do |data|
3939

40-
next if config.skip_introspection_query && data['query'].index(/query IntrospectionQuery/)
40+
next if config.skip_introspection_query && data['query']&.index(/query IntrospectionQuery/)
4141

4242
# Cleanup and indent params for logging
4343
query = indent(data.fetch('query', ''))

0 commit comments

Comments
 (0)