Absinthe GraphiQL Introspection & Relay

I setup Absinthe Relay. All of our API works, but now we are unable to use introspection with GraphiQL …

The error I see is below.

Any pointers? or specific info I should add here? Anyone else bump into this?

# ArgumentError at POST /

Exception:

    ** (ArgumentError) cannot convert the given list to a string.
    
    To be converted to a string, a list must contain only:
    
      * strings
      * integers representing Unicode codepoints
      * or a list containing one of these three elements
    
    Please check the given list or call inspect/1 to get the list representation, got:
    
    [%{direction: :asc, field: :database_id}]

Looks like the list contains a Map.
Says right there that to convert the list to a string, you must meet the printed conditions, which having a map violates.

Try parsing the data out of the Map “%{direction: :asc, field: :database_id}” first.

Yep, I am wondering whether the Absinthe Relay library is missing some sort of parsing info…

Or I didn’t set it up correctly…

I see my mistake now.

I had an argument that looks like this:

arg(:order_by, list_of(:profile_order) ), default_value: [%{direction: :asc, field: :database_id}])

So simple!

Yet again, Elixir’s type unsafety sends me running off somewhere else : /

Thanks @jed!

I see the same issue here:

https://github.com/absinthe-graphql/absinthe/pull/537

which means perhaps updating Absinthe might help…