Skip to content

Instantly share code, notes, and snippets.

@miukki
Created May 2, 2019 06:26
Show Gist options
  • Save miukki/2fc92ef3e88241e82e3d9324820b97d9 to your computer and use it in GitHub Desktop.
Save miukki/2fc92ef3e88241e82e3d9324820b97d9 to your computer and use it in GitHub Desktop.
GraphQL server/client, github repo [email protected]:miukki/graphql-list.git

#Pepository

url = [email protected]:miukki/graphql-list.git

#Play with GraphQL

cd server
yarn graphql

#GraphiQL

{
  trip(id: 1) {
    name
    owner {
      id
      name
    }
  }
}

{
  owner(id: 1) {
    name
    trips {
      name
    }
  }
}

#DB Setup MLAB https://mlab.com/

#db
mongoose.connect('mongodb://miukki:[email protected]:19641/trips')

#client Used script

yarn create react-app client
#Pepository
```
url = [email protected]:miukki/graphql-list.git
```
#Play with GraphQL
```
cd server
yarn graphql
```
#GraphiQL
```
{
trip(id: 1) {
name
owner {
id
name
}
}
}
{
owner(id: 1) {
name
trips {
name
}
}
}
```
#DB Setup MLAB
https://mlab.com/
```
#db
mongoose.connect('mongodb://miukki:[email protected]:19641/trips')
```
#client Used script
```
yarn create react-app client
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment