Jelajahi Sumber

fixed gql products language selection

bach 3 tahun lalu
induk
melakukan
14169ab24a

+ 2 - 0
web/modules/custom/materio_graphql/src/Plugin/GraphQL/SchemaExtension/MaterioSchemaExtension.php

@@ -1298,6 +1298,7 @@ class MaterioSchemaExtension extends SdlSchemaExtensionPluginBase {
         ->map('type', $builder->fromValue('commerce_product'))
         ->map('type', $builder->fromValue('commerce_product'))
         // ->map('bundles', $builder->fromValue(['materiau']))
         // ->map('bundles', $builder->fromValue(['materiau']))
         ->map('id', $builder->fromArgument('id'))
         ->map('id', $builder->fromArgument('id'))
+        ->map('language', $builder->fromArgument('lang'))
       );
       );
 
 
     $registry->addFieldResolver('Query', 'products',
     $registry->addFieldResolver('Query', 'products',
@@ -1305,6 +1306,7 @@ class MaterioSchemaExtension extends SdlSchemaExtensionPluginBase {
         ->map('type', $builder->fromValue('commerce_product'))
         ->map('type', $builder->fromValue('commerce_product'))
         // ->map('bundles', $builder->fromValue(['materiau']))
         // ->map('bundles', $builder->fromValue(['materiau']))
         ->map('ids', $builder->fromArgument('ids'))
         ->map('ids', $builder->fromArgument('ids'))
+        ->map('language', $builder->fromArgument('lang'))
     );
     );
 
 
     $registry->addFieldResolver('Product', 'id',
     $registry->addFieldResolver('Product', 'id',

File diff ditekan karena terlalu besar
+ 0 - 0
web/themes/custom/materiotheme/assets/dist/main.js


TEMPAT SAMPAH
web/themes/custom/materiotheme/assets/dist/main.js.gz


File diff ditekan karena terlalu besar
+ 1 - 1
web/themes/custom/materiotheme/assets/dist/report.html


+ 1 - 1
web/themes/custom/materiotheme/vuejs/store/modules/pages.js

@@ -50,7 +50,7 @@ export default {
     },
     },
     loadProducts ({ dispatch, commit, state }) {
     loadProducts ({ dispatch, commit, state }) {
       const ast = gql`{
       const ast = gql`{
-        products(ids: [${state.products_ids}]) {
+        products(ids: [${state.products_ids}], lang: "${drupalDecoupled.lang_code}") {
           ...ProductsFields
           ...ProductsFields
         }
         }
       }
       }

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini