Skip to content

Commit 108997f

Browse files
committed
Fix links
Signed-off-by: Alan Cha <[email protected]>
1 parent 315fd84 commit 108997f

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.github/workflows/main.yml

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
# You may pin to the exact commit or the version.
2828
# uses: peter-evans/link-checker@41c97244bb50a4a1b273d60abf5b5862b09f0c2d
2929
uses: peter-evans/[email protected]
30+
with:
31+
args: -r -v *.md packages/openapi-to-graphql/*.md packages/openapi-to-graphql/test/*.md packages/openapi-to-graphql-cli/*.md
3032

3133
- name: Create issue from file
3234
uses: peter-evans/create-issue-from-file@v2

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Here are some guides to further help you get started:
6161
<img src="https://raw.githubusercontent.com/ibm/openapi-to-graphql/master/docs/data-centric.png" alt="Example of data-centric design" width="600">
6262

6363
- **Nested data**
64-
[Links](https://github.com/OAI/OpenAPI-Specification/blob/OpenAPI.next/versions/3.0.0.md#link-Object) defined in the OAS are used to create nested data structures, allowing for (deeply) nested queries.
64+
[Links](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#linkObject) defined in the OAS are used to create nested data structures, allowing for (deeply) nested queries.
6565

6666
<img src="https://raw.githubusercontent.com/ibm/openapi-to-graphql/master/docs/links.png" alt="Example of links resolution" width="600">
6767

packages/openapi-to-graphql/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ OpenAPI-to-GraphQL can be installed using:
1818
npm i openapi-to-graphql
1919
```
2020

21-
Note that [`GraphQL.js`](https://github.com/graphql/graphql-js) is a [peer dependency](https://docs.npmjs.com/all#peerdependencies) of OpenAPI-to-GraphQL and must be installed separately (e.g., using `npm i graphql`).
21+
Note that [`GraphQL.js`](https://github.com/graphql/graphql-js) is a [peer dependency](https://docs.npmjs.com/files/package.json#peerdependencies) of OpenAPI-to-GraphQL and must be installed separately (e.g., using `npm i graphql`).
2222

2323
## Usage
2424

@@ -178,9 +178,9 @@ Resolver options:
178178

179179
- `baseUrl` (type: `string`): Used to manually specify the base URL which all paths will be built on. Normally, OpenAPI-to-GraphQL will select a base URL from the [server object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#serverObject) defined in the OAS. However, if the server object contains multiple URLs, OpenAPI-to-GraphQL will randomly select one. The purpose of this option is to provide greater control over the base URL in these situations, especially when the OAS cannot be modified. This option may also prove to be useful in testing and development.
180180

181-
- `customResolvers` (type: `object`, default: `{}`): OpenAPI-to-GraphQL, by default, creates resolver functions that make REST calls to resolve Query and Mutation fields in the generated GraphQL interface. This option allows users to provide custom resolver functions to be used in place of said ones created by OpenAPI-to-GraphQL. The field that the custom resolver will affect is identifed first by the [title](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#infoObject) of the OAS, then the [path](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#paths-object) of the operation, and lastly the [method](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#path-item-object) of the operation. The `customResolvers` object is thus a triply nested object where the outer key is the title, followed by the path, and finally the method, which points to the [resolver function](https://graphql.org/learn/execution/#root-fields-resolvers) itself. The resolver function can use the parameters `obj`, `args`, `context`, and `info` in order to produce the proper data, as do standard [resolver functions](https://graphql.org/learn/execution/#root-fields-resolvers) in GraphQL. Use cases include the resolution of complex relationships between types, implementing performance improvements like caching, or dealing with non-standard authentication requirements. _Note: Because the arguments are provided by the GraphQL interface, they may look different from the [parameters](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#parameterObject) defined by the OAS. For example, they will have [sanitized](https://github.com/Alan-Cha/openapi-to-graphql#characteristics) names. The [request body](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#requestBodyObject) will also be contained in the arguments as an [input object type](https://graphql.org/graphql-js/mutations-and-input-types/)._
181+
- `customResolvers` (type: `object`, default: `{}`): OpenAPI-to-GraphQL, by default, creates resolver functions that make REST calls to resolve Query and Mutation fields in the generated GraphQL interface. This option allows users to provide custom resolver functions to be used in place of said ones created by OpenAPI-to-GraphQL. The field that the custom resolver will affect is identifed first by the [title](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#infoObject) of the OAS, then the [path](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#paths-object) of the operation, and lastly the [method](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#path-item-object) of the operation. The `customResolvers` object is thus a triply nested object where the outer key is the title, followed by the path, and finally the method, which points to the [resolver function](https://graphql.org/learn/execution/#root-fields-resolvers) itself. The resolver function can use the parameters `obj`, `args`, `context`, and `info` in order to produce the proper data, as do standard [resolver functions](https://graphql.org/learn/execution/#root-fields-resolvers) in GraphQL. Use cases include the resolution of complex relationships between types, implementing performance improvements like caching, or dealing with non-standard authentication requirements. _Note: Because the arguments are provided by the GraphQL interface, they may look different from the [parameters](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#parameterObject) defined by the OAS. For example, they will have [sanitized](https://github.com/IBM/openapi-to-graphql#characteristics) names. The [request body](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#requestBodyObject) will also be contained in the arguments as an [input object type](https://graphql.org/graphql-js/mutations-and-input-types/)._
182182

183-
- `customSubscriptionResolvers` (type: `object`, default: `{}`): If the `createSubscriptionsFromCallbacks` is enabled, OpenAPI-to-GraphQL will generate Subscription fields. This option allows users to provide custom resolver and subscribe functions to be used in place of said ones created by OpenAPI-to-GraphQL. The field that the custom resolver and subscribe functions will affect is identifed first by the [title](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#infoObject) of the OAS, then the [path](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#paths-object) of the operation, and lastly the [method](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#path-item-object) of the operation. The resolver is provided via the `resolver` field and the publish function is provided via the `publish` field. The `customSubscriptionResolvers` object is thus a quadruply nested object where the outer key is the title, followed by the path, then the method, and lastly either `resolver` or `publish` which points to the [resolver function](https://graphql.org/learn/execution/#root-fields-resolvers) itself or publish function. See the [Subscriptions tutorial](./docs/subscriptions.md) for more information. _Note: Because the arguments are provided by the GraphQL interface, they may look different from the [parameters](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#parameterObject) defined by the OAS. For example, they will have [sanitized](https://github.com/Alan-Cha/openapi-to-graphql#characteristics) names. The [request body](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#requestBodyObject) will also be contained in the arguments as an [input object type](https://graphql.org/graphql-js/mutations-and-input-types/)._
183+
- `customSubscriptionResolvers` (type: `object`, default: `{}`): If the `createSubscriptionsFromCallbacks` is enabled, OpenAPI-to-GraphQL will generate Subscription fields. This option allows users to provide custom resolver and subscribe functions to be used in place of said ones created by OpenAPI-to-GraphQL. The field that the custom resolver and subscribe functions will affect is identifed first by the [title](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#infoObject) of the OAS, then the [path](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#paths-object) of the operation, and lastly the [method](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#path-item-object) of the operation. The resolver is provided via the `resolver` field and the publish function is provided via the `publish` field. The `customSubscriptionResolvers` object is thus a quadruply nested object where the outer key is the title, followed by the path, then the method, and lastly either `resolver` or `publish` which points to the [resolver function](https://graphql.org/learn/execution/#root-fields-resolvers) itself or publish function. See the [Subscriptions tutorial](./docs/subscriptions.md) for more information. _Note: Because the arguments are provided by the GraphQL interface, they may look different from the [parameters](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#parameterObject) defined by the OAS. For example, they will have [sanitized](https://github.com/IBM/openapi-to-graphql#characteristics) names. The [request body](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#requestBodyObject) will also be contained in the arguments as an [input object type](https://graphql.org/graphql-js/mutations-and-input-types/)._
184184

185185
***
186186

0 commit comments

Comments
 (0)