As long as the integrated graphics core or dedicated graphics chip is powerful enough to play the game. Naturally, a modern laptop with dedicated graphics will perform better than integrated graphics.
Below are two videos demo'ing the Sims 4 on different laptops. The first has a 6th generation Core i7-6500u with the Intel HD 520 in an Asus X555UA laptop and the game is being played at 1080p and medium settings. The second has a 7th generation Core i3-7100u with the Intel HD 620 on a Dell Inspiron 15-5567 laptop and the game is being played at 1366x768 with medium settings. A laptop with a nVidia 940mx graphics chip should have no problems playing the game at 1080p with high graphic settings.
https

/www.youtube.com/watch?v=IT2SGbZykhA...