Relay currently only knows how to handle these three types of root fields:
Root field with no arguments and queries a single node.
e.g. empire queries {id: "123", ...}
Root field with one argument and queries a single node.
e.g. ship(id: "456") queries {id: "456", ...}
Root field with one array argument and queries an array of nodes.
e.g. ships(ids: ["456", "789"]) queries [{id: "456", ...}, {id: "789", ...}]
However, it has become clear that Relay needs to support any kind of root field. For example:
Root field with multiple arguments.
Root field with no arguments and queries an array of nodes.
Root field that is a connection.
Relay currently only knows how to handle these three types of root fields:
Root field with no arguments and queries a single node.
e.g. empire queries {id: "123", ...}
Root field with one argument and queries a single node.
e.g. ship(id: "456") queries {id: "456", ...}
Root field with one array argument and queries an array of nodes.
e.g. ships(ids: ["456", "789"]) queries [{id: "456", ...}, {id: "789", ...}]
However, it has become clear that Relay needs to support any kind of root field. For example:
Root field with multiple arguments.
Root field with no arguments and queries an array of nodes.
Root field that is a connection.