Coder Social home page Coder Social logo

graphql-mongodb-example's People

Contributors

mcastroat avatar sayden 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

graphql-mongodb-example's Issues

Population with GraphQL?

Hi @sayden

Great example! I am trying to see learn how to best model field Population using GraphQL.

I see that for your UserSchema mongoose schema you have the hobbies and friends fields both of which are ObjectIds and reference Hobby/Friend types respectively.

However in your GraphQL model, you don't seem to account for the possibility of the hobby and friend field taking on an ObjectId or HobbyType / UserType object.

I want users to be able to receive a list of ObjectIds or populated objects depending on their query params.

How would you best do this?

run populate command fails

Nice example effort. Thank you.

There is no node_modules/babel/ folder after npm install. Run populate is trying to reference it.
`Alains-MacBook-Pro-4:graphql-mongodb-example-master klik$ npm run populate

[email protected] populate /Users/klik/projects/graphql-mongodb-example-master
babel-node.js scripts/populationScript.es6

sh: babel-node.js: command not found

npm ERR! Darwin 15.5.0
npm ERR! argv "/Users/klik/.nvm/versions/node/v6.2.1/bin/node" "/Users/klik/.nvm/versions/node/v6.2.1/bin/npm" "run" "populate"
npm ERR! node v6.2.1
npm ERR! npm v3.9.3
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] populate: babel-node.js scripts/populationScript.es6
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] populate script 'babel-node.js scripts/populationScript.es6'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the graphql-mongodb-example package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! babel-node.js scripts/populationScript.es6
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs graphql-mongodb-example
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls graphql-mongodb-example
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/klik/projects/graphql-mongodb-example-master/npm-debug.log
Alains-MacBook-Pro-4:graphql-mongodb-example-master klik$`

Graphql dynamic input variables issue

When I tried to add dynamic input for the root query in these examples I can always see an error "Must provide an operation" message.This occurred only in this examples.

query RootQuery($filter:String) {
accounts(filter:$filter){
account_number,
account_type_code,
region
}
}

Can you please add any example for this kind of requirement.

Hello, there was no 'index.html'

no index.html found, and when browse "localhost:9000", got a 'cannot /get'.
THANK YOU, the code is useful for my relay-grahpql-mongodb study

Graphql example with Sort and Filter functionalities

This project example is helpful for basic queries and mutations.It will be more interesting if sorting and filtering functionality added with Graphql+mongoose combination.There are no resource on how to achieve this as well.

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.