Coder Social home page Coder Social logo

indreklasn / graphql-nodejs-hapi-api Goto Github PK

View Code? Open in Web Editor NEW
115.0 11.0 34.0 220 KB

How to set-up a powerful API with Nodejs, GraphQL, MongoDB, Hapi, and Swagger

Home Page: https://levelup.gitconnected.com/how-to-setup-a-powerful-api-with-nodejs-graphql-mongodb-hapi-and-swagger-e251ac189649

License: MIT License

JavaScript 100.00%
graphql hapijs mongodb mongoose nodejs

graphql-nodejs-hapi-api's Introduction

graphql-nodejs-hapi-api's People

Contributors

indreklasn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

graphql-nodejs-hapi-api's Issues

Chapter II - graphiqlHapi and graphqlHapi are not defined

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.

package.json NPM Package versioning

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.

how to write more effective

  1. define type at graphql/PaintingType.js
  2. define scheme at models/Painting.js
  3. if use typescript, a interface need to define at client

all of them are similar, but write 3 times, how to more effective?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.