Closed MitchWijt closed 1 year ago
@IvanGoncharov Could you have a look at this whenever you have the time please? It will fix a bug people are having currently rendering graphs
@IvanGoncharov , Could you please have a look and approve..
cc @MitchWijt
I am so sorry, but we are in the tight deadline to achieve the voyager feature into out backstage developer portal. could you please approve and merge this PR, so that we can TEST. Thanks
@IvanGoncharov , Could you please have a look and approve..
cc @MitchWijt
Previous the listener id index was being incremented by doing id++. However this returns the unincremented result. Meaning if id = 0. id++ will return 0. The id never got incremented, causing the function to crash.
@MitchWijt I don't get what the problem is here, can you please explain with more details?
id
is incrementing and everything is working in my case if you add console.log('id', id);
you will see that it gets a new value each time.
@MitchWijt This issue is already fixed here: https://github.com/graphql-kit/graphql-voyager/pull/324/files Can you please try this PR?
@IvanGoncharov The problem comes forth over here: https://github.com/backstage/backstage/issues/18736
The isMounted fixes the error Can't perform a React state update on an unmounted component.
On every render of the component I was getting this error.
id
was not correctly incrementing in my case, causing the listeners array to be invalid, thus rendering of the voyager graph failing. Which you can see in the backstage bug PR
@IvanGoncharov @MitchWijt
any updates ?
@IvanGoncharov does the above comment make sense to you?
@IvanGoncharov Will these changes be published to NPM any time soon?
@MitchWijt I will try to publish something today.
Did you had a chance to test the current main
? Is it working for you?
This PR fixes the SVG renderer.
Previous the listener
id
index was being incremented by doingid++
. However this returns the unincremented result. Meaning ifid = 0
.id++
will return 0. The id never got incremented, causing the function to crash.Second bug fix is cleaning up the useEffect function in the Voyager component, this was causing errors.