Skip to content

Commit f5049bc

Browse files
committed
Remove extraneous comments
Signed-off-by: Alan Cha <[email protected]>
1 parent c4e112d commit f5049bc

16 files changed

+22
-78
lines changed

packages/openapi-to-graphql/lib/index.js

Lines changed: 1 addition & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openapi-to-graphql/lib/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openapi-to-graphql/lib/oas_3_tools.js

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openapi-to-graphql/lib/oas_3_tools.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openapi-to-graphql/lib/resolver_builder.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ export declare type Options = {
132132
*/
133133
baseUrl?: string;
134134
/**
135-
* Allows to define custom resolvers for fields on the Query/Mutation |
136-
* Subscription root operation type.
135+
* Allows to define custom resolvers for fields on the Query/Mutation/Subscription
136+
* root operation type.
137137
*
138138
* In other words, instead of resolving on an operation (REST call) defined in
139139
* the OAS, the field will resolve on the custom resolver. Note that this will
@@ -310,8 +310,8 @@ export declare type InternalOptions = {
310310
*/
311311
baseUrl?: string;
312312
/**
313-
* Allows to define custom resolvers for fields on the Query/Mutation |
314-
* Subscription root operation type.
313+
* Allows to define custom resolvers for fields on the Query/Mutation/Subscription
314+
* root operation type.
315315
*
316316
* In other words, instead of resolving on an operation (REST call) defined in
317317
* the OAS, the field will resolve on the custom resolver. Note that this will

packages/openapi-to-graphql/src/index.ts

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export async function createGraphQLSchema(
106106
typeof options.createSubscriptionsFromCallbacks === 'boolean'
107107
? options.createSubscriptionsFromCallbacks
108108
: false
109-
109+
110110
// Authentication options
111111
options.viewer = typeof options.viewer === 'boolean' ? options.viewer : true
112112
options.sendOAuthTokenInQuery =
@@ -138,9 +138,7 @@ export async function createGraphQLSchema(
138138
let oass: Oas3[]
139139

140140
if (Array.isArray(spec)) {
141-
/**
142-
* Convert all non-OAS 3.0.x into OAS 3.0.x
143-
*/
141+
// Convert all non-OAS 3.0.x into OAS 3.0.x
144142
oass = await Promise.all(
145143
spec.map(ele => {
146144
return Oas3Tools.getValidOAS3(ele)
@@ -436,19 +434,6 @@ async function translateOpenAPIToGraphQL(
436434
Oas3Tools.CaseStyle.camelCase
437435
)
438436

439-
// handle subscriptions from operation.callbacks
440-
// 1) cbName would be the subscription field name
441-
// each paths contained in operation.callbacks[cbName]
442-
// would be a channel to subscribe on the resolver
443-
// but if callback object contains several operations
444-
// how to be sure that the returned Graphql type would be the same ?
445-
// By "forcing' a common response schema for every operation within the CB ?
446-
// 2) cbName would be a prefix to the subscription field name
447-
// each paths contained in operation.callbacks[cbName] would be appended to create a unique subscription
448-
449-
// console.log('SUB FIELD', field.args, field.subscribe.toString(), field.resolve.toString())
450-
// console.log('SUB FIELD', operation)
451-
452437
let saneFieldName = Oas3Tools.storeSaneName(
453438
saneOperationId,
454439
operationId,

packages/openapi-to-graphql/src/oas_3_tools.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,6 @@ export function countOperations(oas: Oas3): number {
137137
for (let cbName in oas.paths[path][method].callbacks) {
138138
for (let cbPath in oas.paths[path][method].callbacks[cbName]) {
139139
numOps++
140-
// resolve $ref ??
141-
// for (let cbMethod in oas.paths[path][method].callbacks[cbName][cbPath]) {
142-
// if (isOperation(cbMethod)) {
143-
// numOps++
144-
// }
145-
// }
146140
}
147141
}
148142
}
@@ -197,12 +191,6 @@ export function countOperationsSubscription(oas: Oas3): number {
197191
for (let cbName in oas.paths[path][method].callbacks) {
198192
for (let cbPath in oas.paths[path][method].callbacks[cbName]) {
199193
numOps++
200-
// resolve $ref ??
201-
// for (let cbMethod in oas.paths[path][method].callbacks[cbName][cbPath]) {
202-
// if (isOperation(cbMethod)) {
203-
// numOps++
204-
// }
205-
// }
206194
}
207195
}
208196
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function stopServer() {
5151
})
5252
}
5353

54-
// if run from command line, start server:
54+
// If run from command line, start server:
5555
if (require.main === module) {
5656
startServer(3002)
5757
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ function stopServer() {
229229
})
230230
}
231231

232-
// if run from command line, start server:
232+
// If run from command line, start server:
233233
if (require.main === module) {
234234
startServer(3003)
235235
}

0 commit comments

Comments
 (0)