1 00:00:05,070 --> 00:00:07,897 So you've gotten your first taste of GraphQL. 2 00:00:07,897 --> 00:00:12,940 Now we're going to dive in and understand the different parts that make up a query. 3 00:00:12,940 --> 00:00:17,720 In this video, we'll briefly go over each part before explaining them in more detail 4 00:00:17,720 --> 00:00:18,740 in the videos that follow. 5 00:00:19,810 --> 00:00:23,549 At its most basic, a query is composed of three parts, 6 00:00:23,549 --> 00:00:27,469 the query declaration, the endpoint, and the fields. 7 00:00:27,469 --> 00:00:32,605 The query declaration tells GraphQL that we'll only be retrieving information and 8 00:00:32,605 --> 00:00:34,130 not making any changes. 9 00:00:35,200 --> 00:00:38,150 In the curly braces following the query declaration, 10 00:00:38,150 --> 00:00:43,160 we specify which endpoint or endpoints we'd like to call. 11 00:00:43,160 --> 00:00:47,210 In this case, we're calling the topMoviebyRevenue endpoint, 12 00:00:47,210 --> 00:00:51,210 which will return the top earning movie we have in our backend. 13 00:00:51,210 --> 00:00:54,040 In the curly braces following the endpoint name, 14 00:00:54,040 --> 00:00:58,600 we specify the fields we want returned for that endpoint. 15 00:00:58,600 --> 00:01:01,642 This is how we tell GraphQL to include or 16 00:01:01,642 --> 00:01:05,432 exclude certain properties from our response. 17 00:01:05,432 --> 00:01:07,660 So that's the basic anatomy of a query. 18 00:01:07,660 --> 00:01:09,380 In the next video, 19 00:01:09,380 --> 00:01:13,730 you'll learn how to tell GraphQL which fields you want included in your response.