Fixes an invalid refType being sent by frontend
What does this MR do and why?
Sometimes a refType
can be sent to the GraphQL API with an invalid type
which in turn causes a GraphQL error.
This changes that by making sure we only ever send to the API what the API will expect.
If the value from the URL (or whatever else) is invalud then we just send null
.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
How to set up and validate locally
- Visit a URL like
http://gdk.test:3000/gitlab-org/gitlab-test/-/tree/master?ref_type=fakereftype
- No GraphQL error should happen and the page renders correctly