@twilio/flex-sdk
    Preparing search index...

    Interface ReadFragmentOptions<TData, TVariables>

    interface ReadFragmentOptions<TData, TVariables extends OperationVariables> {
        fragment: DocumentNode | TypedDocumentNode<TData, TVariables>;
        fragmentName?: string;
        from?: FromOptionValue<TData>;
        id?: string;
        optimistic?: boolean;
        returnPartialData?: boolean;
    }

    Type Parameters

    • TData
    • TVariables extends OperationVariables

    Hierarchy (View Summary)

    Index

    Properties

    A GraphQL document created using the gql template string tag with one or more fragments which will be used to determine the shape of data to read. If you provide more than one fragment in this document then you must also specify fragmentName to specify which fragment is the root fragment.

    fragmentName?: string

    The name of the fragment in your GraphQL document to be used. If you do not provide a fragmentName and there is only one fragment in your fragment document then that fragment will be used.

    from?: FromOptionValue<TData>

    An object containing a __typename and primary key fields (such as id) identifying the entity object from which the fragment will be retrieved, or a { __ref: "..." } reference, or a string ID (uncommon).

    from is given precedence over id when both are provided.

    id?: string

    The root id to be used. This id should take the same form as the value returned by the cache.identify function. If a value with your id does not exist in the store, null will be returned.

    optimistic?: boolean

    Whether to read from optimistic or non-optimistic cache data. This option should be preferred over the optimistic parameter of the readFragment method.

    false
    
    returnPartialData?: boolean

    Whether to return incomplete data rather than null.

    false