Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ c4e2bf407aa0b7a3d34605134791013ba8a2d376
13fa17ad575aadf0ef823d63d86fbbdd4a37cd9b
f00f4fe6ed5e22cdd2e3f68370c2da96e6bbc8e7
899ed51a7b6607161fcda5c1000115a076cc4fe7
53b9d9cc4fc4091b89f84effb6e526371d3bae68
2 changes: 1 addition & 1 deletion commercetools/commercetools-graphql-api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import com.commercetools.sdk.plugins.GraphQLPlugin

plugins {
id "com.netflix.dgs.codegen" version "8.1.0"
id "com.netflix.dgs.codegen" version "8.3.0"
id 'java'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import com.commercetools.api.client.ProjectApiRoot;
import com.commercetools.graphql.CommercetoolsTestUtils;
import com.commercetools.graphql.api.types.ProductQueryResult;
import com.commercetools.graphql.api.types.*;

import io.vrap.rmf.base.client.ApiHttpResponse;

Expand Down Expand Up @@ -91,4 +91,27 @@ public void graphQLCustom() {
final ProductQueryResult data = response.getBody().getData();
Assertions.assertThat(data.getResults()).isNotNull();
}

@Test
public void graphQLSearch() {
final ProjectApiRoot projectRoot = CommercetoolsTestUtils.getProjectApiRoot();

SearchQueryInput input = SearchQueryInput.newBuilder()
.range(SearchQueryRangeExpressionInput.newBuilder()
._float(SearchNumberRangeExpressionInput.newBuilder()
.field("variants.attributes.weight")
.fieldType(SearchFieldType.number)
.gte(1.2d)
.lte(3d)
.build())
.build())
.build();
final GraphQLRequest<ProductPagedSearchResponse> productQuery = GraphQL
.productsSearch(query -> query.query(input))
.projection(root -> root.results().id());

final ApiHttpResponse<com.commercetools.api.models.graph_ql.GraphQLResponse> response = projectRoot.graphql()
.post(productQuery)
.executeBlocking();
}
}
2 changes: 1 addition & 1 deletion licenses/commercetools-graphql-api/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
},
{
"moduleName": "com.netflix.graphql.dgs.codegen:graphql-dgs-codegen-shared-core",
"moduleVersion": "8.1.0",
"moduleVersion": "8.3.0",
"moduleUrls": [
"https://github.com/Netflix/dgs-codegen"
],
Expand Down
2 changes: 1 addition & 1 deletion licenses/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@
},
{
"moduleName": "com.netflix.graphql.dgs.codegen:graphql-dgs-codegen-shared-core",
"moduleVersion": "8.1.0",
"moduleVersion": "8.3.0",
"moduleUrls": [
"https://github.com/Netflix/dgs-codegen"
],
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
"node": ">=14.15",
"npm": ">=5"
},
"packageManager": "yarn@4.9.2",
"dependencies": {
"husky": "9.1.7",
"lint-staged": "16.1.2"
},
"scripts": {
"postinstall": "husky install",
"postinstall": "husky",
"format": "./gradlew spotlessApply",
"prepare": "husky"
}
},
"packageManager": "yarn@4.13.0"
}
Loading
Loading