All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dft.api.shopify.v202404.GraphQlAPI Maven / Gradle / Ivy

The newest version!
package com.dft.api.shopify.v202404;

import com.dft.api.shopify.ShopifySdkNew;
import com.dft.api.shopify.model.auth.AccessCredential;
import com.dft.api.shopify.v202404.model.graphqlapi.GraphQlQuery;

import java.net.URI;
import java.net.http.HttpRequest;

public class GraphQlAPI extends ShopifySdkNew {

    private static final String VERSION_2024_04 = "/2024-04";
    private static final String ENDPOINT = "/graphql";

    public GraphQlAPI(AccessCredential accessCredential) {
        super(accessCredential);
    }

    public  T productAndMetafieldGraphQl(String query, Class tClass) {

        GraphQlQuery graphQlQuery = new GraphQlQuery();
        graphQlQuery.setQuery(query);

        URI uri = baseUrl(VERSION_2024_04, ENDPOINT);

        HttpRequest request = postWithObject(uri, graphQlQuery);
        return getRequestWrapped(request, tClass);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy