sayden / graphql-mongodb-example Goto Github PK
View Code? Open in Web Editor NEWAn example of Express and MongoDB with Relay and GraphQL working together
License: MIT License
An example of Express and MongoDB with Relay and GraphQL working together
License: MIT License
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$`
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
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.
No gulpfile found...
I think this can be a great upgrade for this example project, I couldn't find any example about that.
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?
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.
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.