Skip to content

Using lists in input types #176

@harendra-kumar

Description

@harendra-kumar

Is it possible to use lists in input arguments? For example:

data UserNames = UserNames
    { getUserNames :: [Text]
    } deriving (Generic, Show)

instance FromValue UserNames
instance Defaultable UserNames
instance HasAnnotatedInputType UserNames

Results in this error:

    • No instance for (HasAnnotatedInputType [Text])

I am not sure what the purpose HasAnnotatedInputType is, what does Annotated mean in the name? There seem to be no instance of this for List types i.e. [a]. Is that just missing or is it not possible to make it, or it does not make sense?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions