Neither graphic design or web design will help you to build mobile applications. At least not directly. Of the two, web design would be closer, but it won’t help beyond interface design.
First you need an education in the fundamentals of programming (logic design, control and data structures, et cetera). Depending on what you want the app to do, you’ll also need classes in database and/or network programming. That is all to build the working guts of the app and not something either of the programs mention generally cover in any detail. Where they would be the best help is in the user interface design (UI} . Some programming sequences will have some UI classes, but it’s not guaranteed.
In addition to the basic understanding of programming, you have to specifically learn the Swift language. This is only used on iOS so finding classes might be difficult. If you want to become a professional developer you’d also need to learn Java programming for Android development. Most decent sized companies will not hire someone that can only develop on one platform.
If you just want to learn for fun there are plenty of books and tutorials out there. Most will assume the basic program design knowledge.