npm package: @genql/twiga
Description: Graphql client
Latest version: 1.0.0


# @genql/twiga

Your awesome graphql client ❤️

## Example usage

```js
import { createClient } from '@genql/twiga'
const client = createClient()



client
  .query({
    product_item_by_id: {
      date_updated: true,
      created_by: true,
      updated_by: true,
      client_stamp: true,
      client_timestamp: true,
      client_info: true,
      slug: true,
      meta: true,
      packed_volume: true,
      supplier_item: true,
      product_item_segment_id: true,
      base_price: true,
    },
    paginated_products: {
      edges: {
        node: {
          date_updated: true,
          client_id: true,
          client_stamp: true,
          active: true,
          product_description: true,
          category_id: true,
          vatable: true,
          featured: true,
          product_type: true,
          meta: true,
        },
      },
    },
    product_items_by_product_id: {
      current_pricing: {
        date_created: true,
        date_updated: true,
        client_id: true,
        client_timestamp: true,
        client_info: true,
        pricing_id: true,
        product_item_id: true,
        unit_of_measure: true,
      },
      date_updated: true,
      client_id: true,
      client_timestamp: true,
      product_id: true,
      image: true,
      image_url: true,
      featured: true,
      packed_volume: true,
      dynamic_price: true,
    },
    product_items: {
      units_of_measure: {
        uom: {
          uom: {
            date_created: true,
            created_by: true,
            updated_by: true,
            client_id: true,
            client_stamp: true,
            client_timestamp: true,
            client_info: true,
            business_domain: true,
          },
          date_created: true,
          created_by: true,
          client_stamp: true,
          client_info: true,
          active: true,
          uom_id: true,
          name: true,
          abbreviation: true,
        },
        created_by: true,
        client_id: true,
        client_stamp: true,
        product_item_id: true,
        business_domain: true,
        conversion_ratio: true,
        domain: true,
      },
      domain_activations: {
        product_item_domain_activation_id: true,
        domain: true,
      },
      pricing: {
        product_item: {
          pricing: {
            date_updated: true,
            created_by: true,
            client_timestamp: true,
            active: true,
            product_item_id: true,
            unit_price: true,
          },
          product: {
            date_created: true,
            client_stamp: true,
            active: true,
            product_id: true,
            product_name: true,
            slug: true,
            category_id: true,
            featured: true,
            product_type: true,
          },
          current_pricing: {
            date_created: true,
            date_updated: true,
            client_id: true,
            client_stamp: true,
            client_info: true,
            product_item_id: true,
            date: true,
            unit_price: true,
            unit_of_measure: true,
          },
          updated_by: true,
          client_stamp: true,
          client_timestamp: true,
          client_info: true,
          product_item_id: true,
          product_item_name: true,
          slug: true,
          product_id: true,
          image: true,
          staff_only: true,
          meta: true,
          featured: true,
          packed_weight: true,
          base_price: true,
          dynamic_price: true,
        },
        updated_by: true,
        client_timestamp: true,
        active: true,
        pricing_id: true,
        unit_price: true,
      },
      current_pricing: {
        product_item: {
          client_id: true,
          client_timestamp: true,
          client_info: true,
          product_item_id: true,
          product_item_name: true,
          image_url: true,
          staff_only: true,
          meta: true,
          featured: true,
          packed_volume: true,
          product_item_segment_id: true,
          base_price: true,
          dynamic_price: true,
        },
        created_by: true,
        updated_by: true,
        client_id: true,
        client_stamp: true,
        client_timestamp: true,
        client_info: true,
        active: true,
        product_item_id: true,
        date: true,
        unit_price: true,
        unit_name: true,
      },
      date_updated: true,
      client_stamp: true,
      client_info: true,
      product_item_id: true,
      image: true,
      staff_only: true,
      description: true,
      featured: true,
      supplier_item: true,
      product_item_segment_id: true,
      dynamic_price: true,
    },
    paginated_product_items: {
      edges: {
        node: {
          pricing: {
            date_updated: true,
            created_by: true,
            client_id: true,
            client_timestamp: true,
            active: true,
            unit_price: true,
            unit_name: true,
          },
          units_of_measure: {
            date_created: true,
            updated_by: true,
            client_id: true,
            client_info: true,
            active: true,
            product_item_uom_id: true,
            product_item_id: true,
            uom_id: true,
            domain: true,
          },
          product: {
            date_updated: true,
            updated_by: true,
            client_stamp: true,
            active: true,
            product_name: true,
            slug: true,
            category_id: true,
            product_type: true,
          },
          client_timestamp: true,
          slug: true,
          image_url: true,
          description: true,
          meta: true,
          packed_weight: true,
          packed_volume: true,
        },
      },
    },
    product_uoms_by_product_id: {
      uom: {
        date_updated: true,
        updated_by: true,
        client_stamp: true,
        client_timestamp: true,
        client_info: true,
        active: true,
        uom_id: true,
        abbreviation: true,
      },
      date_updated: true,
      client_stamp: true,
      product_uom_id: true,
      uom_id: true,
      business_domain: true,
    },
    uom_by_id: {
      uom: {
        date_updated: true,
        created_by: true,
        updated_by: true,
        client_stamp: true,
        client_info: true,
        product_item_id: true,
        uom_id: true,
        business_domain: true,
        domain: true,
      },
      date_created: true,
      date_updated: true,
      created_by: true,
      client_stamp: true,
      client_info: true,
      uom_id: true,
      name: true,
      description: true,
    },
    product_variants: {
      date_created: true,
      updated_by: true,
      client_stamp: true,
      client_info: true,
      active: true,
      variant_id: true,
      variant_name: true,
    },
    packaging_units: {
      date_updated: true,
      created_by: true,
      updated_by: true,
      client_id: true,
      client_timestamp: true,
      active: true,
      packaging_unit_id: true,
      name: true,
    },
    packaging_unit_by_id: {
      date_updated: true,
      created_by: true,
      client_stamp: true,
      packaging_unit_id: true,
    },
    product_categories: {
      date_created: true,
      date_updated: true,
      created_by: true,
      client_timestamp: true,
      active: true,
      category_id: true,
      category_name: true,
      image: true,
      department_id: true,
    },
    bundle_association_by_sku: {
      child_sku: {
        product: {
          date_created: true,
          created_by: true,
          client_stamp: true,
          client_info: true,
          active: true,
          product_id: true,
          product_name: true,
          slug: true,
          vatable: true,
          product_type: true,
          meta: true,
        },
        units_of_measure: {
          date_created: true,
          date_updated: true,
          client_id: true,
          client_stamp: true,
          client_timestamp: true,
          active: true,
          product_item_uom_id: true,
          product_item_id: true,
          business_domain: true,
          conversion_ratio: true,
          domain: true,
        },
        domain_activations: {
          date_created: true,
          date_updated: true,
          created_by: true,
          client_id: true,
          client_info: true,
          product_item_id: true,
          domain: true,
        },
        pricing: {
          product_item: {
            date_updated: true,
            created_by: true,
            client_info: true,
            product_item_name: true,
            slug: true,
            image_url: true,
            meta: true,
            packed_weight: true,
            product_item_segment_id: true,
          },
          date_created: true,
          date_updated: true,
        },
        date_updated: true,
        created_by: true,
        updated_by: true,
        client_id: true,
        client_stamp: true,
        client_timestamp: true,
        client_info: true,
        product_item_name: true,
        product_id: true,
        image: true,
        staff_only: true,
        featured: true,
        product_item_segment_id: true,
        base_price: true,
      },
      date_created: true,
      date_updated: true,
      created_by: true,
      client_id: true,
      client_stamp: true,
      client_info: true,
      association_id: true,
      child_product_item_id: true,
      quantity: true,
      discount: true,
    },
    business_domains: true,
    product_types: true,
  })
  .then(x => console.log(JSON.stringify(x, null, 4)))




client
  .query({
    business_domains: true,
  })
  .then(x => console.log(JSON.stringify(x, null, 4)))




client
  .query({
    paginated_product_items: {
      edges: {
        node: {
          date_updated: true,
          client_id: true,
          client_timestamp: true,
          active: true,
          slug: true,
          product_id: true,
          image: true,
          image_url: true,
          featured: true,
          packed_volume: true,
          product_item_segment_id: true,
          base_price: true,
        },
        cursor: true,
      },
    },
    products_by_domain: {
      date_updated: true,
      created_by: true,
      updated_by: true,
      client_stamp: true,
      client_timestamp: true,
      client_info: true,
      active: true,
      slug: true,
      vatable: true,
      featured: true,
      product_type: true,
    },
    product_by_id: {
      product_images: {
        date_updated: true,
        client_stamp: true,
        active: true,
        product_image_id: true,
        width: true,
        public_url: true,
      },
      categories: {
        products: {
          date_updated: true,
          client_id: true,
          client_info: true,
          active: true,
          slug: true,
          product_description: true,
          category_id: true,
          meta: true,
        },
        date_created: true,
        client_id: true,
        client_stamp: true,
        client_timestamp: true,
        client_info: true,
        active: true,
        category_id: true,
        category_name: true,
        image_url: true,
        banner_image_url: true,
        featured: true,
      },
      date_created: true,
      date_updated: true,
      created_by: true,
      updated_by: true,
      client_stamp: true,
      client_timestamp: true,
      active: true,
      product_code: true,
      vatable: true,
    },
    product_items_by_product_id: {
      date_updated: true,
      created_by: true,
      updated_by: true,
      active: true,
      product_id: true,
      image: true,
      image_url: true,
      staff_only: true,
      description: true,
      packed_weight: true,
      supplier_item: true,
      dynamic_price: true,
    },
    product_items: {
      domain_activations: {
        product_item: {
          created_by: true,
          client_stamp: true,
          client_timestamp: true,
          active: true,
          slug: true,
          image_url: true,
          staff_only: true,
          description: true,
          meta: true,
          packed_weight: true,
          packed_volume: true,
          supplier_item: true,
          base_price: true,
        },
        date_created: true,
        updated_by: true,
        client_stamp: true,
        client_timestamp: true,
        active: true,
      },
      pricing: {
        product_item: {
          date_updated: true,
          updated_by: true,
          client_stamp: true,
          client_timestamp: true,
          client_info: true,
          active: true,
          product_item_id: true,
          product_item_name: true,
          slug: true,
          product_id: true,
          image: true,
          staff_only: true,
          packed_weight: true,
          supplier_item: true,
          product_item_segment_id: true,
          base_price: true,
          dynamic_price: true,
        },
        updated_by: true,
        client_id: true,
        client_stamp: true,
        active: true,
        date: true,
        unit_price: true,
      },
      date_created: true,
      date_updated: true,
      client_stamp: true,
      client_info: true,
      product_item_id: true,
      product_id: true,
      image: true,
      image_url: true,
      staff_only: true,
      meta: true,
      packed_weight: true,
      packed_volume: true,
      supplier_item: true,
      dynamic_price: true,
    },
    product_uoms_by_product_id: {
      uom: {
        created_by: true,
        client_stamp: true,
        active: true,
        uom_id: true,
        abbreviation: true,
      },
      date_created: true,
      updated_by: true,
      client_info: true,
      active: true,
      product_id: true,
      uom_id: true,
      domain: true,
    },
    pricing: {
      product_item: {
        pricing: {
          date_created: true,
          created_by: true,
          client_stamp: true,
          client_info: true,
          active: true,
          pricing_id: true,
          date: true,
          unit_price: true,
          unit_name: true,
          unit_of_measure: true,
        },
        product: {
          product_items: {
            created_by: true,
            updated_by: true,
            client_id: true,
            client_stamp: true,
            product_item_name: true,
            slug: true,
            image: true,
            image_url: true,
            packed_weight: true,
            packed_volume: true,
            supplier_item: true,
          },
          domain_activations: {
            date_updated: true,
            created_by: true,
            updated_by: true,
            client_id: true,
            client_stamp: true,
            client_info: true,
            product_id: true,
          },
          packaging_units: {
            date_created: true,
            client_stamp: true,
            client_timestamp: true,
            client_info: true,
            active: true,
            name: true,
          },
          date_updated: true,
          created_by: true,
          updated_by: true,
          client_id: true,
          client_timestamp: true,
          product_id: true,
          slug: true,
          vatable: true,
          featured: true,
          product_type: true,
          meta: true,
        },
        product_item_segment: {
          date_created: true,
          date_updated: true,
          updated_by: true,
          client_id: true,
          client_timestamp: true,
          product_item_segment_id: true,
          segment_name: true,
        },
        date_updated: true,
        created_by: true,
        client_id: true,
        client_stamp: true,
        active: true,
        product_item_id: true,
        product_item_name: true,
        product_id: true,
        image: true,
        image_url: true,
        description: true,
        packed_volume: true,
        supplier_item: true,
      },
      date_created: true,
      date_updated: true,
      client_id: true,
      client_stamp: true,
      client_info: true,
      unit_price: true,
      unit_name: true,
      unit_of_measure: true,
    },
    pricing_by_id: {
      product_item: {
        date_created: true,
        created_by: true,
        client_stamp: true,
        client_info: true,
        product_id: true,
        image_url: true,
        description: true,
        meta: true,
        featured: true,
        packed_weight: true,
      },
      client_id: true,
      client_timestamp: true,
      pricing_id: true,
      date: true,
      unit_price: true,
      unit_name: true,
      unit_of_measure: true,
    },
    pricing_by_product_item_id: {
      product_item: {
        product: {
          category: {
            date_created: true,
            slug: true,
            image: true,
            banner_image: true,
          },
          units_of_measure: {
            created_by: true,
            updated_by: true,
            client_info: true,
            product_uom_id: true,
          },
          product_items: {
            date_updated: true,
            updated_by: true,
            client_timestamp: true,
            active: true,
            product_item_id: true,
            product_item_name: true,
            product_id: true,
            description: true,
            meta: true,
            featured: true,
            packed_volume: true,
            supplier_item: true,
            product_item_segment_id: true,
            dynamic_price: true,
          },
          variants: {
            date_created: true,
            client_id: true,
            client_stamp: true,
            client_timestamp: true,
            client_info: true,
            active: true,
          },
          packaging_units: {
            date_created: true,
            date_updated: true,
            created_by: true,
            client_timestamp: true,
            name: true,
            weight: true,
          },
          categories: {
            date_created: true,
            date_updated: true,
            updated_by: true,
            client_stamp: true,
            client_info: true,
            category_name: true,
            image: true,
            department_id: true,
            featured: true,
          },
          date_updated: true,
          updated_by: true,
          client_timestamp: true,
          client_info: true,
          active: true,
          product_code: true,
          slug: true,
          product_type: true,
          meta: true,
        },
        domain_activations: {
          product_item: {
            date_created: true,
            date_updated: true,
            updated_by: true,
            client_id: true,
            client_stamp: true,
            client_info: true,
            active: true,
            product_item_id: true,
            slug: true,
            staff_only: true,
            meta: true,
            featured: true,
            packed_weight: true,
            packed_volume: true,
            supplier_item: true,
            product_item_segment_id: true,
          },
          created_by: true,
          updated_by: true,
          client_id: true,
          active: true,
          product_item_domain_activation_id: true,
          product_item_id: true,
          business_domain: true,
        },
        current_pricing: {
          product_item: {
            date_created: true,
            date_updated: true,
            updated_by: true,
            client_id: true,
            active: true,
            product_item_id: true,
            slug: true,
            image: true,
            image_url: true,
            staff_only: true,
            meta: true,
            featured: true,
            supplier_item: true,
            product_item_segment_id: true,
          },
          date_created: true,
          date_updated: true,
          updated_by: true,
          client_id: true,
          client_info: true,
          pricing_id: true,
          unit_name: true,
          unit_of_measure: true,
        },
        updated_by: true,
        client_id: true,
        active: true,
        product_item_id: true,
        image: true,
        staff_only: true,
        meta: true,
        featured: true,
        packed_volume: true,
        product_item_segment_id: true,
        base_price: true,
        dynamic_price: true,
      },
      date_updated: true,
      created_by: true,
      client_stamp: true,
      client_info: true,
      active: true,
      pricing_id: true,
      date: true,
    },
    packaging_units: {
      date_updated: true,
      created_by: true,
      client_id: true,
      client_stamp: true,
      client_timestamp: true,
      active: true,
    },
    packaging_unit_by_id: {
      date_updated: true,
      updated_by: true,
      client_stamp: true,
      active: true,
      packaging_unit_id: true,
      returnable: true,
    },
    return_reasons: {
      date_created: true,
      client_id: true,
      client_timestamp: true,
    },
    product_categories_by_department_id: {
      department: {
        categories: {
          products: {
            created_by: true,
            client_timestamp: true,
            product_name: true,
            product_code: true,
            product_description: true,
            vatable: true,
            featured: true,
            meta: true,
          },
          updated_by: true,
          client_id: true,
          client_timestamp: true,
          client_info: true,
          category_name: true,
          banner_image: true,
          department_id: true,
          featured: true,
        },
        date_updated: true,
        updated_by: true,
        client_stamp: true,
        client_timestamp: true,
        slug: true,
        short_name: true,
        description: true,
        image: true,
        image_url: true,
        featured: true,
      },
      products: {
        units_of_measure: {
          uom: {
            updated_by: true,
            client_stamp: true,
            client_info: true,
            name: true,
            abbreviation: true,
            description: true,
          },
          date_created: true,
          created_by: true,
          updated_by: true,
          client_timestamp: true,
          client_info: true,
          active: true,
          product_uom_id: true,
          product_id: true,
          uom_id: true,
          business_domain: true,
          domain: true,
        },
        domain_activations: {
          created_by: true,
          client_id: true,
          client_stamp: true,
          client_timestamp: true,
          client_info: true,
          active: true,
          product_id: true,
          domain: true,
        },
        variants: {
          date_created: true,
          updated_by: true,
          client_stamp: true,
          client_timestamp: true,
          active: true,
        },
        date_updated: true,
        created_by: true,
        updated_by: true,
        client_stamp: true,
        client_timestamp: true,
        client_info: true,
        product_description: true,
      },
      date_updated: true,
      created_by: true,
      client_id: true,
      client_stamp: true,
      client_timestamp: true,
      client_info: true,
      category_id: true,
      image_url: true,
      banner_image: true,
      featured: true,
    },
    product_department_by_id: {
      categories: {
        created_by: true,
        updated_by: true,
        client_id: true,
        client_timestamp: true,
        image: true,
        banner_image_url: true,
        featured: true,
      },
      date_created: true,
      created_by: true,
      updated_by: true,
      client_id: true,
      client_stamp: true,
      client_info: true,
      active: true,
      slug: true,
      short_name: true,
      description: true,
      image_url: true,
      featured: true,
    },
    product_items_by_ids: {
      domain_activations: {
        date_created: true,
        date_updated: true,
        created_by: true,
        client_info: true,
        active: true,
        product_item_domain_activation_id: true,
        business_domain: true,
      },
      units_of_measure: {
        uom: {
          created_by: true,
          updated_by: true,
          client_stamp: true,
          client_info: true,
          name: true,
          abbreviation: true,
          description: true,
        },
        date_created: true,
        created_by: true,
        updated_by: true,
        client_id: true,
        client_stamp: true,
        client_info: true,
        uom_id: true,
        business_domain: true,
        conversion_ratio: true,
        domain: true,
      },
      product: {
        created_by: true,
        client_id: true,
        client_info: true,
        product_id: true,
        slug: true,
        category_id: true,
        meta: true,
      },
      current_pricing: {
        date_created: true,
        updated_by: true,
        client_timestamp: true,
        client_info: true,
        pricing_id: true,
        product_item_id: true,
        date: true,
        unit_price: true,
        unit_name: true,
      },
      updated_by: true,
      client_id: true,
      client_stamp: true,
      client_timestamp: true,
      product_item_name: true,
      image: true,
      staff_only: true,
      description: true,
      meta: true,
      featured: true,
      packed_weight: true,
      packed_volume: true,
      supplier_item: true,
      product_item_segment_id: true,
      base_price: true,
    },
    product_item_segments: {
      date_updated: true,
      created_by: true,
      client_info: true,
      active: true,
      product_item_segment_id: true,
    },
    product_item_segment_by_id: {
      active: true,
      segment_name: true,
      meta: true,
    },
    bundle_association_by_sku: {
      updated_by: true,
      client_id: true,
      client_info: true,
      active: true,
      parent_product_item_id: true,
      child_product_item_id: true,
    },
    business_domains: true,
    product_types: true,
  })
  .then(x => console.log(JSON.stringify(x, null, 4)))




client
  .query({
    business_domains: true,
    product_types: true,
  })
  .then(x => console.log(JSON.stringify(x, null, 4)))


```