From the course: Building a GraphQL Project with React.js

Unlock this course with a free trial

Join today to access over 22,500 courses taught by industry experts.

Using search queries

Using search queries

- [Instructor] Although, I can get my repository information like this, this is going to show me information for whoever is viewing the application. And what I want is a little bit different, I want to be able to get a specific account and then I'm going to eventually want to search through that account by creating a search query. So this is not the best way to get the information. So what I'm going to do, is I'm going to take this out. Actually, I'm going to go to the GraphQL Explorer because I did tell you that it's a much better way of doing this sort of thing. So in our query, we're going to extract all these repositories from there. And we're still going to want the user's name because we're saying, "hello username." But instead, we're going to use a search command here. And then on the search, we're going to ask it to return a query. And so this is the equivalent of when you go to GitHub and you do a search, you may…

Contents