Skip to content

Commit

Permalink
Add deprecation message
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Cha <[email protected]>
  • Loading branch information
Alan-Cha committed Jun 20, 2019
1 parent fef7438 commit 83a9e0d
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 21 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
![GitHub last commit](https://img.shields.io/github/last-commit/strongloop/oasgraph.svg?style=flat)
![Travis (.org)](https://img.shields.io/travis/strongloop/oasgraph.svg?style=flat)
![GitHub last commit](https://img.shields.io/github/last-commit/ibm/openapi-to-graphql.svg?style=flat)
![Travis (.org)](https://img.shields.io/travis/ibm/openapi-to-graphql.svg?style=flat)
[![Join the chat at https://gitter.im/oasgraph/Lobby](https://badges.gitter.im/oasgraph/Lobby.svg?style=flat)](https://gitter.im/oasgraph/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

# Please note: OASGraph has been renamed to [OpenAPI-to-GraphQL](https://github.com/IBM/openapi-to-graphql).

# OASGraph
Translate APIs described by [OpenAPI Specifications (OAS)](https://github.com/OAI/OpenAPI-Specification) into [GraphQL](https://graphql.org/).

<img src="https://raw.githubusercontent.com/strongloop/oasgraph/master/docs/translation.png" alt="Overview of translation" width="600">
<img src="https://raw.githubusercontent.com/ibm/openapi-to-graphql/master/docs/translation.png" alt="Overview of translation" width="600">


## Getting started
Expand Down Expand Up @@ -58,32 +59,32 @@ Here are some guides to further help you get started:
* **Data-centric**
The GraphQL interface is created around the data definitions in the given OAS, not around the endpoints, leading to a natural use of GraphQL.
<img src="https://raw.githubusercontent.com/strongloop/oasgraph/master/docs/data-centric.png" alt="Example of data-centric design" width="600">
<img src="https://raw.githubusercontent.com/ibm/openapi-to-graphql/master/docs/data-centric.png" alt="Example of data-centric design" width="600">
* **Nested data**
[Links](https://github.com/OAI/OpenAPI-Specification/blob/OpenAPI.next/versions/3.0.md#linksObject) defined in the OAS are used to compose data definitions. Furthermore, hierarchical path structures can be used to nest data via the [`addSubOperations`](./packages/oasgraph/README.md#options-addsuboperations) option.
<img src="https://raw.githubusercontent.com/strongloop/oasgraph/master/docs/links.png" alt="Example of links resolution" width="600">
<img src="https://raw.githubusercontent.com/ibm/openapi-to-graphql/master/docs/links.png" alt="Example of links resolution" width="600">
* **Automatic query resolution**
Automatically generated resolvers translate (nested) GraphQL queries to API requests. Request results are translated back to GraphQL responses.
<img src="https://raw.githubusercontent.com/strongloop/oasgraph/master/docs/resolution.png" alt="Example of query resolution" width="600">
<img src="https://raw.githubusercontent.com/ibm/openapi-to-graphql/master/docs/resolution.png" alt="Example of query resolution" width="600">
* **Mutations**
Non-safe, non-idempotent API operations (e.g., `POST`, `PUT`, `DELETE`) are translated to GraphQL [mutations](http://graphql.org/learn/queries/#mutations). Input payload is type-checked.
<img src="https://raw.githubusercontent.com/strongloop/oasgraph/master/docs/mutations.png" alt="Example of mutation" width="600">
<img src="https://raw.githubusercontent.com/ibm/openapi-to-graphql/master/docs/mutations.png" alt="Example of mutation" width="600">
* **Authentication**
OASGraph currently supports authentication via API Key and basic auth. OASGraph wraps secured endpoints into a `viewer`, which takes the API key / credentials as input.
<img src="https://raw.githubusercontent.com/strongloop/oasgraph/master/docs/auth.png" alt="Example of authentication" width="600">
<img src="https://raw.githubusercontent.com/ibm/openapi-to-graphql/master/docs/auth.png" alt="Example of authentication" width="600">
* **API Sanitation**
Parts of an API that not compatible with GraphQL are automatically sanitized. For example, API parameters and data definition names with unsupported characters (e.g., `-`, `.`, `,`, `:`, `;`...) are removed. GraphQL queries are desanitized to correctly invoke the REST API and the responses are resanitized to create GraphQL-compliant results.
<img src="https://raw.githubusercontent.com/strongloop/oasgraph/master/docs/sanitization.png" alt="Example of sanitation" width="300">
<img src="https://raw.githubusercontent.com/ibm/openapi-to-graphql/master/docs/sanitization.png" alt="Example of sanitation" width="300">
* **Custom request options** Provide headers and query parameters to send with every API request. This allows, for example, to handle authentication or tag requests from GraphQL.
Expand Down
11 changes: 6 additions & 5 deletions packages/oasgraph-cli/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
![Travis (.org)](https://img.shields.io/travis/strongloop/oasgraph.svg?style=flat)
![Travis (.org)](https://img.shields.io/travis/ibm/openapi-to-graphql.svg?style=flat)
[![npm](https://img.shields.io/npm/v/oasgraph-cli.svg?style=flat)](https://www.npmjs.com/package/oasgraph-cli)
[![Join the chat at https://gitter.im/oasgraph/Lobby](https://badges.gitter.im/oasgraph/Lobby.svg?style=flat)](https://gitter.im/oasgraph/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

# Please note: OASGraph CLI has been renamed to [OpenAPI-to-GraphQL CLI](https://github.com/IBM/openapi-to-graphql/tree/master/packages/openapi-to-graphql-cli).

# OASGraph CLI
Command line interface (CLI) for turning APIs described by [OpenAPI Specification (OAS)](https://github.com/OAI/OpenAPI-Specification) into [GraphQL](https://graphql.org/) interfaces.

<img src="https://raw.githubusercontent.com/strongloop/oasgraph/master/docs/translation.png" alt="Overview of translation" width="600">
<img src="https://raw.githubusercontent.com/ibm/openapi-to-graphql/master/docs/translation.png" alt="Overview of translation" width="600">

_Note: To use OASGraph as a library, refer to the [`oasgraph`](https://github.com/strongloop/oasgraph/tree/master/packages/oasgraph) package._
_Note: To use OASGraph as a library, refer to the [`oasgraph`](https://github.com/ibm/openapi-to-graphql/tree/oasgraph/packages/oasgraph) package._


## Installation
Expand Down Expand Up @@ -61,9 +62,9 @@ oasgraph oas.json --save schema.graphql

***

To learn more about the other options, please refer [here](https://github.com/strongloop/oasgraph/tree/master/packages/oasgraph#options).
To learn more about the other options, please refer [here](https://github.com/ibm/openapi-to-graphql/tree/oasgraph/packages/oasgraph#options).

Please note that the CLI tool is mainly used for quick testing and does not offer all the features that [`createGraphQlSchema(oas, options)`](https://github.com/strongloop/oasgraph/tree/master/packages/oasgraph#usage) does.
Please note that the CLI tool is mainly used for quick testing and does not offer all the features that [`createGraphQlSchema(oas, options)`](https://github.com/ibm/openapi-to-graphql/tree/oasgraph/packages/oasgraph#usage) does.


## License
Expand Down
4 changes: 2 additions & 2 deletions packages/oasgraph-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
},
"repository": {
"type": "git",
"url": "https://github.com/strongloop/oasgraph.git"
"url": "https://github.com/IBM/openapi-to-graphql/tree/oasgraph"
},
"homepage": "https://github.com/strongloop/oasgraph/blob/master/README.md",
"homepage": "https://github.com/IBM/openapi-to-graphql/tree/oasgraph",
"keywords": [
"ibm",
"strongloop",
Expand Down
7 changes: 4 additions & 3 deletions packages/oasgraph/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
![Travis (.org)](https://img.shields.io/travis/strongloop/oasgraph.svg?style=flat)
![Travis (.org)](https://img.shields.io/travis/ibm/openapi-to-graphql.svg?style=flat)
[![npm](https://img.shields.io/npm/v/oasgraph.svg?style=flat)](https://www.npmjs.com/package/oasgraph)
[![Join the chat at https://gitter.im/oasgraph/Lobby](https://badges.gitter.im/oasgraph/Lobby.svg?style=flat)](https://gitter.im/oasgraph/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

# Please note: OASGraph has been renamed to [OpenAPI-to-GraphQL](https://github.com/IBM/openapi-to-graphql/tree/master/packages/openapi-to-graphql).

# OASGraph
Generates a [GraphQL schema](https://graphql.org/learn/schema/) for a given [OpenAPI Specification (OAS)](https://github.com/OAI/OpenAPI-Specification).

<img src="https://raw.githubusercontent.com/strongloop/oasgraph/master/docs/translation.png" alt="Overview of translation" width="600">
<img src="https://raw.githubusercontent.com/ibm/openapi-to-graphql/master/docs/translation.png" alt="Overview of translation" width="600">

_Note: To use OASGraph via the command line, refer to the [`oasgraph-cli`](https://github.com/strongloop/oasgraph/tree/master/packages/oasgraph-cli) package._
_Note: To use OASGraph via the command line, refer to the [`oasgraph-cli`](https://github.com/ibm/openapi-to-graphql/tree/oasgraph/packages/oasgraph-cli) package._


## Installation
Expand Down
4 changes: 2 additions & 2 deletions packages/oasgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
},
"repository": {
"type": "git",
"url": "https://github.com/strongloop/oasgraph.git"
"url": "https://github.com/IBM/openapi-to-graphql/tree/oasgraph"
},
"homepage": "https://github.com/strongloop/oasgraph/blob/master/README.md",
"homepage": "https://github.com/IBM/openapi-to-graphql/tree/oasgraph",
"keywords": [
"ibm",
"strongloop",
Expand Down

0 comments on commit 83a9e0d

Please sign in to comment.