Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Graphql For Cs Cart Api Rate Topic   - - - - -

 
  • kaltersia
  • Advanced Member
  • Members
  • Join Date: 07-Feb 18
  • 111 posts

Posted 16 March 2021 - 02:28 PM #1

does anyone know if there is a module 'addon' like GraphQL for cs cart.

 

 

where we can specify what Api's we want in return and not all.

 

 

 

Regards

Adi



 
  • teosu
  • Senior Member
  • Members
  • Join Date: 09-Oct 14
  • 875 posts

Posted 16 March 2021 - 04:28 PM #2

app/addons/graphql_api

cs-cart already support graphql_api

 

as well as using the mobile application on the vendor side



 
  • kaltersia
  • Advanced Member
  • Members
  • Join Date: 07-Feb 18
  • 111 posts

Posted 17 March 2021 - 02:25 AM #3

it was always there and i  never saw it. :shock:



 
  • aaronbell
  • Newbie
  • Trial users
  • Join Date: 25-Feb 21
  • 2 posts

Posted 14 April 2021 - 09:19 PM #4

app/addons/graphql_api

cs-cart already support graphql_api

 

as well as using the mobile application on the vendor side

 

Can you shed any light on how to connect to the graphql api? I can't seem to find anything in the docs



 
  • teosu
  • Senior Member
  • Members
  • Join Date: 09-Oct 14
  • 875 posts

Posted 16 April 2021 - 08:16 AM #5

Hi add header your Storefront-Api-Access-Key : value

here is the api url : https://www.yourdoma...api/4.0/graphql

 

dont forget method must be POST

 

 

sample query 

query getOrder($id: Int!){
    order(id: $id) {
      order_id
      status
      total
      timestamp
      subtotal
      subtotal_discount
      shipping_cost
      notes
      details
      products {
        product_id
        product
        company_id
        company_name
        product_code
        product_type
        status
        list_price
        main_pair {
          icon {
            image_path
          }
        }
        amount
        weight
        length
        width
        height
        shipping_freight
        free_shipping
        list_qty_count
        price
        main_category
        full_description
        short_description
      }
      product_groups {
        group_id
      }
      shipping {
        shipping_id
        shipping
      }
      payment_method {
        payment
      }
      user_id
      firstname
      lastname
      phone
      email
      b_firstname
      b_lastname
      b_address
      b_address_2
      b_city
      b_state
      b_state_descr
      b_country
      b_country_descr
      b_zipcode
      b_phone
      s_firstname
      s_lastname
      s_address
      s_address_2
      s_city
      s_state
      s_state_descr
      s_country
      s_country_descr
      s_zipcode
      s_phone
    }
  }

sample graphql variable

{
    "id":4545789
}