monaco-graphql: GraphQLAPI.setSchema results in TypeError
See original GitHub issuethis._worker
is null
when I call GraphQLAPI.setSchema
, so it throws (TypeError): this.worker is not a function
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:
- Created 3 years ago
- Reactions:2
- Comments:9 (4 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@cshaver I come across the prolem as well. Then i try to calling
setSchema()
insetTimeout
.this._worker
is notnull
now, but when I try to use the type declared in the schema, monaco shows unknow type error. Did you meet the problem too?fixed in
monaco-graphql 0.3.1-alpha.2
setSchema()
now accepts either an SDL string or GraphQLSchema primitive. enjoy!