Skip to content

Commit 7b9f4a6

Browse files
Alan-ChaErikWittern
authored andcommitted
Remove subOperations and fix link
See #188 #198 Signed-off-by: Alan Cha <[email protected]>
1 parent 2991377 commit 7b9f4a6

File tree

7 files changed

+2
-15
lines changed

7 files changed

+2
-15
lines changed

README.md

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

6262
- **Nested data**
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.
63+
[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.
6464

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

packages/openapi-to-graphql/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ OpenAPI-to-GraphQL.createGraphQLSchema(oas, {
179179
qs: {
180180
limit: 30 // send limit query string in every request
181181
},
182-
addSubOperations: false,
183182
requestOptions: {
184183
proxy: "http://my-proxy:3128"
185184
},

packages/openapi-to-graphql/lib/types/operation.d.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,6 @@ export declare type Operation = {
8080
* (Local) server definitions of the operation.
8181
*/
8282
servers: ServerObject[];
83-
/**
84-
* List of operations which are nested based on their path.
85-
*/
86-
subOps?: Operation[];
8783
/**
8884
* Whether this operation should be placed in an authentication viewer\
8985
* (cannot be true if "viewer" option passed to OpenAPI-to-GraphQL is false).

packages/openapi-to-graphql/src/types/operation.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,6 @@ export type Operation = {
117117
*/
118118
servers: ServerObject[]
119119

120-
/**
121-
* List of operations which are nested based on their path.
122-
*/
123-
subOps?: Operation[]
124-
125120
/**
126121
* Whether this operation should be placed in an authentication viewer\
127122
* (cannot be true if "viewer" option passed to OpenAPI-to-GraphQL is false).

packages/openapi-to-graphql/test/evaluation/eval_apis_guru.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ async function checkOas(OASList) {
5151
console.log(`Process "${name}" (${oas['x-file-path']})...`)
5252
try {
5353
let { report } = await openapiToGraphql.createGraphQlSchema(oas, {
54-
strict: false,
55-
addSubOperations: false
54+
strict: false
5655
})
5756
results.successes.push({ name, report })
5857
} catch (error) {

packages/openapi-to-graphql/test/example_api.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ beforeAll(() => {
2424
return Promise.all([
2525
openapiToGraphql
2626
.createGraphQlSchema(oas, {
27-
addSubOperations: true,
2827
fillEmptyResponses: true
2928
})
3029
.then(({ schema, report }) => {

packages/openapi-to-graphql/test/example_api3.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ beforeAll(() => {
2828
return Promise.all([
2929
openapiToGraphql
3030
.createGraphQlSchema([oas, oas3], {
31-
addSubOperations: true,
3231
fillEmptyResponses: true
3332
})
3433
.then(({ schema, report }) => {

0 commit comments

Comments
 (0)