https://github.com/simonaco/serverless-graphql-apis-part1
GraphQL API
https://github.com/simonaco/serverless-graphql-apis-part1
azure azure-functions graphql graphql-api serverless
Last synced: 6 months ago
JSON representation
GraphQL API
- Host: GitHub
- URL: https://github.com/simonaco/serverless-graphql-apis-part1
- Owner: simonaco
- Created: 2019-02-12T10:22:48.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-28T15:48:25.000Z (about 7 years ago)
- Last Synced: 2025-03-14T19:31:07.740Z (about 1 year ago)
- Topics: azure, azure-functions, graphql, graphql-api, serverless
- Language: JavaScript
- Homepage: https://graphqlplayground.azurewebsites.net/api/graphiql
- Size: 4.88 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GraphQL API
This is a GraphQL endpoint calling two existing REST api endpoints
You can explore the endpoint we'll build at [https://graphqlplayground.azurewebsites.net/api/graphiql](https://graphqlplayground.azurewebsites.net/api/graphiql)
## Steps
If you haven't already, make sure to clone this repository.
1. ⚠️ Navigate to the project's folder and open it in a *new instance* of VS Code
1. Install dependencies
```
npm install
```
1. Go to *Debug* panel in VS Code and click run
1. Using [Postman](https://www.getpostman.com/) (or any Rest client) make a POST request to your GraphQL endpoint running in your local [http://localhost:7071/api/graphql](http://localhost:7071/api/graphql) with this body of type *application/json*:
```json
{ "query": "{teams{id name points}}"}
```
1. To deploy your function using VS Code go to the Azure Functions extension. Click the blue arrow button and follow prompt instructions to either create a new function or deploy to an existing one