GraphQL Tutorial #15 - More on Root Queries

preview_player
Показать описание

----- COURSE LINKS:

======== Other Tutorials =========

----- NODE.JS TUTORIALS

----- MONGODB TUTORIALS

----- REACT TUTORIALS

======== Social Links ==========

Рекомендации по теме
Комментарии
Автор

Woa :O My mind is blown! GraphQL looks super cool so far!

TheChodex
Автор

Amazing teacher with some "AMAZING STUFF" ahah ! I love GraphQL too now !

Shamzic
Автор

mind blown! such simplicity! such power!

nshosain
Автор

At this level of this tutorial I understand why I should use GraphQL, it's an amazing tool. T
hank you for sharing this knowledge with us <3

mahdibouaziz
Автор

4:17 that is seriously seriously amazing indeed!

MrMShake
Автор

This is pretty awesome, GraphQL is really blowing my mind

dicasparadevs
Автор

ohh my god graphql is amazing this really shocked me this make fetching data very easy to us

dilawarkhan
Автор

Hi Shaun! In 'authors' query how does GraphQL know which books belong to the author? We defined authors query which returns an array of authors, but we didn't specify which books did authors write.

orkhanrzali
Автор

Thanks so much Shaun, great playlist! One quick question: how to implement a many to many relationship between two types?

valentinoyoutub
Автор

Great effort
Can you tell how in the end all the books related to authers being showed on graphiql cause we have not done any relational data operation like for individual ones in previuos tutorials ?

inaamullah
Автор

Hello Shaun, how to make a query if a book is written by multiple author?

johnmoore
Автор

for retrieving all books, resolve is working without(parent, args) too. So is it really required for some other purpose?

akashkeshari
Автор

what if i want to pass arguments dynamically instead of pre-defined argument(id) in the root-query? Also what if i want to pass more than one argument in the root-query?

uppalapraveen
Автор

for the books query i am getting the author as null

architdutt
Автор

One Quick Question:
Can we pass default value to args of root query?

For example:
books: {
type: new GraphQLList(BookType),
args: { limit: {type: GraphQLInt, *default:* 20 }},
resolve(parent, args){
// get books
}
}

I tried this but I didn't work. So any other way we can do this?

PS: Thank you so much your awesome videos. I have been learning lot from you. <3

RahulRaval
Автор

If i test:
{
authors{
name
book{
name
}
}
}
i obtain:
{
"errors": [
{
"message": "Cannot query field \"books\" on type \"Author\". Did you mean \"book\"?",
"locations": [
{
"line": 4,
"column": 5
}
]
}
]
}
But if i use :
{
authors{
name
book{
name

}
}
}
I obtain the right strings of authors and books. It have sense because for each authors I ask for their books, so i must use the command in the RootQueryType "book".
Why do you obtain the list with "books"?

thank you for your work

stefano
Автор

I think you don't have to pass (parent, args) when you query books and authors. Nice tutorial tho

otwnati
Автор

Hello Shaun,

Thank you for another great playlist. Whereas many things are clear and understood, I'm struggling with formulating a schema for the below example, where there is an object nested within the data. Any pointers would be much appreciated.

Thanks again!!

'example'
var rates = [
{
"success": true,
"timestamp": 1430068515,
"source": "USD",
"quotes": {
"USDAUD": 1.278384,
"USDCHF": 0.953975,
"USDEUR": 0.919677,
"USDGBP": 0.658443,
"USDPLN": 3.713873
}
}
];

mizz
Автор

I'm using the extension REST Client for Visual Studio and saving all of my requests into a .http file that it recognizes and puts a nice "send request" button above them. If anyone has anything better for saving requests, let me know.

DavidHudman
Автор

What the fuck!!! You 're amazing Teacher!!!!

rodlu