With GraphQL-ruby I want to define a type for a field that holds data in the following structure:
[
["2016-06-07", 14134.84],
["2016-06-08", 14134.84],
# ...
]
How would I go for this? I tried
module Types
class PerformanceDataType < Types::BaseObject
field :assets, [[Types::AssetType]], null: false
# ....
end
end
module Types
class AssetType < Types::BaseObject
field :date, String, null: false
field :value, Float, null: false
end
end
I am not using that data yet so I can't say if it works, but it feels too unspecific. Generating the schema didn't throw any errors.