Skip to content

Commit

Permalink
fix: fixed generate script
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddharth9890 committed Jul 2, 2024
1 parent d277f53 commit ea76738
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions scripts/generateSDK/BuildOperationForField.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ const {

let operationVariables = [];
let fieldTypeMap = new Map();

function addOperationVariable(variable) {
operationVariables.push(variable);
}

function resetOperationVariables() {
operationVariables = [];
}

function resetFieldMap() {
fieldTypeMap = new Map();
}
Expand Down Expand Up @@ -53,7 +56,6 @@ function buildOperationNodeForField({
selectedFields,
rootTypeNames,
});
// attach variables
operationNode.variableDefinitions = [...operationVariables];
resetOperationVariables();
resetFieldMap();
Expand Down Expand Up @@ -308,7 +310,6 @@ function resolveVariable(arg, name) {
if (isNonNullType(type)) {
return {
kind: Kind.NON_NULL_TYPE,
// for v16 compatibility
type: resolveVariableType(type.ofType),
};
}
Expand Down
3 changes: 1 addition & 2 deletions scripts/generateSDK/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ const {
memoize1,
getRootTypeMap,
parseGraphQLSDL,
buildOperationNodeForField,
} = require('@graphql-tools/utils');
// const { buildOperationNodeForField } = require('./BuildOperationForField');
const { buildOperationNodeForField } = require('./BuildOperationForField');

function getUnifiedSchema(rawSource) {
let schema = rawSource;
Expand Down

0 comments on commit ea76738

Please sign in to comment.