• Alex Kalderimis's avatar
    Make resolve and resolve_field more flexible · 661b48b2
    Alex Kalderimis authored
    This ensures that these methods work correctly in more cicumstances.
    
    If given a real context, it will be hashified before consumption (not
    doing so causes `Context#to_h` to raise a runtime error).
    
    We check for the field on the `object_type` rather than always on the
    `described_class` - this makes `resolve_field` usable outside type
    specs.
    661b48b2
graphql_helpers.rb 21.8 KB