Skip to content

Use of map() where parent type is a node #6

Closed
@johanobergman

Description

@johanobergman

Resolving fields with map works really well (and fast!) when the parent type is a list. However, when using Relay connections, it's impossible to use map on the "connected" type, since its parent is an edge and not the list of edges.
An example:
UserType -> todos -> TodoConnection -> edges -> EdgeType -> node -> TodoType -> items*
I want to use map on items but I cant since the root argument will contain an array with only one element - the edge.

Is there any way to work around this, or is it perhaps something you would consider improving?

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