rmosolgo / graphql-ruby

Ruby implementation of GraphQL
http://graphql-ruby.org
MIT License
5.38k stars 1.39k forks source link

handle non-existing field selection on enum type correctly #5144

Closed ElvinEfendi closed 2 weeks ago

ElvinEfendi commented 2 weeks ago

Since https://github.com/rmosolgo/graphql-ruby/pull/4966/files#diff-2252722dfaf6594778838471788047281b9c06a3f2419c5342a84221d75f086cR17, a query that select a (non existing) field on an enum type results in an exception: "NoMethodError: undefined method 'fields' for class <an enum type>".

rmosolgo commented 2 weeks ago

Thanks for this fix! Scalars might have the same problem -- I'll investigate after merging this.