  Next Point-of-Interest (POI) recommendation plays a crucial role in urban
mobility applications. Recently, POI recommendation models based on Graph
Neural Networks (GNN) have been extensively studied and achieved, however, the
effective incorporation of both spatial and temporal information into such
GNN-based models remains challenging. Extracting distinct fine-grained features
unique to each piece of information is difficult since temporal information
often includes spatial information, as users tend to visit nearby POIs. To
address the challenge, we propose \textbf{\underline{Mob}}ility
\textbf{\underline{G}}raph \textbf{\underline{T}}ransformer (MobGT) that
enables us to fully leverage graphs to capture both the spatial and temporal
features in users' mobility patterns. MobGT combines individual spatial and
temporal graph encoders to capture unique features and global user-location
relations. Additionally, it incorporates a mobility encoder based on Graph
Transformer to extract higher-order information between POIs. To address the
long-tailed problem in spatial-temporal data, MobGT introduces a novel loss
function, Tail Loss. Experimental results demonstrate that MobGT outperforms
state-of-the-art models on various datasets and metrics, achieving 24\%
improvement on average. Our codes are available at
\url{https://github.com/Yukayo/MobGT}.
