indreklasn / graphql-nodejs-hapi-api Goto Github PK
View Code? Open in Web Editor NEWHow to set-up a powerful API with Nodejs, GraphQL, MongoDB, Hapi, and Swagger
License: MIT License
How to set-up a powerful API with Nodejs, GraphQL, MongoDB, Hapi, and Swagger
License: MIT License
graphql/PaintingType.js
models/Painting.js
all of them are similar, but write 3 times, how to more effective?
The tutorial is very great. However could you please add the example about CRUD with graphql
Thanks
Excellent overview of implementing GraphQL w/ HAPI. I found the examples to be clean and to the point and easy to pick up on. Instead of just cloning your repo I followed with the steps and coded myself. However, I looked past the package version's you're using and installed the latest of every package. This doesn't look to be an old repo but the versions are a bit behind and new requirements are needed to work with the Graph QL Plugins specifically. Working on a resolution for the newer versions of the packages.
In the tutoria after requiring hapi-graphql
and your schema and registering your plugins, there is no mention to require graphiqlHapi and graphqlHapi. However, in the source code there is a dependency for apollo-server-hapi
Should that be included in the tutorial? Also, another thing I'm noticing is that when I include apollo dependency, I get this error
(node:17228) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Apollo Server requires options.
Although the source code doesn't have options when I looked. Also wouldn't the process middleware declared at the bottom of the index.js
handle the promise rejection?
The final issue I've encountered was with the swagger documentation site. When you try out the post method you get a 500 error because there isn't any content in the request to post.
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.