@@ -156,9 +156,9 @@ public function redirects(): array
156156
157157 public function posts (?string $ lang = null ): array |Collection |null
158158 {
159- return Cache::remember ($ lang ?? $ this -> lang . ' _ ' . 'allPosts ' , $ this ->ttl , function () {
159+ return Cache::remember ('allPosts ' , $ this ->ttl , function () {
160160 $ gql = (new Query ('posts ' ))
161- ->setArguments (['locales ' => new RawObject ( $ lang ?? $ this -> lang ), ' orderBy ' => new RawObject ('publicationDate_DESC ' )])
161+ ->setArguments (['orderBy ' => new RawObject ('publicationDate_DESC ' )])
162162 ->setSelectionSet (
163163 [
164164 'id ' ,
@@ -179,9 +179,9 @@ public function posts(?string $lang = null): array|Collection|null
179179
180180 public function categories (): array |null
181181 {
182- return Cache::remember ($ this -> lang . ' _ ' . 'allPostCategories ' , $ this ->ttl , function () {
182+ return Cache::remember ('allPostCategories ' , $ this ->ttl , function () {
183183 $ gql = (new Query ('categories ' ))
184- ->setArguments (['locales ' => new RawObject ( $ this -> lang ), ' orderBy ' => new RawObject ('name_ASC ' )])
184+ ->setArguments (['orderBy ' => new RawObject ('name_ASC ' )])
185185 ->setSelectionSet (['id ' , 'name ' , 'slug ' ]);
186186
187187 return $ this ->query ($ gql )->categories ;
@@ -190,9 +190,9 @@ public function categories(): array|null
190190
191191 public function article (string $ slug ): object |null
192192 {
193- return Cache::remember ($ this -> lang . ' _ ' . 'article_ ' .$ slug , $ this ->ttl , function () use ($ slug ) {
193+ return Cache::remember ('article_ ' .$ slug , $ this ->ttl , function () use ($ slug ) {
194194 $ gql = (new Query ('post ' ))
195- ->setArguments (['locales ' => new RawObject ( $ this -> lang ), ' where ' => new RawObject ('{slug: " ' .$ slug .'"} ' )])
195+ ->setArguments (['where ' => new RawObject ('{slug: " ' .$ slug .'"} ' )])
196196 ->setSelectionSet (
197197 [
198198 'id ' ,
@@ -240,9 +240,9 @@ public function article(string $slug): object|null
240240
241241 public function featuredPosts (): array |null
242242 {
243- return Cache::remember ($ this -> lang . ' _ ' . 'featuredPosts ' , $ this ->ttl , function () {
243+ return Cache::remember ('featuredPosts ' , $ this ->ttl , function () {
244244 $ gql = (new Query ('posts ' ))
245- ->setArguments (['locales ' => new RawObject ( $ this -> lang ), ' where ' => new RawObject ('{isFeatured: true} ' ), 'orderBy ' => new RawObject ('publicationDate_DESC ' )])
245+ ->setArguments (['where ' => new RawObject ('{isFeatured: true} ' ), 'orderBy ' => new RawObject ('publicationDate_DESC ' )])
246246 ->setSelectionSet (
247247 [
248248 'id ' ,
@@ -263,7 +263,7 @@ public function featuredPosts(): array|null
263263 public function relatedPosts (array $ ids ): array |null
264264 {
265265 $ gql = (new Query ('posts ' ))
266- ->setArguments (['locales ' => new RawObject ( $ this -> lang ), ' where ' => new RawObject ('{id_in: [" ' .implode ('"," ' , $ ids ).'"]} ' )])
266+ ->setArguments (['where ' => new RawObject ('{id_in: [" ' .implode ('"," ' , $ ids ).'"]} ' )])
267267 ->setSelectionSet (
268268 [
269269 'id ' ,
0 commit comments