GraphQL Tutorial #10 - Testing Queries in Graphiql

preview_player
Показать описание
Hey, in this GraphQL tutorial I'll be explaining how we can use that front-end querying tool called Graphiql, to test out our GraphQL server.

----- COURSE LINKS:

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

----- NODE.JS TUTORIALS

----- MONGODB TUTORIALS

----- REACT TUTORIALS

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

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

const { graphqlHTTP } = require('express-graphql'); for anyone get error!

stevenlee
Автор

here i am, trying to modernize my skillset by finally learning GQL. this tutorial series is the only one available out there that's not boring to listen to, of great quality, and free! thank you for this!

imnoodlehaus
Автор

this is very nice, "wa la" made me really happy!

Khan_
Автор

This whole series is really amazing!! Thanks so much!!

oleersoy
Автор

this guy is really cool teacher, love your tutorials man ! :)

prashantkumartripathi
Автор

5:24 Graphql you take care of the REST!

cryptonative
Автор

fantastic breakdown of stuff, Ninja doing a great job of explaining concepts etc. Thanks!

MrTobypowell
Автор

Very very nice, Thanks so much for the fantastic tutorial

mohamedosama
Автор

Thank you! Seriously fantastic. Keep 'em coming!! :)

nicot
Автор

thank you for this amazing series.. good luck <3

hussein.h
Автор

awesome! i'am so grateful for these content, just great!

hachij_
Автор

Gotta love the self documenting nature of Graphql

abe
Автор

Hi @The Net Ninja.

I have a question.

Let's say if I want to search the books by specifying some other parameter, let's say genre.

In that case, would I have to create a new field inside the RootQuery or I can take advantage of the books field which currently uses the id as an arg and somehow use genre instead of id from the args to make my search on lodash?

Thanks.

harisrg
Автор

for those who find graphqlHTTP is not a server
import { graphqlHTTP } and not just import graphqlHTTP

sourabhvaishnav
Автор

Is it a good idea to fetch all available data and search for id it? directly querying DB on id would be better considering performance.

rishikeshct
Автор

Hi BlackBelt, very cool video. what about a course in graphql but used in mobile app maybe using nativescript framework or just andorid java programming. would it be super nice

corsaronero
Автор

hoping for one project betwwen graph ql with react native

ngoclichtran
Автор

I am trying to make this work, stuck on lesson 10 - my code is exactly the same as yours but when I try to run it I get "Error: One of the provided types for building the Schema is missing a name." Help please!

jodid
Автор

Thank you for the tutorials! I'm getting an error message "Expected string but found 'book'" with the query { book: }, with the following schema (which I copied from the source files when I couldn't find a problem in mine) - any idea what could be wrong?

const graphql = require('graphql');
const _ = require('lodash');

const { GraphQLObjectType,
GraphQLString,
GraphQLSchema,
GraphQLID } = graphql;

// dummy data
var books = [
{ name: 'Name of the Wind', genre: 'Fantasy', id: '1' },
{ name: 'The Final Empire', genre: 'Fantasy', id: '2' },
{ name: 'The Long Earth', genre: 'Sci-Fi', id: '3' },
];

const BookType = new GraphQLObjectType({
name: "Book",
fields: ( ) => ({
id: { type: GraphQLID },
name: { type: GraphQLString },
genre: { type: GraphQLString }
})
});

const RootQuery = new GraphQLObjectType({
name: 'RootQueryType',
fields: {
book: {
type: BookType,
args: { id: { type: GraphQLID } },
resolve(parent, args){
// code to get data from db / other source
return _.find(books, { id: args.id });
}
}
}
});

module.exports = new GraphQLSchema({
query: RootQuery
});

jesseallaway
Автор

Hi can you make these same videos but using mysql instead. Pleaseee

raytosh