Hex Core JS
    Preparing search index...

    Type Alias RelayConnectionPick<T, K>

    Constructs a new type from T by picking K from the node type in the Relay connection type T.

    type User = {
    id: string;
    name: string;
    }

    type UserConnection = RelayConnection<User>;

    RelayConnectionPick<UserConnection, "id">; // RelayConnection<Pick<User, "id">>
    type RelayConnectionPick<
        T extends { edges: { node: any }[] },
        K extends keyof T["edges"][0]["node"],
    > = {
        edges: { node: Pick<T["edges"][0]["node"], K> }[];
    }

    Type Parameters

    • T extends { edges: { node: any }[] }
    • K extends keyof T["edges"][0]["node"]
    Index

    Properties

    Properties

    edges: { node: Pick<T["edges"][0]["node"], K> }[]