Skip to content

Commit 59a3307

Browse files
committed
fix: update testing/schema_structure.md
The validate method returns array.
1 parent 4315fb1 commit 59a3307

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

guides/testing/schema_structure.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@ namespace :graphql do
4444
puts "\n"
4545

4646
results = queries.map { |query| schema.validate(query) }
47-
errors = results
48-
.select { |result| result[:errors].present? }
49-
.map { |result| result[:errors] }
50-
.flatten
47+
errors = results.flatten
5148

5249
if errors.empty?
5350
puts '✅ All queries are valid'

0 commit comments

Comments
 (0)