profile
viewpoint
Esa-Matti Suuronen esamattis Valu Digital Oy Jyväskylä, Finland https://twitter.com/esamatti I write code and jump from airplanes

esamattis/browserify-externalize 75

Create external Browserify bundles for lazy asynchronous loading

esamattis/angry-caching-proxy 74

Make package downloads lightning fast!

esamattis/backbone.viewmaster 52

Few tested opinions on how to handle deeply nested views in Backbone.js focusing on modularity.

esamattis/babel-plugin-ts-optchain 25

Babel plugin for transpiling legacy browser support to ts-optchain by removing Proxy usage.

esamattis/carcounter 24

Asynchronous module loading example with Browserify

esamattis/babel-plugin-display-name-custom 14

display name inference for your custom react component creators

alexhanh/jade-highlight 5

Jade syntax highlighting for the ACE editor

esamattis/browserify-cs-example 3

Browserify v2 with CoffeeScript Source Maps

esamattis/anchor 1

Rsync implementation in node.js

esamattis/aswyg-editor 1

ASWYG Editor - Also See What You Get Editor

startedmartpie/next-transpile-modules

started time in 3 hours

issue closedvalu-digital/wp-graphql-polylang

How to get actual language for product [polylang/woocomerce]

Hi I have a problem with a get a real language for products. How can you download the current language of the product or is it possible?.Thanks for the help in advance "data": { "products": { "nodes": [ { "language": { "code": "PL" }, "name": "test", "slug": "91" }, { "language": { "code": "PL" <---- here it should be EN}, "name": "English prod", "slug": "test-prod" },

closed time in 3 days

MrHDOLEK

issue commentvalu-digital/wp-graphql-polylang

How to get actual language for product [polylang/woocomerce]

Unfortunately there's no Woocommerence support in this plugin. See https://github.com/valu-digital/wp-graphql-polylang/issues/34#issuecomment-712224991

MrHDOLEK

comment created time in 3 days

push eventvalu-digital/babel-gql

Esa-Matti Suuronen

commit sha 9415a6426d82e618c4e0d1103d65df5336c1db6c

If statements are hard

view details

push time in 4 days

created tagesamattis/npm-release

tagv2

Github action for npm (pre)releases

created time in 6 days

push eventesamattis/npm-release

Esa-Matti Suuronen

commit sha 826f17c7f75e87cc0efe1c06325f76c85a07e406

Suggest v2

view details

Esa-Matti Suuronen

commit sha 2b7db9e1b2829fb1c9258b9471659a09ec4e955c

prettier

view details

Esa-Matti Suuronen

commit sha 5da71b51a28c8907b35384b7a1f7e1f0990ecc68

Fix release script

view details

push time in 6 days

created tagesamattis/npm-release

tagv1

Github action for npm (pre)releases

created time in 6 days

delete tag esamattis/npm-release

delete tag : v1

delete time in 6 days

created tagesamattis/npm-release

tagv1

Github action for npm (pre)releases

created time in 6 days

delete tag esamattis/npm-release

delete tag : v1

delete time in 6 days

push eventesamattis/npm-release

Esa-Matti Suuronen

commit sha 84cf84b5ec76323a44fdbda4d1215d462cc21407

Do not bumb the version

view details

Esa-Matti Suuronen

commit sha c289c23a1826c7e29cd3b18ee7e10e324b64e304

prettier

view details

Esa-Matti Suuronen

commit sha a66f8f2157e9b08f16c7e90502da22299badafb8

Remove semver package

view details

Esa-Matti Suuronen

commit sha 2a1611b772337d8436e7ae201728f6ceb56bf121

commit dist

view details

Esa-Matti Suuronen

commit sha 9f12a429b0357e04f845b777513077d81f1a4409

2.0.0

view details

push time in 6 days

created tagesamattis/npm-release

tagv2.0.0

Github action for npm (pre)releases

created time in 6 days

push eventesamattis/slimux

Esa-Matti Suuronen

commit sha ebc0ef3164c07b00e0b63113cf627637af424352

Add maintenance notice

view details

push time in 7 days

issue closedvalu-digital/wp-graphql-polylang

The plugin does not show "language" for WooCommerce products

I am using wp-graphql-polylang and wp-graphql-woocommerce, but when querying products I cannot find the "language" schema. I now used a work around through an ACF select field, but it would be nice to have languages available for WooCommerce products 👍

closed time in 7 days

MobyDigg

issue commentvalu-digital/wp-graphql-polylang

The plugin does not show "language" for WooCommerce products

There's no WooCommerence support in this plugin and I don't think it even would belong to this plugin since WooCommerence support for Polylang is shipped in a seperate plugin:

https://polylang.pro/downloads/polylang-for-woocommerce/

I'd prefer seeing wp-graphql-polylang-woocommerce that would implement it.

That being said we don't have any plans to create one at the moment but would happily to link to one if somebody would create it.

MobyDigg

comment created time in 7 days

issue commentesamattis/slimux

Repository maintenance

Yeah, I don't personally use this anymore so cannot really dedicate time to maintain this actively. If somebody wants to start a fork that merges the PRs from here I'm happy to link to it from the README.

nraw

comment created time in 7 days

created tagesamattis/npm-release

tagv1

Github action for npm (pre)releases

created time in 8 days

delete tag esamattis/npm-release

delete tag : v1

delete time in 8 days

created tagesamattis/npm-release

tagv1.2.4

Github action for npm (pre)releases

created time in 8 days

push eventesamattis/npm-release

Esa-Matti Suuronen

commit sha f06184e1a1d9eed441f47a25e0caa874ca3fbce1

Upgrade deps

view details

Esa-Matti Suuronen

commit sha 7b16851c5e3915b525da35c83123f06b0443dcff

commit dist

view details

Esa-Matti Suuronen

commit sha ddf6b88393fc81ff5679e6a0e871ccfd50ce8f29

1.2.4

view details

push time in 8 days

push eventvalu-digital/babel-gql

Esa-Matti Suuronen

commit sha f9468da4532bdbf2f9a05f7482b34efbc9609e42

Check for file existence

view details

push time in 9 days

release esamattis/sh-thunk

v0.3.2

released time in 9 days

push eventesamattis/sh-thunk

Esa-Matti Suuronen

commit sha a5d8d6a67dd6e5601906b1fd396b7f4bf7d2690f

Allow plain string types

view details

Esa-Matti Suuronen

commit sha 7cb72b8fc7b1641e67e0b3afc1a090cd40dbff9e

0.3.2

view details

push time in 9 days

created tagesamattis/sh-thunk

tagv0.3.2

Generate promise returning thunks from shell strings.

created time in 9 days

release esamattis/sh-thunk

v0.3.1

released time in 9 days

push eventesamattis/sh-thunk

Esa-Matti Suuronen

commit sha 3b4c42ce76159e811341caec6beac6c99dacfe64

Fix bug with empty string

view details

Esa-Matti Suuronen

commit sha 3a54ec1a879ecce460ced53976a99b2055cc9542

0.3.1

view details

push time in 9 days

created tagesamattis/sh-thunk

tagv0.3.1

Generate promise returning thunks from shell strings.

created time in 9 days

push eventesamattis/sh-thunk

Esa-Matti Suuronen

commit sha aa3fc47a32e6db6da0a187ae5b93dd2f121d2672

Use printf in the tests

view details

Esa-Matti Suuronen

commit sha f0625fc2b4c7e9fcaff275ca9cff7bbaffc434b3

Test multiple expansions

view details

push time in 9 days

release valu-digital/create-async-hook

v0.0.4

released time in 11 days

push eventvalu-digital/create-async-hook

Esa-Matti Suuronen

commit sha 7ab2c7a2e99688da556ebc42616d3576a9511766

Target es5

view details

Esa-Matti Suuronen

commit sha 49efb26585beb9673f23a01668e817483f716a6b

0.0.4

view details

push time in 11 days

created tagvalu-digital/create-async-hook

tagv0.0.4

React Hook Factory for Async Functions

created time in 11 days

issue commentvalu-digital/wp-graphql-polylang

Neither `menu` nor `menuItem` has field "language"

Oh and just in case if you didn't notice. You can use the connectedNode field on a menu item to get node the menu item points to and if it a post type that is translated you can get the language of it of course.

Example:

{
  menuItems(where: {location: FOOTER_MENU, language: EN}) {
    nodes {
      label
      url
      connectedNode {
        node {
          ... on Page {
            title
            language {
              name
            }
          }
        }
      }
    }
  }
}
SilencerWeb

comment created time in 18 days

issue commentvalu-digital/wp-graphql-polylang

Neither `menu` nor `menuItem` has field "language"

Btw, you might want to read this comment if you want to better understand how the menus work in Polylang:

https://github.com/valu-digital/wp-graphql-polylang/issues/25#issuecomment-705703786

SilencerWeb

comment created time in 18 days

issue commentvalu-digital/wp-graphql-polylang

Neither `menu` nor `menuItem` has field "language"

Yup. That's just how Polylang works and there's really nothing we can do here. If you want them to be translatable you need to bring it up with the Polylang folks.

SilencerWeb

comment created time in 18 days

issue commentvalu-digital/wp-graphql-polylang

Neither `menu` nor `menuItem` has field "language"

From where would you get the language for it?

One menu can be assigned to a multiple locations so every menu and menu item can have multiple languages in a sense.

Just try this query

{
  menus {
    nodes {
      name
      locations
    }
  }
}

and you see that the locations field is an array.

SilencerWeb

comment created time in 18 days

push eventesamattis/toggl-paster

Esa-Matti Suuronen

commit sha c8aa88a5da6e465229bbb9c6089804855347e67e

fixup! Add copy date button

view details

push time in 18 days

push eventesamattis/toggl-paster

Esa-Matti Suuronen

commit sha 41d5ba0cfa9f0cfad39f25e7631507c22d362e95

Add copy date button

view details

push time in 18 days

push eventvalu-digital/wp-graphql-cache

Esa-Matti Suuronen

commit sha c8b3056ca9d83d290950219bf3d3abeb8e8c415b

Update README.md

view details

push time in 18 days

push eventvalu-digital/wp-graphql-cache

Esa-Matti Suuronen

commit sha d5958ff019a8fb9e9c5c3f216181e1d139fe5343

Test with wp-graphql 0.13.3

view details

push time in 18 days

push eventvalu-digital/wp-graphql-cache

Esa-Matti Suuronen

commit sha 763fa82b939350489fcbcad5d52184282d9c65d3

Update README.md

view details

push time in 18 days

delete branch valu-digital/wp-graphql-cache

delete branch : wp-graphql-0.13.3

delete time in 18 days

push eventvalu-digital/wp-graphql-cache

Esa-Matti Suuronen

commit sha 22f62ee917c2945e898cbcebfb505112b9069ec3

Test with wp-graphql 0.13.3

view details

Esa-Matti Suuronen

commit sha f897beaf697b70065ea1a0b232adfb371335e918

Merge pull request #4 from valu-digital/wp-graphql-0.13.3 Test with wp-graphql 0.13.3

view details

push time in 18 days

issue commentvalu-digital/wp-graphql-polylang

Add `language` where arg to `menus`

I don't quite follow. Can you provide the query you are using, what results you get and what did you expect getting?


But here's some background how the locations work internally in WP and Polylang which might clear things a bit.

When you register a menu location named PRIMARY and then enable Polylang and add three languages: EN, EE, FI and set EN as the default language. Polylang will then assume that the PRIMARY location is location for the default language EN. Then it will create additional locations based on the PRIMARY location for the other languages. Those will be PRIMARY___SE and PRIMARY___FI.

This means that when you query menu items without the language where arg using the PRIMARY location you will get the menu items from the default language. But when you add the language where arg wp-graphql-polylang just converts it to corresponding translated location.

Example:

menuItems(where: {location: PRIMARY, language: EE})

is the same as

menuItems(where: {location: PRIMARY___EE})

But if you do

menuItems(where: {location: PRIMARY, language: EN})

It's just

menuItems(where: {location: PRIMARY})

because EN was the default language.


This means with the menus field you can use the PRIMARY___* locations as a workaround until we have proper language where arg support in menus.

Btw, may I ask what's you use case for the menus field you cannot do with menuItems? I've mainly seen menus useful for reimplementing the WP menu builder.


But there's another discussion to had here too. Should the query without the language defined (ex. where: {location: PRIMARY}) return the menus / menu items from all languages and not the default. The current behaviour is inconsistent with how other fields (posts, terms) work in wp-graphql-polylang.


And last thing: I consider the PRIMARY___* location to be internal for Polylang and might remove them from the graphql api completely once we have all the required language where args in place.

esamattis

comment created time in 18 days

push eventvalu-digital/wp-graphql-cache

Esa-Matti Suuronen

commit sha e5bce1f65473ed1afe41858b34a3fe02b84c7c18

Document required wp-graphql version

view details

push time in 18 days

create barnchvalu-digital/wp-graphql-cache

branch : wp-graphql-0.13.3

created branch time in 18 days

push eventesamattis/jquery.panfullsize

Esa-Matti Suuronen

commit sha 152e38c4031186716ea38f87ad59cfd30f345c69

Fix demo link

view details

push time in 19 days

push eventesamattis/jquery.panfullsize

Esa-Matti Suuronen

commit sha b3e8718fd1c0dbc6fab8d6a8bc36793ced06dde3

https fix

view details

push time in 19 days

push eventesamattis/jquery.panfullsize

Esa-Matti Suuronen

commit sha 1e9b9dca6c15967f3654c106a82d4d6c1e8e76a9

https fix

view details

push time in 19 days

push eventesamattis/toggl-paster

Esa-Matti Suuronen

commit sha e7c6bb3e381b4431d7fe831f3e01ccbd26ff1ef2

Better styles

view details

Esa-Matti Suuronen

commit sha 51ee0dfcb0e4d6054cf1f982ae25f51f2bed9fad

Add day reset button

view details

Esa-Matti Suuronen

commit sha e6320272ccfddc088236ce0e77329998fee38b47

Add copy week button

view details

Esa-Matti Suuronen

commit sha 0b17967712e10e636b19b1a202bee792f92d26b5

jei

view details

push time in 20 days

push eventesamattis/toggl-paster

Esa-Matti Suuronen

commit sha a4f1230e7ffd90c50b7f4b354f065998637ed918

Entries without project as own project

view details

Esa-Matti Suuronen

commit sha 0840a02b351d0558e136c2c36d6f9f92e7dbd163

ADd sum buttons

view details

push time in 20 days

push eventesamattis/toggl-paster

Esa-Matti Suuronen

commit sha 173da316c9d7a1625fd9a830685bd6d6fdbcd2b8

upgrade

view details

Esa-Matti Suuronen

commit sha 7879416d090627175e607c7391a531253c0dd7aa

Add next.js

view details

Esa-Matti Suuronen

commit sha 573ce8dab49622839b0d9b02cc41e8ddd5f81749

Port to next js

view details

Esa-Matti Suuronen

commit sha 2e4d81a676adc6aa9eb45fd037d25958324c8df5

Add vscode config

view details

Esa-Matti Suuronen

commit sha 8223df3bdc61044ba4f6350289068b38731fbc32

add vscode config

view details

Esa-Matti Suuronen

commit sha 5e02189ee0f723979179137a7d222ba6f683fc9e

Run prettier

view details

push time in 20 days

IssuesEvent

issue commentvalu-digital/wp-graphql-polylang

Add `language` where arg to `menus`

Actually, menus could be filtered by the location and the location language.

esamattis

comment created time in 21 days

issue closedvalu-digital/wp-graphql-polylang

Neither `menu` nor `menuItem` has field "language"

Neither menu nor menuItem has field "language"

<details> <summary>Screenshots</summary>

image image </details>

WordPress v5.5.1 Polylang v2.8.2 WP GraphQL Polylang v0.5.0 WP GraphQL v0.13.1 WP GraphiQL v1.0.1

closed time in 21 days

SilencerWeb

issue closedvalu-digital/wp-graphql-polylang

Add `language` where arg to `menus`

So we could do this

{
  menus(where: {language: EN}) {
    nodes {
      slug
      name
    }
  }
}

closed time in 21 days

esamattis

issue commentvalu-digital/wp-graphql-polylang

Add `language` where arg to `menus`

Menus themselves are not translateable so this feature request is invalid.

See this comment:

https://github.com/valu-digital/wp-graphql-polylang/issues/33#issuecomment-703633500

esamattis

comment created time in 21 days

issue commentvalu-digital/wp-graphql-polylang

Neither `menu` nor `menuItem` has field "language"

You don't translate the menus or menu items themselves. Instead Polylang automatically generates localised versions of the menu locations you have created with register_nav_menus() and you are supposed create different menus for each language and assign them to the corresponding locations.

Using the location and language where args it is possible to query menu items by the language:

{
    # Get translated version of a given menu
    menuItems(where: { language: EN, location: FOOTER_MENU }) {
        nodes {
            label
            url
        }
    }
}
SilencerWeb

comment created time in 21 days

startedpmndrs/zustand

started time in 23 days

startedpmndrs/jotai

started time in 23 days

push eventvalu-digital/wp-graphql-polylang

Esa-Matti Suuronen

commit sha 047847b01eb40eea6740196897fb566edf7cc9c3

Update README.md

view details

push time in 24 days

push eventvalu-digital/wp-graphql-polylang

Esa-Matti Suuronen

commit sha 7f458bf3297d525d03efe38a4b22b02c55607845

Remove old travis badge

view details

push time in 24 days

pull request commentvalu-digital/wp-graphql-polylang

Add support for previews

Released in v0.5.0 https://github.com/valu-digital/wp-graphql-polylang/compare/v0.4.0...v0.5.0

vilpersson

comment created time in a month

issue commentvalu-digital/wp-graphql-polylang

Menu-Language not working

Fixed in v0.5.0 https://github.com/valu-digital/wp-graphql-polylang/compare/v0.4.0...v0.5.0

davidfaber

comment created time in a month

release valu-digital/wp-graphql-polylang

v0.5.0

released time in a month

push eventvalu-digital/wp-graphql-polylang

Esa-Matti Suuronen

commit sha 74cd88d6377a1c7fe17edc79066ee66403e6a450

Bind wp-browser to 2.2 minor

view details

Esa-Matti Suuronen

commit sha a3e6bcf360b194731a199af9090c1f4f573feda8

Add pagination test with language filter

view details

Esa-Matti Suuronen

commit sha 69195789b20ebaa5fa3534f8c025b182a4caf9ba

Fix test table prefix

view details

Esa-Matti Suuronen

commit sha 288ba7dd31ffa0d5d4b39a27c0e6195625537002

Link to rburgst/wp-graphql-wpml

view details

Esa-Matti Suuronen

commit sha 73d6947116a576d32dcc0f55e9c212ec051bd6c1

Update README.md

view details

David Faber

commit sha 84d725f99da0ca289eea0bdb873a12aeca51ec00

Finding a new way of querying menuItems for a language

view details

David Faber

commit sha 18caf1ce7c9c8f16382eb1f05ce7c7f4ea226fa4

Only filtering for menu-items

view details

Ville Huumo

commit sha f6d22628572acb82e7787eb93af7c7420592eda6

Add support for previews

view details

Esa-Matti Suuronen

commit sha c2a8101095320baa8f1635dba4fd7055809e4622

Add MenuItemsQueriesTest

view details

Esa-Matti Suuronen

commit sha 1cc78325d400c76d6eb5cb58fde6af9630c80cae

Merge remote-tracking branch 'davidfaber/menuLanguages'

view details

Esa-Matti Suuronen

commit sha 58573bf4467f528460cf0c472cafe0d6b9da1380

Hack around $resolver->get_query_args()

view details

Esa-Matti Suuronen

commit sha 3f3a2de5cd4da63bd4c702ac2638cdecc14476f9

fixup! Hack around $resolver->get_query_args()

view details

Esa-Matti Suuronen

commit sha b4e9417646e0cd8e0ee3d019e13aef2bbd0872b2

Coding style clean up

view details

Esa-Matti Suuronen

commit sha 12da0a00a413845e3c780da85bd61c529e4dc131

Bind plugin dep versions

view details

Esa-Matti Suuronen

commit sha a82a0e651be6c5b011895a74023521d6959cd817

Fix cleanup fails

view details

Esa-Matti Suuronen

commit sha d8d5d790e707c37a8cb05b1b9c1738311e420a03

Fix assertion args order

view details

Esa-Matti Suuronen

commit sha 7ccf98868667cdbe989e5f975348410f2a0e6e44

Fix menuItems with the default language

view details

Esa-Matti Suuronen

commit sha 7c4242cfee5714598341abaefeafac44c5c34b2b

Merge remote-tracking branch 'origin/master' into previews

view details

Esa-Matti Suuronen

commit sha bebf17a1c4a253498e84bd00584db7a6ee4aa810

Add preview tests

view details

Esa-Matti Suuronen

commit sha 659d1011c704fb19f61c6c6c24f80c7c0eca9a3d

Fix 'translations' when fetching preview

view details

push time in a month

created tagvalu-digital/wp-graphql-polylang

tagv0.5.0

WPGraphQL Polylang Extension for WordPress

created time in a month

push eventvalu-digital/wp-graphql-polylang

Esa-Matti Suuronen

commit sha 55da6b2d1baced45e43b30f5282c868d5fef6d98

Release v0.5.0

view details

push time in a month

delete branch valu-digital/wp-graphql-polylang

delete branch : polylang-update

delete time in a month

push eventvalu-digital/wp-graphql-polylang

Esa-Matti Suuronen

commit sha a8511e563f6984348dfcbc77ef68d2183590d73a

Try new polylang

view details

Esa-Matti Suuronen

commit sha c49b6e930d9d7489bdaf9f8351ada9ce1ed90258

Fix PLL_SETTINGS_INC removal in tests https://github.com/polylang/polylang/commit/cd6fdeeef9490096d6380dd9211106c325b04a2a

view details

Esa-Matti Suuronen

commit sha 70b211bc5a66d7801673a24845051a91a174a111

Remove debug log

view details

Esa-Matti Suuronen

commit sha aade5db3803e3f838c232c88123fdae585a3f3e0

Fix polyang 2.8 initialization in the tests

view details

Esa-Matti Suuronen

commit sha f6aec75224fa507d6d6af4b18fc06403151bc135

Merge pull request #32 from valu-digital/polylang-update

view details

push time in a month

push eventvalu-digital/wp-graphql-polylang

Esa-Matti Suuronen

commit sha aade5db3803e3f838c232c88123fdae585a3f3e0

Fix polyang 2.8 initialization in the tests

view details

push time in a month

push eventvalu-digital/wp-graphql-polylang

Esa-Matti Suuronen

commit sha 70b211bc5a66d7801673a24845051a91a174a111

Remove debug log

view details

Esa-Matti Suuronen

commit sha 73439916b5f8bf342ece5abedf1eb30a3e787d89

Fix polyang 2.8 initialization in the tests

view details

push time in a month

push eventvalu-digital/wp-graphql-polylang

Esa-Matti Suuronen

commit sha c49b6e930d9d7489bdaf9f8351ada9ce1ed90258

Fix PLL_SETTINGS_INC removal in tests https://github.com/polylang/polylang/commit/cd6fdeeef9490096d6380dd9211106c325b04a2a

view details

push time in a month

create barnchvalu-digital/wp-graphql-polylang

branch : polylang-update

created branch time in a month

pull request commentvalu-digital/wp-graphql-polylang

Add support for previews

Merged, thank you!

Made couple additional fixes to this:

Must remove the original parent from the translations list to avoid duplicate entries https://github.com/valu-digital/wp-graphql-polylang/commit/659d1011c704fb19f61c6c6c24f80c7c0eca9a3d

Also needed to use the parent id for the name and locale fields too https://github.com/valu-digital/wp-graphql-polylang/commit/c521f30fb2d852987ed28f6ccbf1fc76d6a0b741

vilpersson

comment created time in a month

push eventvalu-digital/wp-graphql-polylang

Ville Huumo

commit sha f6d22628572acb82e7787eb93af7c7420592eda6

Add support for previews

view details

Esa-Matti Suuronen

commit sha 7c4242cfee5714598341abaefeafac44c5c34b2b

Merge remote-tracking branch 'origin/master' into previews

view details

Esa-Matti Suuronen

commit sha bebf17a1c4a253498e84bd00584db7a6ee4aa810

Add preview tests

view details

Esa-Matti Suuronen

commit sha 659d1011c704fb19f61c6c6c24f80c7c0eca9a3d

Fix 'translations' when fetching preview

view details

Esa-Matti Suuronen

commit sha c6978580d80f75ae8ce0d9762269a9dc5c6a0021

Fix test file name

view details

Esa-Matti Suuronen

commit sha 3af0d56f5c2f093315b94dd4fdf8e119b747804b

Fix preview language.code test

view details

Esa-Matti Suuronen

commit sha c521f30fb2d852987ed28f6ccbf1fc76d6a0b741

Fix language.name and language.slug in previews

view details

Esa-Matti Suuronen

commit sha 0b400836ef81f03aed3992b2a8e840393b224a24

Merge pull request #30 from vilpersson/master

view details

push time in a month

PR merged valu-digital/wp-graphql-polylang

Add support for previews

Returns languages and translations when querying post previews.

+152 -7

5 comments

2 changed files

vilpersson

pr closed time in a month

push eventvilpersson/wp-graphql-polylang

Esa-Matti Suuronen

commit sha 3af0d56f5c2f093315b94dd4fdf8e119b747804b

Fix preview language.code test

view details

Esa-Matti Suuronen

commit sha c521f30fb2d852987ed28f6ccbf1fc76d6a0b741

Fix language.name and language.slug in previews

view details

push time in a month

pull request commentvalu-digital/wp-graphql-polylang

Add support for previews

Ah. It seems that in a real WP instance the language of preview is not set at all so we need to fallback to the language of the original post.

vilpersson

comment created time in a month

pull request commentvalu-digital/wp-graphql-polylang

Add support for previews

It explicitly set here in the test:

https://github.com/valu-digital/wp-graphql-polylang/pull/30/files#diff-c9b04d9613c130bcf51b35ed35bf1490R42

But I'll test this in a real WP env. Unit testing Polylang correctly is actually quite hard since it's initialization so tied to the normal WP boot up.

vilpersson

comment created time in a month

pull request commentvalu-digital/wp-graphql-polylang

Add support for previews

Oh wait. Now it fails in the CI 🤔

vilpersson

comment created time in a month

pull request commentvalu-digital/wp-graphql-polylang

Add support for previews

Merged master here and added tests.

For some reason the testCanHaveLanguageField passed even without your changes.

https://github.com/valu-digital/wp-graphql-polylang/blob/bebf17a1c4a253498e84bd00584db7a6ee4aa810/tests/wpunit/PostPreviewQueryTest.php#L25-L59

Can you eleborate when it failed before?

vilpersson

comment created time in a month

push eventvilpersson/wp-graphql-polylang

Esa-Matti Suuronen

commit sha c6978580d80f75ae8ce0d9762269a9dc5c6a0021

Fix test file name

view details

push time in a month

push eventvilpersson/wp-graphql-polylang

David Faber

commit sha 84d725f99da0ca289eea0bdb873a12aeca51ec00

Finding a new way of querying menuItems for a language

view details

David Faber

commit sha 18caf1ce7c9c8f16382eb1f05ce7c7f4ea226fa4

Only filtering for menu-items

view details

Esa-Matti Suuronen

commit sha c2a8101095320baa8f1635dba4fd7055809e4622

Add MenuItemsQueriesTest

view details

Esa-Matti Suuronen

commit sha 1cc78325d400c76d6eb5cb58fde6af9630c80cae

Merge remote-tracking branch 'davidfaber/menuLanguages'

view details

Esa-Matti Suuronen

commit sha 58573bf4467f528460cf0c472cafe0d6b9da1380

Hack around $resolver->get_query_args()

view details

Esa-Matti Suuronen

commit sha 3f3a2de5cd4da63bd4c702ac2638cdecc14476f9

fixup! Hack around $resolver->get_query_args()

view details

Esa-Matti Suuronen

commit sha b4e9417646e0cd8e0ee3d019e13aef2bbd0872b2

Coding style clean up

view details

Esa-Matti Suuronen

commit sha 12da0a00a413845e3c780da85bd61c529e4dc131

Bind plugin dep versions

view details

Esa-Matti Suuronen

commit sha a82a0e651be6c5b011895a74023521d6959cd817

Fix cleanup fails

view details

Esa-Matti Suuronen

commit sha d8d5d790e707c37a8cb05b1b9c1738311e420a03

Fix assertion args order

view details

Esa-Matti Suuronen

commit sha 7ccf98868667cdbe989e5f975348410f2a0e6e44

Fix menuItems with the default language

view details

Esa-Matti Suuronen

commit sha 7c4242cfee5714598341abaefeafac44c5c34b2b

Merge remote-tracking branch 'origin/master' into previews

view details

Esa-Matti Suuronen

commit sha bebf17a1c4a253498e84bd00584db7a6ee4aa810

Add preview tests

view details

Esa-Matti Suuronen

commit sha 659d1011c704fb19f61c6c6c24f80c7c0eca9a3d

Fix 'translations' when fetching preview

view details

push time in a month

push eventvalu-digital/wp-graphql-polylang

Esa-Matti Suuronen

commit sha d8d5d790e707c37a8cb05b1b9c1738311e420a03

Fix assertion args order

view details

Esa-Matti Suuronen

commit sha 7ccf98868667cdbe989e5f975348410f2a0e6e44

Fix menuItems with the default language

view details

push time in a month

push eventvalu-digital/wp-graphql-polylang

Esa-Matti Suuronen

commit sha 12da0a00a413845e3c780da85bd61c529e4dc131

Bind plugin dep versions

view details

Esa-Matti Suuronen

commit sha a82a0e651be6c5b011895a74023521d6959cd817

Fix cleanup fails

view details

push time in a month

push eventvalu-digital/wp-graphql-polylang

Esa-Matti Suuronen

commit sha fe9a43c53d6e5c1419fb1a752cf5884da82971de

Fix args ref

view details

push time in a month

delete branch valu-digital/wp-graphql-polylang

delete branch : esamattis-patch-1

delete time in a month

push eventvalu-digital/wp-graphql-polylang

Esa-Matti Suuronen

commit sha b6ac31a4c0839036373a5743b605680aeffae835

Bind plugin dep versions

view details

Esa-Matti Suuronen

commit sha 38064fc263eb70e5f3f0e6d100f7fe18892d1034

Merge pull request #31 from valu-digital/esamattis-patch-1 Bind plugin dep versions

view details

push time in a month

pull request commentvalu-digital/wp-graphql-polylang

Bind plugin dep versions

Oops. No it wasn't.

esamattis

comment created time in a month

PullRequestEvent

issue closedvalu-digital/wp-graphql-polylang

Menu-Language not working

Hi there, First of all, wp-graphql-polylang is awesome!

I found an issue when using it with WPGraphql Version 0.12.3 where menu-languages are not working anymore.

I figured out, that the filter graphql_menu_item_connection_args you're using has been removed and is not applied anymore.

Maybe there is another way, but I couldn't find one.

Thanks in advance, David

closed time in a month

davidfaber

issue commentvalu-digital/wp-graphql-polylang

Menu-Language not working

Fixed by https://github.com/valu-digital/wp-graphql-polylang/pull/29

davidfaber

comment created time in a month

pull request commentvalu-digital/wp-graphql-polylang

Finding a new way of querying menuItems for a language

Merged but after poking around I found a "better" way to do this without copy/pasting code from the wp-graphql:

https://github.com/valu-digital/wp-graphql-polylang/commit/58573bf4467f528460cf0c472cafe0d6b9da1380

Still terrible but works for now. I also added tests for this.

I'll probably contribute a new proper filter for this to wp-graphql once we figure out with @jasonbahl where to put it.

davidfaber

comment created time in a month

pull request commentvalu-digital/wp-graphql-polylang

Bind plugin dep versions

manually merged

esamattis

comment created time in a month

more