Create a GraphQL Schema

Share this video with your friends

Send Tweet

In this video, we’ll take a look at the GraphQL Language and write out our first GraphQL Schema. We’ll use the graphql package available to us through npm to parse our graphql language file and resolve our initial query.

Mithun
Mithun
~ 8 years ago

The line endings seen in the editor are distracting.

A feedback would be that their display be turned off when recording videos, especially as we are looking at the video and attempting to write the code present.

Josh Black
Josh Black(instructor)
~ 8 years ago

Hi Mithun! Just wanted to say thanks for watching the video!

RE: the line endings, totally understand! They definitely add visual clutter when looking at the code. Will try and remedy this in future so it's not as distracting 😄

Nate Gibbons
Nate Gibbons
~ 8 years ago

which terminal & font set are you using?

Ian
Ian
~ 8 years ago

Thanks for the course, it came at the perfect time as I was looking to dive into Graphql from scratch.

By the way, are you using a theme for your ZSH profile? Anything you can share? I like the simplicity of it.

It reminds me that I really need to get more fluent with VIM too. :P

Josh Black
Josh Black(instructor)
~ 8 years ago

Hi marshallformua! The terminal I'm using right now is iTerm2, with a zsh profile, and then Operator Mono for the font.

Thanks for watching, by the way!

Josh Black
Josh Black(instructor)
~ 8 years ago

Hi Ian! Glad that the content for this course was helpful, thank you so much for watching!

And I definitely can share the profile settings, since I actually grabbed them from someone else's dotfiles 😂.

Most of the configuration for what I have comes from Greg Hurrell, working on Relay for Facebook. He posted his config setup under wincent/wincent on GitHub. Most of the theme stuff and vim pieces come from that.

Let me know if you have any more questions! And thanks again for watching 😄

Chris Pauley
Chris Pauley
~ 8 years ago

Which version of node is required?

After I typed your sample code and typed "node index.js", I get the following error:

const { graphql, buildSchema } = require('graphql'); ^

SyntaxError: Unexpected token {

Josh Black
Josh Black(instructor)
~ 8 years ago

Hi Chris! The version of Node that I used for this series was v6.x. Hope that helps!

ian morton
ian morton
~ 6 years ago

I get this from the query, not sure how to fix it, { data: [Object: null prototype] { foo: 'bar' } }

Oleksandr Lidak
Oleksandr Lidak
~ 5 years ago

I can not watch it! I've got undefined. Exception: ERROR_LOADING just in the middle the fifth time today

Yannis
Yannis
~ 5 years ago

Would it be possible to connect this server with React Apollo ?