Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luizcalaca/node-graphql-mongodb-api
GraphQL API
https://github.com/luizcalaca/node-graphql-mongodb-api
api apollo-server graphql mongodb mongoose
Last synced: 28 days ago
JSON representation
GraphQL API
- Host: GitHub
- URL: https://github.com/luizcalaca/node-graphql-mongodb-api
- Owner: luizcalaca
- Created: 2022-03-19T03:06:04.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-20T13:49:08.000Z (almost 3 years ago)
- Last Synced: 2023-03-08T03:53:37.006Z (almost 2 years ago)
- Topics: api, apollo-server, graphql, mongodb, mongoose
- Language: JavaScript
- Homepage:
- Size: 36.1 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Blog API em GraphQL
Um aplicativo em GraphQL para gerenciar posts
#### How to run
```
git clone https://github.com/luizcalaca/node-graphql-mongodb-api.git
npm install
npm start
```Access on: http://localhost/4000 and will be opened the GraphQL playground
#### Example on Playground
```
mutation CreatePost($post: PostInput) {
createPost(post: $post) {
name,
comments {
description
}
}
}
```Using the below Headers:
```
{
"post": {
"name": "GraphQL vs REST",
"comments": {
"description": "That's difficult to discuss about"
}
}
}
```We will post this:
```
{
"data": {
"createPost": {
"name": "GraphQL vs REST",
"comments": {
"description": "That's difficult to discuss about"
}
}
}
}
```