I can’t help you with your exact situation, but in general if there are
multiple “word” separated by whitespace
it’s because that type is “constructed” from multiple types. So the first word is the “generic” type and the other words are the “type parameters”. Imagine a list of numbers: Its type would be
value : List Int
value =
[ 1, 2, 3 ]
or a piece of HTML markup that can trigger your specific MyMsg type:
type MyMsg
= DoStuff
viewButton : Html MyMsg
viewButton =
button [ onClick DoStuff ] [ text "Click me to do stuff!" ]
Other classic examples are Dict Int String for example: A dictionary that maps Int keys to String values. There are also Maybe and Result documented in the official documentation, which use type parameters.
The documentation page Reading types might also help you understand how to read the type annotations.
As @IloSophiep explained, these are “type variables”. You might know them from other languages as “generics”. They allow you to define types and functions that focus on the “shape” of something instead of the particular type of content. Types can have multiple variables that are separated by spaces.
In this particular case a dillonkearns/elm-graphql's SelectionSet is a structure that represents a set of selected fields from a GraphQL type. The first type variable Response indicates the Elm type that you’d get after running the query. The second type variable (scope) indicates that this selection can be peformed on the RootQuery GraphQL type.