Skip to content

Commit 86c3129

Browse files
Alan-ChaErikWittern
authored andcommitted
Added tutorial video
* Small change to tutorial Signed-off-by: Alan Cha <[email protected]>
1 parent 72dc787 commit 86c3129

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

docs/tutorials/loopback_tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Try to run a simple query like the following:
9292
GraphQL query
9393
```
9494
query{
95-
person(id: 1){
95+
person(id: 15){
9696
name
9797
}
9898
}
@@ -103,7 +103,7 @@ Expected output
103103
{
104104
"data": {
105105
"person": {
106-
"name": "Albert"
106+
"name": "Daron"
107107
}
108108
}
109109
}

docs/tutorials/watson.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
OASGraph is a library that automatically creates GraphQL wrappers for existing REST(-like) APIs, relying on the Swagger or OpenAPI specifications of these APIs. To exemplify what OASGraph can do, let's create a GraphQL wrapper for the [IBM Watson Language Translator API](https://www.ibm.com/watson/services/language-translator/). The Language Translator API uses machine learning capabilities to detect the language of given texts, and to translate texts to any of a number of supported languages.
44

55

6+
## Video demo
7+
8+
[![OASGraph](../conveyor_belt.png)](https://www.youtube.com/watch?v=2GkJ5J6yuKY "Click here to watch!")
9+
10+
611
## Creating a simple wrapper
712

813
To create a GraphQL wrapper around the API, we use the Swagger specification of the Language Translator API available [here](https://watson-api-explorer.ng.bluemix.net/listings/language-translator-v2.json). From this specification, OASGraph creates a GraphQL schema, consisting of the API's data types and their relations. OASGraph also creates so-called resolve functions, which interact with the Language Translator API to resolve GraphQL queries. The schema created by OASGraph can be exposed using web application frameworks like [Express.js](https://expressjs.com/) via the [express-graphql](https://github.com/graphql/express-graphql) middleware.

0 commit comments

Comments
 (0)