Skip to content

Commit 7838ba4

Browse files
Merge pull request #1054 from commercetools/dgs-codegen-fix
update dgs-codegen plugin
2 parents c246b86 + ff9643f commit 7838ba4

File tree

7 files changed

+283
-364
lines changed

7 files changed

+283
-364
lines changed

.git-blame-ignore-revs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ c4e2bf407aa0b7a3d34605134791013ba8a2d376
2525
13fa17ad575aadf0ef823d63d86fbbdd4a37cd9b
2626
f00f4fe6ed5e22cdd2e3f68370c2da96e6bbc8e7
2727
899ed51a7b6607161fcda5c1000115a076cc4fe7
28+
53b9d9cc4fc4091b89f84effb6e526371d3bae68

commercetools/commercetools-graphql-api/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import com.commercetools.sdk.plugins.GraphQLPlugin
22

33
plugins {
4-
id "com.netflix.dgs.codegen" version "8.1.0"
4+
id "com.netflix.dgs.codegen" version "8.3.0"
55
id 'java'
66
}
77

commercetools/commercetools-graphql-api/src/integrationTest/java/com/commercetools/graphql/api/TestQuery.java

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import com.commercetools.api.client.ProjectApiRoot;
77
import com.commercetools.graphql.CommercetoolsTestUtils;
8-
import com.commercetools.graphql.api.types.ProductQueryResult;
8+
import com.commercetools.graphql.api.types.*;
99

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

@@ -91,4 +91,27 @@ public void graphQLCustom() {
9191
final ProductQueryResult data = response.getBody().getData();
9292
Assertions.assertThat(data.getResults()).isNotNull();
9393
}
94+
95+
@Test
96+
public void graphQLSearch() {
97+
final ProjectApiRoot projectRoot = CommercetoolsTestUtils.getProjectApiRoot();
98+
99+
SearchQueryInput input = SearchQueryInput.newBuilder()
100+
.range(SearchQueryRangeExpressionInput.newBuilder()
101+
._float(SearchNumberRangeExpressionInput.newBuilder()
102+
.field("variants.attributes.weight")
103+
.fieldType(SearchFieldType.number)
104+
.gte(1.2d)
105+
.lte(3d)
106+
.build())
107+
.build())
108+
.build();
109+
final GraphQLRequest<ProductPagedSearchResponse> productQuery = GraphQL
110+
.productsSearch(query -> query.query(input))
111+
.projection(root -> root.results().id());
112+
113+
final ApiHttpResponse<com.commercetools.api.models.graph_ql.GraphQLResponse> response = projectRoot.graphql()
114+
.post(productQuery)
115+
.executeBlocking();
116+
}
94117
}

licenses/commercetools-graphql-api/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
},
9898
{
9999
"moduleName": "com.netflix.graphql.dgs.codegen:graphql-dgs-codegen-shared-core",
100-
"moduleVersion": "8.1.0",
100+
"moduleVersion": "8.3.0",
101101
"moduleUrls": [
102102
"https://github.com/Netflix/dgs-codegen"
103103
],

licenses/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@
383383
},
384384
{
385385
"moduleName": "com.netflix.graphql.dgs.codegen:graphql-dgs-codegen-shared-core",
386-
"moduleVersion": "8.1.0",
386+
"moduleVersion": "8.3.0",
387387
"moduleUrls": [
388388
"https://github.com/Netflix/dgs-codegen"
389389
],

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
"node": ">=14.15",
1010
"npm": ">=5"
1111
},
12-
"packageManager": "yarn@4.9.2",
1312
"dependencies": {
1413
"husky": "9.1.7",
1514
"lint-staged": "16.1.2"
1615
},
1716
"scripts": {
18-
"postinstall": "husky install",
17+
"postinstall": "husky",
1918
"format": "./gradlew spotlessApply",
2019
"prepare": "husky"
21-
}
20+
},
21+
"packageManager": "yarn@4.13.0"
2222
}

0 commit comments

Comments
 (0)