graphiql: Logger doesn't work anymore

From the graphql-language-service-server package (at least, could be shared further).

It used to work before the TS rewrite but now logger emits nothing when connected to say VSCode extension now.

process.stderr.write seems to work though.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 16 (12 by maintainers)

Commits related to this issue

Most upvoted comments

@divyenduz and I had a session and tried to track down what changed in graphql-languagesrver and client from 3.5.1. My guess is that the language server no longer writes to stderr as it did before, and somewhere in vscode-jsonrpc this changed over major versions. we decided manually writing to stderr in the Logger._log() will fix it for now, but it would be great to know why this regression occurred

This one seems to work because in graphql-language-service-* it is a process.stderr.write

process.stderr.write(`Definition not found for GraphQL type ${name}`);

Want to pair on this real quick?

In 10-20 minutes maybe?

yes i will be getting around to this bug, was trying to identify where the regression originally happened

In my local environment, even if I use the version of 2.4.0-alpha.1 of graphql-language-service-service, logger emits a log file under the temp folder. I tested it following the pattern A except step 7. I’ll try the step 7 later.

thanks for reporting, good to know! i’ll take a look here today and be sure to have it fixed before the next alpha