The interactions of users and items in recommender systems can be naturally modeled as user- item bipartite graphs. The iterative propagation of graph neural networks (GNN) can explicitly exploit high-order connectivity from those user-item interactions. Apart from these advantages, there are two limitations to applying GNN for content-based recommendation: 1) To learn node representations, existing methods only depend on the graph topology but ignore the insightful relationship between the connected nodes. 2) The representations of nodes and edges were initialized randomly, which brings uncertainty to the training of the GNN model, thus making it difficult to converge. To address these issues, this study proposes a graph attention network with auxiliary pretraining (GAT-AP) for content-based collaborative filtering. It explicitly exploits the user-item graph structure twofold. First, an auxiliary personalized sentiment analysis task was applied by fine-tuning the BERT model to initialize the representations of nodes and edges by investigating the user preference for products based on the reviews of the users. Second, the obtained edge representations were used as the propagation constraints to assign different weights to the edges in GAT. Comparative results show the significant performance gains of GAT-AP and the necessity of node and edge initialization with auxiliary tasks.