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

    Interface ShopifySearchResponse

    Represents the full response from a Shopify GraphQL product search query. May contain partial errors (e.g. permission-denied fields) alongside valid data.

    const response: ShopifySearchResponse = {
    data: {
    products: {
    edges: [{ node: { id: "gid://shopify/Product/123", title: "Test", ... } }]
    }
    }
    };
    interface ShopifySearchResponse {
        errors?: {
            message: string;
            locations?: { line: number; column: number }[];
            path?: (string | number)[];
            extensions?: {
                code: string;
                documentation: string;
                requiredAccess: string;
            };
        }[];
        data: { products: { edges: { node: ShopifyProductNode }[] } };
        extensions?: { cost?: { requestedQueryCost: number } };
    }
    Index

    Properties

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

    Array of GraphQL errors (e.g. permission denied for specific fields)

    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 caused the error

    • Optionalextensions?: { code: string; documentation: string; requiredAccess: string }

      Additional error metadata

      • code: string

        Error code (e.g. "ACCESS_DENIED")

      • documentation: string

        Link to relevant documentation

      • requiredAccess: string

        Description of required access scope

    data: { products: { edges: { node: ShopifyProductNode }[] } }

    The query result data

    Type declaration

    extensions?: { cost?: { requestedQueryCost: number } }

    Query cost and performance metadata

    Type declaration

    • Optionalcost?: { requestedQueryCost: number }

      API cost information

      • requestedQueryCost: number

        The computed cost of the query