moonhighway / learning-graphql Goto Github PK
View Code? Open in Web Editor NEWThe code samples for Learning GraphQL by Eve Porcello and Alex Banks, published by O'Reilly Media
Home Page: https://www.graphqlworkshop.com
The code samples for Learning GraphQL by Eve Porcello and Alex Banks, published by O'Reilly Media
Home Page: https://www.graphqlworkshop.com
Not working URL for interfaces
Actual behavior: After cloning chapter 7 and npm install
then npm start
the above error occurs when running the following query in /playground:
subscription { newPhoto { name url postedBy { name } } }
I was encountering the same error after following the directions in the book.
Also ws://localhost:4000/
does not connect, with the browser stating This site can’t be reached
Expected behavior: When the instructions are followed in the book, or when the repo is cloned and started, there should be no errors.
I suspect this has to do with new npm packages being released, but am seeking clarity as the repo seems to have been created 4 months ago with updates as recently as 2 months ago.
This link not work.
https://launchpad.graphql.com/r94qxj5q4n
Hello,
i've got an error to my code and i don't fix it:
GraphQLError [Object]: Syntax Error: Cannot parse the unexpected character "/".
Can yotu help me to found an issue
Fairthfully
I'm guessing this is due to changes in apollo-server-express
since you published? If I google, I can find several workarounds, but I am interested in how you would solve this. Thanks!
In the User
type resolver, the connected postedPhotos
field is not returning data. We need to change the filter from parent._id
to parent.githubLogin
.
From:
postedPhotos: (parent, args, { db }) =>
db.collection("photos")
.find({ userID: parent._id })
.toArray(),
To:
postedPhotos: (parent, args, { db }) =>
db.collection("photos")
.find({ userID: parent.githubLogin })
.toArray(),
Hello. I couldn't get the subscriptions firing in the /playground url.
I added the subscriptionEndpoint property to fix it.
app.get( "/playground", expressPlayground({ endpoint: "/graphql", subscriptionEndpoint: "ws://localhost:4000/graphql" }) );
Hope this helps someone.
All versions in every package.json
file should be specific. No ^
or *
or anything automatic. We need to wait until Apollo Server 2.0 is out of rc
.
Adorei o livro, sentir falta somente, de uma api usando java, ja que java e a linguagem mais usada no mundo para escrever api REST, no proximo livro vai contemplar isso ,,,,
Obrigado.,..
I suggest use optional chaining for nullable value because occurred error.
The following links are not working:
The below error is :
{
"error": "Failed to fetch schema. Please check your connection"
}
Finalize each of the following Readme.md documents:
Make sure each Readme provides enough information to install and run the api at it's current state. Also make sure all overviews and any necessary resource links have been provided.
The authentication URL does not work anymore once you've got your Token.
It is no more : https://api.github.com/user?access_token=[token]
But : https://api.github.com/user with the token in the 'Authorization' header. The problem is that I could never make this work even following this documentation :
Could you please fix the code on the repo since it renders basically chapters 5, 6 and 7 useless ?
Hi Alex, Hi Eve,
I've started your book recently (Kindle version), everything was great so far but I just noticed that the links to GraphQL Playground example code were always redirected to this link
Unfortunately it prevents me working with the example code.
Is there a way to fix it ?
Thanks and congrats for the book, I am really enjoying it so far !
Chapter 6 does praise Apollo Client for providing a cache (among many other things). However, the suggested way of using apollo-boost with react-apollo does not make proper use of the cache.
When following along with chapter 6 all the way to the end of the paragraph about react-apollo's Query component I noticed that the application does not showcase the caching mechanism suggested by the book. Reloading the application will always cause a POST request to be sent to the GraphQL API.
I'm having this error in my code in the AuthorizedUser.js file: 'githubAuthMutation' is not defined no-undef.
I read Japanese edition and found a mistake that is not related to a main topic
The below code is written in a book
inPhotos: (parent: any) =>
tags
.filter((tag) => tag.userID === parent.id)
.map((tag) => tag.photoID)
.map((photoID) => photos.find((p) => p.id === photoID))
However correct code is below
inPhotos: (parent: any) =>
tags
// NOT parent.id BUT parent.githubLogin
.filter((tag) => tag.userID === parent.githubLogin)
.map((tag) => tag.photoID)
.map((photoID) => photos.find((p) => p.id === photoID))
tag.userID is githubLogin ("gPlake") NOT id ("1")
https://github.com/MoonHighway/learning-graphql/blob/master/chapter-03/README.md#chapter-examples
Union types sample and Interfaces sample are 404.
Related #24
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.