learnrelay / pokedex Goto Github PK
View Code? Open in Web Editor NEWPokedex example app using and teaching Relay and GraphQL
Home Page: http://demo.learnrelay.org
Pokedex example app using and teaching Relay and GraphQL
Home Page: http://demo.learnrelay.org
see also learnrelay/learnrelay#20
Our current workflow goes like this:
Changes to the separate steps should be made in the respective folder in the
master
branch. After all changes, theupdate-branches.sh
script should be executed that syncs these folders with the separate branches.
This is an issue when contributors create a pull request for a separate branch, as the master
branch falls out of sync. Also, when the PR is merged but afterwards the update-branches.sh
script is executed, the commits on the branch are lost.
The following things have to be done:
update-branches.sh
step-01
, step-01-solution
and step-05
A suggestion for a PR workflow:
.gitignore
in master
pull-branches.sh
that pulls all branches into separate folders to the master
branchThen a possible workflow could look like this
go to the
master
branch. executepull-branches.sh
. introduce changes to a branch in its folder. callupdate-branches.sh
to sync the changes from the folder to the branch.
Couldn't get the routing from PokemonPreviewPage back to ListPage. Kept complaining about this.props.router being null. Solved via wrapping ala <Route ... component={withRouter(PokemonPage)}.
There is no asset folder with the delete.svg icon so the PokemonPage can't load as it does not find the delete image in line 5 in PokemonPage.js
import deleteIcon from '../assets/delete.svg'
The link in If you haven't done it already, checkout the interactive Learn Relay tutorial.
in README.md links to https://learnrelay.org/
which redirects to https://www.learnrelay.com/
, which does not exist. Should probably link to https://www.learnrelay.org/
, and https://learnrelay.org/
should not redirect to .com
, but .org
.
In the section about optimistic updates you are talking multiple times about "AddPokemonMutation" but the name in the docs and in the code is "CreatePokemonMutation".
The steps are slightly off. Instead off:
git clone [email protected]:learnrelay/pokedex.git
cd pokedex
git checkout step-01
npm install
npm start # open localhost:3000
I needed to do this
git clone [email protected]:learnrelay/pokedex.git
cd pokedex
git checkout step-01
cd branch-step-01
npm install
npm start # open localhost:3000
The src folder inside the root of the step-01 branch doesn't have the correct version of the code. Please let me know if you need any further info.
{
"data": null,
"errors": [
{
"locations": [
{
"line": 3,
"column": 5
}
],
"path": [
"viewer",
"allPokemons"
],
"code": 2041,
"message": "You requested 100000 nodes. We will only return up to 1000 nodes per query.",
"requestId": "cj0joxj4rj5nh0163ml0et4ao"
}
]
}
From exercise 4 onwards, in PokermonPage.js
the instances of this.props.router.push
are throwing errors: Cannot read property 'push' of undefined.
I'm aware of the withRouter
removal in #11, but I don't see this.props.router.push
rewritten to something else, hence the solution samples are throwing blocking errors.
There are some examples for how to setup a simple graphql server, e.g.
https://medium.com/apollo-stack/tutorial-building-a-graphql-server-cddaa023c035
We could implement a simple version with just the needed features for Pokedex.
At https://learnrelay.org/mutations/what-is-a-mutation/ in the getConfigs() section the link to the mutation types is pointing to the markdown file. If you remove the ending '.md' it works fine.
Dead link points to: https://learnrelay.org/mutations/what-is-a-mutation/mutation-types.md
In step-01 we create the relay container around the ListPage component,
However are then instructed to checkout the step-02 branch which has this change reverted.
Also, step-01 the instructions about adding the relay container are missing the instructions to add import Relay from 'react-relay'
.
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.