File tree Expand file tree Collapse file tree 7 files changed +283
-364
lines changed
commercetools/commercetools-graphql-api
src/integrationTest/java/com/commercetools/graphql/api
commercetools-graphql-api Expand file tree Collapse file tree 7 files changed +283
-364
lines changed Original file line number Diff line number Diff line change @@ -25,3 +25,4 @@ c4e2bf407aa0b7a3d34605134791013ba8a2d376
252513fa17ad575aadf0ef823d63d86fbbdd4a37cd9b
2626f00f4fe6ed5e22cdd2e3f68370c2da96e6bbc8e7
2727899ed51a7b6607161fcda5c1000115a076cc4fe7
28+ 53b9d9cc4fc4091b89f84effb6e526371d3bae68
Original file line number Diff line number Diff line change 11import com.commercetools.sdk.plugins.GraphQLPlugin
22
33plugins {
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
Original file line number Diff line number Diff line change 55
66import com .commercetools .api .client .ProjectApiRoot ;
77import com .commercetools .graphql .CommercetoolsTestUtils ;
8- import com .commercetools .graphql .api .types .ProductQueryResult ;
8+ import com .commercetools .graphql .api .types .* ;
99
1010import 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}
Original file line number Diff line number Diff line change 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 ],
Original file line number Diff line number Diff line change 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 ],
Original file line number Diff line number Diff line change 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}
You can’t perform that action at this time.
0 commit comments