https://github.com/react-native-training/apollo-graphql-mongodb-react-native
Apollo Server Example using MongoDB + Mongoose + Express, Apollo Client using React Native
https://github.com/react-native-training/apollo-graphql-mongodb-react-native
apollo-client apollo-server graphql-server
Last synced: 4 months ago
JSON representation
Apollo Server Example using MongoDB + Mongoose + Express, Apollo Client using React Native
- Host: GitHub
- URL: https://github.com/react-native-training/apollo-graphql-mongodb-react-native
- Owner: react-native-training
- Created: 2016-10-19T22:39:30.000Z (over 8 years ago)
- Default Branch: medium
- Last Pushed: 2017-03-17T15:43:38.000Z (about 8 years ago)
- Last Synced: 2025-02-06T04:58:50.317Z (4 months ago)
- Topics: apollo-client, apollo-server, graphql-server
- Language: JavaScript
- Homepage:
- Size: 7.65 MB
- Stars: 98
- Watchers: 3
- Forks: 22
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This repo goes along with the Medium post [React Native with Apollo Server and Client](https://medium.com/@dabit3/react-native-with-apollo-server-and-client-part-1-efb7d15d2361#.8qbyeisdd).
There are two parts to this application: the [client](https://github.com/dabit3/apollo-graphql-mongodb-react-native#apollo-client-example) (React Native Application) and the [server](https://github.com/dabit3/apollo-graphql-mongodb-react-native#apollo-server-example) (GraphQL server)
# Apollo Server
#### Using Apollo + GraphQL + MongoDB + Express
To get setup:
clone repository
`git clone [email protected]:dabit3/apollo-graphql-mongodb.git`
cd into repository
`cd apollo-graphql-mongodb/apolloserver`
install dependencies
`yarn`
Start MongoDB Server
`mongod`
Start project server
`node app.js`
Open GraphQL Explorer on http://localhost:8080/graphiql
Try submitting a query:
```
query {
president(name: "George Washington") {
name
term
party
}
}```
# Apollo Client
To get setup
clone repository (if not already done in step 1):
`git clone [email protected]:dabit3/apollo-graphql-mongodb.git`
cd into repository
`cd apollo-graphql-mongodb/apolloclient`
install dependencies
`yarn`
run project
`react-native run-ios` or `react-native run-android`