Class FetchCustomObjectsGraphQlRequest
- java.lang.Object
-
- com.commercetools.sync.commons.helpers.GraphQlBaseRequestImpl<ResourceKeyIdGraphQlResult>
-
- com.commercetools.sync.commons.models.FetchCustomObjectsGraphQlRequest
-
- All Implemented Interfaces:
GraphQlBaseRequest<ResourceKeyIdGraphQlResult>,io.sphere.sdk.client.SphereRequest<ResourceKeyIdGraphQlResult>
public class FetchCustomObjectsGraphQlRequest extends GraphQlBaseRequestImpl<ResourceKeyIdGraphQlResult>
A SphereRequest implementation to allowSphereClientto execute graphQL queries on CTP. It provides a POST request to the CTP graphql API containing body to fetch custom object resource with the given container name defined in endpoint parameter.
-
-
Field Summary
-
Fields inherited from class com.commercetools.sync.commons.helpers.GraphQlBaseRequestImpl
limit, queryPredicate
-
-
Constructor Summary
Constructors Constructor Description FetchCustomObjectsGraphQlRequest(java.lang.String container, java.time.Instant lastModifiedAt)TakescontainerandlastModifiedAtto instantiate a newFetchCustomObjectsGraphQlRequestinstance, which is an implementation of theSphereRequest.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringbuildQueryString()This method builds a string matching the required format needed in the CTP graphql API.ResourceKeyIdGraphQlResultdeserialize(io.sphere.sdk.http.HttpResponse httpResponse)-
Methods inherited from class com.commercetools.sync.commons.helpers.GraphQlBaseRequestImpl
deserializeWithResourceName, httpRequestIntent, withLimit, withPredicate
-
-
-
-
Constructor Detail
-
FetchCustomObjectsGraphQlRequest
public FetchCustomObjectsGraphQlRequest(@Nonnull java.lang.String container, @Nonnull java.time.Instant lastModifiedAt)TakescontainerandlastModifiedAtto instantiate a newFetchCustomObjectsGraphQlRequestinstance, which is an implementation of theSphereRequest.- Parameters:
container- - A namespace to group custom objects.lastModifiedAt- - lastModifiedAt will be used in where param.
-
-
Method Detail
-
deserialize
@Nullable public ResourceKeyIdGraphQlResult deserialize(io.sphere.sdk.http.HttpResponse httpResponse)
-
buildQueryString
@Nonnull protected java.lang.String buildQueryString()
Description copied from class:GraphQlBaseRequestImplThis method builds a string matching the required format needed in the CTP graphql API.- Specified by:
buildQueryStringin classGraphQlBaseRequestImpl<ResourceKeyIdGraphQlResult>- Returns:
- a string representing a graphql query
-
-