timqian / gql-generator

Generate queries from graphql schema, used for writing api test.
MIT License
375 stars 93 forks source link

Keep getting error when I try to use the tool #72

Open Riskmatrix0897 opened 1 year ago

Riskmatrix0897 commented 1 year ago

I keep getting this error as I am trying to use the tool:

gqlg --schemaFilePath ./schema.graphql --destDirPath ./gql/outputg --depthLimit 4 /usr/local/lib/node_modules/gql-generator/node_modules/graphql/language/parser.js:212 throw this.unexpected(keywordToken); ^

GraphQLError: Syntax Error: Unexpected . at syntaxError (/usr/local/lib/node_modules/gql-generator/node_modules/graphql/error/syntaxError.js:15:10) at Parser.unexpected (/usr/local/lib/node_modules/gql-generator/node_modules/graphql/language/parser.js:1458:41) at Parser.parseDefinition (/usr/local/lib/node_modules/gql-generator/node_modules/graphql/language/parser.js:212:16) at Parser.many (/usr/local/lib/node_modules/gql-generator/node_modules/graphql/language/parser.js:1511:26) at Parser.parseDocument (/usr/local/lib/node_modules/gql-generator/node_modules/graphql/language/parser.js:122:25) at parse (/usr/local/lib/node_modules/gql-generator/node_modules/graphql/language/parser.js:32:17) at buildSchema (/usr/local/lib/node_modules/gql-generator/node_modules/graphql/utilities/buildASTSchema.js:101:38) at main (/usr/local/lib/node_modules/gql-generator/index.js:24:21) at Object. (/usr/local/lib/node_modules/gql-generator/index.js:265:10) at Module._compile (node:internal/modules/cjs/loader:1218:14) { path: undefined, locations: [ { line: 1, column: 1 } ], extensions: [Object: null prototype] {} }