com.dft.api.shopify.v202404.GraphQlAPI Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of shopify-admin-rest Show documentation
Show all versions of shopify-admin-rest Show documentation
Shopify Admin REST API using JDK 11 and Reactive Programming
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);
}
}