<?php
require '../Helpers.php';


get_products();
function get_products()
{

    $query = <<<QUERY

    query {
         products(first: 10) {
            edges {
                node {
                id
                }
            }
        }

    }

    QUERY;



    $client = graphql();

    $response = $client->query(['query' => $query]);

    $getSku = $response->getDecodedBody();

    dd($getSku);

    // if (!empty($getSku['data']['inventoryItem']['sku'])) {

    //     return $getSku['data']['inventoryItem']['sku'];

    // } else {

    //     return "";

    // }

}