types/product.types.ts

nextjs-commerce · src/graphql/types/product.types.ts · typescript · MIT
pos

Defines TypeScript interfaces for GraphQL product queries and responses in an e‑commerce application.

// Source: https://github.com/bagisto/nextjs-commerce | License: MIT
// Provided via justclaw.it.com; keep this notice with the code.

export interface PageInfo {
  startCursor: string | null;
  endCursor: string | null;
  hasNextPage: boolean;
  hasPreviousPage: boolean;
}

export interface AttributeValue {
  id: string;
  locale?: string;
  channel?: string;
  value?: string;
  textValue?: string;
  attribute: {
    id: string;
    code: string;
  };
}

export interface SuperAttribute {
  id: string;
  code: string;
}

export interface ProductVariant {
  id: string;
  sku: string;
  type: string;
  name?: string;
  price?: number;
  attributeValues: {
    edges: Array<{
      node: AttributeValue;
    }>;
  };
}

export interface ProductCore {
  id: string;
  _id: string;
  sku: string;


... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key