ChemPal Documentation - v0.0.13-beta.5
    Preparing search index...

    Interface Magento2SearchResponse

    Top-level shape of a successful Magento 2 GraphQL products query response. The optional errors array carries partial-success errors (e.g. permission denied for individual fields) alongside valid data.

    const response: Magento2SearchResponse = {
    data: {
    products: {
    total_count: 6175,
    page_info: { current_page: 1, page_size: 20, total_pages: 309 },
    items: []
    }
    }
    };
    interface Magento2SearchResponse {
        data: {
            products: {
                total_count: number;
                page_info: Magento2PageInfo;
                items: Magento2ProductItem[];
            };
        };
        errors?: {
            message: string;
            locations?: { line: number; column: number }[];
            path?: (string | number)[];
        }[];
    }
    Index

    Properties

    Properties

    data: {
        products: {
            total_count: number;
            page_info: Magento2PageInfo;
            items: Magento2ProductItem[];
        };
    }

    Query result payload

    Type declaration

    errors?: {
        message: string;
        locations?: { line: number; column: number }[];
        path?: (string | number)[];
    }[]

    Partial-success errors returned alongside data

    Type declaration

    • message: string

      Human-readable error message

    • Optionallocations?: { line: number; column: number }[]

      Source locations in the query where the error occurred

    • Optionalpath?: (string | number)[]

      Path to the field that triggered the error