How to get file name that causes GraphQLError: Syntax Error: Unterminated string - graphql

In our team we sometimes get an GraphQl syntax error, when modifying our schema.
However, we don't seem to get the name of file causing the issue? The error looks like this:
GraphQLError: Syntax Error: Unterminated string.
at syntaxError (<full-path-to-project>>node_modules/graphql/error/syntaxError.js:15:10)
at readString (<full-path-to-project>>node_modules/graphql/language/lexer.js:513:38)
at readToken (<full-path-to-project>>node_modules/graphql/language/lexer.js:267:14)
at Object.lookahead (<full-path-to-project>>node_modules/graphql/language/lexer.js:54:43)
at Object.advanceLexer [as advance] (<full-path-to-project>>node_modules/graphql/language/lexer.js:44:33)
at Parser.parseStringLiteral (<full-path-to-project>>node_modules/graphql/language/parser.js:519:17)
at Parser.parseDescription (<full-path-to-project>>node_modules/graphql/language/parser.js:728:19)
at Parser.parseFieldDefinition (<full-path-to-project>>node_modules/graphql/language/parser.js:856:28)
at Parser.optionalMany (<full-path-to-project>>node_modules/graphql/language/parser.js:1497:28)
at Parser.parseFieldsDefinition (<full-path-to-project>>node_modules/graphql/language/parser.js:846:17)
at Parser.parseObjectTypeDefinition (<full-path-to-project>>node_modules/graphql/language/parser.js:798:23)
at Parser.parseTypeSystemDefinition (<full-path-to-project>>node_modules/graphql/language/parser.js:696:23)
at Parser.parseDefinition (<full-path-to-project>>node_modules/graphql/language/parser.js:146:23)
at Parser.many (<full-path-to-project>>node_modules/graphql/language/parser.js:1518:26)
at Parser.parseDocument (<full-path-to-project>>node_modules/graphql/language/parser.js:111:25)
at parse (<full-path-to-project>>node_modules/graphql/language/parser.js:36:17) {
message: 'Syntax Error: Unterminated string.',
locations: [ { line: 27, column: 51 } ]
}
Is this normal - and how do I get the file causing the problem?

Related

Typing multiline expressions in nix repl

This PR seems to indicate that it was at least a feature in nix repl's predecessor, nix-repl.
When I try to replicate the example in the PR, I get errors.
nix-repl> rec {
error: syntax error, unexpected end of file, at (string):1:6
nix-repl> a = b.foo;
error: syntax error, unexpected ';', expecting end of file, at (string):1:7
nix-repl> b.foo.bar = 12;
error: syntax error, unexpected '=', expecting end of file, at (string):1:23
nix-repl> }
error: syntax error, unexpected '}', at (string):1:11
nix-repl>

terraform plan is giving the error : function call (function yamldecode)

Please find the GitLab repo for the terraform scripts which we are using.
enter link description here
Run in terraform plan gives the below error in an all-in-one.YAML file for the elastic search.
Error: Error in function call
on kubernetes.tf line 49, in locals:
49: resource_list = yamldecode(file("${path. module}/all-in-one.yaml")).items
|----------------
| path.module is "."
Call to function `"yamldecode"` failed: on line 458, column 1: unexpected extra
content after value.
enter image description here
As is describe in the fine manual:
Only one YAML document is permitted. If multiple documents are present in the given string then this function will return an error.
and one can trivially reproduce your error message:
content = yamldecode("---\nhello: world\n---\ntoo: bad\n")
on main.tf line 14, in resource "local_file" "example":
14: content = yamldecode("---\nhello: world\n---\ntoo: bad\n")
Call to function "yamldecode" failed: on line 2, column 1: unexpected extra
content after value.

compilation Error: unexpected TOKEN_Function

This is the error i get:
Error [mod0000_mergedfiles]game\gui\main_menu\ingamemenu.ws(2179): syntax error, unexpected TOKEN_FUNCTION, expecting '{' or ';', near 'function'.
To clarify the line with the syntax error is 2179.
And here is the entire script: https://pastebin.com/UsUjJ1rY.
function ShouldHideDLCIcons():bool
{
return theGame.GetInGameConfigWrapper().GetVarValue('fhudMainMenu', 'fhudHideDLC');
}

Error: invalid argument 0: json: cannot unmarshal hex string of odd length into Go struct field SendTxArgs.data of type hexutil.Bytes

i have a problem that i've been trying to solve for a whole day...
I'm using Vagrant and truffle to migrate a couple of SmartContracts. The problem
occurs right at the migration when i get an error for one of the contracts.
This is the output of the console, any help will be very much appriciated:
Deploying StringUtils...
... 0xfff3df73a1aa886c9006dab692b3dd36fa0f0b4ab1a1f8a933b679c7d17cbadc
StringUtils: 0x9d13c6d3afe1721beef56b55d303b09e021e27ab
Linking StringUtils to Appalto
Deploying Appalto...
... undefined
Error encountered, bailing. Network state unknown. Review successful transactions manually.
Error: invalid argument 0: json: cannot unmarshal hex string of odd length into Go struct field SendTxArgs.data of type hexutil.Bytes
at Object.InvalidResponse (C:\Users\valer\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\web3\lib\web3\errors.js:38:1)
at C:\Users\valer\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\web3\lib\web3\requestmanager.js:86:1
at C:\Users\valer\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\truffle-migrate\index.js:225:1
at C:\Users\valer\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\truffle-provider\wrapper.js:134:1
at XMLHttpRequest.request.onreadystatechange (C:\Users\valer\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\web3\lib\web3\httpprovider.js:128:1)
at XMLHttpRequestEventTarget.dispatchEvent (C:\Users\valer\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\xhr2\lib\xhr2.js:64:1)
at XMLHttpRequest._setReadyState (C:\Users\valer\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\xhr2\lib\xhr2.js:354:1)
at XMLHttpRequest._onHttpResponseEnd (C:\Users\valer\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\xhr2\lib\xhr2.js:509:1)
at IncomingMessage.<anonymous> (C:\Users\valer\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\xhr2\lib\xhr2.js:469:1)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)```

Facing issues in compilation of idl files using tao_idl in rhel7 machine

i am facing issues in compilation of idl file. i have tried with different options with -Cw, -GI and -o all are giving the below errors
tao_idl: "El_file.idl", line 201: error in lookup of symbols File::File1_operationFailed
tao_idl: "El_file.idl", line 204: error in lookup of symbols File::File1_operationFailed
tao_idl: "El_file.idl", line 208: error in lookup of symbols File::File1_operationFailed
tao_idl: El_file.idl: found 744 errors
Fatal Error - Aborting
Thanks for response john.
line 9 : statement cannot be parsed
line 201: error in lookup of symbol: ptype
line 9 :module Mgr{
interface intf1;
interface intf2;
interface intf3;
....
..
...
...
..
}
enum ptype{
Profile1,
Profile2,
...
...
}
line 201 :struct pstruct{
ptype P1;
}
Your IDL is not legal, you should close the module, enum, and struct with }; and not just }

Resources