question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

monaco-graphql: GraphQLAPI.setSchema results in TypeError

See original GitHub issue

this._worker is null when I call GraphQLAPI.setSchema, so it throws (TypeError): this.worker is not a function

image

Example repo: https://github.com/cshaver/nextjs-monaco-graphql-example/commit/61df7029ac9f724c18b7b7c9d4a10d5c1e71233d Deployed to: https://nextjs-monaco-graphql-example-git-ex-setschema.crit.vercel.app/

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
fanbitiancommented, Aug 18, 2020

@cshaver I come across the prolem as well. Then i try to calling setSchema() in setTimeout. this._worker is not null now, but when I try to use the type declared in the schema, monaco shows unknow type error. Did you meet the problem too? image

1reaction
acaocommented, Aug 22, 2020

fixed in monaco-graphql 0.3.1-alpha.2

setSchema() now accepts either an SDL string or GraphQLSchema primitive. enjoy!

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found