Skip to content

Commit

Permalink
clean up, remove deprecated definitionMarker parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
woodensail authored and 孙一帆 committed Dec 9, 2022
1 parent ccbd42d commit ab0ef20
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,11 @@ class Marker {
*
* @param type {GraphQLInputType}
* @param options
* @param definitionMarker
* @returns {DefinitionResult}
*/
function getJSONSchemaFromGraphQLType(
type: GraphQLInputType | GraphQLInputField,
options?: JSONSchemaRunningOptions,
definitionMarker: Marker = new Marker(),
): DefinitionResult {
let required = false;
let definition: CombinedSchema = Object.create(null);
Expand All @@ -155,7 +153,6 @@ function getJSONSchemaFromGraphQLType(
const { definition: def, definitions: defs } = getJSONSchemaFromGraphQLType(
type.ofType,
options,
definitionMarker,
);
if (def.$ref) {
definition.items = { $ref: def.$ref };
Expand All @@ -173,7 +170,6 @@ function getJSONSchemaFromGraphQLType(
const { definition: def, definitions: defs } = getJSONSchemaFromGraphQLType(
type.ofType,
options,
definitionMarker,
);
definition = def;
if (defs) {
Expand Down Expand Up @@ -214,12 +210,12 @@ function getJSONSchemaFromGraphQLType(
required: fieldRequired,
definition: typeDefinition,
definitions: typeDefinitions,
} = getJSONSchemaFromGraphQLType(field.type, options, definitionMarker);
} = getJSONSchemaFromGraphQLType(field.type, options);

const {
definition: fieldDefinition,
// definitions: fieldDefinitions,
} = getJSONSchemaFromGraphQLType(field, options, definitionMarker);
} = getJSONSchemaFromGraphQLType(field, options);

fieldDef.properties[fieldName] = {
...typeDefinition,
Expand Down

0 comments on commit ab0ef20

Please sign in to comment.