You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today I used patch-package to patch @playlyfe/gql@2.6.2 for the project I'm working on.
I didn't dig deeper, but I got an error very early when using vs code extension graphql-for-vscode which uses this project.
From what I can tell if getSchemaErrors is called before _updateFiles in GQLSchemaBuilder it could lead to _errors to be undefined.
Here is the diff that solved my problem:
diff --git a/node_modules/@playlyfe/gql/lib/GQLService.js b/node_modules/@playlyfe/gql/lib/GQLService.js
index ed4507e..31ee161 100644
--- a/node_modules/@playlyfe/gql/lib/GQLService.js+++ b/node_modules/@playlyfe/gql/lib/GQLService.js@@ -117,7 +117,7 @@ var GQLService = exports.GQLService = function () {
if (!this._isInitialized) {
return [];
}
- var schemaErrors = this._schemaBuilder.getSchemaErrors();+ var schemaErrors = this._schemaBuilder.getSchemaErrors() || [];
var queryErrors = this._queryManager ? this._queryManager.getErrors() : [];
return schemaErrors.concat(queryErrors.filter(function (err) {
return Boolean(err);
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
@playlyfe/gql@2.6.2
for the project I'm working on.I didn't dig deeper, but I got an error very early when using vs code extension graphql-for-vscode which uses this project.
From what I can tell if
getSchemaErrors
is called before_updateFiles
inGQLSchemaBuilder
it could lead to_errors
to be undefined.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: