howtographql / howtographql Goto Github PK
View Code? Open in Web Editor NEWThe Fullstack Tutorial for GraphQL
Home Page: https://www.howtographql.com/
License: MIT License
The Fullstack Tutorial for GraphQL
Home Page: https://www.howtographql.com/
License: MIT License
"This is a special GraphQ object that gets passed to all resolvers"
should be "GraphQL" instead of "GraphQ"
We need to agree to the terminology for the following things:
image with url https://iimgur.com/zvrTREp.png
should have url https://imgur.com/zvrTREp.png
I've noticed today, while adding some instruction annotations to the graphql-js
tutorial, that one of the places I was trying to add it to wasn't working. It seems to be something related to ordered lists. I'm adding <Instruction>
right before such a list like this:
It's time to start creating your project. For this, follow these steps:
<Instruction>
1. First, you'll need is to have Node.js installed on your machine. If you don't yet, make sure to do it [now](https://nodejs.org/en/). Note that the code samples here assume the latest versions of Node.js, with ES6 support, so it's best if that's what you have as well.
2. Setup your **package.json** by typing `npm init -y` in the terminal, inside the folder of your choice.
3. Install dependencies:
```
npm i —save express body-parser graphql-server-express graphql-tools graphql
```
</Instruction>
But it's just ignored when I run the site with gatsby:
If I move the opening <Instruction>
tag up to the paragraph right before the list, it's detected, but the list itself isn't shown:
On the second lesson of the Graphcool tutorial the graphcool status
command is taught after the graphcool push
command has likely been put into the learner's console. This might stop them from seeing what graphcool status
will output. I think if you are going to include the graphcool status
command in this tutorial, which I think makes sense, it'd be the best learning experience if they were introduced to it before they push their data off to the server.
I am willing to come up with a few changes here if you think this would be a good change.
/graphql gives a 404 not found in 'Queries' lesson.
At "Install Dependancies" install command
npm install —save express body-parser graphql-server-express graphql-tools graphql
should have ascii dash -
before save
, so should be,
npm install -save express body-parser graphql-server-express graphql-tools graphql
Navigating in chrome browser to https://www.howtographql.com/?v1 gives NET::ERR_CERT_AUTHORITY_INVALID
Ideas:
import
featureproject.graphcool
/ authenticable typesI've just noticed that links inside instruction blocks are not very noticeable. They look like regular text unless tou actually try hovering over them, which can be bad in some cases, as the reader needs to know about the link beforehand.
For example, without hovering:
I'd expect the links to show up as bold text or another color, like they do outside instruction blocks, for example:
Just a suggestion :)
This brings up a different problem: In a GraphQL query where we ask want to retrieve information about a Child but only have a Person type to work with, how do we know whether we can actually access this field?
I think maybe the correct would be:
This brings up a different problem: In a GraphQL query where we ask to retrieve information about a Child but only have a Person type to work with, how do we know whether we can actually access this field?
The last line of the Queries: Loading Links chapter of the React + Apollo tutorial reads:
That’s it! Go ahead and run yarn start again. You should see the exact same screen as before.
But as no mutations have been executed as part of the chapter, the content of the response to the query is an empty list of links: {"data":{"allLinks":[]}}
, so the 2 links provided as mock data are no longer displayed.
n
<title>
/content
target=_blank
First create the example project in go (a Hackernews clone based on the GraphQL schema that’s also used in the other frontend/backend tracks)
Then write the tutorial similar to the other tutorials
I get it really doesn't matter but shouldn't
7-.using-data-loaders.md
be named
7-using-data-loaders.md
Currently the mutations look like the following:
type Mutation {
signinUser(email: AUTH_PROVIDER_EMAIL): SigninPayload!
createUser(name: String!, authProvider: AuthProviderSignupData!): User
createLink(description: String!, url: String!, postedById: ID): Link
createVote(linkId: ID, userId: ID): Vote
}
One problem is how are we going to handle validation errors.
For example createLink
can fail if url
is already posted or description is too short.
The current schema doesn't express this. If keep the current schema, the only way to handle is through the graphql build-in errors, which are quite hard to handle on the client forms.
In my projects, I use the following format for mutations:
type Mutation {
// have Relay style input, makes it easy
// to get form state and dump it directly into the mutation
// (this would also make the schema usable in Relay examples)
createLink(input: CreateLinkInput): CreateLinkPayload
}
input CreateLinkInput {
description: String!
url: String!
postedById: ID
}
// all mutations return `node` (created/updated/remove) root node
// and array of errors (having those make it easy to present them in a form)
type CreateLinkPayload {
node: Link
errors: [ValidationError!]
}
// error contain field, message (can be code or user presentable string)
type ValidationError {
field: String!
message: String!
}
What do you think?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.