|
1 |
| - |
| 1 | + |
2 | 2 | 
|
3 | 3 | [](https://gitter.im/IBM/openapi-to-graphql?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
4 | 4 |
|
5 | 5 | # OpenAPI-to-GraphQL
|
6 | 6 |
|
7 | 7 | Translate APIs described by [OpenAPI Specifications (OAS)](https://github.com/OAI/OpenAPI-Specification) or [Swagger](https://swagger.io/specification/v2/) into [GraphQL](https://graphql.org/).
|
8 | 8 |
|
9 |
| -<img src="https://raw.githubusercontent.com/strongloop/oasgraph/openapi-to-graphql/docs/translation.png" alt="Overview of translation" width="600"> |
| 9 | +<img src="https://raw.githubusercontent.com/ibm/openapi-to-graphql/master/docs/translation.png" alt="Overview of translation" width="600"> |
10 | 10 |
|
11 | 11 | ## Getting started
|
12 | 12 |
|
@@ -57,32 +57,32 @@ Here are some guides to further help you get started:
|
57 | 57 | - **Data-centric**
|
58 | 58 | The GraphQL interface is created around the data definitions in the given OAS, not around the endpoints, leading to a natural use of GraphQL.
|
59 | 59 |
|
60 |
| - <img src="https://raw.githubusercontent.com/strongloop/oasgraph/openapi-to-graphql/docs/data-centric.png" alt="Example of data-centric design" width="600"> |
| 60 | + <img src="https://raw.githubusercontent.com/ibm/openapi-to-graphql/master/docs/data-centric.png" alt="Example of data-centric design" width="600"> |
61 | 61 |
|
62 | 62 | - **Nested data**
|
63 | 63 | [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/openapi-to-graphql/README.md#options-addsuboperations) option.
|
64 | 64 |
|
65 |
| - <img src="https://raw.githubusercontent.com/strongloop/oasgraph/openapi-to-graphql/docs/links.png" alt="Example of links resolution" width="600"> |
| 65 | + <img src="https://raw.githubusercontent.com/ibm/openapi-to-graphql/master/docs/links.png" alt="Example of links resolution" width="600"> |
66 | 66 |
|
67 | 67 | - **Automatic query resolution**
|
68 | 68 | Automatically generated resolvers translate (nested) GraphQL queries to API requests. Request results are translated back to GraphQL responses.
|
69 | 69 |
|
70 |
| - <img src="https://raw.githubusercontent.com/strongloop/oasgraph/openapi-to-graphql/docs/resolution.png" alt="Example of query resolution" width="600"> |
| 70 | + <img src="https://raw.githubusercontent.com/ibm/openapi-to-graphql/master/docs/resolution.png" alt="Example of query resolution" width="600"> |
71 | 71 |
|
72 | 72 | - **Mutations**
|
73 | 73 | 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.
|
74 | 74 |
|
75 |
| - <img src="https://raw.githubusercontent.com/strongloop/oasgraph/openapi-to-graphql/docs/mutations.png" alt="Example of mutation" width="600"> |
| 75 | + <img src="https://raw.githubusercontent.com/ibm/openapi-to-graphql/master/docs/mutations.png" alt="Example of mutation" width="600"> |
76 | 76 |
|
77 | 77 | - **Authentication**
|
78 | 78 | OpenAPI-to-GraphQL currently supports authentication via API Key and basic auth. OpenAPI-to-GraphQL wraps secured endpoints into a `viewer`, which takes the API key / credentials as input.
|
79 | 79 |
|
80 |
| - <img src="https://raw.githubusercontent.com/strongloop/oasgraph/openapi-to-graphql/docs/auth.png" alt="Example of authentication" width="600"> |
| 80 | + <img src="https://raw.githubusercontent.com/ibm/openapi-to-graphql/master/docs/auth.png" alt="Example of authentication" width="600"> |
81 | 81 |
|
82 | 82 | - **API Sanitation**
|
83 | 83 | 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.
|
84 | 84 |
|
85 |
| - <img src="https://raw.githubusercontent.com/strongloop/oasgraph/openapi-to-graphql/docs/sanitization.png" alt="Example of sanitation" width="300"> |
| 85 | + <img src="https://raw.githubusercontent.com/ibm/openapi-to-graphql/master/docs/sanitization.png" alt="Example of sanitation" width="300"> |
86 | 86 |
|
87 | 87 | - **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.
|
88 | 88 |
|
|
0 commit comments