We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6bd543d commit e58e649Copy full SHA for e58e649
lib/graphql/schema.rb
@@ -1281,10 +1281,10 @@ def validate_timeout(new_validate_timeout = nil)
1281
# @return [Array<GraphQL::StaticValidation::Error >]
1282
def validate(string_or_document, rules: nil, context: nil)
1283
doc = if string_or_document.is_a?(String)
1284
- GraphQL.parse(string_or_document)
1285
- else
1286
- string_or_document
1287
- end
+ GraphQL.parse(string_or_document)
+ else
+ string_or_document
+ end
1288
query = GraphQL::Query.new(self, document: doc, context: context)
1289
validator_opts = { schema: self }
1290
rules && (validator_opts[:rules] = rules)
0 commit comments